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A,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KA3TC,CAEH,WAAI/O,GACF,OAAOryC,KAAKgsC,aAAanlC,IAAI,WAAWF,KAC1C,CAEA,WAAI0rC,CAAQA,GACVryC,KAAKgsC,aAAanlC,IAAI,WAAWC,SAASurC,EAC5C,CAEA,cAAIa,GACF,OAAOlzC,KAAKgsC,aAAanlC,IAAI,cAAcF,KAC7C,CAEA,cAAIusC,CAAWA,GACblzC,KAAKgsC,aAAanlC,IAAI,cAAcC,SAASosC,EAC/C,CAEA,gBAAIc,GACF,OAAOh0C,KAAKgsC,aAAanlC,IAAI,gBAAgBF,KAC/C,CAEA,gBAAIqtC,CAAaA,GACfh0C,KAAKgsC,aAAanlC,IAAI,gBAAgBC,SAASktC,EACjD,CAEA,SAAIE,GACF,OAAOl0C,KAAKgsC,aAAanlC,IAAI,SAASF,KACxC,CAEA,SAAIutC,CAAMA,GACRl0C,KAAKgsC,aAAanlC,IAAI,SAASC,SAASotC,EAC1C,CAEA,SAAIE,GACF,OAAOp0C,KAAKgsC,aAAanlC,IAAI,SAASF,KACxC,CAEA,SAAIytC,CAAMA,GACRp0C,KAAKgsC,aAAanlC,IAAI,SAASC,SAASstC,EAC1C,CAEA,SAAIE,GACF,OAAOt0C,KAAKgsC,aAAanlC,IAAI,SAASF,KACxC,CAEA,SAAI2tC,CAAMA,GACRt0C,KAAKgsC,aAAanlC,IAAI,SAASC,SAASwtC,EAC1C,CAEA,QAAIE,GACF,OAAOx0C,KAAKgsC,aAAanlC,IAAI,QAAQF,KACvC,CAEA,QAAI6tC,CAAKA,GACPx0C,KA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6E,QAElF,yBACF,uBACA,iCACE,6CACF,uBACA,e,sCCtCO,MAAMC,I,kCAAAA,GAA2B,E,oBAA3BA,GAA2B,gcCNxC,gBAAsC,kDAAsC,QAC5E,+BACE,gCACE,sIAEF,QACF,sBACA,8BACE,kCACE,mCACC,mBACE,mGAAsF,QAE3F,yBACA,kCACE,mCACC,mBACE,4GACO,QAEZ,yBACA,kCACE,mCACC,mBACE,wHACW,QAEhB,yBACA,kCACE,mCACC,mBACE,8EAAiE,QAEtE,yBACA,kCACE,mCACC,mBACE,0FAA6E,QAElF,yBACF,uBACA,iCACE,6CACF,uBACA,e,sCCtCO,MAAMC,I,kCAAAA,GAAsB,E,oBAAtBA,GAAsB,2bCNnC,gBAAsC,iDAAqC,QAC3E,+BACE,gCACE,4GACF,QACF,sBACA,8BACE,kCACE,mCACC,mBACE,mGAAsF,QAE3F,yBACA,kCACE,mCACC,mBACE,8EAAiE,QAEtE,yBACA,kCACE,mCACC,mBACE,yFAA4E,QAEjF,yBACA,kCACE,mCACC,mBACE,kFAAqE,QAE1E,yBACF,uBACA,iCACE,6CACF,uBACA,e,sCC7BO,MAAMC,I,kCAAAA,GAAsB,E,oBAAtBA,GAAsB,2bCNnC,gBAAsC,iDAAqC,QAC3E,+BACE,gCACE,4GACF,QACF,sBACA,8BACE,kCACE,mCACC,mBACE,mGAAsF,QAE3F,yBACA,kCACE,mCACC,mBACE,8EAAiE,QAEtE,yBACA,kCACE,mCACC,mBACE,yFAA4E,QAEjF,yBACA,kCACE,mCACC,mBACE,kFAAqE,QAE1E,yBACF,uBACA,iCACE,6CACF,uBACA,e,+FC7BO,MAAMC,I,kCAAAA,GAAsB,E,oBAAtBA,GAAsB,wXCNnC,gBAAsC,8CAAkC,QACxE,+BACE,gCACE,+IAEF,QACF,sBACA,8BACE,gCACE,6DACA,kBACE,qDACA,gBACG,gCAAmB,QAExB,2BACF,yBACA,gCAAI,2CAA8B,QAClC,gCAAI,iDAAoC,QACxC,gCAAI,0CAA6B,QAC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AMmf,UAAU,GACpD,CAAErhB,KAAM,iBAAkBkC,MAAO,KAAMmf,UAAU,GACjD,CAAErhB,KAAM,QAASkC,MAAO,KAAMmf,UAAU,GACxC,CAAErhB,KAAM,SAAUkC,MAAO,KAAMmf,UAAU,GACzC,CAAErhB,KAAM,WAAYkC,MAAO,KAAMmf,UAAU,IAGrC,KAAAs7B,yBAAqC,CAC3C,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KA1Y6C,CAqBzC,QAAA9xC,G,0CACAtP,KAAKqnN,WACPrnN,KAAKuP,UAAUuL,WAAW,OAAD,wBACpB9a,KAAKqnN,WAAS,CACjBrzK,aACEh0C,KAAKshD,mBAAmBthD,KAAKqnN,UAAUh1K,aACpCryC,KAAKqnN,UAAUnzK,SACdl0C,KAAKqnN,UAAUjzK,SACfp0C,KAAKqnN,UAAU/yK,SACft0C,KAAKqnN,UAAU7yK,QACfx0C,KAAKqnN,UAAUt3M,UAIzB/P,KAAKuP,UAAUlO,aAAaC,MAAK,EAAAwQ,EAAA,GAAU9R,KAAK0hB,WAAWngB,WAAW8kD,IACpErmD,KAAKouD,eAAiB,CACpB/b,QAASgU,EAAOhU,QAChBa,WAAYmT,EAAOnT,WACnBgB,MAAOmS,EAAOnS,MACdE,MAAOiS,EAAOjS,MACdE,MAAO+R,EAAO/R,MACdE,KAAM6R,EAAO7R,KACbzkC,MAAOs2C,EAAOt2C,MACf,GAEL,G,CAEA,WAAAsD,GACErT,KAAK0hB,SAASpO,OAC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DAZ,SAAYruK,GACV,YACA,oBACA,oBAEA,WAED,CAPD,CAAYA,IAAAA,EAAU,KCAtB,SAAYquK,GACV,yBACA,iBACA,yCACA,2CACA,uCACA,qCACA,uCACA,mCACA,mCACA,qCACA,wCACA,oCACA,kCACA,8BACA,wCACA,sCACA,kBACA,sCACA,wCACA,4CACA,0CACA,kBACA,wBACA,gCACA,4BACA,2BACD,CA3BD,CAAYA,IAAAA,EAAU,KA6B4B,IAAIztN,IAAI,CACxDytN,EAAWjnG,QACXinG,EAAWhnG,IACXgnG,EAAWC,gBAGsC,IAAI1tN,IAAI,CACzDytN,EAAW79H,eACX69H,EAAW59H,aACX49H,EAAW39H,aACX29H,EAAW/mG,IACX+mG,EAAW19H,WACX09H,EAAWz9H,SACXy9H,EAAWx9H,WCzCb,IAAY09H,ECAAC,GDAZ,SAAYD,GACV,mBACA,8CACD,CAHD,CAAYA,IAAAA,EAAe,KCA3B,SAAYC,GACV,uCACA,sDACA,4CACA,8CACA,gDACA,8CACA,oDACA,8DACA,8DACA,0EACA,sEAEA,0CACA,0CACA,0CACA,8DACA,8DACA,wCACA,gEACA,oDACA,oFACA,0FACA,oFACA,oEACA,0EACA,oEACA,4DACA,kDACA,4CACA,wFACA,oFAEA,kDACA,kDACA,kDAEA,wCACA,wCACA,wCAEA,8DACA,kEACA,8DACA,8DACA,0EACA,sEACA,wFACA,4FACA,oFACA,wEACA,0EACA,8DACA,gEACA,sFACA,sFAEA,sDACA,8DACA,8EACA,kEACA,4DACA,8DACA,8EACA,gFACA,4EACA,8FAEA,0CAEA,sDACA,0DACA,sDACA,sDAEA,sEACA,kEACA,sEACA,kFAEA,6DACA,kEACA,oEACA,0EAEA,6CACD,CAtFD,CAAYA,IAAAA,EAAS,K,ICDTC,ECAAC,ECAAC,E,YFAZ,SAAYF,GACV,4BACA,WACD,CAHD,CAAYA,IAAAA,EAAe,KCA3B,SAAYC,GACV,iBACA,sBACD,CAHD,CAAYA,IAAAA,EAAsB,KCAlC,SAAY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,YACY,MAA1CkrD,EAAIvuH,UAAU2xH,UAAUtuD,MAAM,QAElC,CAEQ,mBAAO25J,CAAaR,GAG1B,MAAMwB,EAAcxB,EAAU5rM,QAAQ,QAAU,EAChD,IAAKotM,GAAexB,EAAU5rM,QAAQ,MAAQ,EAC5C4rM,EAAY,UAAYA,OACnB,IAAKwB,EACV,OAAO,KAGT,IACE,OAAe,MAAXnD,EACK,IAAIA,EAAQ9nN,IAAIypN,GAGlB,IAAIzpN,IAAIypN,E,CACf,MAAOtmP,G,CAIT,OAAO,IACT,EA5kBO,EAAA0zF,QAAS,EACT,EAAA13B,QAAS,EACT,EAAAC,WAAY,EACZ,EAAAi9E,iBAAkB,EAClB,EAAA8rG,sBAAuB,EACvB,EAAAxtL,OAAwB,KAExB,EAAAuwL,wBACL,02BACc,EAAAxB,WAAuB,CAAC,aACxB,EAAAnvE,8BAAgC,EAChC,EAAA5+J,sBAAwB,GACxB,EAAAwvO,qBAAuB,IAAIj3O,IAAyB,CAClE,CAAC,aAAc,IAAImf,IAAI,CAAC,yBAyNnB,EAAAm2N,UAAY,4EAyWrBzB,EAAMtsK,M,qECvmBC,MAAM2vK,EAAkB,CAC7B,SACA,UACA,YACA,QACA,UACA,UACA,SACA,OACA,WACA,WACA,WACA,UACA,UACA,SACA,WACA,UACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,SACA,SACA,UACA,YACA,YACA,UACA,WACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,WACA,UACA,OACA,UACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,WACA,WACA,UACA,OACA,UACA,YACA,WACA,WACA,UACA,YACA,OACA,SACA,WACA,YACA,YACA,YACA,YACA,SACA,QACA,YACA,WACA,SACA,UACA,SACA,SACA,WACA,QACA,SACA,YACA,YACA,YACA,YACA,YACA,OACA,UACA,SACA,SACA,QACA,YACA,SACA,QACA,UACA,QACA,WACA,UACA,YACA,QACA,YACA,YACA,SACA,WACA,YACA,UACA,QACA,OACA,OACA,OACA,MACA,OACA,YACA,QACA,YACA,QACA,UACA,UACA,YACA,QACA,QACA,YACA,WACA,SACA,QACA,QACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,QACA,QACA,YACA,QACA,WACA,UACA,WACA,WACA,OACA,WACA,SACA,SACA,WACA,QACA,YACA,QACA,WACA,YACA,YACA,WACA,YACA,YACA,SACA,YACA,YACA,SACA,UACA,UACA,WACA,OACA,QACA,QACA,QACA,UACA,WACA,UACA,WACA,QACA,SACA,WACA,QACA,YACA,UACA,QACA,QACA,SACA,WACA,SACA,YACA,SACA,UACA,WACA,YACA,UACA,YACA,UACA,SACA,UACA,UACA,UACA,SACA,SACA,WACA,OACA,YACA,UACA,QACA,SACA,SACA,SACA,UACA,UACA,YACA,YACA,UACA,SACA,UACA,YACA,YACA,WACA,QACA,YACA,QACA,QACA,WACA,YACA,WACA,WACA,UACA,WACA,UACA,YACA,UACA,YACA,WACA,WACA,WACA,SACA,UACA,YACA,WACA,SACA,WACA,WACA,YACA,WACA,YACA,WACA,YACA,YACA,YACA,YACA,SACA,UACA,QACA,QACA,UACA,SACA,UACA,SACA,WACA,WACA,UACA,SACA,WACA,QACA,SACA,UACA,YACA,SACA,UACA,YACA,YACA,WACA,WACA,YACA,UACA,WACA,QACA,YACA,YACA,UACA,QACA,YACA,YACA,YACA,YACA,WACA,WACA,UACA,UACA,QACA,QACA,WACA,QACA,OACA,WACA,YACA,YACA,WACA,OACA,QACA,WACA,WACA,QACA,QACA,YACA,UACA,WACA,QACA,SACA,UACA,SACA,UACA,UACA,UACA,SACA,UACA,OACA,QACA,QACA,SACA,UACA,UACA,QACA,SACA,UACA,SACA,YACA,WACA,QACA,MACA,SACA,YACA,SACA,YACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,YACA,SACA,WACA,SACA,UACA,WACA,UACA,UACA,YACA,YACA,YACA,SACA,WACA,QACA,OACA,WACA,OACA,SACA,YACA,UACA,SACA,SACA,UACA,YACA,WACA,YACA,YACA,SACA,QACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,WACA,UACA,UACA,WACA,QACA,WACA,YACA,SACA,YACA,SACA,SACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,SACA,WACA,SACA,UACA,WACA,QACA,WACA,UACA,OACA,QACA,QACA,SACA,QACA,QACA,SACA,UACA,SACA,QACA,OACA,OACA,SACA,WACA,SACA,SACA,WACA,YACA,YACA,WACA,SACA,SACA,YACA,WACA,WACA,UACA,YACA,WACA,WACA,YACA,UACA,UACA,WACA,YACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,YACA,SACA,WACA,WACA,YACA,WACA,QACA,WACA,YACA,SACA,QACA,UACA,QACA,UACA,SACA,WACA,QACA,SACA,UACA,SACA,SACA,YACA,UACA,QACA,UACA,WACA,QACA,SACA,WACA,SACA,UACA,YACA,UACA,QACA,WACA,SACA,SACA,SACA,WACA,QACA,WACA,WACA,SACA,SACA,UACA,WACA,WACA,SACA,YACA,UACA,SACA,WACA,SACA,UACA,SACA,UACA,QACA,WACA,UACA,WACA,SACA,UACA,SACA,OACA,YACA,UACA,YACA,SACA,WACA,YACA,UACA,WACA,YACA,WACA,OACA,YACA,SACA,QACA,QACA,QACA,SACA,SACA,QACA,OACA,QACA,OACA,YACA,WACA,YACA,UACA,UACA,SACA,SACA,UACA,UACA,UACA,QACA,OACA,QACA,UACA,YACA,YACA,QACA,YACA,YACA,QACA,WACA,YACA,SACA,UACA,SACA,QACA,QACA,UACA,QACA,QACA,WACA,QACA,QACA,UACA,UACA,WACA,SACA,OACA,WACA,QACA,WACA,UACA,WACA,OACA,OACA,WACA,WACA,UACA,OACA,SACA,UACA,QACA,SACA,YACA,QACA,QACA,UACA,SACA,QACA,QACA,WACA,UACA,WACA,WACA,OACA,SACA,UACA,SACA,SACA,UACA,UACA,YACA,OACA,SACA,SACA,QACA,OACA,MACA,UACA,OACA,UACA,SACA,UACA,WACA,QACA,WACA,WACA,WACA,QACA,UACA,SACA,SACA,QACA,OACA,YACA,YACA,OACA,YACA,SACA,QACA,SACA,UACA,WACA,UACA,QACA,QACA,QACA,SACA,UACA,WACA,YACA,OACA,YACA,WACA,SACA,QACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,YACA,YACA,SACA,SACA,QACA,SACA,UACA,OACA,SACA,SACA,WACA,YACA,UACA,WACA,SACA,SACA,WACA,UACA,UACA,QACA,QACA,QACA,QACA,UACA,UACA,SACA,YACA,OACA,QACA,QACA,UACA,UACA,YACA,UACA,UACA,YACA,YACA,UACA,UACA,YACA,YACA,YACA,UACA,WACA,SACA,SACA,YACA,SACA,SACA,WACA,QACA,QACA,UACA,WACA,YACA,SACA,WACA,WACA,SACA,WACA,QACA,QACA,WACA,QACA,YACA,SACA,WACA,SACA,YACA,SACA,SACA,SACA,WACA,WACA,YACA,YACA,WACA,WACA,UACA,QACA,SACA,UACA,SACA,SACA,UACA,UACA,QACA,OACA,QACA,YACA,SACA,OACA,UACA,YACA,YACA,WACA,WACA,UACA,UACA,UACA,WACA,WACA,WACA,QACA,QACA,SACA,SACA,SACA,UACA,YACA,WACA,QACA,OACA,SACA,OACA,SACA,UACA,OACA,WACA,OACA,SACA,UACA,SACA,YACA,QACA,UACA,QACA,SACA,QACA,SACA,SACA,QACA,QACA,WACA,UACA,OACA,UACA,OACA,WACA,WACA,UACA,YACA,WACA,UACA,YACA,OACA,UACA,UACA,UACA,YACA,QACA,SACA,WACA,SACA,WACA,UACA,WACA,SACA,QACA,SACA,SACA,UACA,SACA,QACA,OACA,SACA,WACA,WACA,SACA,UACA,SACA,SACA,SACA,QACA,YACA,SACA,UACA,SACA,UACA,UACA,WACA,OACA,YACA,UACA,UACA,SACA,YACA,UACA,UACA,UACA,YACA,UACA,YACA,UACA,UACA,QACA,UACA,SACA,YACA,SACA,UACA,WACA,WACA,YACA,YACA,YACA,WACA,SACA,YACA,QACA,SACA,UACA,UACA,WACA,UACA,YACA,WACA,YACA,QACA,YACA,YACA,UACA,UACA,UACA,SACA,YACA,QACA,SACA,WACA,SACA,UACA,YACA,YACA,QACA,UACA,UACA,UACA,OACA,OACA,SACA,SACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,WACA,SACA,UACA,WACA,WACA,UACA,YACA,WACA,UACA,SACA,SACA,SACA,UACA,YACA,SACA,QACA,UACA,YACA,SACA,SACA,YACA,QACA,UACA,YACA,UACA,WACA,WACA,UACA,SACA,SACA,QACA,SACA,YACA,WACA,WACA,SACA,SACA,SACA,WACA,WACA,YACA,YACA,YACA,UACA,WACA,WACA,QACA,WACA,QACA,QACA,UACA,YACA,UACA,YACA,WACA,SACA,SACA,UACA,QACA,QACA,YACA,WACA,UACA,QACA,UACA,YACA,YACA,WACA,UACA,WACA,UACA,UACA,QACA,UACA,UACA,WACA,QACA,UACA,SACA,WACA,WACA,WACA,UACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,SACA,OACA,YACA,UACA,QACA,YACA,SACA,QACA,QACA,UACA,QACA,WACA,SACA,UACA,QACA,QACA,YACA,YACA,YACA,WACA,YACA,YACA,QACA,QACA,QACA,OACA,WACA,SACA,WACA,WACA,QACA,WACA,WACA,SACA,YACA,UACA,QACA,UACA,WACA,SACA,OACA,SACA,UACA,WACA,SACA,SACA,QACA,OACA,SACA,QACA,QACA,QACA,QACA,QACA,WACA,QACA,SACA,WACA,SACA,WACA,WACA,YACA,SACA,UACA,UACA,WACA,UACA,SACA,SACA,OACA,QACA,QACA,OACA,QACA,WACA,SACA,SACA,QACA,YACA,QACA,WACA,UACA,UACA,WACA,UACA,WACA,UACA,QACA,QACA,QACA,UACA,SACA,WACA,OACA,OACA,QACA,QACA,QACA,UACA,QACA,SACA,YACA,WACA,QACA,SACA,UACA,SACA,UACA,WACA,QACA,SACA,WACA,OACA,SACA,QACA,UACA,QACA,QACA,UACA,WACA,UACA,UACA,WACA,QACA,SACA,UACA,WACA,YACA,QACA,WACA,SACA,SACA,YACA,SACA,UACA,QACA,YACA,UACA,UACA,WACA,YACA,YACA,OACA,WACA,SACA,UACA,SACA,QACA,UACA,MACA,WACA,SACA,UACA,SACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,OACA,OACA,OACA,OACA,WACA,WACA,UACA,WACA,SACA,YACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,SACA,WACA,OACA,OACA,OACA,UACA,QACA,QACA,SACA,QACA,WACA,UACA,UACA,WACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,SACA,UACA,SACA,YACA,WACA,WACA,YACA,UACA,YACA,WACA,WACA,YACA,WACA,YACA,UACA,UACA,UACA,WACA,UACA,YACA,UACA,QACA,YACA,UACA,WACA,WACA,SACA,WACA,YACA,YACA,UACA,YACA,YACA,UACA,OACA,UACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,YACA,UACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,WACA,WACA,UACA,YACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,UACA,YACA,YACA,WACA,UACA,UACA,UACA,UACA,WACA,UACA,YACA,UACA,UACA,YACA,OACA,SACA,SACA,UACA,SACA,UACA,SACA,OACA,QACA,OACA,WACA,YACA,UACA,SACA,SACA,SACA,YACA,YACA,WACA,WACA,YACA,QACA,WACA,UACA,WACA,YACA,SACA,UACA,WACA,UACA,YACA,YACA,UACA,SACA,SACA,WACA,YACA,SACA,SACA,YACA,OACA,UACA,SACA,QACA,QACA,QACA,YACA,YACA,WACA,YACA,UACA,SACA,UACA,WACA,QACA,UACA,WACA,UACA,SACA,WACA,OACA,WACA,YACA,WACA,WACA,SACA,WACA,UACA,WACA,YACA,YACA,SACA,QACA,YACA,QACA,UACA,UACA,QACA,QACA,QACA,UACA,WACA,WACA,WACA,WACA,SACA,SACA,UACA,YACA,QACA,UACA,UACA,YACA,SACA,WACA,YACA,SACA,WACA,WACA,WACA,WACA,WACA,SACA,QACA,QACA,SACA,QACA,QACA,WACA,UACA,WACA,YACA,UACA,WACA,UACA,WACA,OACA,UACA,QACA,QACA,QACA,UACA,SACA,WACA,UACA,UACA,UACA,WACA,UACA,YACA,SACA,WACA,UACA,QACA,QACA,QACA,QACA,OACA,QACA,SACA,UACA,UACA,QACA,QACA,UACA,UACA,YACA,UACA,YACA,UACA,QACA,YACA,SACA,UACA,WACA,WACA,YACA,UACA,WACA,YACA,UACA,UACA,WACA,QACA,OACA,SACA,UACA,UACA,YACA,OACA,UACA,UACA,WACA,SACA,SACA,WACA,WACA,YACA,WACA,UACA,YACA,WACA,UACA,YACA,UACA,QACA,SACA,UACA,UACA,UACA,SACA,OACA,SACA,SACA,SACA,SACA,YACA,UACA,QACA,QACA,QACA,UACA,SACA,UACA,SACA,SACA,YACA,QACA,QACA,QACA,OACA,SACA,UACA,YACA,UACA,YACA,WACA,YACA,UACA,MACA,QACA,SACA,UACA,UACA,WACA,SACA,YACA,YACA,MACA,MACA,WACA,SACA,QACA,WACA,SACA,QACA,QACA,WACA,QACA,UACA,YACA,SACA,WACA,QACA,SACA,SACA,WACA,YACA,QACA,WACA,WACA,YACA,UACA,WACA,WACA,UACA,OACA,OACA,YACA,OACA,YACA,OACA,WACA,SACA,WACA,WACA,UACA,OACA,SACA,WACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,WACA,SACA,YACA,WACA,SACA,UACA,YACA,QACA,OACA,YACA,SACA,WACA,QACA,UACA,WACA,SACA,QACA,SACA,SACA,QACA,QACA,YACA,QACA,WACA,SACA,WACA,YACA,WACA,UACA,SACA,YACA,YACA,UACA,YACA,UACA,YACA,WACA,OACA,WACA,UACA,SACA,YACA,YACA,YACA,QACA,WACA,SACA,WACA,YACA,SACA,SACA,OACA,OACA,SACA,SACA,WACA,SACA,WACA,SACA,UACA,SACA,YACA,YACA,YACA,WACA,UACA,YACA,WACA,WACA,WACA,UACA,SACA,WACA,SACA,WACA,UACA,YACA,WACA,YACA,YACA,QACA,WACA,UACA,UACA,SACA,SACA,OACA,WACA,YACA,WACA,SACA,YACA,QACA,WACA,QACA,WACA,YACA,SACA,WACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,UACA,QACA,SACA,WACA,SACA,YACA,YACA,WACA,SACA,YACA,WACA,SACA,WACA,YACA,YACA,WACA,SACA,QACA,SACA,QACA,UACA,SACA,UACA,UACA,OACA,YACA,YACA,WACA,YACA,SACA,UACA,YACA,WACA,SACA,SACA,SACA,WACA,YACA,YACA,UACA,UACA,QACA,WACA,SACA,SACA,WACA,QACA,UACA,YACA,UACA,YACA,YACA,WACA,WACA,YACA,YACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,YACA,WACA,WACA,SACA,YACA,YACA,WACA,YACA,YACA,SACA,WACA,YACA,WACA,UACA,QACA,UACA,WACA,UACA,UACA,YACA,WACA,SACA,UACA,YACA,UACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,YACA,UACA,OACA,WACA,SACA,YACA,QACA,OACA,SACA,UACA,YACA,WACA,YACA,WACA,WACA,YACA,YACA,MACA,WACA,YACA,WACA,OACA,SACA,OACA,WACA,QACA,SACA,SACA,UACA,SACA,QACA,UACA,SACA,YACA,QACA,QACA,SACA,SACA,UACA,UACA,UACA,SACA,SACA,UACA,WACA,YACA,YACA,WACA,YACA,WACA,YACA,WACA,WACA,WACA,SACA,WACA,WACA,UACA,YACA,WACA,UACA,UACA,YACA,WACA,WACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,WACA,OACA,YACA,UACA,OACA,UACA,YACA,YACA,WACA,WACA,YACA,SACA,UACA,WACA,UACA,WACA,SACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,YACA,WACA,UACA,WACA,UACA,YACA,UACA,WACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,QACA,QACA,QACA,YACA,UACA,WACA,WACA,WACA,WACA,SACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,QACA,SACA,SACA,OACA,WACA,WACA,QACA,QACA,QACA,QACA,OACA,SACA,YACA,SACA,QACA,UACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,QACA,QACA,SACA,WACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,UACA,QACA,OACA,YACA,SACA,SACA,OACA,SACA,WACA,SACA,OACA,OACA,QACA,OACA,OACA,WACA,YACA,YACA,WACA,YACA,WACA,UACA,UACA,YACA,WACA,YACA,QACA,UACA,UACA,OACA,UACA,WACA,YACA,YACA,WACA,YACA,YACA,YACA,SACA,SACA,WACA,SACA,SACA,QACA,OACA,UACA,QACA,QACA,QACA,UACA,WACA,YACA,WACA,WACA,SACA,WACA,SACA,SACA,WACA,UACA,UACA,UACA,QACA,QACA,QACA,YACA,UACA,WACA,UACA,UACA,UACA,QACA,QACA,WACA,SACA,OACA,MACA,SACA,YACA,UACA,WACA,UACA,WACA,WACA,QACA,OACA,OACA,SACA,SACA,MACA,OACA,SACA,WACA,OACA,UACA,WACA,WACA,MACA,OACA,SACA,YACA,YACA,UACA,UACA,WACA,SACA,SACA,OACA,OACA,UACA,OACA,QACA,QACA,QACA,UACA,UACA,WACA,UACA,YACA,UACA,WACA,UACA,WACA,WACA,OACA,QACA,UACA,UACA,UACA,SACA,UACA,QACA,UACA,UACA,WACA,WACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,SACA,UACA,QACA,UACA,SACA,WACA,SACA,YACA,YACA,SACA,WACA,UACA,QACA,SACA,SACA,OACA,OACA,QACA,QACA,QACA,YACA,OACA,SACA,UACA,YACA,UACA,WACA,YACA,UACA,YACA,YACA,OACA,WACA,SACA,OACA,UACA,SACA,WACA,YACA,WACA,MACA,YACA,UACA,YACA,SACA,YACA,SACA,SACA,WACA,WACA,YACA,UACA,YACA,SACA,QACA,YACA,UACA,SACA,QACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,UACA,YACA,YACA,WACA,SACA,MACA,WACA,WACA,YACA,QACA,UACA,SACA,MACA,UACA,WACA,MACA,YACA,QACA,YACA,WACA,YACA,QACA,UACA,QACA,QACA,UACA,SACA,UACA,YACA,YACA,QACA,WACA,UACA,SACA,SACA,WACA,SACA,YACA,QACA,UACA,YACA,WACA,OACA,QACA,WACA,UACA,WACA,UACA,UACA,WACA,WACA,YACA,WACA,YACA,WACA,WACA,WACA,WACA,UACA,UACA,YACA,QACA,MACA,SACA,YACA,SACA,YACA,YACA,WACA,UACA,YACA,SACA,SACA,YACA,YACA,WACA,UACA,UACA,WACA,WACA,YACA,QACA,SACA,UACA,UACA,YACA,YACA,UACA,YACA,WACA,YACA,YACA,WACA,YACA,WACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,WACA,WACA,YACA,UACA,SACA,UACA,YACA,YACA,YACA,UACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,SACA,SACA,SACA,UACA,UACA,SACA,SACA,YACA,WACA,YACA,WACA,SACA,UACA,SACA,SACA,YACA,SACA,SACA,WACA,UACA,WACA,UACA,YACA,WACA,WACA,WACA,UACA,WACA,QACA,OACA,SACA,OACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,WACA,UACA,QACA,SACA,WACA,UACA,UACA,YACA,SACA,YACA,YACA,WACA,SACA,SACA,UACA,YACA,SACA,SACA,UACA,QACA,QACA,WACA,YACA,YACA,WACA,WACA,WACA,SACA,YACA,YACA,WACA,UACA,QACA,UACA,YACA,YACA,SACA,WACA,WACA,YACA,YACA,WACA,UACA,UACA,WACA,UACA,QACA,YACA,SACA,YACA,WACA,UACA,QACA,WACA,YACA,YACA,UACA,UACA,OACA,YACA,YACA,YACA,WACA,WACA,QACA,WACA,UACA,OACA,QACA,YACA,SACA,QACA,UACA,UACA,WACA,YACA,YACA,YACA,SACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,YACA,YACA,YACA,YACA,QACA,OACA,YACA,SACA,UACA,SACA,QACA,WACA,OACA,SACA,YACA,WACA,WACA,SACA,UACA,YACA,YACA,YACA,YACA,YACA,QACA,SACA,WACA,YACA,SACA,SACA,WACA,UACA,YACA,WACA,UACA,UACA,UACA,YACA,WACA,WACA,YACA,SACA,WACA,UACA,YACA,YACA,WACA,YACA,SACA,YACA,WACA,WACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,WACA,YACA,UACA,SACA,WACA,SACA,YACA,UACA,UACA,SACA,YACA,UACA,UACA,OACA,SACA,UACA,SACA,OACA,QACA,UACA,OACA,WACA,SACA,SACA,WACA,UACA,UACA,YACA,QACA,UACA,OACA,UACA,YACA,YACA,UACA,UACA,WACA,SACA,UACA,WACA,SACA,YACA,YACA,UACA,WACA,WACA,MACA,QACA,UACA,SACA,SACA,OACA,OACA,SACA,SACA,WACA,WACA,WACA,WACA,WACA,QACA,QACA,UACA,SACA,UACA,WACA,YACA,WACA,SACA,SACA,QACA,SACA,SACA,WACA,UACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,WACA,WACA,YACA,UACA,UACA,QACA,WACA,QACA,UACA,SACA,WACA,SACA,SACA,SACA,UACA,OACA,SACA,QACA,WACA,SACA,WACA,WACA,UACA,UACA,YACA,QACA,WACA,QACA,UACA,WACA,WACA,YACA,SACA,UACA,UACA,WACA,MACA,OACA,UACA,UACA,WACA,WACA,YACA,YACA,QACA,UACA,QACA,QACA,YACA,UACA,WACA,WACA,OACA,UACA,YACA,YACA,YACA,WACA,WACA,SACA,QACA,UACA,WACA,SACA,WACA,UACA,YACA,YACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,OACA,UACA,SACA,QACA,QACA,SACA,SACA,QACA,QACA,OACA,QACA,QACA,QACA,WACA,OACA,SACA,UACA,QACA,WACA,UACA,UACA,QACA,SACA,UACA,WACA,OACA,MACA,MACA,OACA,QACA,OACA,WACA,SACA,WACA,SACA,WACA,SACA,OACA,OACA,OACA,UACA,WACA,WACA,YACA,SACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,YACA,WACA,UACA,WACA,WACA,WACA,SACA,SACA,UACA,WACA,WACA,MACA,QACA,WACA,WACA,UACA,YACA,WACA,YACA,WACA,QACA,QACA,UACA,UACA,YACA,SACA,UACA,QACA,WACA,WACA,WACA,UACA,UACA,UACA,WACA,WACA,UACA,WACA,SACA,YACA,WACA,YACA,WACA,UACA,WACA,YACA,WACA,UACA,SACA,WACA,SACA,YACA,WACA,QACA,UACA,UACA,WACA,SACA,SACA,QACA,SACA,WACA,YACA,YACA,WACA,QACA,SACA,UACA,QACA,UACA,YACA,SACA,OACA,QACA,YACA,UACA,WACA,WACA,YACA,SACA,QACA,QACA,SACA,WACA,YACA,WACA,QACA,YACA,SACA,MACA,QACA,MACA,YACA,UACA,QACA,OACA,YACA,WACA,UACA,SACA,SACA,UACA,YACA,SACA,YACA,WACA,OACA,SACA,QACA,SACA,SACA,WACA,UACA,MACA,SACA,UACA,SACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,MACA,WACA,YACA,SACA,UACA,WACA,QACA,OACA,OACA,SACA,OACA,QACA,OACA,SACA,MACA,SACA,UACA,WACA,WACA,QACA,UACA,YACA,SACA,QACA,YACA,WACA,YACA,UACA,YACA,WACA,WACA,SACA,YACA,YACA,YACA,WACA,YACA,UACA,YACA,UACA,UACA,UACA,QACA,QACA,YACA,SACA,UACA,YACA,QACA,OACA,WACA,YACA,WACA,SACA,WACA,SACA,SACA,SACA,QACA,UACA,SACA,WACA,QACA,QACA,SACA,QACA,UACA,UACA,UACA,QACA,YACA,SACA,YACA,UACA,SACA,WACA,YACA,QACA,UACA,QACA,WACA,UACA,WACA,UACA,SACA,UACA,UACA,UACA,UACA,SACA,UACA,SACA,UACA,WACA,WACA,SACA,YACA,YACA,UACA,WACA,QACA,QACA,QACA,UACA,WACA,UACA,OACA,SACA,YACA,UACA,SACA,OACA,OACA,WACA,OACA,UACA,QACA,WACA,WACA,YACA,OACA,UACA,QACA,UACA,OACA,OACA,OACA,QACA,WACA,YACA,QACA,SACA,OACA,SACA,OACA,SACA,WACA,OACA,UACA,SACA,SACA,SACA,OACA,OACA,OACA,WACA,YACA,WACA,YACA,SACA,SACA,WACA,UACA,YACA,WACA,WACA,UACA,WACA,QACA,WACA,WACA,UACA,UACA,UACA,WACA,UACA,SACA,UACA,QACA,WACA,QACA,QACA,UACA,YACA,QACA,QACA,YACA,UACA,UACA,YACA,WACA,SACA,YACA,SACA,YACA,YACA,UACA,QACA,OACA,UACA,WACA,WACA,YACA,SACA,QACA,UACA,WACA,OACA,YACA,OACA,QACA,YACA,WACA,WACA,QACA,UACA,YACA,QACA,YACA,QACA,SACA,WACA,OACA,UACA,OACA,WACA,SACA,QACA,QACA,SACA,WACA,SACA,QACA,SACA,UACA,QACA,QACA,SACA,UACA,QACA,OACA,SACA,WACA,WACA,UACA,UACA,YACA,UACA,WACA,SACA,QACA,YACA,WACA,WACA,QACA,UACA,YACA,QACA,OACA,WACA,QACA,OACA,UACA,UACA,YACA,UACA,QACA,SACA,WACA,OACA,OACA,QACA,QACA,UACA,OACA,SACA,MACA,UACA,WACA,YACA,WACA,UACA,WACA,SACA,SACA,UACA,UACA,MACA,UACA,QACA,OACA,UACA,OACA,SACA,SACA,YACA,SACA,UACA,SACA,UACA,YACA,UACA,WACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,SACA,UACA,WACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,SACA,YACA,SACA,QACA,YACA,YACA,UACA,WACA,UACA,YACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,WACA,YACA,UACA,WACA,YACA,SACA,WACA,WACA,WACA,YACA,WACA,QACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,UACA,QACA,UACA,OACA,SACA,QACA,UACA,YACA,QACA,SACA,YACA,WACA,UACA,WACA,YACA,OACA,UACA,SACA,QACA,QACA,SACA,WACA,SACA,WACA,SACA,OACA,WACA,WACA,YACA,YACA,YACA,SACA,SACA,YACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,UACA,WACA,YACA,YACA,UACA,WACA,OACA,OACA,QACA,UACA,YACA,UACA,QACA,UACA,YACA,QACA,SACA,SACA,SACA,UACA,UACA,WACA,WACA,UACA,YACA,QACA,WACA,QACA,SACA,SACA,YACA,QACA,WACA,SACA,UACA,UACA,UACA,UACA,QACA,YACA,WACA,WACA,UACA,WACA,SACA,SACA,WACA,OACA,MACA,OACA,OACA,OACA,QACA,SACA,WACA,SACA,QACA,YACA,WACA,UACA,SACA,YACA,WACA,YACA,WACA,WACA,SACA,SACA,YACA,YACA,SACA,WACA,SACA,OACA,SACA,UACA,WACA,WACA,SACA,SACA,SACA,UACA,SACA,YACA,UACA,QACA,OACA,UACA,OACA,SACA,YACA,MACA,SACA,UACA,WACA,YACA,WACA,YACA,YACA,YACA,SACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,MACA,UACA,QACA,OACA,OACA,MACA,WACA,WACA,WACA,UACA,YACA,YACA,WACA,WACA,WACA,SACA,QACA,OACA,QACA,WACA,SACA,SACA,YACA,WACA,WACA,QACA,YACA,WACA,UACA,WACA,UACA,YACA,WACA,UACA,YACA,WACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,SACA,SACA,YACA,UACA,WACA,YACA,YACA,WACA,SACA,UACA,YACA,YACA,WACA,UACA,YACA,YACA,QACA,WACA,YACA,WACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,UACA,WACA,YACA,WACA,UACA,YACA,YACA,YACA,UACA,YACA,SACA,WACA,SACA,SACA,MACA,OACA,SACA,OACA,QACA,MACA,OACA,YACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,WACA,YACA,YACA,UACA,QACA,UACA,YACA,UACA,OACA,YACA,SACA,QACA,MACA,MACA,SACA,SACA,YACA,UACA,WACA,YACA,SACA,YACA,WACA,MACA,UACA,UACA,SACA,UACA,UACA,WACA,QACA,OACA,QACA,UACA,UACA,OACA,UACA,YACA,OACA,OACA,YACA,UACA,QACA,SACA,SACA,MACA,QACA,SACA,QACA,SACA,WACA,OACA,UACA,UACA,MACA,SACA,YACA,SACA,UACA,OACA,UACA,WACA,WACA,YACA,QACA,OACA,MACA,SACA,WACA,YACA,SACA,UACA,WACA,YACA,WACA,QACA,YACA,WACA,YACA,OACA,SACA,WACA,UACA,QACA,YACA,QACA,UACA,UACA,OACA,SACA,QACA,OACA,WACA,WACA,OACA,SACA,UACA,SACA,UACA,WACA,SACA,QACA,OACA,UACA,YACA,UACA,SACA,WACA,WACA,QACA,WACA,UACA,SACA,QACA,QACA,SACA,WACA,OACA,MACA,OACA,SACA,OACA,WACA,WACA,SACA,OACA,OACA,WACA,WACA,YACA,WACA,OACA,SACA,SACA,WACA,SACA,WACA,UACA,UACA,UACA,OACA,UACA,UACA,YACA,WACA,SACA,UACA,UACA,OACA,SACA,QACA,OACA,UACA,WACA,OACA,QACA,WACA,QACA,QACA,QACA,SACA,UACA,QACA,OACA,UACA,UACA,WACA,YACA,WACA,SACA,SACA,QACA,UACA,WACA,SACA,UACA,SACA,OACA,OACA,QACA,SACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,WACA,YACA,WACA,YACA,QACA,UACA,SACA,QACA,SACA,UACA,SACA,OACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,SACA,WACA,UACA,SACA,WACA,SACA,UACA,UACA,SACA,WACA,SACA,WACA,SACA,WACA,OACA,WACA,OACA,SACA,QACA,SACA,SACA,WACA,UACA,UACA,YACA,OACA,UACA,SACA,YACA,UACA,QACA,OACA,SACA,OACA,OACA,UACA,SACA,UACA,YACA,WACA,SACA,UACA,QACA,WACA,SACA,WACA,YACA,YACA,SACA,UACA,YACA,UACA,UACA,WACA,MACA,OACA,SACA,UACA,UACA,WACA,SACA,WACA,WACA,SACA,QACA,QACA,OACA,OACA,UACA,YACA,QACA,QACA,UACA,WACA,OACA,QACA,WACA,WACA,SACA,SACA,WACA,UACA,OACA,OACA,MACA,UACA,UACA,SACA,OACA,OACA,WACA,YACA,SACA,SACA,SACA,UACA,QACA,SACA,QACA,YACA,UACA,SACA,SACA,YACA,YACA,QACA,UACA,YACA,WACA,YACA,YACA,SACA,WACA,UACA,SACA,YACA,WACA,YACA,UACA,UACA,SACA,QACA,WACA,WACA,YACA,YACA,OACA,QACA,OACA,YACA,OACA,SACA,WACA,SACA,YACA,UACA,YACA,WACA,QACA,YACA,SACA,QACA,YACA,WACA,WACA,SACA,WACA,WACA,QACA,OACA,UACA,YACA,WACA,UACA,SACA,UACA,WACA,QACA,YACA,WACA,YACA,YACA,YACA,UACA,YACA,WACA,WACA,SACA,WACA,UACA,YACA,WACA,WACA,QACA,YACA,SACA,YACA,OACA,OACA,SACA,UACA,YACA,UACA,WACA,UACA,WACA,UACA,YACA,WACA,SACA,SACA,QACA,QACA,YACA,UACA,UACA,UACA,YACA,WACA,YACA,SACA,UACA,UACA,YACA,QACA,UACA,SACA,UACA,QACA,WACA,SACA,SACA,SACA,OACA,MACA,WACA,YACA,UACA,UACA,WACA,QACA,QACA,YACA,YACA,SACA,WACA,SACA,SACA,UACA,WACA,SACA,YACA,SACA,UACA,SACA,QACA,YACA,SACA,YACA,YACA,UACA,SACA,YACA,SACA,UACA,WACA,SACA,UACA,UACA,UACA,YACA,WACA,UACA,WACA,YACA,WACA,WACA,YACA,OACA,SACA,YACA,YACA,SACA,SACA,SACA,SACA,WACA,WACA,WACA,QACA,WACA,WACA,UACA,QACA,SACA,YACA,SACA,UACA,SACA,WACA,WACA,UACA,QACA,SACA,SACA,WACA,SACA,UACA,YACA,SACA,UACA,YACA,WACA,QACA,WACA,OACA,YACA,WACA,WACA,UACA,MACA,YACA,SACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,YACA,UACA,WACA,UACA,YACA,QACA,SACA,WACA,SACA,YACA,WACA,UACA,WACA,YACA,YACA,YACA,WACA,MACA,SACA,WACA,UACA,YACA,WACA,WACA,WACA,QACA,YACA,WACA,YACA,YACA,UACA,WACA,SACA,QACA,OACA,WACA,YACA,SACA,WACA,YACA,SACA,YACA,QACA,QACA,YACA,WACA,UACA,WACA,UACA,WACA,QACA,YACA,YACA,QACA,QACA,UACA,OACA,QACA,SACA,QACA,SACA,OACA,OACA,MACA,MACA,WACA,QACA,OACA,SACA,UACA,WACA,WACA,YACA,YACA,SACA,WACA,QACA,YACA,UACA,QACA,QACA,WACA,UACA,YACA,SACA,QACA,YACA,QACA,YACA,WACA,SACA,UACA,YACA,WACA,QACA,QACA,SACA,YACA,QACA,UACA,UACA,SACA,YACA,QACA,UACA,SACA,WACA,OACA,YACA,YACA,SACA,OACA,SACA,SACA,SACA,UACA,YACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,QACA,YACA,OACA,SACA,SACA,UACA,QACA,SACA,UACA,YACA,WACA,SACA,WACA,UACA,SACA,WACA,WACA,WACA,YACA,OACA,SACA,UACA,SACA,WACA,SACA,WACA,SACA,YACA,SACA,SACA,WACA,WACA,YACA,WACA,YACA,YACA,UACA,UACA,OACA,SACA,OACA,UACA,QACA,OACA,MACA,YACA,SACA,WACA,WACA,SACA,UACA,QACA,OACA,SACA,WACA,WACA,QACA,QACA,SACA,SACA,WACA,YACA,QACA,WACA,QACA,UACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,WACA,UACA,WACA,YACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,UACA,SACA,WACA,WACA,YACA,QACA,SACA,QACA,MACA,MACA,QACA,MACA,YACA,WACA,WACA,SACA,WACA,UACA,WACA,YACA,SACA,YACA,OACA,UACA,YACA,YACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,SACA,YACA,SACA,UACA,YACA,YACA,WACA,WACA,SACA,QACA,SACA,UACA,SACA,UACA,UACA,OACA,MACA,OACA,WACA,OACA,MACA,QACA,WACA,QACA,OACA,UACA,WACA,OACA,WACA,UACA,WACA,UACA,QACA,SACA,WACA,OACA,WACA,QACA,UACA,YACA,UACA,OACA,SACA,OACA,OACA,OACA,OACA,UACA,OACA,OACA,WACA,UACA,YACA,YACA,YACA,WACA,QACA,UACA,WACA,SACA,WACA,WACA,YACA,YACA,MACA,YACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,UACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,WACA,QACA,WACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,SACA,UACA,UACA,WACA,WACA,UACA,YACA,YACA,UACA,UACA,SACA,UACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,OACA,UACA,UACA,WACA,UACA,WACA,WACA,YACA,YACA,WACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,UACA,YACA,YACA,YACA,UACA,WACA,WACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,WACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,UACA,YACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,UACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,UACA,WACA,WACA,WACA,UACA,YACA,WACA,YACA,MACA,SACA,UACA,YACA,UACA,YACA,SACA,WACA,SACA,QACA,QACA,YACA,UACA,WACA,WACA,WACA,SACA,SACA,UACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,SACA,YACA,OACA,WACA,YACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,WACA,QACA,WACA,OACA,YACA,QACA,UACA,WACA,YACA,UACA,YACA,SACA,QACA,YACA,YACA,SACA,QACA,UACA,UACA,WACA,YACA,SACA,UACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,WACA,WACA,YACA,SACA,UACA,YACA,SACA,SACA,QACA,UACA,UACA,SACA,WACA,SACA,SACA,UACA,UACA,UACA,SACA,UACA,YACA,SACA,UACA,YACA,QACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,UACA,UACA,YACA,WACA,WACA,WACA,QACA,SACA,SACA,UACA,SACA,WACA,UACA,QACA,YACA,SACA,WACA,YACA,OACA,WACA,UACA,QACA,YACA,UACA,SACA,YACA,YACA,SACA,WACA,QACA,YACA,WACA,SACA,SACA,UACA,UACA,WACA,SACA,QACA,QACA,SACA,UACA,WACA,UACA,SACA,SACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,UACA,SACA,OACA,SACA,WACA,UACA,SACA,UACA,UACA,YACA,WACA,UACA,YACA,QACA,SACA,UACA,WACA,YACA,MACA,WACA,UACA,QACA,YACA,YACA,YACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,QACA,OACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,QACA,OACA,YACA,YACA,SACA,YACA,QACA,SACA,WACA,QACA,YACA,SACA,YACA,YACA,QACA,UACA,UACA,SACA,UACA,YACA,SACA,UACA,YACA,QACA,YACA,QACA,SACA,WACA,UACA,UACA,WACA,QACA,UACA,QACA,SACA,UACA,UACA,SACA,WACA,UACA,WACA,WACA,UACA,WACA,YACA,YACA,WACA,WACA,SACA,UACA,YACA,YACA,UACA,WACA,YACA,WACA,UACA,UACA,WACA,UACA,YACA,WACA,QACA,WACA,QACA,SACA,YACA,SACA,WACA,YACA,UACA,OACA,OACA,OACA,OACA,OACA,QACA,OACA,UACA,WACA,SACA,OACA,YACA,UACA,QACA,MACA,OACA,OACA,OACA,UACA,UACA,WACA,YACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,SACA,QACA,SACA,WACA,QACA,OACA,YACA,UACA,YACA,UACA,SACA,OACA,OACA,UACA,OACA,SACA,SACA,QACA,WACA,WACA,UACA,WACA,YACA,OACA,SACA,WACA,WACA,SACA,YACA,WACA,UACA,SACA,WACA,QACA,OACA,SACA,WACA,WACA,SACA,UACA,SACA,UACA,WACA,SACA,SACA,UACA,YACA,UACA,UACA,QACA,SACA,WACA,QACA,UACA,OACA,WACA,YACA,UACA,QACA,SACA,MACA,WACA,SACA,WACA,UACA,WACA,YACA,SACA,UACA,WACA,YACA,UACA,WACA,WACA,UACA,YACA,UACA,SACA,WACA,YACA,UACA,UACA,SACA,YACA,YACA,UACA,YACA,WACA,YACA,YACA,SACA,UACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,SACA,UACA,SACA,YACA,YACA,YACA,SACA,UACA,YACA,UACA,QACA,UACA,YACA,UACA,YACA,YACA,WACA,UACA,SACA,UACA,UACA,YACA,UACA,UACA,WACA,SACA,YACA,WACA,QACA,SACA,YACA,UACA,UACA,SACA,QACA,WACA,QACA,QACA,QACA,SACA,SACA,WACA,UACA,UACA,YACA,QACA,YACA,WACA,WACA,YACA,QACA,UACA,YACA,UACA,YACA,UACA,WACA,YACA,WACA,WACA,UACA,UACA,UACA,UACA,YACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,UACA,WACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,QACA,QACA,YACA,SACA,WACA,YACA,SACA,YACA,WACA,WACA,YACA,WACA,UACA,QACA,UACA,YACA,WACA,SACA,YACA,YACA,WACA,WACA,QACA,WACA,SACA,SACA,WACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,UACA,UACA,WACA,YACA,QACA,SACA,QACA,YACA,QACA,UACA,MACA,UACA,SACA,YACA,SACA,SACA,MACA,OACA,YACA,OACA,UACA,QACA,YACA,OACA,SACA,SACA,QACA,WACA,YACA,YACA,UACA,WACA,OACA,QACA,SACA,QACA,WACA,YACA,WACA,SACA,WACA,YACA,QACA,UACA,WACA,SACA,SACA,UACA,SACA,SACA,WACA,YACA,OACA,QACA,YACA,WACA,UACA,WACA,WACA,YACA,SACA,YACA,UACA,WACA,UACA,SACA,QACA,UACA,OACA,SACA,WACA,UACA,YACA,SACA,QACA,WACA,QACA,WACA,QACA,UACA,YACA,YACA,UACA,UACA,QACA,UACA,UACA,SACA,YACA,YACA,WACA,UACA,SACA,QACA,UACA,UACA,YACA,YACA,YACA,QACA,QACA,QACA,UACA,YACA,QACA,OACA,SACA,YACA,WACA,YACA,QACA,QACA,OACA,SACA,SACA,OACA,SACA,QACA,SACA,WACA,YACA,WACA,YACA,WACA,QACA,SACA,SACA,OACA,OACA,SACA,SACA,UACA,SACA,UACA,UACA,WACA,UACA,SACA,OACA,SACA,QACA,SACA,WACA,OACA,SACA,QACA,YACA,SACA,SACA,SACA,UACA,SACA,UACA,UACA,UACA,QACA,OACA,SACA,SACA,OACA,UACA,SACA,QACA,SACA,SACA,UACA,YACA,WACA,QACA,YACA,WACA,WACA,UACA,WACA,OACA,YACA,WACA,UACA,YACA,YACA,YACA,WACA,SACA,WACA,WACA,WACA,UACA,YACA,SACA,QACA,UACA,SACA,SACA,UACA,SACA,UACA,UACA,WACA,WACA,SACA,SACA,YACA,SACA,SACA,SACA,SACA,YACA,YACA,UACA,SACA,WACA,UACA,WACA,YACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,YACA,SACA,SACA,UACA,SACA,WACA,WACA,SACA,YACA,YACA,UACA,WACA,WACA,YACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,YACA,UACA,WACA,WACA,WACA,YACA,YACA,SACA,SACA,UACA,SACA,WACA,WACA,WACA,WACA,YACA,UACA,UACA,WACA,UACA,UACA,YACA,SACA,YACA,YACA,UACA,SACA,WACA,YACA,SACA,SACA,UACA,UACA,SACA,SACA,SACA,WACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,YACA,QACA,SACA,SACA,YACA,YACA,UACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,YACA,UACA,WACA,WACA,QACA,QACA,UACA,UACA,YACA,WACA,WACA,WACA,UACA,QACA,UACA,YACA,UACA,SACA,SACA,SACA,WACA,SACA,YACA,OACA,SACA,SACA,UACA,UACA,WACA,SACA,WACA,WACA,YACA,YACA,QACA,UACA,YACA,SACA,UACA,SACA,YACA,UACA,UACA,UACA,WACA,SACA,WACA,YACA,YACA,WACA,YACA,YACA,UACA,UACA,WACA,WACA,YACA,WACA,SACA,SACA,SACA,WACA,UACA,SACA,UACA,YACA,YACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,WACA,SACA,WACA,UACA,SACA,UACA,QACA,WACA,SACA,YACA,SACA,YACA,YACA,UACA,UACA,WACA,YACA,YACA,YACA,OACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,YACA,UACA,QACA,SACA,WACA,UACA,SACA,WACA,WACA,WACA,WACA,SACA,SACA,QACA,UACA,UACA,YACA,YACA,YACA,WACA,WACA,UACA,WACA,YACA,YACA,YACA,SACA,WACA,WACA,WACA,WACA,SACA,WACA,UACA,WACA,SACA,SACA,WACA,YACA,YACA,SACA,WACA,YACA,SACA,YACA,YACA,UACA,UACA,UACA,UACA,WACA,SACA,SACA,WACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YACA,YACA,QACA,SACA,UACA,SACA,UACA,UACA,WACA,QACA,SACA,UACA,UACA,UACA,SACA,UACA,YACA,WACA,WACA,UACA,YACA,YACA,SACA,YACA,SACA,WACA,UACA,YACA,UACA,UACA,WACA,YACA,SACA,SACA,WACA,YACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,QACA,SACA,UACA,OACA,SACA,SACA,WACA,UACA,UACA,WACA,SACA,OACA,SACA,UACA,OACA,UACA,QACA,QACA,UACA,SACA,OACA,OACA,QACA,UACA,OACA,UACA,WACA,WACA,UACA,SACA,WACA,UACA,OACA,SACA,OACA,UACA,UACA,QACA,QACA,YACA,WACA,YACA,YACA,UACA,WACA,SACA,UACA,QACA,UACA,OACA,QACA,WACA,SACA,WACA,SACA,SACA,WACA,YACA,UACA,WACA,YACA,WACA,QACA,QACA,QACA,OACA,OACA,SACA,SACA,OACA,SACA,UACA,UACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,UACA,QACA,SACA,QACA,SACA,SACA,UACA,SACA,UACA,OACA,SACA,SACA,MACA,SACA,OACA,SACA,WACA,UACA,QACA,YACA,UACA,SACA,UACA,QACA,OACA,SACA,UACA,QACA,OACA,OACA,OACA,MACA,UACA,WACA,YACA,SACA,YACA,SACA,YACA,UACA,WACA,QACA,UACA,SACA,YACA,YACA,SACA,WACA,UACA,OACA,OACA,UACA,QACA,OACA,QACA,OACA,QACA,SACA,WACA,SACA,SACA,QACA,SACA,QACA,OACA,WACA,SACA,UACA,YACA,YACA,OACA,SACA,WACA,WACA,WACA,YACA,SACA,UACA,WACA,UACA,YACA,UACA,SACA,WACA,UACA,UACA,YACA,UACA,YACA,YACA,WACA,QACA,WACA,YACA,OACA,QACA,UACA,YACA,QACA,UACA,YACA,UACA,OACA,YACA,QACA,UACA,WACA,QACA,YACA,YACA,UACA,WACA,WACA,YACA,QACA,QACA,SACA,UACA,QACA,UACA,SACA,QACA,YACA,MACA,UACA,SACA,UACA,WACA,QACA,UACA,WACA,UACA,WACA,OACA,UACA,UACA,WACA,QACA,YACA,SACA,WACA,YACA,SACA,QACA,UACA,YACA,WACA,QACA,YACA,SACA,WACA,YACA,SACA,WACA,YACA,WACA,UACA,UACA,YACA,QACA,QACA,WACA,QACA,QACA,UACA,QACA,SACA,YACA,YACA,SACA,YACA,SACA,UACA,QACA,WACA,SACA,YACA,UACA,WACA,WACA,SACA,WACA,WACA,WACA,YACA,YACA,QACA,UACA,UACA,SACA,WACA,SACA,WACA,YACA,SACA,SACA,UACA,YACA,WACA,WACA,UACA,UACA,WACA,QACA,QACA,WACA,YACA,SACA,UACA,WACA,YACA,YACA,SACA,UACA,SACA,YACA,SACA,UACA,WACA,WACA,QACA,SACA,WACA,WACA,WACA,SACA,WACA,UACA,UACA,UACA,SACA,WACA,YACA,YACA,WACA,OACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,SACA,UACA,OACA,SACA,WACA,YACA,YACA,YACA,YACA,WACA,QACA,YACA,SACA,SACA,SACA,WACA,YACA,SACA,SACA,YACA,UACA,WACA,QACA,UACA,UACA,SACA,WACA,UACA,UACA,SACA,WACA,QACA,YACA,YACA,UACA,UACA,WACA,SACA,QACA,SACA,UACA,YACA,UACA,SACA,QACA,QACA,WACA,UACA,YACA,UACA,QACA,QACA,UACA,UACA,QACA,UACA,WACA,QACA,SACA,QACA,UACA,QACA,YACA,UACA,UACA,UACA,YACA,QACA,SACA,OACA,QACA,QACA,QACA,QACA,UACA,SACA,WACA,SACA,SACA,UACA,WACA,YACA,SACA,UACA,SACA,UACA,QACA,UACA,YACA,UACA,QACA,OACA,QACA,YACA,QACA,QACA,WACA,UACA,WACA,WACA,QACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,YACA,SACA,QACA,QACA,UACA,WACA,WACA,SACA,WACA,UACA,UACA,QACA,UACA,YACA,YACA,WACA,QACA,SACA,WACA,WACA,YACA,WACA,SACA,SACA,SACA,SACA,SACA,UACA,WACA,YACA,SACA,QACA,SACA,WACA,UACA,UACA,YACA,OACA,QACA,OACA,MACA,UACA,WACA,UACA,SACA,SACA,SACA,OACA,UACA,WACA,WACA,SACA,SACA,UACA,OACA,YACA,QACA,OACA,OACA,SACA,YACA,SACA,YACA,SACA,WACA,SACA,UACA,YACA,SACA,UACA,SACA,WACA,WACA,UACA,SACA,UACA,MACA,QACA,SACA,SACA,SACA,UACA,WACA,YACA,UACA,UACA,QACA,UACA,WACA,YACA,UACA,UACA,OACA,SACA,SACA,WACA,SACA,UACA,YACA,WACA,WACA,UACA,SACA,SACA,SACA,OACA,QACA,QACA,QACA,SACA,UACA,UACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,SACA,YACA,UACA,WACA,WACA,QACA,UACA,WACA,WACA,UACA,QACA,YACA,UACA,OACA,UACA,UACA,WACA,YACA,SACA,QACA,OACA,UACA,QACA,WACA,YACA,UACA,WACA,QACA,UACA,OACA,OACA,QACA,QACA,QACA,SACA,QACA,YACA,SACA,SACA,UACA,QACA,SACA,YACA,UACA,WACA,YACA,WACA,WACA,QACA,WACA,YACA,SACA,OACA,OACA,SACA,WACA,SACA,SACA,UACA,WACA,SACA,OACA,YACA,UACA,SACA,OACA,OACA,QACA,QACA,MACA,QACA,UACA,YACA,UACA,WACA,UACA,QACA,WACA,QACA,YACA,QACA,QACA,QACA,UACA,QACA,OACA,SACA,YACA,YACA,UACA,QACA,UACA,SACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,QACA,UACA,UACA,OACA,QACA,QACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,UACA,WACA,SACA,UACA,SACA,QACA,UACA,UACA,QACA,QACA,WACA,YACA,YACA,UACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,WACA,WACA,YACA,WACA,QACA,OACA,QACA,UACA,SACA,WACA,QACA,YACA,YACA,WACA,YACA,UACA,WACA,UACA,WACA,SACA,YACA,YACA,WACA,YACA,SACA,QACA,YACA,UACA,WACA,YACA,UACA,WACA,QACA,OACA,SACA,YACA,SACA,SACA,QACA,SACA,QACA,QACA,UACA,SACA,UACA,UACA,WACA,UACA,WACA,QACA,SACA,WACA,YACA,UACA,YACA,WACA,YACA,UACA,WACA,SACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,UACA,UACA,WACA,SACA,SACA,YACA,SACA,SACA,UACA,QACA,WACA,SACA,QACA,QACA,QACA,WACA,SACA,SACA,WACA,YACA,UACA,UACA,WACA,SACA,UACA,SACA,QACA,SACA,SACA,SACA,QACA,QACA,QACA,SACA,YACA,YACA,SACA,SACA,SACA,SACA,SACA,OACA,OACA,OACA,UACA,WACA,WACA,QACA,SACA,WACA,SACA,WACA,WACA,YACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,QACA,WACA,WACA,SACA,SACA,SACA,YACA,UACA,YACA,YACA,SACA,QACA,UACA,QACA,QACA,UACA,WACA,WACA,YACA,UACA,WACA,YACA,YACA,YACA,WACA,WACA,UACA,UACA,QACA,QACA,QACA,SACA,WACA,YACA,SACA,UACA,WACA,WACA,YACA,UACA,QACA,WACA,UACA,YACA,UACA,WACA,SACA,WACA,UACA,WACA,UACA,YACA,UACA,UACA,WACA,QACA,QACA,SACA,YACA,SACA,UACA,SACA,UACA,YACA,UACA,QACA,YACA,WACA,WACA,YACA,QACA,QACA,QACA,YACA,WACA,YACA,YACA,UACA,OACA,SACA,UACA,OACA,SACA,UACA,YACA,YACA,WACA,YACA,UACA,OACA,QACA,UACA,UACA,YACA,SACA,WACA,YACA,QACA,YACA,YACA,UACA,WACA,UACA,WACA,WACA,WACA,SACA,WACA,SACA,UACA,YACA,OACA,SACA,QACA,QACA,QACA,QACA,QACA,YACA,YACA,YACA,UACA,QACA,QACA,SACA,QACA,QACA,YACA,YACA,WACA,UACA,UACA,WACA,YACA,WACA,UACA,YACA,YACA,QACA,QACA,QACA,WACA,UACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,YACA,QACA,SACA,UACA,SACA,WACA,SACA,SACA,SACA,SACA,WACA,SACA,WACA,SACA,SACA,WACA,YACA,WACA,YACA,SACA,YACA,UACA,WACA,QACA,SACA,QACA,UACA,UACA,UACA,WACA,SACA,QACA,UACA,UACA,SACA,QACA,UACA,WACA,SACA,UACA,YACA,QACA,QACA,UACA,UACA,WACA,QACA,SACA,WACA,SACA,UACA,YACA,UACA,WACA,SACA,QACA,YACA,YACA,YACA,UACA,WACA,WACA,WACA,YACA,UACA,WACA,SACA,WACA,UACA,YACA,WACA,YACA,YACA,WACA,SACA,UACA,WACA,YACA,YACA,YACA,UACA,YACA,YACA,UACA,UACA,WACA,YACA,YACA,UACA,WACA,SACA,WACA,WACA,UACA,SACA,SACA,YACA,UACA,YACA,OACA,UACA,SACA,SACA,OACA,WACA,YACA,UACA,SACA,YACA,WACA,QACA,UACA,QACA,WACA,WACA,WACA,SACA,UACA,UACA,UACA,SACA,OACA,SACA,WACA,YACA,SACA,YACA,YACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,SACA,WACA,SACA,UACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,YACA,SACA,UACA,WACA,UACA,UACA,UACA,UACA,WACA,UACA,YACA,YACA,WACA,SACA,WACA,UACA,YACA,WACA,QACA,UACA,UACA,WACA,YACA,YACA,OACA,YACA,UACA,YACA,OACA,WACA,QACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,UACA,UACA,YACA,YACA,UACA,WACA,WACA,WACA,UACA,WACA,QACA,QACA,SACA,SACA,UACA,UACA,QACA,SACA,QACA,QACA,QACA,WACA,WACA,YACA,WACA,UACA,UACA,WACA,UACA,WACA,WACA,YACA,YACA,QACA,SACA,UACA,UACA,QACA,WACA,SACA,SACA,YACA,UACA,YACA,UACA,SACA,WACA,QACA,OACA,UACA,WACA,UACA,UACA,WACA,UACA,YACA,MACA,UACA,OACA,SACA,SACA,WACA,OACA,QACA,SACA,WACA,QACA,SACA,OACA,SACA,UACA,UACA,UACA,WACA,UACA,WACA,WACA,UACA,UACA,OACA,YACA,SACA,SACA,UACA,QACA,SACA,SACA,WACA,OACA,SACA,QACA,YACA,UACA,QACA,WACA,SACA,WACA,SACA,QACA,SACA,QACA,OACA,OACA,UACA,YACA,OACA,QACA,QACA,WACA,WACA,UACA,UACA,YACA,QACA,SACA,WACA,UACA,UACA,YACA,WACA,WACA,QACA,UACA,QACA,QACA,SACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,SACA,QACA,QACA,QACA,WACA,SACA,SACA,WACA,YACA,SACA,SACA,SACA,WACA,SACA,YACA,SACA,WACA,YACA,YACA,UACA,WACA,OACA,QACA,WACA,WACA,OACA,YACA,UACA,QACA,QACA,QACA,SACA,WACA,UACA,OACA,QACA,UACA,UACA,YACA,YACA,WACA,UACA,OACA,SACA,OACA,OACA,QACA,SACA,UACA,YACA,UACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,OACA,UACA,OACA,SACA,SACA,SACA,UACA,YACA,SACA,SACA,SACA,QACA,UACA,QACA,WACA,UACA,QACA,UACA,YACA,UACA,UACA,WACA,YACA,QACA,UACA,SACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,QACA,QACA,SACA,WACA,WACA,OACA,YACA,WACA,YACA,UACA,QACA,SACA,OACA,UACA,UACA,YACA,SACA,SACA,QACA,WACA,SACA,QACA,WACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,WACA,WACA,UACA,YACA,SACA,WACA,WACA,UACA,QACA,SACA,YACA,WACA,UACA,YACA,UACA,WACA,WACA,UACA,OACA,SACA,WACA,UACA,UACA,UACA,WACA,WACA,SACA,WACA,UACA,UACA,YACA,SACA,WACA,QACA,SACA,QACA,QACA,UACA,QACA,SACA,YACA,UACA,WACA,WACA,YACA,QACA,MACA,QACA,WACA,UACA,UACA,UACA,MACA,UACA,QACA,SACA,WACA,QACA,SACA,UACA,WACA,WACA,YACA,OACA,SACA,UACA,SACA,SACA,OACA,QACA,OACA,MACA,QACA,QACA,QACA,WACA,SACA,YACA,SACA,QACA,QACA,UACA,YACA,OACA,WACA,QACA,QACA,QACA,YACA,UACA,UACA,WACA,SACA,SACA,UACA,SACA,QACA,OACA,QACA,WACA,YACA,QACA,YACA,WACA,SACA,YACA,SACA,YACA,YACA,WACA,UACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,UACA,YACA,WACA,SACA,SACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,UACA,WACA,WACA,YACA,UACA,YACA,YACA,UACA,UACA,SACA,YACA,YACA,UACA,QACA,SACA,UACA,SACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,SACA,YACA,YACA,WACA,UACA,UACA,UACA,UACA,YACA,UACA,YACA,WACA,QACA,YACA,UACA,YACA,SACA,YACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,YACA,YACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,UACA,SACA,YACA,UACA,YACA,WACA,UACA,WACA,UACA,SACA,WACA,SACA,YACA,UACA,WACA,YACA,WACA,YACA,WACA,UACA,YACA,SACA,YACA,YACA,YACA,SACA,WACA,UACA,YACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,SACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,SACA,UACA,WACA,YACA,YACA,WACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,YACA,WACA,UACA,YACA,SACA,SACA,UACA,WACA,UACA,UACA,YACA,YACA,QACA,YACA,YACA,YACA,YACA,YACA,QACA,WACA,YACA,SACA,WACA,OACA,YACA,WACA,WACA,UACA,SACA,YACA,YACA,UACA,UACA,UACA,WACA,WACA,YACA,UACA,SACA,YACA,YACA,YACA,YACA,UACA,WACA,WACA,QACA,YACA,WACA,WACA,WACA,YACA,YACA,UACA,WACA,WACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,UACA,WACA,UACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,UACA,YACA,YACA,WACA,YACA,SACA,WACA,SACA,YACA,WACA,UACA,WACA,WACA,YACA,WACA,YACA,YACA,YACA,YACA,WACA,SACA,YACA,WACA,UACA,WACA,UACA,YACA,YACA,SACA,SACA,YACA,YACA,YACA,WACA,SACA,YACA,YACA,WACA,SACA,YACA,YACA,UACA,SACA,YACA,SACA,WACA,WACA,SACA,SACA,WACA,UACA,WACA,YACA,YACA,UACA,WACA,WACA,YACA,WACA,WACA,SACA,WACA,YACA,SACA,YACA,YACA,WACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,SACA,WACA,WACA,SACA,WACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,YACA,UACA,YACA,YACA,WACA,WACA,WACA,SACA,UACA,WACA,YACA,UACA,UACA,YACA,WACA,UACA,WACA,WACA,SACA,QACA,QACA,UACA,WACA,WACA,YACA,SACA,YACA,YACA,YACA,YACA,UACA,YACA,SACA,UACA,WACA,UACA,UACA,WACA,SACA,UACA,WACA,WACA,YACA,WACA,YACA,WACA,WACA,YACA,UACA,WACA,YACA,SACA,WACA,YACA,UACA,QACA,YACA,SACA,WACA,YACA,SACA,UACA,YACA,YACA,YACA,SACA,YACA,WACA,UACA,UACA,YACA,YACA,QACA,SACA,UACA,WACA,YACA,SACA,UACA,UACA,WACA,SACA,SACA,SACA,WACA,YACA,SACA,OACA,QACA,UACA,WACA,UACA,SACA,SACA,UACA,SACA,UACA,WACA,UACA,UACA,WACA,WACA,UACA,SACA,UACA,SACA,WACA,SACA,SACA,UACA,QACA,SACA,WACA,UACA,SACA,SACA,YACA,UACA,SACA,QACA,UACA,OACA,YACA,OACA,QACA,QACA,UACA,UACA,UACA,SACA,SACA,QACA,UACA,SACA,SACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,QACA,SACA,SACA,YACA,QACA,UACA,SACA,SACA,WACA,UACA,YACA,WACA,WACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,SACA,WACA,OACA,QACA,SACA,YACA,SACA,WACA,SACA,WACA,UACA,SACA,YACA,WACA,WACA,YACA,UACA,QACA,QACA,YACA,WACA,UACA,UACA,SACA,QACA,UACA,SACA,YACA,WACA,UACA,OACA,SACA,OACA,UACA,OACA,WACA,YACA,SACA,QACA,OACA,WACA,UACA,QACA,WACA,SACA,UACA,WACA,YACA,WACA,UACA,UACA,YACA,WACA,UACA,UACA,YACA,WACA,SACA,SACA,QACA,QACA,UACA,WACA,QACA,OACA,YACA,UACA,WACA,UACA,UACA,SACA,WACA,UACA,QACA,QACA,WACA,WACA,UACA,WACA,YACA,UACA,YACA,QACA,WACA,WACA,UACA,WACA,QACA,UACA,OACA,WACA,SACA,UACA,UACA,QACA,SACA,UACA,QACA,QACA,SACA,YACA,MACA,QACA,SACA,QACA,QACA,QACA,SACA,QACA,OACA,SACA,OACA,UACA,SACA,SACA,QACA,OACA,UACA,SACA,UACA,SACA,WACA,YACA,YACA,WACA,YACA,UACA,SACA,SACA,YACA,UACA,UACA,WACA,YACA,UACA,OACA,UACA,QACA,QACA,WACA,SACA,OACA,WACA,SACA,OACA,QACA,QACA,WACA,QACA,YACA,SACA,QACA,WACA,UACA,QACA,WACA,UACA,WACA,SACA,MACA,OACA,SACA,QACA,SACA,QACA,QACA,YACA,UACA,OACA,OACA,YACA,WACA,UACA,SACA,WACA,WACA,WACA,WACA,SACA,WACA,SACA,YACA,UACA,SACA,YACA,OACA,OACA,QACA,UACA,OACA,OACA,UACA,SACA,WACA,SACA,OACA,QACA,WACA,SACA,OACA,SACA,OACA,OACA,WACA,QACA,UACA,SACA,SACA,WACA,SACA,MACA,OACA,YACA,YACA,YACA,YACA,YACA,UACA,OACA,OACA,SACA,OACA,QACA,OACA,OACA,UACA,UACA,YACA,QACA,YACA,YACA,QACA,QACA,QACA,MACA,UACA,QACA,SACA,WACA,UACA,WACA,SACA,UACA,UACA,UACA,UACA,QACA,UACA,UACA,YACA,UACA,WACA,UACA,YACA,UACA,OACA,QACA,QACA,MACA,UACA,UACA,OACA,OACA,OACA,WACA,WACA,SACA,WACA,QACA,UACA,OACA,MACA,YACA,UACA,QACA,MACA,SACA,QACA,QACA,OACA,SACA,SACA,OACA,QACA,MACA,UACA,QACA,MACA,WACA,OACA,YACA,QACA,YACA,UACA,UACA,QACA,OACA,MACA,SACA,SACA,OACA,SACA,YACA,YACA,UACA,O,wHC1lPK,MAAMC,EAIX,MAAA1kK,GACE,MAA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,QACtD,2BACA,wCACE,gDACE,6CACE,U,iBACF,QACA,2CACA,4CAOF,6BACA,gDACE,6CACE,U,iBACF,QACA,4CACA,6CAOF,6BACA,gDACE,6CACE,U,kBACF,QACA,8CACF,8BACF,4BACF,0BACA,2CACE,oDACE,wCAAuB,W,kBAA0B,QACnD,4BACA,0CACE,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACF,4BACF,0BACA,2CACE,oDACE,wCAAuB,W,kBAAsB,QAC/C,4BACA,0CACE,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACF,4BACF,0BACF,wBACA,iB,MAzJM,kCAGuB,8CAKnB,iEAIoB,iDASpB,qEAMA,oEAMA,oEAMA,mEAQmB,+CAKnB,+DAaA,2EAaA,2EAQmB,6CAKnB,kEAMA,kEAQmB,yCAKnB,qEAMA,qEAMA,qEAMA,qEAMA,0EAMA,0EAMA,oE,gBCvHN,KAAY,KACZ,IACA,IAAW,IACX,KAAmB,8BACnB,KACA7C,GACAD,GACA,IAAe,oBACf,IAAgB,IAChB,KAAY,UACZ,KAAgB,wB,+WCdV,yB,sBAEE,oBAAc,wC,0BAGhB,yB,yBAEE,oBAAgB,e,4BAVtB,4BACE,2CAAW,S,gBAAoB,QAC/B,+CACE,wDAKA,wDAKF,+BACF,8B,qBAba,mCAGN,gDAKe,gD,2BASlB,yB,yBAEE,oBAAmB,e,4BAcvB,uBACE,S,gBACF,S,sBADE,yH,4BATN,SACE,iDACE,2CAAW,S,gBAA0B,QACrC,qDAKA,qDAGF,6BACF,4B,qBAVe,yCAIT,gDAES,qD,EC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AAYsC,EAAYtC,IAGhD,GAAGuC,EAAS,IAAI57S,EAAS47S,EAAQxC,EAClC,CAEA,IADGsC,GAA4BA,EAA2BngT,GACrDwI,EAAI21S,EAASl+S,OAAQuI,IACzBs2S,EAAUX,EAAS31S,GAChBq1S,EAAoB/6P,EAAEg9P,EAAiBhB,IAAYgB,EAAgBhB,IACrEgB,EAAgBhB,GAAS,KAE1BgB,EAAgBhB,GAAW,EAE5B,OAAOjB,EAAoBK,EAAEz5S,EAC9B,EAEI67S,EAAqBjkN,KAAuC,iCAAIA,KAAuC,kCAAK,GAChHikN,EAAmB73S,QAAQy3S,EAAqB98R,KAAK,KAAM,IAC3Dk9R,EAAmBr3S,KAAOi3S,EAAqB98R,KAAK,KAAMk9R,EAAmBr3S,KAAKma,KAAKk9R,G,ICpFvF,IAAIC,EAAsB1C,EAAoBK,OAAEj0S,EAAW,CAAC,MAAM,WAAa,OAAO4zS,EAAoB,MAAQ,IAClH0C,EAAsB1C,EAAoBK,EAAEqC,E","sources":["webpack://@bitwarden/web-vault/webpack/runtime/chunk loaded","webpack://@bitwarden/web-vault/webpack/runtime/create fake namespace object","webpack://@bitwarden/web-vault/webpack/runtime/load script","webpack://@bitwarden/web-vault/./src/app/admin-console/common/base-members.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/common/base.events.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/common/people-table-data-source.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/core/policy-list.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/core-organization.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/responses/group.response.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/group.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/requests/group.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/requests/organization-group-bulk.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/group.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-update.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-invite.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/organization-user-admin-view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/user-admin.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/collection-access-selection.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/organization-user.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-create.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-information.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-information.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/guards/org-permissions.guard.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/icons/admin-console-logo.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/layouts/organization-layout.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/layouts/organization-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/entity-events.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/entity-events.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/user-confirm.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/user-confirm.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-verify-delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/verify-recover-delete-org.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-bulk-confirm.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-status.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/bulk-status.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/policy.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/base-policy.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/disable-send.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/disable-send.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/master-password.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/master-password.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/password-generator.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/password-generator.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/personal-ownership.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/personal-ownership.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/require-sso.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/require-sso.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/reset-password.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/reset-password.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/send-options.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/send-options.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/single-org.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/single-org.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/two-factor-authentication.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/two-factor-authentication.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policy-edit.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policy-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/registration/web-registration-finish.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/webauthn-rotate-credential.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/credential-create-options.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/pending-webauthn-login-credential.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/webauthn-login-credential.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/rotateable-key-set.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/enable-credential-encryption.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/save-credential.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/webauthn-login-authenticator-response.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/webauthn-login-attestation-response.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/response/webauthn-login-credential-create-options.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/response/webauthn-login-credential.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/webauthn-login-admin-api.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/webauthn-login-admin.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/emergency-access.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/enums/emergency-access-status-type.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/response/emergency-access.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/services/emergency-access-api.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-accept.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-confirm.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-invite.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-password.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-update.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/services/emergency-access.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/guards/deep-link.guard.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/settings.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/auth.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/key-rotation/user-key-rotation-api.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/key-rotation/user-key-rotation.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/key-rotation/request/update-key.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/key-rotation/user-key-rotation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-accept-init.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-accept.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/organization-invite.ts","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/danger-zone.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/danger-zone.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-profile.request.ts","webpack://@bitwarden/web-vault/./src/app/components/selectable-avatar.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-avatar-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-avatar-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/profile.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/profile.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/api-key.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/api-key.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-provider.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-base.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-duo.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-duo.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-duo.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-authenticator.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-authenticator.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-authenticator.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-email.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-email.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-recovery.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-recovery.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-web-authn-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-web-authn.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-webauthn.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-yubikey-otp.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-yubikey.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-yubikey.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-setup.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-setup.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-verify.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor-verify.component.html","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/user-verification-prompt.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification-prompt.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification-prompt.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/user-verification.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.component.html","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-upgrade.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-organization-create.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/organizations/organization-plans.component.html","webpack://@bitwarden/web-vault/./src/app/billing/organizations/organization-plans.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/storage.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-storage.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-storage.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-bank.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/add-credit-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/add-credit-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/billing-shared.module.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method-warnings/payment-method-warnings.module.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method-warnings/payment-method-warnings.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method-warnings/payment-method-warnings.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/sm-subscribe.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/sm-subscribe.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/tax-info.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/tax-info.component.ts","webpack://@bitwarden/web-vault/./src/app/common/base.accept.component.ts","webpack://@bitwarden/web-vault/./src/app/components/dynamic-avatar.component.ts","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/api-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/organization-sso.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/payment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-api-key-information.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-auto-enroll-status.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/keys.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-keys.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization/organization.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/responses/organization-domain-sso-details.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/responses/organization-domain.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/requests/organization-domain-sso-details.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-management-preferences/default-organization-management-preferences.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/responses/organization-user.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/responses/organization-user-bulk.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/responses/organization-user-bulk-public-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-user/requests/organization-user-bulk.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/reset-password-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/policy/policy.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/provider.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/user-verification/user-verification-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/account.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/notification.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/update-avatar.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/avatar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-devices-trust.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/device-trust.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/views/device.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/responses/device.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/protected-device.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices/requests/trusted-device-keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/kdf-config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/key-connector-user-key.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/set-key-connector-key.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/key-connector.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/master-password/master-password.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/sso-login.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/set-tokens-result.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/token.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/token.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/verify-otp.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/constants/index.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/autofill-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/badge-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/account/billing-account-profile-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/organization-billing-metadata.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/organization-billing-status.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/masked-payment-method.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/payment-information.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/billing-keys.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/config-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-upload/file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/storage.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/account-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/global-state-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/state-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/message.listener.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/helpers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/subject-message.sender.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/global-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/app-id.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/response/server-config.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/server-config.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/data/server-config.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/config/default-config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/encrypted-organization-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout-settings.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/org-keys.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/provider-keys.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/user-key.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/encrypted-object.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/encrypt.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/get-class-initializer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/default-environment.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/azure-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migration-builder.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrator.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/10-move-ever-had-user-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/11-move-org-keys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/12-move-environment-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/13-move-provider-keys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/14-move-biometric-client-key-half-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/15-move-folder-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/16-move-last-sync-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/17-move-enable-passkeys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/18-move-autofill-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/19-migrate-require-password-on-start.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/20-move-private-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/21-move-collections-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/22-move-collapsed-groupings-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/23-move-biometric-prompts-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/24-move-sm-onboarding-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/25-move-clear-clipboard-to-autofill-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/26-revert-move-last-sync-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/27-move-badge-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/28-move-biometric-unlock-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/29-move-user-notification-settings-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/30-move-policy-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/31-move-enable-context-menu-to-autofill-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/32-move-preferred-language.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/33-move-app-id-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/34-move-domain-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/35-move-theme-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/36-move-show-card-and-identity-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/37-move-avatar-color-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/38-migrate-token-svc-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/39-move-billing-account-profile-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/4-remove-ever-been-unlocked.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/40-move-organization-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/41-move-event-collection-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/42-move-enable-favicon-to-domain-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/43-move-auto-confirm-finger-prints-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/44-move-user-decryption-options-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/45-merge-environment-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/46-delete-orphaned-biometric-prompt-data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/47-move-desktop-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/48-move-ddg-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/49-move-account-server-configs.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/5-add-key-type-to-org-keys.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/50-move-key-connector-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/51-move-remembered-email-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/52-delete-installed-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/53-migrate-device-trust-svc-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/54-move-encrypted-sends.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/55-move-master-key-state-to-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/56-move-auth-requests.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/57-move-cipher-service-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/58-remove-refresh-token-migrated-state-provider-flag.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/59-move-kdf-config-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/6-remove-legacy-etm-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/60-known-accounts.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/61-move-pin-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/62-migrate-vault-timeout-settings-svc-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/63-migrate-password-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/64-migrate-generator-history.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/65-migrate-forwarder-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/66-move-final-desktop-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/7-move-biometric-auto-prompt-to-account.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/8-move-state-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/9-move-browser-settings-to-global.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/min-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrate.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/migration-builder.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migration-helper.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/migration-runner.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/storage-service.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/user-auto-unlock-key.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/decrypt-parameters.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-active-user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-derived-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-update-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/util.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/state-base.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-global-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-single-user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/provider.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send-file.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send-text.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/folder.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/sequentialize.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/core-sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/default-sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-connection.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-export.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-sponsorship-sync-status.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user-bulk-public-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user-bulk.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/auth-request.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/device-verification.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/key-connector-user-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/prelogin.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/register.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/sso-pre-validate.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-authenticator.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-duo.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-email.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-recover.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-yubi-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing-payment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/tax-rate.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/collection-bulk-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/breach-account.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/user-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/attachment-upload-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/optional-cipher.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/audit.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/throttle.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/data/event.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/event.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/search.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-access.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-file-download-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-file-upload-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-state.provider.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/sorted-ciphers-cache.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-move.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-restore.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-share.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-update-collections.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-create.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-partial.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-share.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/ciphers.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/cipher.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/folder.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/totp.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/vault-settings.state.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/logging-error-handler.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/theming/angular-theming.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/jslib-services.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/auth.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/folder/folder.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/folder/folder-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/account-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/crypto.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/convert-values.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/default-broadcaster.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/noop-notifications.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/notifications.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/web-crypto-function.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/multithread-encrypt.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/event-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/event-collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/policy/policy-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/user-verification/user-verification.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/types/verification.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-user/organization-user.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/password-reset-enrollment.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/form-validation-errors.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/user-verification/user-verification-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization/organization-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/config/config-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/anonymous-hub.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/validation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/org-domain.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/org-domain-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices-api.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices/devices.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login-prf-crypto.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-global-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-active-user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-single-user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-derived-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/organization-billing.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/vault-settings/vault-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/vault-settings/vault-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/billing-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/payment-method-warnings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/provider/provider-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/payment-processors/braintree.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/payment-processors/stripe.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/memory-storage.service.ts","webpack://@bitwarden/web-vault/./src/app/core/html-storage.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/translation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/i18n.service.ts","webpack://@bitwarden/web-vault/./src/translation-constants.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-environment.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-migration-runner.ts","webpack://@bitwarden/web-vault/./src/app/platform/window-storage.service.ts","webpack://@bitwarden/web-vault/./src/app/core/event.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/container.service.ts","webpack://@bitwarden/web-vault/./src/app/core/init.service.ts","webpack://@bitwarden/web-vault/./src/app/core/modal.service.ts","webpack://@bitwarden/web-vault/./src/app/core/state/state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-download/file-download.builder.ts","webpack://@bitwarden/web-vault/./src/app/core/web-file-download.service.ts","webpack://@bitwarden/web-vault/./src/app/core/core.module.ts","webpack://@bitwarden/web-vault/./src/app/core/i18n.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/storage/memory-storage.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-storage-service.provider.ts","webpack://@bitwarden/web-vault/./src/app/core/router.service.ts","webpack://@bitwarden/web-vault/./src/app/core/web-platform-utils.service.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher-content.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher-content.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/header/header.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/header/web-header.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/header/web-header.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/org-switcher/org-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/org-switcher/org-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/shared/product-switcher.service.ts","webpack://@bitwarden/web-vault/./src/app/layouts/secrets-manager-logo.ts","webpack://@bitwarden/web-vault/./src/app/layouts/password-manager-logo.ts","webpack://@bitwarden/web-vault/./src/app/layouts/user-layout.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/user-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/toggle-width.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-side-nav.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-side-nav.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/account-fingerprint/account-fingerprint.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/account-fingerprint/account-fingerprint.component.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding-task.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding-task.component.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.component.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.module.ts","webpack://@bitwarden/web-vault/./src/app/shared/loose-components.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/avatar/avatar.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/color-password/color-password.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tabs.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.module.ts","webpack://@bitwarden/web-vault/./src/app/shared/locales.ts","webpack://@bitwarden/web-vault/./src/app/shared/shared.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/event-export/event.export.ts","webpack://@bitwarden/web-vault/./src/app/tools/event-export/event-export.service.ts","webpack://@bitwarden/web-vault/./src/app/core/guards/has-premium.guard.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/breach-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/breach-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-breach.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-exposed-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-inactive-two-factor.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-member-access.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-reused-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-unsecured-websites.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-weak-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/reports-shared.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reports-home.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reports-home.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-layout.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/cipher-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/exposed-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/exposed-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/inactive-two-factor-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/inactive-two-factor-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reused-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reused-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/unsecured-websites-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/unsecured-websites-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/weak-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/weak-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/models/report-variant.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-card/report-card.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-card/report-card.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-list/report-list.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-list/report-list.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/assign-collections/assign-collections-web.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/assign-collections/assign-collections-web.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/bit-validators/forbidden-characters.validator.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/not-premium.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/premium-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-cipher-row.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-cipher-row.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-name-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-collection-row.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-collection-row.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/core/bulk-collection-access.request.ts","webpack://@bitwarden/web-vault/./src/app/vault/core/collection-admin.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/core/views/collection-admin.view.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/add-edit-custom-fields.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/true-false-value.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit-custom-fields.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit-custom-fields.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/admin-console/components/collections.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/collections.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/collections.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-badge.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/ellipsis.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/get-organization-name.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/pipes.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/link-sso.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/organization-options.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/vault-filter.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/routed-vault-filter-bridge.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/routed-vault-filter.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/collapsed-groupings.state.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/filter-function.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/routed-vault-filter.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/vault-filter-shared.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-badge.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-badge.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/settings/purge-vault.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/settings/purge-vault.component.html","webpack://@bitwarden/web-vault/./src/app/vault/utils/collection-utils.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/guard/feature-flag.guard.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/accept-family-sponsorship.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/accept-family-sponsorship.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization/organization-sponsorship-redeem.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-verify-recover-delete.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/providers/verify-recover-delete-provider.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/providers/verify-recover-delete-provider.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/settings/create-organization.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/settings/create-organization.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/password-hint.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/hint.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/hint.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/hint.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/lock.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/lock.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/lock.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/base-login-decryption-options.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-decryption-options/login-decryption-options.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-decryption-options/login-decryption-options.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/auth-request-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/create-auth.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/iframe-component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/captcha-iframe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/captcha-protected.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/login-via-auth-request.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-auth-request.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-auth-request.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/base-login-via-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/create-passkey-failed.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/create-passkey.icon.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-webauthn/login-via-webauthn.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-webauthn/login-via-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/login.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login.component.ts","webpack://@bitwarden/web-vault/./src/utils/flags.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.component.html","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-delete.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-delete.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-recovery.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-two-factor.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-two-factor.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/remove-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/remove-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/remove-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/set-password.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/change-password.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/set-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/set-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/set-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/deauthorize-sessions.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/deauthorize-sessions.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/delete-account-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/delete-account-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/email-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-email.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-email.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/account.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/account.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/enums/emergency-access-type.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/models/emergency-access.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/confirm/emergency-access-confirm.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/confirm/emergency-access-confirm.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access-add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/takeover/emergency-access-takeover.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/takeover/emergency-access-takeover.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/attachments/emergency-access-attachments.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-access-view.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-access-view.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/password.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/enums/webauthn-login-credential-prf-status.enum.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/delete-credential-dialog/delete-credential-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/delete-credential-dialog/delete-credential-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/enable-encryption-dialog/enable-encryption-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/enable-encryption-dialog/enable-encryption-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/change-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/change-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/kdf.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf-confirmation.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf-confirmation.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-keys.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-keys.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/sso.component.html","webpack://@bitwarden/web-vault/./src/app/auth/sso.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/reference-event.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/accounts/trial-initiation/trial-billing-step.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/register.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/register.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.component.html","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.component.ts","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.component.html","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-badges.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-badges.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-forbes.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-forbes.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-us-news.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-us-news.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/confirmation-details.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/confirmation-details.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/default-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/default-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise1-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise1-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise2-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise2-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams1-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams1-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams2-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams2-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams3-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams3-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-cnet.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-cnet.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-individual-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-individual-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/review-blurb.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/secrets-manager-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/review-blurb.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/secrets-manager-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-auth.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/webauthn-iframe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-options.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-options.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-options.component.html","webpack://@bitwarden/web-vault/./src/app/auth/two-factor.component.html","webpack://@bitwarden/web-vault/./src/app/auth/two-factor.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/update-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/update-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/update-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-temp-password.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/update-temp-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/update-temp-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/update-temp-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-email-token.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-email-token.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-recover-delete.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-recover-delete.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/input-strip-spaces.directive.ts","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsoring-org-row.component.html","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsoring-org-row.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsored-families.component.html","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsored-families.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/frontend-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/frontend-layout.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/update-domains.request.ts","webpack://@bitwarden/web-vault/./src/app/settings/domain-rules.component.html","webpack://@bitwarden/web-vault/./src/app/settings/domain-rules.component.ts","webpack://@bitwarden/web-vault/./src/app/settings/preferences.component.html","webpack://@bitwarden/web-vault/./src/app/settings/preferences.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/generator/components/generator.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/generator/components/password-generator-history.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/copy-text.directive.ts","webpack://@bitwarden/web-vault/./src/app/tools/password-generator-history.component.html","webpack://@bitwarden/web-vault/./src/app/tools/password-generator-history.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/generator.component.html","webpack://@bitwarden/web-vault/./src/app/tools/generator.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-access.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-access.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send-access.request.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/icons/no-send.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/icons/expired-send.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-file.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-file.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-password.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-text.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-password.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-text.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/access.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/access.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/send/send.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/send/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/verify-email.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/verify-email.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-dialogs.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/services/vault-banners.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/vault-filter.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/services/abstraction/vault-onboarding.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/services/vault-onboarding.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/vault-onboarding.enum.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/types/checkable.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/folder-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/folder-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/folder-add-edit.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/components/share.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/share.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/share.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-header/vault-header.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-header/vault-header.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/vault-banners.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/vault-banners.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.module.ts","webpack://@bitwarden/web-vault/./src/app/oss-routing.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/two-factor-component-refactor-route-swap.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.module.ts","webpack://@bitwarden/web-vault/./src/app/oss.module.ts","webpack://@bitwarden/web-vault/./src/app/wildcard-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/guards/is-enterprise-org.guard.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/organization-sso.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/view/sso-config.view.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/launch-click.directive.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/auth/sso/sso.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/auth/sso/sso-type.validator.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/requests/organization-domain.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/validators/unique-in-array.validator.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/validators/domain-name.validator.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/api/scim-config.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/scim-config.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/organizations-routing.module.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/organizations/organizations.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/icons/provider-portal-logo.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/services/provider-client-vault-privacy-banner.service.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/providers/providers.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/providers/providers.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/billing-history/provider-billing-history.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/billing-history/provider-billing-history.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-add-organization.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/create-client-organization.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/services/web-provider.service.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/base-clients.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/update-client-organization.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-client-name-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-client-name-dialog.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-client-subscription-dialog.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-client-subscription-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/no-clients.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-clients.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/clients/manage-clients.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/guards/has-consolidated-billing.guard.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/tokenized-payment-method.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/payment-method/provider-select-payment-method-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/payment-method/provider-select-payment-method-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/domain/masked-payment-method.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/domain/tax-information.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/verify-bank-account.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/payment-method/provider-payment-method.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/payment-method/provider-payment-method.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription-status.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription-status.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/create-organization.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/clients/create-organization.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-accept.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-bulk.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-confirm.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-invite.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-update.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/dialogs/add-edit-member-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/dialogs/add-edit-member-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-user-bulk-confirm.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/base-bulk-confirm.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/dialogs/bulk-confirm-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/components/bulk/base-bulk-remove.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/dialogs/bulk-remove-dialog.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/members.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/members.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/common/base.people.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/bulk/bulk-confirm.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/bulk/bulk-remove.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-update.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup-provider.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup-provider.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-setup.request.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/providers-routing.module.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/providers/providers.module.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/app-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/app.component.ts","webpack://@bitwarden/web-vault/./src/app/app.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/activate-autofill.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/activate-autofill.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/disable-personal-vault-export.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/disable-personal-vault-export.component.html","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/app.component.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/app/app.module.ts","webpack://@bitwarden/web-vault/../../bitwarden_license/bit-web/src/main.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/sso.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/email.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/recovery.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/totp.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/webauthn.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-icon.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-icon.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/auth.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/lock.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/redirect.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/tde-decryption-required.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/unauth.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/validators/inputs-field-match.validator.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/add-account-credit-dialog/add-account-credit-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/add-account-credit-dialog/add-account-credit-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/invoices.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/invoices.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/no-invoices.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/manage-tax-information/manage-tax-information.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/manage-tax-information/manage-tax-information.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/select-payment-method/select-payment-method.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/select-payment-method/select-payment-method.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/verify-bank-account/verify-bank-account.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/verify-bank-account/verify-bank-account.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/components/callout.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/components/callout.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/a11y-title.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/api-action.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/copy-click.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/input-verbatim.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/stop-click.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/stop-prop.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toastr.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/credit-card-number.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/jslib.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/pluralize.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/search.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/user-name.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/user-type.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/abstractions/form-validation-errors.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/fingerprint.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/i18n.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/theming/theming.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/utils/feature-flagged-route.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/utils/safe-provider.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/injection-tokens.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/modal.ref.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/dynamic-modal.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/modal-injector.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/modal.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/component-route-swap.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/form-selection-list.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/attachments.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/fallback-src.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/icon.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/icon.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/icon/build-cipher-icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/bitwarden-logo.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/lock.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/fingerprint-dialog/fingerprint-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/fingerprint-dialog/fingerprint-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/input-password/input-password.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/input-password/input-password.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/registration/register-send-verification-email.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/registration-check-email.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-self-hosted-env-config-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-self-hosted-env-config-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start-secondary.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start-secondary.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/registration/register-finish.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/default-registration-finish.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-callout/password-callout.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-callout/password-callout.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/active-client-verification-option.enum.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-form-input.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-form-input.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/vault-timeout-input/vault-timeout-input.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/vault-timeout-input/vault-timeout-input.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-email.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-strategy.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/user-decryption-options.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/pin.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/auth-request.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/rotateable-key-set.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/login-credentials.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/user-decryption-options.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/pin/pin.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-email/login-email.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/prelogin.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/password-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/auth-result.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/auth-request-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/password-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/sso-token.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/sso-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/user-api-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/webauthn-login-token.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/webauthn-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-strategies/login-strategy.state.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-strategies/login-strategy.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/user-decryption-options/user-decryption-options.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/passwordless-auth.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/auth-request/auth-request.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/register-route.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/utilities/decode-jwt-token-to-json.utility.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/audit.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/event/event-collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/event/event-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/notifications.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/search.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/vault-timeout/vault-timeout-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/vault-timeout/vault-timeout.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/org-domain.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/organization-user.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-reset-password-enrollment.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-user/requests/organization-user-reset-password.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/policy/policy-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/provider.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/provider/provider-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-api-key-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-connection-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-user-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-user-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/policy-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-user-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-user-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/scim-provider-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/api/permissions.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/organization.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/policy.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/master-password-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/organization.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/policy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-api-key.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-connection.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-create.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/selection-read-only.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/policy.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/selection-read-only.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/account-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/account.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/anonymous-hub.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/auth.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/avatar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/device-trust.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/devices.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/kdf-config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/key-connector.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/master-password.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/password-reset-enrollment.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/sso-login.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/token.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/two-factor.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/user-verification/user-verification.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login-prf-crypto.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/authentication-status.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/authentication-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/sso.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/two-factor-provider-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/verification-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/api/sso-config.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/admin-auth-req-storable.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/force-set-password-reason.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/range-with-default.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/kdf-config.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/device.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/token-two-factor.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/user-api-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/secret-verification.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-email.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-captcha.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/key-connector-user-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/trusted-device-user-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/webauthn-prf-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/user-decryption-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-token.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-two-factor.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/master-password-policy.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-web-authn.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/view/webauthn-login/webauthn-login-credential-assertion-options.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/two-factor.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/request/webauthn-login-response.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/request/webauthn-login-assertion-response.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/response/assertion-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/response/credential-assertion-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/domain-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/account/billing-account-profile-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/billilng-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/payment-processors/braintree.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/payment-processors/stripe.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/organization-billing.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/payment-method-warnings-service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/provider-billing.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/payment-method-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/plan-sponsorship-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/plan-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/transaction-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/bitwarden-product-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/product-tier-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/bit-pay-invoice.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/expanded-tax-info-update.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/payment.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/tax-info-update.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing-history.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/invoices.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/organization-subscription.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/plan.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/subscription-suspension.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/provider-subscription-response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/subscription.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/tax-info.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/feature-flag.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/http-status-code.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/client-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/device-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/event-system-user.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/event-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/integration-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/native-messaging-version.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/notification-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/vault-timeout-action.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/domain/domain-service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/card.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/field.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/identity.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/fido2-credential.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/login-uri.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/login.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/password-history.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/secure-note.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/cipher.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/cipher-with-ids.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/collection.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/collection-with-id.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/folder.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/folder-with-id.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/base.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/global-domain.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/domains.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/error.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/event.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/list.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-provider-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/profile.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/view/event.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/view/view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/app-id.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/broadcaster.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/crypto-function.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/crypto.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/encrypt.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/environment.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-download/file-download.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/translation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/i18n.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/key-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/log.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/platform-utils.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/validation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/biometrics/biometric.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/biometrics/biometric-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/encryption-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/file-upload-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/hash-purpose.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/html-storage-location.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/kdf-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/key-suffix-options.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/log-level-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/storage-location.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/theme-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/message.sender.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/flags.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/safe-urls.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/wordlist.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/account.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/domain-base.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/enc-array-buffer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/enc-string.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/symmetric-crypto-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/task-scheduler.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/default-task-scheduler.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/scheduled-task-name.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/console-log.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/initializer-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/deserialization-helpers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/derive-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/derived-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/global-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-event-registrar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-event-runner.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/sync.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/theming/theme-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/password-strength/password-strength.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/password-strength/password-strength.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/rx.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/enums/send-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/api/send-file.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/api/send-text.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-file.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-text.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-file.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-text.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/send-kdf.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/buffered-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/buffered-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/data-packer.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/padded-data-packer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-classifier.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/user-encryptor.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/user-key-encryptor.ts","webpack://@bitwarden/web-vault/../../libs/common/src/types/vault-timeout.type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/cipher.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/folder/folder-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/totp.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/cipher-reprompt-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/cipher-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/field-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/linked-id-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/secure-note-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/linked-field-option.decorator.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/card.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/fido2-credential.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/field.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/identity.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/login-uri.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/login.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/secure-note.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/attachment.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/card.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/cipher.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/collection.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/fido2-credential.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/field.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/identity.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/login-uri.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/login.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/password-history.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/secure-note.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/attachment.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/card.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/cipher.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/collection.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/fido2-credential.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/field.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/folder.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/identity.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/login-uri.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/login.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/password.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/secure-note.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/tree-node.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-collections.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/attachment.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/collection.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/folder-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/folder.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/attachment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/password-history.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/cipher.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/collection.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/folder.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/attachment.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/card.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/cipher.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/collection.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/fido2-credential.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/field.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/folder.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/identity.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/item.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/login-uri.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/login.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/password-history.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/secure-note.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/service-utils.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/async-actions.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/bit-action.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/bit-submit.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/form-button.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/avatar/avatar.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge/badge.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge/badge.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumb.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumb.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/checkbox/checkbox.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/checkbox/checkbox.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/color-password/color-password.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/container/container.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/container/container.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/animations.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog/dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog/dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/directives/dialog-close.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/directives/dialog-title-container.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/hint.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/label.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/error-summary.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field-control.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/error.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/password-input-toggle.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/prefix.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/suffix.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icons/search.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/autofocus.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/input.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/input.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/layout/layout.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/layout/layout.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/link/link.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/link/link.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-divider.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-divider.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-item.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-trigger-for.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-base.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-divider.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-divider.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-item.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-logo.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-logo.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/navigation.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-input.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/section/section.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/option.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/button-like.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/focusable-element.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/i18n.pipe.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/shared.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/cell.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/row.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/sortable.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table-data-source.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-header.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-list-container.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-list-item.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-body.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-body.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-label.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-link.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-link.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-nav-bar.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-nav-bar.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toast/utils.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/typography/typography.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/typography/typography.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/utils/function-to-observable.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-api.service.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/import-ciphers.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/import-organization-ciphers.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/kvp.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/collection-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/models/import-result.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/base-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/ascendo-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avast/avast-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avast/avast-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avira-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/blackberry-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/chrome-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/blur-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/buttercup-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/clipperz-html-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/codebook-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/dashlane/dashlane-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/dashlane/dashlane-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/encryptr-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/enpass/enpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/enpass/enpass-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/firefox-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/fsecure/fsecure-fsk-types.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/gnome-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/kaspersky-txt-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keepass2-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keepassx-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keeper/keeper-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/lastpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/logmeonce-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/meldium-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/msecure-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/myki-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/nordpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/types/onepassword-1pux-importer-types.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/cipher-import-context.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-mac-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-win-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/padlock-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passkeep-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passky/passky-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passman-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passpack-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordagent-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordboss-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passworddragon-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordsafe-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordwallet-txt-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/protonpass/types/protonpass-json-type.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/protonpass/protonpass-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/psono/psono-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/remembear-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/roboform-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/safari-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/safeincloud-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/saferpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/securesafe-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/splashid-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/stickypassword-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/truekey-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/upm-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/yoti-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/zohovault-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/models/import-options.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import.service.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-collection.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/export-helper.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/org-vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/base-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/org-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/individual-vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/individual-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-addy-io-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-catchall-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-duck-duck-go-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-fastmail-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-forward-email-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-passphrase-boundaries.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-password-boundaries.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-eff-username-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-firefox-relay-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-passphrase-generation-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-password-generation-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-subaddress-generator-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-simple-login-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/disabled-passphrase-generator-policy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/disabled-password-generator-policy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/forwarders.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/default-policy-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/passphrase-generator-options-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/password-generator-options-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/policies.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/passphrase-least-privilege.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/password-least-privilege.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/crypto-service-randomizer.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/rx.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/services/default-generator.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/util.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/storage.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/passphrase-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/password-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/catchall-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/subaddress-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/eff-username-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/abstractions/generator-strategy.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarder-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/addy-io.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/duck-duck-go.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/fastmail.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/firefox-relay.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/forward-email.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarders/simple-login.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/password-generation.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generated-password-history.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generated-credential.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generator-history.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/legacy-password-history-decryptor.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/local-generator-history.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/default-generator-navigation.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/generator-navigation-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/generator-navigation-policy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/default-generator-navigation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/password-generator-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/legacy-password-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/create-legacy-password-generation-service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/username-generation.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/legacy-username-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/create-legacy-username-generation-service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-reprompt.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-reprompt.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/services/password-reprompt.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/services/copy-cipher-field.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/copy-cipher-field.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/card/card.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/section/section-header.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/section/section-header.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/additional-information/additional-information.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/additional-information/additional-information.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-content.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-content.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/a11y/a11y-cell.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/a11y/a11y-row.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-action.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-group.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/attachments/attachments-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/attachments/attachments-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-details/item-details-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-details/item-details-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-history/item-history-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-history/item-history-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/cipher-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/cipher-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/abstractions/cipher-form.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/cipher-form-container.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/identity/identity.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/identity/identity.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/item-details/item-details-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-form.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-form.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/services/default-cipher-form.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/cipher-form.module.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/assign-collections.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/assign-collections.component.html","webpack://@bitwarden/web-vault/webpack/bootstrap","webpack://@bitwarden/web-vault/webpack/runtime/compat get default export","webpack://@bitwarden/web-vault/webpack/runtime/define property getters","webpack://@bitwarden/web-vault/webpack/runtime/ensure chunk","webpack://@bitwarden/web-vault/webpack/runtime/get javascript chunk filename","webpack://@bitwarden/web-vault/webpack/runtime/get mini-css chunk filename","webpack://@bitwarden/web-vault/webpack/runtime/global","webpack://@bitwarden/web-vault/webpack/runtime/hasOwnProperty shorthand","webpack://@bitwarden/web-vault/webpack/runtime/make namespace object","webpack://@bitwarden/web-vault/webpack/runtime/node module decorator","webpack://@bitwarden/web-vault/webpack/runtime/publicPath","webpack://@bitwarden/web-vault/webpack/runtime/jsonp chunk loading","webpack://@bitwarden/web-vault/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"@bitwarden/web-vault:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import { Directive } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormControl } from \"@angular/forms\";\nimport { firstValueFrom, lastValueFrom, debounceTime, combineLatest, BehaviorSubject } from \"rxjs\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport {\n OrganizationUserStatusType,\n OrganizationUserType,\n ProviderUserStatusType,\n ProviderUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserUserDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { OrganizationUserView } from \"../organizations/core/views/organization-user.view\";\nimport { UserConfirmComponent } from \"../organizations/manage/user-confirm.component\";\n\nimport { PeopleTableDataSource, peopleFilter } from \"./people-table-data-source\";\n\nexport type StatusType = OrganizationUserStatusType | ProviderUserStatusType;\nexport type UserViewTypes = ProviderUserUserDetailsResponse | OrganizationUserView;\n\n/**\n * A refactored copy of BasePeopleComponent, using the component library table and other modern features.\n * This will replace BasePeopleComponent once all subclasses have been changed over to use this class.\n */\n@Directive()\nexport abstract class BaseMembersComponent {\n /**\n * Shows a banner alerting the admin that users need to be confirmed.\n */\n get showConfirmUsers(): boolean {\n return (\n this.dataSource.activeUserCount > 1 &&\n this.dataSource.confirmedUserCount > 0 &&\n this.dataSource.confirmedUserCount < 3 &&\n this.dataSource.acceptedUserCount > 0\n );\n }\n\n get showBulkConfirmUsers(): boolean {\n return this.dataSource.acceptedUserCount > 0;\n }\n\n get showBulkReinviteUsers(): boolean {\n return this.dataSource.invitedUserCount > 0;\n }\n\n abstract userType: typeof OrganizationUserType | typeof ProviderUserType;\n abstract userStatusType: typeof OrganizationUserStatusType | typeof ProviderUserStatusType;\n\n protected abstract dataSource: PeopleTableDataSource;\n\n firstLoaded: boolean;\n\n /**\n * The currently selected status filter, or null to show all active users.\n */\n status: StatusType | null;\n\n /**\n * The currently executing promise - used to avoid multiple user actions executing at once.\n */\n actionPromise: Promise;\n\n protected searchControl = new FormControl(\"\", { nonNullable: true });\n protected statusToggle = new BehaviorSubject(null);\n\n constructor(\n protected apiService: ApiService,\n protected i18nService: I18nService,\n protected cryptoService: CryptoService,\n protected validationService: ValidationService,\n private logService: LogService,\n protected userNamePipe: UserNamePipe,\n protected dialogService: DialogService,\n protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n protected toastService: ToastService,\n ) {\n // Connect the search input and status toggles to the table dataSource filter\n combineLatest([this.searchControl.valueChanges.pipe(debounceTime(200)), this.statusToggle])\n .pipe(takeUntilDestroyed())\n .subscribe(\n ([searchText, status]) => (this.dataSource.filter = peopleFilter(searchText, status)),\n );\n }\n\n abstract edit(user: UserView): void;\n abstract getUsers(): Promise | UserView[]>;\n abstract deleteUser(id: string): Promise;\n abstract reinviteUser(id: string): Promise;\n abstract confirmUser(user: UserView, publicKey: Uint8Array): Promise;\n\n async load() {\n // Load new users from the server\n const response = await this.getUsers();\n\n // GetUsers can return a ListResponse or an Array\n if (response instanceof ListResponse) {\n this.dataSource.data = response.data != null && response.data.length > 0 ? response.data : [];\n } else if (Array.isArray(response)) {\n this.dataSource.data = response;\n }\n\n this.firstLoaded = true;\n }\n\n invite() {\n this.edit(null);\n }\n\n protected async removeUserConfirmationDialog(user: UserView) {\n return this.dialogService.openSimpleDialog({\n title: this.userNamePipe.transform(user),\n content: { key: \"removeUserConfirmation\" },\n type: \"warning\",\n });\n }\n\n async remove(user: UserView) {\n const confirmed = await this.removeUserConfirmationDialog(user);\n if (!confirmed) {\n return false;\n }\n\n this.actionPromise = this.deleteUser(user.id);\n try {\n await this.actionPromise;\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"removedUserId\", this.userNamePipe.transform(user)),\n });\n this.dataSource.removeUser(user);\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async reinvite(user: UserView) {\n if (this.actionPromise != null) {\n return;\n }\n\n this.actionPromise = this.reinviteUser(user.id);\n try {\n await this.actionPromise;\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"hasBeenReinvited\", this.userNamePipe.transform(user)),\n });\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async confirm(user: UserView) {\n const confirmUser = async (publicKey: Uint8Array) => {\n try {\n this.actionPromise = this.confirmUser(user, publicKey);\n await this.actionPromise;\n user.status = this.userStatusType.Confirmed;\n this.dataSource.replaceUser(user);\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(user)),\n });\n } catch (e) {\n this.validationService.showError(e);\n throw e;\n } finally {\n this.actionPromise = null;\n }\n };\n\n if (this.actionPromise != null) {\n return;\n }\n\n try {\n const publicKeyResponse = await this.apiService.getUserPublicKey(user.userId);\n const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n const autoConfirm = await firstValueFrom(\n this.organizationManagementPreferencesService.autoConfirmFingerPrints.state$,\n );\n if (autoConfirm == null || !autoConfirm) {\n const dialogRef = UserConfirmComponent.open(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(user),\n userId: user != null ? user.userId : null,\n publicKey: publicKey,\n confirmUser: () => confirmUser(publicKey),\n },\n });\n await lastValueFrom(dialogRef.closed);\n\n return;\n }\n\n try {\n const fingerprint = await this.cryptoService.getFingerprint(user.userId, publicKey);\n this.logService.info(`User's fingerprint: ${fingerprint.join(\"-\")}`);\n } catch (e) {\n this.logService.error(e);\n }\n await confirmUser(publicKey);\n } catch (e) {\n this.logService.error(`Handled exception: ${e}`);\n }\n }\n}\n","import { Directive } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { EventResponse } from \"@bitwarden/common/models/response/event.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { EventView } from \"@bitwarden/common/models/view/event.view\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { EventService } from \"../../core\";\nimport { EventExportService } from \"../../tools/event-export\";\n\n@Directive()\nexport abstract class BaseEventsComponent {\n loading = true;\n loaded = false;\n events: EventView[];\n dirtyDates = true;\n continuationToken: string;\n\n abstract readonly exportFileName: string;\n\n protected eventsForm = new FormGroup({\n start: new FormControl(null),\n end: new FormControl(null),\n });\n\n constructor(\n protected eventService: EventService,\n protected i18nService: I18nService,\n protected exportService: EventExportService,\n protected platformUtilsService: PlatformUtilsService,\n protected logService: LogService,\n protected fileDownloadService: FileDownloadService,\n ) {\n const defaultDates = this.eventService.getDefaultDateFilters();\n this.start = defaultDates[0];\n this.end = defaultDates[1];\n }\n\n get start(): string {\n return this.eventsForm.value.start;\n }\n\n set start(val: string) {\n this.eventsForm.get(\"start\").setValue(val);\n }\n\n get end(): string {\n return this.eventsForm.value.end;\n }\n\n set end(val: string) {\n this.eventsForm.get(\"end\").setValue(val);\n }\n\n loadMoreEvents = async () => {\n await this.loadEvents(false);\n };\n\n refreshEvents = async () => {\n await this.loadEvents(true);\n };\n\n exportEvents = async () => {\n if (this.dirtyDates) {\n return;\n }\n\n this.loading = true;\n\n const dates = this.parseDates();\n if (dates == null) {\n return;\n }\n\n let promise: Promise;\n try {\n promise = this.export(dates[0], dates[1]);\n await promise;\n } catch (e) {\n this.logService.error(`Handled exception: ${e}`);\n }\n\n promise = null;\n this.loading = false;\n };\n\n loadEvents = async (clearExisting: boolean) => {\n const dates = this.parseDates();\n if (dates == null) {\n return;\n }\n\n this.loading = true;\n let events: EventView[] = [];\n let promise: Promise;\n promise = this.loadAndParseEvents(\n dates[0],\n dates[1],\n clearExisting ? null : this.continuationToken,\n );\n\n const result = await promise;\n this.continuationToken = result.continuationToken;\n events = result.events;\n\n if (!clearExisting && this.events != null && this.events.length > 0) {\n this.events = this.events.concat(events);\n } else {\n this.events = events;\n }\n\n this.dirtyDates = false;\n this.loading = false;\n promise = null;\n };\n\n protected abstract requestEvents(\n startDate: string,\n endDate: string,\n continuationToken: string,\n ): Promise>;\n protected abstract getUserName(r: EventResponse, userId: string): { name: string; email: string };\n\n protected async loadAndParseEvents(\n startDate: string,\n endDate: string,\n continuationToken: string,\n ) {\n const response = await this.requestEvents(startDate, endDate, continuationToken);\n\n const events = await Promise.all(\n response.data.map(async (r) => {\n const userId = r.actingUserId == null ? r.userId : r.actingUserId;\n const eventInfo = await this.eventService.getEventInfo(r);\n const user = this.getUserName(r, userId);\n const userName = user != null ? user.name : this.i18nService.t(\"unknown\");\n\n return new EventView({\n message: eventInfo.message,\n humanReadableMessage: eventInfo.humanReadableMessage,\n appIcon: eventInfo.appIcon,\n appName: eventInfo.appName,\n userId: userId,\n userName: userName,\n userEmail: user != null ? user.email : \"\",\n date: r.date,\n ip: r.ipAddress,\n type: r.type,\n installationId: r.installationId,\n systemUser: r.systemUser,\n serviceAccountId: r.serviceAccountId,\n });\n }),\n );\n return { continuationToken: response.continuationToken, events: events };\n }\n\n protected parseDates() {\n let dates: string[] = null;\n try {\n dates = this.eventService.formatDateFilters(this.start, this.end);\n } catch (e) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidDateRange\"),\n );\n return null;\n }\n return dates;\n }\n\n private async export(start: string, end: string) {\n let continuationToken = this.continuationToken;\n let events = [].concat(this.events);\n\n while (continuationToken != null) {\n const result = await this.loadAndParseEvents(start, end, continuationToken);\n continuationToken = result.continuationToken;\n events = events.concat(result.events);\n }\n\n const data = await this.exportService.getEventExport(events);\n const fileName = this.exportService.getFileName(this.exportFileName, \"csv\");\n this.fileDownloadService.download({\n fileName,\n blobData: data,\n blobOptions: { type: \"text/plain\" },\n });\n }\n}\n","import {\n OrganizationUserStatusType,\n ProviderUserStatusType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { TableDataSource } from \"@bitwarden/components\";\n\nimport { StatusType, UserViewTypes } from \"./base-members.component\";\n\nconst MaxCheckedCount = 500;\n\n/**\n * Returns true if the user matches the status, or where the status is `null`, if the user is active (not revoked).\n */\nfunction statusFilter(user: UserViewTypes, status: StatusType) {\n if (status == null) {\n return user.status != OrganizationUserStatusType.Revoked;\n }\n\n return user.status === status;\n}\n\n/**\n * Returns true if the string matches the user's id, name, or email.\n * (The default string search includes all properties, which can return false positives for collection names etc.)\n */\nfunction textFilter(user: UserViewTypes, text: string) {\n const normalizedText = text?.toLowerCase();\n return (\n !normalizedText || // null/empty strings should be ignored, i.e. always return true\n user.email.toLowerCase().includes(normalizedText) ||\n user.id.toLowerCase().includes(normalizedText) ||\n user.name?.toLowerCase().includes(normalizedText)\n );\n}\n\nexport function peopleFilter(searchText: string, status: StatusType) {\n return (user: UserViewTypes) => statusFilter(user, status) && textFilter(user, searchText);\n}\n\n/**\n * An extended TableDataSource class for managing people (organization members and provider users).\n * It includes a tally of different statuses, utility methods, and other common functionality.\n */\nexport abstract class PeopleTableDataSource extends TableDataSource {\n protected abstract statusType: typeof OrganizationUserStatusType | typeof ProviderUserStatusType;\n\n /**\n * The number of 'active' users, that is, all users who are not in a revoked status.\n */\n activeUserCount: number;\n\n invitedUserCount: number;\n acceptedUserCount: number;\n confirmedUserCount: number;\n revokedUserCount: number;\n\n override set data(data: T[]) {\n super.data = data;\n\n this.activeUserCount =\n this.data?.filter((u) => u.status !== this.statusType.Revoked).length ?? 0;\n\n this.invitedUserCount =\n this.data?.filter((u) => u.status === this.statusType.Invited).length ?? 0;\n this.acceptedUserCount =\n this.data?.filter((u) => u.status === this.statusType.Accepted).length ?? 0;\n this.confirmedUserCount =\n this.data?.filter((u) => u.status === this.statusType.Confirmed).length ?? 0;\n this.revokedUserCount =\n this.data?.filter((u) => u.status === this.statusType.Revoked).length ?? 0;\n }\n\n override get data() {\n // If you override a setter, you must also override the getter\n return super.data;\n }\n\n /**\n * Check or uncheck a user in the table\n * @param select check the user (true), uncheck the user (false), or toggle the current state (null)\n */\n checkUser(user: T, select?: boolean) {\n (user as any).checked = select == null ? !(user as any).checked : select;\n }\n\n getCheckedUsers() {\n return this.data.filter((u) => (u as any).checked);\n }\n\n /**\n * Check all filtered users (i.e. those rows that are currently visible)\n * @param select check the filtered users (true) or uncheck the filtered users (false)\n */\n checkAllFilteredUsers(select: boolean) {\n if (select) {\n // Reset checkbox selection first so we know nothing else is selected\n this.uncheckAllUsers();\n }\n\n const filteredUsers = this.filteredData;\n\n const selectCount =\n filteredUsers.length > MaxCheckedCount ? MaxCheckedCount : filteredUsers.length;\n for (let i = 0; i < selectCount; i++) {\n this.checkUser(filteredUsers[i], select);\n }\n }\n\n uncheckAllUsers() {\n this.data.forEach((u) => ((u as any).checked = false));\n }\n\n /**\n * Remove a user from the data source. Use this to ensure the table is re-rendered after the change.\n */\n removeUser(user: T) {\n // Note: use immutable functions so that we trigger setters to update the table\n this.data = this.data.filter((u) => u != user);\n }\n\n /**\n * Replace a user in the data source by matching on user.id. Use this to ensure the table is re-rendered after the change.\n */\n replaceUser(user: T) {\n const index = this.data.findIndex((u) => u.id === user.id);\n if (index > -1) {\n // Clone the array so that the setter for dataSource.data is triggered to update the table rendering\n const updatedData = this.data.slice();\n updatedData[index] = user;\n this.data = updatedData;\n }\n }\n}\n","import { BasePolicy } from \"../organizations/policies\";\n\nexport class PolicyListService {\n private policies: BasePolicy[] = [];\n\n addPolicies(policies: BasePolicy[]) {\n this.policies.push(...policies);\n }\n\n getPolicies(): BasePolicy[] {\n return this.policies;\n }\n}\n","import { NgModule } from \"@angular/core\";\n\n@NgModule({})\nexport class CoreOrganizationModule {}\n","import { SelectionReadOnlyResponse } from \"@bitwarden/common/admin-console/models/response/selection-read-only.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class GroupResponse extends BaseResponse {\n id: string;\n organizationId: string;\n name: string;\n externalId: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.name = this.getResponseProperty(\"Name\");\n this.externalId = this.getResponseProperty(\"ExternalId\");\n }\n}\n\nexport class GroupDetailsResponse extends GroupResponse {\n collections: SelectionReadOnlyResponse[] = [];\n\n constructor(response: any) {\n super(response);\n const collections = this.getResponseProperty(\"Collections\");\n if (collections != null) {\n this.collections = collections.map((c: any) => new SelectionReadOnlyResponse(c));\n }\n }\n}\n","import { View } from \"@bitwarden/common/src/models/view/view\";\n\nimport { GroupDetailsResponse, GroupResponse } from \"../services/group/responses/group.response\";\n\nimport { CollectionAccessSelectionView } from \"./collection-access-selection.view\";\n\nexport class GroupView implements View {\n id: string;\n organizationId: string;\n name: string;\n externalId: string;\n collections: CollectionAccessSelectionView[] = [];\n members: string[] = [];\n\n static fromResponse(response: GroupResponse): GroupView {\n const view: GroupView = Object.assign(new GroupView(), response) as GroupView;\n\n if (response instanceof GroupDetailsResponse && response.collections != undefined) {\n view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c));\n }\n\n return view;\n }\n}\n","import { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class GroupRequest {\n name: string;\n collections: SelectionReadOnlyRequest[] = [];\n users: string[] = [];\n}\n","export class OrganizationGroupBulkRequest {\n ids: string[];\n\n constructor(ids: string[]) {\n this.ids = ids == null ? [] : ids;\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { CoreOrganizationModule } from \"../../core-organization.module\";\nimport { GroupView } from \"../../views/group.view\";\n\nimport { GroupRequest } from \"./requests/group.request\";\nimport { OrganizationGroupBulkRequest } from \"./requests/organization-group-bulk.request\";\nimport { GroupDetailsResponse, GroupResponse } from \"./responses/group.response\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class GroupService {\n constructor(\n protected apiService: ApiService,\n protected configService: ConfigService,\n ) {}\n\n async get(orgId: string, groupId: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + orgId + \"/groups/\" + groupId + \"/details\",\n null,\n true,\n true,\n );\n\n return GroupView.fromResponse(new GroupDetailsResponse(r));\n }\n\n async getAll(orgId: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + orgId + \"/groups\",\n null,\n true,\n true,\n );\n\n const listResponse = new ListResponse(r, GroupDetailsResponse);\n\n return Promise.all(listResponse.data?.map((gr) => GroupView.fromResponse(gr))) ?? [];\n }\n}\n\n@Injectable({ providedIn: CoreOrganizationModule })\nexport class InternalGroupService extends GroupService {\n constructor(\n protected apiService: ApiService,\n protected configService: ConfigService,\n ) {\n super(apiService, configService);\n }\n\n async delete(orgId: string, groupId: string): Promise {\n await this.apiService.send(\n \"DELETE\",\n \"/organizations/\" + orgId + \"/groups/\" + groupId,\n null,\n true,\n false,\n );\n }\n\n async deleteMany(orgId: string, groupIds: string[]): Promise {\n await this.apiService.send(\n \"DELETE\",\n \"/organizations/\" + orgId + \"/groups\",\n new OrganizationGroupBulkRequest(groupIds),\n true,\n true,\n );\n }\n\n async save(group: GroupView): Promise {\n const request = new GroupRequest();\n request.name = group.name;\n request.users = group.members;\n request.collections = group.collections.map(\n (c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage),\n );\n\n if (group.id == undefined) {\n return await this.postGroup(group.organizationId, request);\n } else {\n return await this.putGroup(group.organizationId, group.id, request);\n }\n }\n\n private async postGroup(organizationId: string, request: GroupRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/groups\",\n request,\n true,\n true,\n );\n return GroupView.fromResponse(new GroupResponse(r));\n }\n\n private async putGroup(\n organizationId: string,\n id: string,\n request: GroupRequest,\n ): Promise {\n const r = await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/groups/\" + id,\n request,\n true,\n true,\n );\n return GroupView.fromResponse(new GroupResponse(r));\n }\n}\n","import { OrganizationUserType } from \"../../../enums\";\nimport { PermissionsApi } from \"../../../models/api/permissions.api\";\nimport { SelectionReadOnlyRequest } from \"../../../models/request/selection-read-only.request\";\n\nexport class OrganizationUserUpdateRequest {\n type: OrganizationUserType;\n accessSecretsManager: boolean;\n collections: SelectionReadOnlyRequest[] = [];\n groups: string[] = [];\n permissions: PermissionsApi;\n}\n","import { OrganizationUserType } from \"../../../enums\";\nimport { PermissionsApi } from \"../../../models/api/permissions.api\";\nimport { SelectionReadOnlyRequest } from \"../../../models/request/selection-read-only.request\";\n\nexport class OrganizationUserInviteRequest {\n emails: string[] = [];\n type: OrganizationUserType;\n accessSecretsManager: boolean;\n collections: SelectionReadOnlyRequest[] = [];\n groups: string[];\n permissions: PermissionsApi;\n}\n","import {\n OrganizationUserStatusType,\n OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\n\nimport { CollectionAccessSelectionView } from \"./collection-access-selection.view\";\n\nexport class OrganizationUserAdminView {\n id: string;\n userId: string;\n organizationId: string;\n type: OrganizationUserType;\n status: OrganizationUserStatusType;\n externalId: string;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n hasMasterPassword: boolean;\n\n collections: CollectionAccessSelectionView[] = [];\n groups: string[] = [];\n\n accessSecretsManager: boolean;\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport {\n OrganizationUserInviteRequest,\n OrganizationUserUpdateRequest,\n} from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { OrganizationUserDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { CoreOrganizationModule } from \"../core-organization.module\";\nimport { OrganizationUserAdminView } from \"../views/organization-user-admin-view\";\n\n@Injectable({ providedIn: CoreOrganizationModule })\nexport class UserAdminService {\n constructor(\n private configService: ConfigService,\n private organizationUserService: OrganizationUserService,\n ) {}\n\n async get(\n organizationId: string,\n organizationUserId: string,\n ): Promise {\n const userResponse = await this.organizationUserService.getOrganizationUser(\n organizationId,\n organizationUserId,\n {\n includeGroups: true,\n },\n );\n\n if (userResponse == null) {\n return undefined;\n }\n\n const [view] = await this.decryptMany(organizationId, [userResponse]);\n\n return view;\n }\n\n async save(user: OrganizationUserAdminView): Promise {\n const request = new OrganizationUserUpdateRequest();\n request.permissions = user.permissions;\n request.type = user.type;\n request.collections = user.collections;\n request.groups = user.groups;\n request.accessSecretsManager = user.accessSecretsManager;\n\n await this.organizationUserService.putOrganizationUser(user.organizationId, user.id, request);\n }\n\n async invite(emails: string[], user: OrganizationUserAdminView): Promise {\n const request = new OrganizationUserInviteRequest();\n request.emails = emails;\n request.permissions = user.permissions;\n request.type = user.type;\n request.collections = user.collections;\n request.groups = user.groups;\n request.accessSecretsManager = user.accessSecretsManager;\n\n await this.organizationUserService.postOrganizationUserInvite(user.organizationId, request);\n }\n\n private async decryptMany(\n organizationId: string,\n users: OrganizationUserDetailsResponse[],\n ): Promise {\n const promises = users.map(async (u) => {\n const view = new OrganizationUserAdminView();\n\n view.id = u.id;\n view.organizationId = organizationId;\n view.userId = u.userId;\n view.type = u.type;\n view.status = u.status;\n view.externalId = u.externalId;\n view.permissions = u.permissions;\n view.resetPasswordEnrolled = u.resetPasswordEnrolled;\n view.collections = u.collections.map((c) => ({\n id: c.id,\n hidePasswords: c.hidePasswords,\n readOnly: c.readOnly,\n manage: c.manage,\n }));\n view.groups = u.groups;\n view.accessSecretsManager = u.accessSecretsManager;\n view.hasMasterPassword = u.hasMasterPassword;\n\n return view;\n });\n\n return await Promise.all(promises);\n }\n}\n","import { View } from \"@bitwarden/common/models/view/view\";\n\ninterface SelectionResponseLike {\n id: string;\n readOnly: boolean;\n hidePasswords: boolean;\n manage: boolean;\n}\n\nexport class CollectionAccessSelectionView extends View {\n readonly id: string;\n readonly readOnly: boolean;\n readonly hidePasswords: boolean;\n readonly manage: boolean;\n\n constructor(response?: SelectionResponseLike) {\n super();\n\n if (!response) {\n return;\n }\n\n this.id = response.id;\n this.readOnly = response.readOnly;\n this.hidePasswords = response.hidePasswords;\n this.manage = response.manage;\n }\n}\n","import { OrganizationUserUserDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport {\n OrganizationUserStatusType,\n OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\n\nimport { CollectionAccessSelectionView } from \"./collection-access-selection.view\";\n\nexport class OrganizationUserView {\n id: string;\n userId: string;\n type: OrganizationUserType;\n status: OrganizationUserStatusType;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n name: string;\n email: string;\n avatarColor: string;\n twoFactorEnabled: boolean;\n usesKeyConnector: boolean;\n hasMasterPassword: boolean;\n /**\n * True if this organizaztion user has been granted access to Secrets Manager, false otherwise.\n */\n accessSecretsManager: boolean;\n\n collections: CollectionAccessSelectionView[] = [];\n groups: string[] = [];\n\n groupNames: string[] = [];\n collectionNames: string[] = [];\n\n static fromResponse(response: OrganizationUserUserDetailsResponse): OrganizationUserView {\n const view = Object.assign(new OrganizationUserView(), response) as OrganizationUserView;\n\n if (response.collections != undefined) {\n view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c));\n }\n\n if (response.groups != undefined) {\n view.groups = response.groups;\n }\n\n return view;\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { OrganizationInformationComponent } from \"./organization-information.component\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [OrganizationInformationComponent],\n exports: [OrganizationInformationComponent],\n})\nexport class OrganizationCreateModule {}\n","
\n \n {{ \"organizationName\" | i18n }}\n \n \n
\n
\n

{{ \"generalInformation\" | i18n }}

\n
\n \n {{ \"organizationName\" | i18n }}\n \n \n \n {{ \"billingEmail\" | i18n }}\n \n \n \n {{ \"clientOwnerEmail\" | i18n }}\n \n \n
\n
\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { UntypedFormGroup } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\n\n@Component({\n selector: \"app-org-info\",\n templateUrl: \"organization-information.component.html\",\n})\nexport class OrganizationInformationComponent implements OnInit {\n @Input() nameOnly = false;\n @Input() createOrganization = true;\n @Input() isProvider = false;\n @Input() acceptingSponsorship = false;\n @Input() formGroup: UntypedFormGroup;\n @Output() changedBusinessOwned = new EventEmitter();\n\n constructor(private accountService: AccountService) {}\n\n async ngOnInit(): Promise {\n if (this.formGroup.controls.billingEmail.value) {\n return;\n }\n\n const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n\n if (activeAccount?.email) {\n this.formGroup.controls.billingEmail.setValue(activeAccount.email);\n }\n }\n}\n","import { inject } from \"@angular/core\";\nimport {\n ActivatedRouteSnapshot,\n CanActivateFn,\n Router,\n RouterStateSnapshot,\n} from \"@angular/router\";\n\nimport {\n canAccessOrgAdmin,\n OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\n\n/**\n * `CanActivateFn` that asserts the logged in user has permission to access\n * the page being navigated to. Two high-level checks are performed:\n *\n * 1. If the user is not a member of the organization in the URL parameters, they\n * are redirected to the home screen.\n * 2. If the organization in the URL parameters is disabled and the user is not\n * an admin, they are redirected to the home screen.\n *\n * In addition to these high level checks the guard accepts a callback\n * function as an argument that will be called to check for more granular\n * permissions. Based on the return from callback one of the following\n * will happen:\n *\n * 1. If the logged in user does not have the required permissions they are\n * redirected to `/organizations/{id}` or `/` based on admin console access\n * permissions.\n * 2. If the logged in user does have the required permissions navigation\n * proceeds as expected.\n */\nexport function organizationPermissionsGuard(\n permissionsCallback?: (organization: Organization) => boolean,\n): CanActivateFn {\n return async (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const router = inject(Router);\n const organizationService = inject(OrganizationService);\n const toastService = inject(ToastService);\n const i18nService = inject(I18nService);\n const syncService = inject(SyncService);\n\n // TODO: We need to fix issue once and for all.\n if ((await syncService.getLastSync()) == null) {\n await syncService.fullSync(false);\n }\n\n const org = await organizationService.get(route.params.organizationId);\n if (org == null) {\n return router.createUrlTree([\"/\"]);\n }\n\n if (!org.isOwner && !org.enabled) {\n toastService.showToast({\n variant: \"error\",\n title: null,\n message: i18nService.t(\"organizationIsDisabled\"),\n });\n return router.createUrlTree([\"/\"]);\n }\n\n const hasPermissions = permissionsCallback == null || permissionsCallback(org);\n\n if (!hasPermissions) {\n // Handle linkable ciphers for organizations the user only has view access to\n // https://bitwarden.atlassian.net/browse/EC-203\n const cipherId =\n state.root.queryParamMap.get(\"itemId\") || state.root.queryParamMap.get(\"cipherId\");\n if (cipherId) {\n return router.createUrlTree([\"/vault\"], {\n queryParams: {\n itemId: cipherId,\n },\n });\n }\n\n toastService.showToast({\n variant: \"error\",\n title: null,\n message: i18nService.t(\"accessDenied\"),\n });\n return canAccessOrgAdmin(org)\n ? router.createUrlTree([\"/organizations\", org.id])\n : router.createUrlTree([\"/\"]);\n }\n\n return true;\n };\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const AdminConsoleLogo = svgIcon`\n\n`;\n","\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n {{ \"accessingUsingProvider\" | i18n: organization.providerName }}\n \n \n\n \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { combineLatest, map, mergeMap, Observable, Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n canAccessBillingTab,\n canAccessGroupsTab,\n canAccessMembersTab,\n canAccessOrgAdmin,\n canAccessReportingTab,\n canAccessSettingsTab,\n canAccessVaultTab,\n getOrganizationById,\n OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { PolicyType, ProviderStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { BannerModule, IconModule } from \"@bitwarden/components\";\n\nimport { OrgSwitcherComponent } from \"../../../layouts/org-switcher/org-switcher.component\";\nimport { WebLayoutModule } from \"../../../layouts/web-layout.module\";\nimport { AdminConsoleLogo } from \"../../icons/admin-console-logo\";\n\n@Component({\n selector: \"app-organization-layout\",\n templateUrl: \"organization-layout.component.html\",\n standalone: true,\n imports: [\n CommonModule,\n RouterModule,\n JslibModule,\n WebLayoutModule,\n IconModule,\n OrgSwitcherComponent,\n BannerModule,\n ],\n})\nexport class OrganizationLayoutComponent implements OnInit, OnDestroy {\n protected readonly logo = AdminConsoleLogo;\n\n protected orgFilter = (org: Organization) => canAccessOrgAdmin(org);\n\n organization$: Observable;\n showPaymentAndHistory$: Observable;\n hideNewOrgButton$: Observable;\n organizationIsUnmanaged$: Observable;\n\n private _destroy = new Subject();\n\n protected consolidatedBillingEnabled$ = this.configService.getFeatureFlag$(\n FeatureFlag.EnableConsolidatedBilling,\n );\n\n constructor(\n private route: ActivatedRoute,\n private organizationService: OrganizationService,\n private platformUtilsService: PlatformUtilsService,\n private configService: ConfigService,\n private policyService: PolicyService,\n private providerService: ProviderService,\n ) {}\n\n async ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n\n this.organization$ = this.route.params\n .pipe(takeUntil(this._destroy))\n .pipe(map((p) => p.organizationId))\n .pipe(\n mergeMap((id) => {\n return this.organizationService.organizations$\n .pipe(takeUntil(this._destroy))\n .pipe(getOrganizationById(id));\n }),\n );\n\n this.showPaymentAndHistory$ = this.organization$.pipe(\n map(\n (org) =>\n !this.platformUtilsService.isSelfHost() &&\n org?.canViewBillingHistory &&\n org?.canEditPaymentMethods,\n ),\n );\n\n this.hideNewOrgButton$ = this.policyService.policyAppliesToActiveUser$(PolicyType.SingleOrg);\n\n const provider$ = this.organization$.pipe(\n switchMap((organization) => this.providerService.get$(organization.providerId)),\n );\n\n this.organizationIsUnmanaged$ = combineLatest([\n this.consolidatedBillingEnabled$,\n this.organization$,\n provider$,\n ]).pipe(\n map(\n ([consolidatedBillingEnabled, organization, provider]) =>\n !consolidatedBillingEnabled ||\n !organization.hasProvider ||\n !provider ||\n provider.providerStatus !== ProviderStatusType.Billable,\n ),\n );\n }\n\n ngOnDestroy() {\n this._destroy.next();\n this._destroy.complete();\n }\n\n canShowVaultTab(organization: Organization): boolean {\n return canAccessVaultTab(organization);\n }\n\n canShowSettingsTab(organization: Organization): boolean {\n return canAccessSettingsTab(organization);\n }\n\n canShowMembersTab(organization: Organization): boolean {\n return canAccessMembersTab(organization);\n }\n\n canShowGroupsTab(organization: Organization): boolean {\n return canAccessGroupsTab(organization);\n }\n\n canShowReportsTab(organization: Organization): boolean {\n return canAccessReportingTab(organization);\n }\n\n canShowBillingTab(organization: Organization): boolean {\n return canAccessBillingTab(organization);\n }\n\n getReportTabLabel(organization: Organization): string {\n return organization.useEvents ? \"reporting\" : \"reports\";\n }\n}\n","\n \n {{ \"eventLogs\" | i18n }}\n {{ name }}\n \n
\n
\n
\n
\n \n \n \n \n
\n -\n
\n \n \n \n \n
\n \n
\n
\n
\n
\n {{ \"noEventsInList\" | i18n }}\n
\n \n \n \n {{ \"timestamp\" | i18n }}\n \n {{ \"client\" | i18n }}\n \n {{ \"member\" | i18n }}\n {{ \"event\" | i18n }}\n \n \n \n \n {{ r.date | date: \"medium\" }}\n \n \n {{ r.appName }}, {{ r.ip }}\n \n \n {{ r.userName }}\n \n \n \n \n \n \n {{ \"loadMore\" | i18n }}\n \n
\n \n \n \n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { EventResponse } from \"@bitwarden/common/models/response/event.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { EventView } from \"@bitwarden/common/models/view/event.view\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService, TableDataSource } from \"@bitwarden/components\";\n\nimport { EventService } from \"../../../core\";\nimport { SharedModule } from \"../../../shared\";\n\nexport interface EntityEventsDialogParams {\n entity: \"user\" | \"cipher\";\n entityId: string;\n\n organizationId?: string;\n providerId?: string;\n showUser?: boolean;\n name?: string;\n}\n\n@Component({\n imports: [SharedModule],\n templateUrl: \"entity-events.component.html\",\n standalone: true,\n})\nexport class EntityEventsComponent implements OnInit {\n loading = true;\n continuationToken: string;\n protected dataSource = new TableDataSource();\n protected filterFormGroup = this.formBuilder.group({\n start: [\"\"],\n end: [\"\"],\n });\n\n private orgUsersUserIdMap = new Map();\n private orgUsersIdMap = new Map();\n\n get name() {\n return this.params.name;\n }\n\n get showUser() {\n return this.params.showUser ?? false;\n }\n\n constructor(\n @Inject(DIALOG_DATA) private params: EntityEventsDialogParams,\n private apiService: ApiService,\n private i18nService: I18nService,\n private eventService: EventService,\n private platformUtilsService: PlatformUtilsService,\n private userNamePipe: UserNamePipe,\n private logService: LogService,\n private organizationUserService: OrganizationUserService,\n private formBuilder: FormBuilder,\n private validationService: ValidationService,\n ) {}\n\n async ngOnInit() {\n const defaultDates = this.eventService.getDefaultDateFilters();\n this.filterFormGroup.setValue({\n start: defaultDates[0],\n end: defaultDates[1],\n });\n await this.load();\n }\n\n async load() {\n try {\n if (this.showUser) {\n const response = await this.organizationUserService.getAllUsers(this.params.organizationId);\n response.data.forEach((u) => {\n const name = this.userNamePipe.transform(u);\n this.orgUsersIdMap.set(u.id, { name: name, email: u.email });\n this.orgUsersUserIdMap.set(u.userId, { name: name, email: u.email });\n });\n }\n await this.loadEvents(true);\n } catch (e) {\n this.logService.error(e);\n this.validationService.showError(e);\n }\n\n this.loading = false;\n }\n\n loadMoreEvents = async () => {\n await this.loadEvents(false);\n };\n\n refreshEvents = async () => {\n await this.loadEvents(true);\n };\n\n private async loadEvents(clearExisting: boolean) {\n let dates: string[] = null;\n try {\n dates = this.eventService.formatDateFilters(\n this.filterFormGroup.value.start,\n this.filterFormGroup.value.end,\n );\n } catch (e) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidDateRange\"),\n );\n return;\n }\n\n let response: ListResponse;\n if (this.params.entity === \"user\" && this.params.providerId) {\n response = await this.apiService.getEventsProviderUser(\n this.params.providerId,\n this.params.entityId,\n dates[0],\n dates[1],\n clearExisting ? null : this.continuationToken,\n );\n } else if (this.params.entity === \"user\") {\n response = await this.apiService.getEventsOrganizationUser(\n this.params.organizationId,\n this.params.entityId,\n dates[0],\n dates[1],\n clearExisting ? null : this.continuationToken,\n );\n } else {\n response = await this.apiService.getEventsCipher(\n this.params.entityId,\n dates[0],\n dates[1],\n clearExisting ? null : this.continuationToken,\n );\n }\n\n this.continuationToken = response.continuationToken;\n const events: EventView[] = await Promise.all(\n response.data.map(async (r) => {\n const userId = r.actingUserId == null ? r.userId : r.actingUserId;\n const eventInfo = await this.eventService.getEventInfo(r);\n const user =\n this.showUser && userId != null && this.orgUsersUserIdMap.has(userId)\n ? this.orgUsersUserIdMap.get(userId)\n : null;\n\n return new EventView({\n message: eventInfo.message,\n humanReadableMessage: eventInfo.humanReadableMessage,\n appIcon: eventInfo.appIcon,\n appName: eventInfo.appName,\n userId: userId,\n userName: user != null ? user.name : this.showUser ? this.i18nService.t(\"unknown\") : null,\n userEmail: user != null ? user.email : this.showUser ? \"\" : null,\n date: r.date,\n ip: r.ipAddress,\n type: r.type,\n installationId: r.installationId,\n systemUser: r.systemUser,\n serviceAccountId: r.serviceAccountId,\n });\n }),\n );\n\n if (!clearExisting && this.dataSource.data != null && this.dataSource.data.length > 0) {\n this.dataSource.data = this.dataSource.data.concat(events);\n } else {\n this.dataSource.data = events;\n }\n }\n}\n\n/**\n * Strongly typed helper to open a EntityEventsComponent as a dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openEntityEventsDialog = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(EntityEventsComponent, config);\n};\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport type UserConfirmDialogData = {\n name: string;\n userId: string;\n publicKey: Uint8Array;\n confirmUser: (publicKey: Uint8Array) => Promise;\n};\n\n@Component({\n selector: \"app-user-confirm\",\n templateUrl: \"user-confirm.component.html\",\n})\nexport class UserConfirmComponent implements OnInit {\n name: string;\n userId: string;\n publicKey: Uint8Array;\n\n loading = true;\n fingerprint: string;\n formPromise: Promise;\n\n formGroup = new FormGroup({\n dontAskAgain: new FormControl(false),\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected data: UserConfirmDialogData,\n private dialogRef: DialogRef,\n private cryptoService: CryptoService,\n private logService: LogService,\n private organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n ) {\n this.name = data.name;\n this.userId = data.userId;\n this.publicKey = data.publicKey;\n }\n\n async ngOnInit() {\n try {\n if (this.publicKey != null) {\n const fingerprint = await this.cryptoService.getFingerprint(this.userId, this.publicKey);\n if (fingerprint != null) {\n this.fingerprint = fingerprint.join(\"-\");\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n this.loading = false;\n }\n\n submit = async () => {\n if (this.loading) {\n return;\n }\n\n if (this.formGroup.value.dontAskAgain) {\n await this.organizationManagementPreferencesService.autoConfirmFingerPrints.set(true);\n }\n\n await this.data.confirmUser(this.publicKey);\n\n this.dialogRef.close();\n };\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(UserConfirmComponent, config);\n }\n}\n","
\n \n \n {{ \"confirmUser\" | i18n }}\n {{ name }}\n \n \n

\n {{ \"fingerprintEnsureIntegrityVerify\" | i18n }}\n \n {{ \"learnMore\" | i18n }}\n

\n

\n {{ fingerprint }}\n

\n \n \n {{ \"dontAskFingerprintAgain\" | i18n }}\n \n
\n \n \n \n \n
\n
\n","export class OrganizationVerifyDeleteRecoverRequest {\n token: string;\n\n constructor(token: string) {\n this.token = token;\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"@bitwarden/common/admin-console/models/request/organization-verify-delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\n@Component({\n templateUrl: \"verify-recover-delete-org.component.html\",\n standalone: true,\n imports: [SharedModule],\n})\nexport class VerifyRecoverDeleteOrgComponent implements OnInit {\n loading = true;\n name: string;\n\n private orgId: string;\n private token: string;\n\n constructor(\n private router: Router,\n private apiService: OrganizationApiServiceAbstraction,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n ) {}\n\n async ngOnInit() {\n const qParams = await firstValueFrom(this.route.queryParams);\n if (qParams.orgId != null && qParams.token != null && qParams.name != null) {\n this.orgId = qParams.orgId;\n this.token = qParams.token;\n this.name = qParams.name;\n this.loading = false;\n } else {\n await this.router.navigate([\"/\"]);\n }\n }\n\n submit = async () => {\n const request = new OrganizationVerifyDeleteRecoverRequest(this.token);\n await this.apiService.deleteUsingToken(this.orgId, request);\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"organizationDeleted\"),\n this.i18nService.t(\"organizationDeletedDesc\"),\n );\n await this.router.navigate([\"/\"]);\n };\n}\n","
\n
\n

{{ \"deleteOrganization\" | i18n }}

\n
\n
\n \n {{ \"deletingOrganizationIsPermanentWarning\" | i18n: name }}\n \n

\n {{ name }}\n

\n

{{ \"deleteRecoverOrgConfirmDesc\" | i18n }}

\n

{{ \"deletingOrganizationActiveUserAccountsWarning\" | i18n }}

\n
\n
\n \n {{ \"deleteOrganization\" | i18n }}\n \n \n {{ \"cancel\" | i18n }}\n \n
\n
\n
\n
\n
\n","type OrganizationUserBulkRequestEntry = {\n id: string;\n key: string;\n};\n\nexport class OrganizationUserBulkConfirmRequest {\n keys: OrganizationUserBulkRequestEntry[];\n\n constructor(keys: OrganizationUserBulkRequestEntry[]) {\n this.keys = keys;\n }\n}\n","\n \n \n {{ \"noSelectedUsersApplicable\" | i18n }}\n \n \n {{ error }}\n \n \n

\n {{ \"fingerprintEnsureIntegrityVerify\" | i18n }}\n \n {{ \"learnMore\" | i18n }}\n

\n \n \n \n {{ \"user\" | i18n }}\n {{ \"fingerprint\" | i18n }}\n \n \n \n \n \n \n \n \n {{ user.email }}\n

{{ user.name }}

\n \n \n {{ fingerprints.get(user.id) }}\n \n \n \n \n \n \n \n {{ user.email }}\n

{{ user.name }}

\n \n \n {{ \"bulkFilteredMessage\" | i18n }}\n \n \n
\n
\n
\n \n \n \n \n {{ \"user\" | i18n }}\n {{ \"status\" | i18n }}\n \n \n \n \n \n \n \n \n {{ user.email }}\n

{{ user.name }}

\n \n \n {{ statuses.get(user.id) }}\n \n \n {{ \"bulkFilteredMessage\" | i18n }}\n \n \n
\n
\n
\n
\n \n \n {{ \"confirm\" | i18n }}\n \n \n \n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserBulkConfirmRequest } from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { OrganizationUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { BulkUserDetails } from \"./bulk-status.component\";\n\ntype BulkConfirmDialogData = {\n organizationId: string;\n users: BulkUserDetails[];\n};\n\n@Component({\n selector: \"app-bulk-confirm\",\n templateUrl: \"bulk-confirm.component.html\",\n})\nexport class BulkConfirmComponent implements OnInit {\n organizationId: string;\n users: BulkUserDetails[];\n\n excludedUsers: BulkUserDetails[];\n filteredUsers: BulkUserDetails[];\n publicKeys: Map = new Map();\n fingerprints: Map = new Map();\n statuses: Map = new Map();\n\n loading = true;\n done = false;\n error: string;\n\n constructor(\n @Inject(DIALOG_DATA) protected data: BulkConfirmDialogData,\n protected cryptoService: CryptoService,\n protected apiService: ApiService,\n private organizationUserService: OrganizationUserService,\n private i18nService: I18nService,\n ) {\n this.organizationId = data.organizationId;\n this.users = data.users;\n }\n\n async ngOnInit() {\n this.excludedUsers = this.users.filter((u) => !this.isAccepted(u));\n this.filteredUsers = this.users.filter((u) => this.isAccepted(u));\n\n if (this.filteredUsers.length <= 0) {\n this.done = true;\n }\n\n const response = await this.getPublicKeys();\n\n for (const entry of response.data) {\n const publicKey = Utils.fromB64ToArray(entry.key);\n const fingerprint = await this.cryptoService.getFingerprint(entry.userId, publicKey);\n if (fingerprint != null) {\n this.publicKeys.set(entry.id, publicKey);\n this.fingerprints.set(entry.id, fingerprint.join(\"-\"));\n }\n }\n\n this.loading = false;\n }\n\n async submit() {\n this.loading = true;\n try {\n const key = await this.getCryptoKey();\n const userIdsWithKeys: any[] = [];\n for (const user of this.filteredUsers) {\n const publicKey = this.publicKeys.get(user.id);\n if (publicKey == null) {\n continue;\n }\n const encryptedKey = await this.cryptoService.rsaEncrypt(key.key, publicKey);\n userIdsWithKeys.push({\n id: user.id,\n key: encryptedKey.encryptedString,\n });\n }\n const response = await this.postConfirmRequest(userIdsWithKeys);\n\n response.data.forEach((entry) => {\n const error = entry.error !== \"\" ? entry.error : this.i18nService.t(\"bulkConfirmMessage\");\n this.statuses.set(entry.id, error);\n });\n\n this.done = true;\n } catch (e) {\n this.error = e.message;\n }\n this.loading = false;\n }\n\n protected isAccepted(user: BulkUserDetails) {\n return user.status === OrganizationUserStatusType.Accepted;\n }\n\n protected async getPublicKeys() {\n return await this.organizationUserService.postOrganizationUsersPublicKey(\n this.organizationId,\n this.filteredUsers.map((user) => user.id),\n );\n }\n\n protected getCryptoKey(): Promise {\n return this.cryptoService.getOrgKey(this.organizationId);\n }\n\n protected async postConfirmRequest(userIdsWithKeys: any[]) {\n const request = new OrganizationUserBulkConfirmRequest(userIdsWithKeys);\n return await this.organizationUserService.postOrganizationUserBulkConfirm(\n this.organizationId,\n request,\n );\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(BulkConfirmComponent, config);\n }\n}\n","\n \n \n {{ \"noSelectedUsersApplicable\" | i18n }}\n \n \n {{ error }}\n \n \n 0 && !error\">\n

{{ removeUsersWarning }}

\n

\n {{ \"removeMembersWithoutMasterPasswordWarning\" | i18n }}\n

\n
\n \n \n \n {{ \"user\" | i18n }}\n {{ \"details\" | i18n }}\n \n \n \n \n \n \n \n \n {{ user.email }}\n {{ user.name }}\n \n \n \n - \n \n \n {{ \"noMasterPassword\" | i18n }}\n \n \n \n \n \n \n
\n \n \n \n \n {{ \"user\" | i18n }}\n {{ \"status\" | i18n }}\n \n \n \n \n \n \n \n \n {{ user.email }}\n {{ user.name }}\n \n \n {{ statuses.get(user.id) }}\n \n \n {{ \"bulkFilteredMessage\" | i18n }}\n \n \n \n \n \n
\n \n 0\"\n bitButton\n type=\"submit\"\n buttonType=\"primary\"\n [disabled]=\"loading\"\n [bitAction]=\"submit\"\n >\n {{ \"removeUsers\" | i18n }}\n \n \n \n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { BulkUserDetails } from \"./bulk-status.component\";\n\ntype BulkRemoveDialogData = {\n organizationId: string;\n users: BulkUserDetails[];\n};\n\n@Component({\n selector: \"app-bulk-remove\",\n templateUrl: \"bulk-remove.component.html\",\n})\nexport class BulkRemoveComponent {\n organizationId: string;\n users: BulkUserDetails[];\n\n statuses: Map = new Map();\n\n loading = false;\n done = false;\n error: string;\n showNoMasterPasswordWarning = false;\n\n constructor(\n @Inject(DIALOG_DATA) protected data: BulkRemoveDialogData,\n protected apiService: ApiService,\n protected i18nService: I18nService,\n private organizationUserService: OrganizationUserService,\n ) {\n this.organizationId = data.organizationId;\n this.users = data.users;\n this.showNoMasterPasswordWarning = this.users.some(\n (u) => u.status > OrganizationUserStatusType.Invited && u.hasMasterPassword === false,\n );\n }\n\n submit = async () => {\n this.loading = true;\n try {\n const response = await this.deleteUsers();\n\n response.data.forEach((entry) => {\n const error = entry.error !== \"\" ? entry.error : this.i18nService.t(\"bulkRemovedMessage\");\n this.statuses.set(entry.id, error);\n });\n this.done = true;\n } catch (e) {\n this.error = e.message;\n }\n\n this.loading = false;\n };\n\n protected async deleteUsers() {\n return await this.organizationUserService.deleteManyOrganizationUsers(\n this.organizationId,\n this.users.map((user) => user.id),\n );\n }\n\n protected get removeUsersWarning() {\n return this.i18nService.t(\"removeOrgUsersConfirmation\");\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(BulkRemoveComponent, config);\n }\n}\n","\n \n
\n \n {{ \"loading\" | i18n }}\n
\n \n \n \n {{ \"user\" | i18n }}\n {{ \"status\" | i18n }}\n \n \n \n \n \n \n \n \n {{ item.user.email }}\n {{ item.user.name }}\n \n \n {{ item.message }}\n \n \n {{ item.message }}\n \n \n \n \n
\n \n \n \n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\n\nimport { OrganizationUserBulkResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport {\n OrganizationUserStatusType,\n ProviderUserStatusType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserBulkResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response\";\nimport { ProviderUserUserDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { OrganizationUserView } from \"../../../core/views/organization-user.view\";\n\nexport interface BulkUserDetails {\n id: string;\n name: string;\n email: string;\n status: OrganizationUserStatusType | ProviderUserStatusType;\n hasMasterPassword?: boolean;\n}\n\ntype BulkStatusEntry = {\n user: BulkUserDetails;\n error: boolean;\n message: string;\n};\n\ntype BulkStatusDialogData = {\n users: Array;\n filteredUsers: Array;\n request: Promise>;\n successfulMessage: string;\n};\n\n@Component({\n selector: \"app-bulk-status\",\n templateUrl: \"bulk-status.component.html\",\n})\nexport class BulkStatusComponent implements OnInit {\n users: BulkStatusEntry[];\n loading = false;\n\n constructor(\n @Inject(DIALOG_DATA) protected data: BulkStatusDialogData,\n private i18nService: I18nService,\n private logService: LogService,\n ) {}\n\n async ngOnInit() {\n this.loading = true;\n await this.showBulkStatus(this.data);\n }\n\n async showBulkStatus(data: BulkStatusDialogData) {\n try {\n const response = await data.request;\n const keyedErrors: any = response.data\n .filter((r) => r.error !== \"\")\n .reduce((a, x) => ({ ...a, [x.id]: x.error }), {});\n const keyedFilteredUsers: any = data.filteredUsers.reduce(\n (a, x) => ({ ...a, [x.id]: x }),\n {},\n );\n\n this.users = data.users.map((user) => {\n let message = keyedErrors[user.id] ?? data.successfulMessage;\n // eslint-disable-next-line\n if (!keyedFilteredUsers.hasOwnProperty(user.id)) {\n message = this.i18nService.t(\"bulkFilteredMessage\");\n }\n\n return {\n user: user,\n error: keyedErrors.hasOwnProperty(user.id), // eslint-disable-line\n message: message,\n };\n });\n this.loading = false;\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(BulkStatusComponent, config);\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { UserKeyRotationDataProvider } from \"@bitwarden/auth/common\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport {\n OrganizationUserResetPasswordRequest,\n OrganizationUserResetPasswordWithIdRequest,\n} from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport {\n Argon2KdfConfig,\n KdfConfig,\n PBKDF2KdfConfig,\n} from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class OrganizationUserResetPasswordService\n implements UserKeyRotationDataProvider\n{\n constructor(\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n private organizationService: OrganizationService,\n private organizationUserService: OrganizationUserService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private i18nService: I18nService,\n ) {}\n\n /**\n * Returns the user key encrypted by the organization's public key.\n * Intended for use in enrollment\n * @param orgId desired organization\n */\n async buildRecoveryKey(orgId: string, userKey?: UserKey): Promise {\n // Retrieve Public Key\n const orgKeys = await this.organizationApiService.getKeys(orgId);\n if (orgKeys == null) {\n throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n }\n\n const publicKey = Utils.fromB64ToArray(orgKeys.publicKey);\n\n // RSA Encrypt user key with organization's public key\n userKey ??= await this.cryptoService.getUserKey();\n if (userKey == null) {\n throw new Error(\"No user key found\");\n }\n const encryptedKey = await this.cryptoService.rsaEncrypt(userKey.key, publicKey);\n\n return encryptedKey.encryptedString;\n }\n\n /**\n * Sets a user's master password through account recovery.\n * Intended for organization admins\n * @param newMasterPassword user's new master password\n * @param email user's email\n * @param orgUserId organization user's id\n * @param orgId organization id\n */\n async resetMasterPassword(\n newMasterPassword: string,\n email: string,\n orgUserId: string,\n orgId: string,\n ): Promise {\n const response = await this.organizationUserService.getOrganizationUserResetPasswordDetails(\n orgId,\n orgUserId,\n );\n\n if (response == null) {\n throw new Error(this.i18nService.t(\"resetPasswordDetailsError\"));\n }\n\n // Decrypt Organization's encrypted Private Key with org key\n const orgSymKey = await this.cryptoService.getOrgKey(orgId);\n if (orgSymKey == null) {\n throw new Error(\"No org key found\");\n }\n const decPrivateKey = await this.encryptService.decryptToBytes(\n new EncString(response.encryptedPrivateKey),\n orgSymKey,\n );\n\n // Decrypt User's Reset Password Key to get UserKey\n const decValue = await this.cryptoService.rsaDecrypt(response.resetPasswordKey, decPrivateKey);\n const existingUserKey = new SymmetricCryptoKey(decValue) as UserKey;\n\n // determine Kdf Algorithm\n const kdfConfig: KdfConfig =\n response.kdf === KdfType.PBKDF2_SHA256\n ? new PBKDF2KdfConfig(response.kdfIterations)\n : new Argon2KdfConfig(response.kdfIterations, response.kdfMemory, response.kdfParallelism);\n\n // Create new master key and hash new password\n const newMasterKey = await this.cryptoService.makeMasterKey(\n newMasterPassword,\n email.trim().toLowerCase(),\n kdfConfig,\n );\n const newMasterKeyHash = await this.cryptoService.hashMasterKey(\n newMasterPassword,\n newMasterKey,\n );\n\n // Create new encrypted user key for the User\n const newUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(\n newMasterKey,\n existingUserKey,\n );\n\n // Create request\n const request = new OrganizationUserResetPasswordRequest();\n request.key = newUserKey[1].encryptedString;\n request.newMasterPasswordHash = newMasterKeyHash;\n\n // Change user's password\n await this.organizationUserService.putOrganizationUserResetPassword(orgId, orgUserId, request);\n }\n\n /**\n * Returns existing account recovery keys re-encrypted with the new user key.\n * @param originalUserKey the original user key\n * @param newUserKey the new user key\n * @param userId the user id\n * @throws Error if new user key is null\n * @returns a list of account recovery keys that have been re-encrypted with the new user key\n */\n async getRotatedData(\n originalUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (newUserKey == null) {\n throw new Error(\"New user key is required for rotation.\");\n }\n\n const allOrgs = await this.organizationService.getAll();\n\n if (!allOrgs) {\n return;\n }\n\n const requests: OrganizationUserResetPasswordWithIdRequest[] = [];\n for (const org of allOrgs) {\n // If not already enrolled, skip\n if (!org.resetPasswordEnrolled) {\n continue;\n }\n\n // Re-enroll - encrypt user key with organization public key\n const encryptedKey = await this.buildRecoveryKey(org.id, newUserKey);\n\n // Create/Execute request\n const request = new OrganizationUserResetPasswordWithIdRequest();\n request.organizationId = org.id;\n request.resetPasswordKey = encryptedKey;\n request.masterPasswordHash = \"ignored\";\n\n requests.push(request);\n }\n return requests;\n }\n}\n","import { PolicyType } from \"../../enums\";\n\nexport class PolicyRequest {\n type: PolicyType;\n enabled: boolean;\n data: any;\n}\n","import { Directive, Input, OnInit } from \"@angular/core\";\nimport { UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\n\nexport abstract class BasePolicy {\n abstract name: string;\n abstract description: string;\n abstract type: PolicyType;\n abstract component: any;\n\n display(organization: Organization) {\n return true;\n }\n}\n\n@Directive()\nexport abstract class BasePolicyComponent implements OnInit {\n @Input() policyResponse: PolicyResponse;\n @Input() policy: BasePolicy;\n\n enabled = new UntypedFormControl(false);\n data: UntypedFormGroup = null;\n\n ngOnInit(): void {\n this.enabled.setValue(this.policyResponse.enabled);\n\n if (this.policyResponse.data != null) {\n this.loadData();\n }\n }\n\n loadData() {\n this.data.patchValue(this.policyResponse.data ?? {});\n }\n\n buildRequestData() {\n if (this.data != null) {\n return this.data.value;\n }\n\n return null;\n }\n\n buildRequest(policiesEnabledMap: Map) {\n const request = new PolicyRequest();\n request.enabled = this.enabled.value;\n request.type = this.policy.type;\n request.data = this.buildRequestData();\n\n return Promise.resolve(request);\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { LooseComponentsModule, SharedModule } from \"../../../shared\";\n\nimport { DisableSendPolicyComponent } from \"./disable-send.component\";\nimport { MasterPasswordPolicyComponent } from \"./master-password.component\";\nimport { PasswordGeneratorPolicyComponent } from \"./password-generator.component\";\nimport { PersonalOwnershipPolicyComponent } from \"./personal-ownership.component\";\nimport { PoliciesComponent } from \"./policies.component\";\nimport { PolicyEditComponent } from \"./policy-edit.component\";\nimport { RequireSsoPolicyComponent } from \"./require-sso.component\";\nimport { ResetPasswordPolicyComponent } from \"./reset-password.component\";\nimport { SendOptionsPolicyComponent } from \"./send-options.component\";\nimport { SingleOrgPolicyComponent } from \"./single-org.component\";\nimport { TwoFactorAuthenticationPolicyComponent } from \"./two-factor-authentication.component\";\n\n@NgModule({\n imports: [SharedModule, LooseComponentsModule],\n declarations: [\n DisableSendPolicyComponent,\n MasterPasswordPolicyComponent,\n PasswordGeneratorPolicyComponent,\n PersonalOwnershipPolicyComponent,\n RequireSsoPolicyComponent,\n ResetPasswordPolicyComponent,\n SendOptionsPolicyComponent,\n SingleOrgPolicyComponent,\n TwoFactorAuthenticationPolicyComponent,\n PoliciesComponent,\n PolicyEditComponent,\n ],\n exports: [\n DisableSendPolicyComponent,\n MasterPasswordPolicyComponent,\n PasswordGeneratorPolicyComponent,\n PersonalOwnershipPolicyComponent,\n RequireSsoPolicyComponent,\n ResetPasswordPolicyComponent,\n SendOptionsPolicyComponent,\n SingleOrgPolicyComponent,\n TwoFactorAuthenticationPolicyComponent,\n PoliciesComponent,\n PolicyEditComponent,\n ],\n})\nexport class PoliciesModule {}\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class DisableSendPolicy extends BasePolicy {\n name = \"disableSend\";\n description = \"disableSendPolicyDesc\";\n type = PolicyType.DisableSend;\n component = DisableSendPolicyComponent;\n}\n\n@Component({\n selector: \"policy-disable-send\",\n templateUrl: \"disable-send.component.html\",\n})\nexport class DisableSendPolicyComponent extends BasePolicyComponent {}\n","\n {{ \"disableSendExemption\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n","\n {{ \"keyConnectorPolicyRestriction\" | i18n }}\n\n\n
\n \n \n {{ \"turnOn\" | i18n }}\n \n\n \n \n {{ \"enforceOnLoginDesc\" | i18n }}\n \n\n
\n \n {{ \"minComplexityScore\" | i18n }}\n \n \n \n \n \n {{ \"minLength\" | i18n }}\n \n \n
\n\n \n \n A-Z\n \n \n \n a-z\n \n \n \n 0-9\n \n \n \n !@#$%^&*\n \n
\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class MasterPasswordPolicy extends BasePolicy {\n name = \"masterPassPolicyTitle\";\n description = \"masterPassPolicyDesc\";\n type = PolicyType.MasterPassword;\n component = MasterPasswordPolicyComponent;\n}\n\n@Component({\n selector: \"policy-master-password\",\n templateUrl: \"master-password.component.html\",\n})\nexport class MasterPasswordPolicyComponent extends BasePolicyComponent implements OnInit {\n MinPasswordLength = Utils.minimumPasswordLength;\n\n data: FormGroup> = this.formBuilder.group({\n minComplexity: [null],\n minLength: [this.MinPasswordLength, [Validators.min(Utils.minimumPasswordLength)]],\n requireUpper: [false],\n requireLower: [false],\n requireNumbers: [false],\n requireSpecial: [false],\n enforceOnLogin: [false],\n });\n\n passwordScores: { name: string; value: number }[];\n showKeyConnectorInfo = false;\n\n constructor(\n private formBuilder: FormBuilder,\n i18nService: I18nService,\n private organizationService: OrganizationService,\n ) {\n super();\n\n this.passwordScores = [\n { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n { name: i18nService.t(\"weak\") + \" (0)\", value: 0 },\n { name: i18nService.t(\"weak\") + \" (1)\", value: 1 },\n { name: i18nService.t(\"weak\") + \" (2)\", value: 2 },\n { name: i18nService.t(\"good\") + \" (3)\", value: 3 },\n { name: i18nService.t(\"strong\") + \" (4)\", value: 4 },\n ];\n }\n\n async ngOnInit() {\n super.ngOnInit();\n const organization = await this.organizationService.get(this.policyResponse.organizationId);\n this.showKeyConnectorInfo = organization.keyConnectorEnabled;\n }\n}\n","
\n \n \n {{ \"turnOn\" | i18n }}\n \n\n
\n \n {{ \"defaultType\" | i18n }}\n \n \n \n \n
\n\n

{{ \"password\" | i18n }}

\n
\n \n {{ \"minLength\" | i18n }}\n \n \n
\n
\n \n {{ \"minNumbers\" | i18n }}\n \n \n \n {{ \"minSpecial\" | i18n }}\n \n \n
\n \n \n A-Z\n \n \n \n a-z\n \n \n \n 0-9\n \n \n \n !@#$%^&*\n \n

{{ \"passphrase\" | i18n }}

\n
\n \n {{ \"minimumNumberOfWords\" | i18n }}\n \n \n
\n \n \n {{ \"capitalize\" | i18n }}\n \n \n \n {{ \"includeNumber\" | i18n }}\n \n
\n","import { Component } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class PasswordGeneratorPolicy extends BasePolicy {\n name = \"passwordGenerator\";\n description = \"passwordGeneratorPolicyDesc\";\n type = PolicyType.PasswordGenerator;\n component = PasswordGeneratorPolicyComponent;\n}\n\n@Component({\n selector: \"policy-password-generator\",\n templateUrl: \"password-generator.component.html\",\n})\nexport class PasswordGeneratorPolicyComponent extends BasePolicyComponent {\n data = this.formBuilder.group({\n defaultType: [null],\n minLength: [null, [Validators.min(5), Validators.max(128)]],\n useUpper: [null],\n useLower: [null],\n useNumbers: [null],\n useSpecial: [null],\n minNumbers: [null, [Validators.min(0), Validators.max(9)]],\n minSpecial: [null, [Validators.min(0), Validators.max(9)]],\n minNumberWords: [null, [Validators.min(3), Validators.max(20)]],\n capitalize: [null],\n includeNumber: [null],\n });\n\n defaultTypes: { name: string; value: string }[];\n\n constructor(\n private formBuilder: UntypedFormBuilder,\n i18nService: I18nService,\n ) {\n super();\n\n this.defaultTypes = [\n { name: i18nService.t(\"userPreference\"), value: null },\n { name: i18nService.t(\"password\"), value: \"password\" },\n { name: i18nService.t(\"passphrase\"), value: \"passphrase\" },\n ];\n }\n}\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class PersonalOwnershipPolicy extends BasePolicy {\n name = \"personalOwnership\";\n description = \"personalOwnershipPolicyDesc\";\n type = PolicyType.PersonalOwnership;\n component = PersonalOwnershipPolicyComponent;\n}\n\n@Component({\n selector: \"policy-personal-ownership\",\n templateUrl: \"personal-ownership.component.html\",\n})\nexport class PersonalOwnershipPolicyComponent extends BasePolicyComponent {}\n","\n {{ \"personalOwnershipExemption\" | i18n }}\n\n\n
\n
\n \n \n
\n
\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class RequireSsoPolicy extends BasePolicy {\n name = \"requireSso\";\n description = \"requireSsoPolicyDesc\";\n type = PolicyType.RequireSso;\n component = RequireSsoPolicyComponent;\n\n display(organization: Organization) {\n return organization.useSso;\n }\n}\n\n@Component({\n selector: \"policy-require-sso\",\n templateUrl: \"require-sso.component.html\",\n})\nexport class RequireSsoPolicyComponent extends BasePolicyComponent {\n constructor(private i18nService: I18nService) {\n super();\n }\n\n buildRequest(policiesEnabledMap: Map): Promise {\n const singleOrgEnabled = policiesEnabledMap.get(PolicyType.SingleOrg) ?? false;\n if (this.enabled.value && !singleOrgEnabled) {\n throw new Error(this.i18nService.t(\"requireSsoPolicyReqError\"));\n }\n\n return super.buildRequest(policiesEnabledMap);\n }\n}\n","\n {{ \"requireSsoPolicyReq\" | i18n }}\n\n\n {{ \"requireSsoExemption\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n","\n {{ \"keyConnectorPolicyRestriction\" | i18n }}\n\n\n\n {{ \"accountRecoverySingleOrgRequirementDesc\" | i18n }}\n\n\n\n {{ \"accountRecoveryPolicyWarning\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n\n\n \n \n {{ \"resetPasswordPolicyAutoEnrollCheckbox\" | i18n }}\n \n\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class ResetPasswordPolicy extends BasePolicy {\n name = \"accountRecoveryPolicy\";\n description = \"accountRecoveryPolicyDesc\";\n type = PolicyType.ResetPassword;\n component = ResetPasswordPolicyComponent;\n\n display(organization: Organization) {\n return organization.useResetPassword;\n }\n}\n\n@Component({\n selector: \"policy-reset-password\",\n templateUrl: \"reset-password.component.html\",\n})\nexport class ResetPasswordPolicyComponent extends BasePolicyComponent implements OnInit {\n data = this.formBuilder.group({\n autoEnrollEnabled: false,\n });\n showKeyConnectorInfo = false;\n\n constructor(\n private formBuilder: FormBuilder,\n private organizationService: OrganizationService,\n ) {\n super();\n }\n\n async ngOnInit() {\n super.ngOnInit();\n const organization = await this.organizationService.get(this.policyResponse.organizationId);\n this.showKeyConnectorInfo = organization.keyConnectorEnabled;\n }\n}\n","import { Component } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class SendOptionsPolicy extends BasePolicy {\n name = \"sendOptions\";\n description = \"sendOptionsPolicyDesc\";\n type = PolicyType.SendOptions;\n component = SendOptionsPolicyComponent;\n}\n\n@Component({\n selector: \"policy-send-options\",\n templateUrl: \"send-options.component.html\",\n})\nexport class SendOptionsPolicyComponent extends BasePolicyComponent {\n data = this.formBuilder.group({\n disableHideEmail: false,\n });\n\n constructor(private formBuilder: UntypedFormBuilder) {\n super();\n }\n}\n","\n {{ \"sendOptionsExemption\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n\n
\n

{{ \"options\" | i18n }}

\n \n \n {{ \"disableHideEmail\" | i18n }}\n \n
\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class SingleOrgPolicy extends BasePolicy {\n name = \"singleOrg\";\n description = \"singleOrgDesc\";\n type = PolicyType.SingleOrg;\n component = SingleOrgPolicyComponent;\n}\n\n@Component({\n selector: \"policy-single-org\",\n templateUrl: \"single-org.component.html\",\n})\nexport class SingleOrgPolicyComponent extends BasePolicyComponent {\n constructor(private i18nService: I18nService) {\n super();\n }\n\n buildRequest(policiesEnabledMap: Map): Promise {\n if (!this.enabled.value) {\n if (policiesEnabledMap.get(PolicyType.RequireSso) ?? false) {\n throw new Error(\n this.i18nService.t(\"disableRequiredError\", this.i18nService.t(\"requireSso\")),\n );\n }\n\n if (policiesEnabledMap.get(PolicyType.MaximumVaultTimeout) ?? false) {\n throw new Error(\n this.i18nService.t(\n \"disableRequiredError\",\n this.i18nService.t(\"maximumVaultTimeoutLabel\"),\n ),\n );\n }\n }\n\n return super.buildRequest(policiesEnabledMap);\n }\n}\n","\n {{ \"singleOrgPolicyWarning\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class TwoFactorAuthenticationPolicy extends BasePolicy {\n name = \"twoStepLoginPolicyTitle\";\n description = \"twoStepLoginPolicyDesc\";\n type = PolicyType.TwoFactorAuthentication;\n component = TwoFactorAuthenticationPolicyComponent;\n}\n\n@Component({\n selector: \"policy-two-factor-authentication\",\n templateUrl: \"two-factor-authentication.component.html\",\n})\nexport class TwoFactorAuthenticationPolicyComponent extends BasePolicyComponent {}\n","\n {{ \"twoStepLoginPolicyWarning\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n","
\n \n \n
\n \n {{ \"loading\" | i18n }}\n
\n
\n

{{ policy.description | i18n }}

\n \n
\n
\n \n \n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n Inject,\n ViewChild,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { BasePolicy, BasePolicyComponent } from \"../policies\";\n\nexport type PolicyEditDialogData = {\n /** Returns policy abstracts. */\n policy: BasePolicy;\n /** Returns a unique organization id */\n organizationId: string;\n /** A map indicating whether each policy type is enabled or disabled. */\n policiesEnabledMap: Map;\n};\n\nexport enum PolicyEditDialogResult {\n Saved = \"saved\",\n}\n@Component({\n selector: \"app-policy-edit\",\n templateUrl: \"policy-edit.component.html\",\n})\nexport class PolicyEditComponent implements AfterViewInit {\n @ViewChild(\"policyForm\", { read: ViewContainerRef, static: true })\n policyFormRef: ViewContainerRef;\n\n policyType = PolicyType;\n loading = true;\n enabled = false;\n formPromise: Promise;\n defaultTypes: any[];\n policyComponent: BasePolicyComponent;\n\n private policyResponse: PolicyResponse;\n formGroup = this.formBuilder.group({\n enabled: [this.enabled],\n });\n constructor(\n @Inject(DIALOG_DATA) protected data: PolicyEditDialogData,\n private policyApiService: PolicyApiServiceAbstraction,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private cdr: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n ) {}\n get policy(): BasePolicy {\n return this.data.policy;\n }\n\n async ngAfterViewInit() {\n await this.load();\n this.loading = false;\n\n this.policyComponent = this.policyFormRef.createComponent(this.data.policy.component)\n .instance as BasePolicyComponent;\n this.policyComponent.policy = this.data.policy;\n this.policyComponent.policyResponse = this.policyResponse;\n\n this.cdr.detectChanges();\n }\n\n async load() {\n try {\n this.policyResponse = await this.policyApiService.getPolicy(\n this.data.organizationId,\n this.data.policy.type,\n );\n } catch (e) {\n if (e.statusCode === 404) {\n this.policyResponse = new PolicyResponse({ Enabled: false });\n } else {\n throw e;\n }\n }\n }\n\n submit = async () => {\n let request: PolicyRequest;\n try {\n request = await this.policyComponent.buildRequest(this.data.policiesEnabledMap);\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", null, e.message);\n return;\n }\n this.formPromise = this.policyApiService.putPolicy(\n this.data.organizationId,\n this.data.policy.type,\n request,\n );\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"editedPolicyId\", this.i18nService.t(this.data.policy.name)),\n );\n this.dialogRef.close(PolicyEditDialogResult.Saved);\n };\n\n static open = (dialogService: DialogService, config: DialogConfig) => {\n return dialogService.open(PolicyEditComponent, config);\n };\n}\n","\n\n\n \n \n {{ \"loading\" | i18n }}\n \n \n \n \n \n \n {{\n \"on\" | i18n\n }}\n {{ p.description | i18n }}\n \n \n \n \n \n\n","import { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PolicyListService } from \"../../core/policy-list.service\";\nimport { BasePolicy } from \"../policies\";\n\nimport { PolicyEditComponent, PolicyEditDialogResult } from \"./policy-edit.component\";\n\n@Component({\n selector: \"app-org-policies\",\n templateUrl: \"policies.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class PoliciesComponent implements OnInit {\n @ViewChild(\"editTemplate\", { read: ViewContainerRef, static: true })\n editModalRef: ViewContainerRef;\n\n loading = true;\n organizationId: string;\n policies: BasePolicy[];\n organization: Organization;\n\n private orgPolicies: PolicyResponse[];\n protected policiesEnabledMap: Map = new Map();\n\n constructor(\n private route: ActivatedRoute,\n private organizationService: OrganizationService,\n private policyApiService: PolicyApiServiceAbstraction,\n private policyListService: PolicyListService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.parent.params.subscribe(async (params) => {\n this.organizationId = params.organizationId;\n this.organization = await this.organizationService.get(this.organizationId);\n this.policies = this.policyListService.getPolicies();\n\n await this.load();\n\n // Handle policies component launch from Event message\n /* eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe, rxjs/no-nested-subscribe */\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.policyId != null) {\n const policyIdFromEvents: string = qParams.policyId;\n for (const orgPolicy of this.orgPolicies) {\n if (orgPolicy.id === policyIdFromEvents) {\n for (let i = 0; i < this.policies.length; i++) {\n if (this.policies[i].type === orgPolicy.type) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.edit(this.policies[i]);\n break;\n }\n }\n break;\n }\n }\n }\n });\n });\n }\n\n async load() {\n const response = await this.policyApiService.getPolicies(this.organizationId);\n this.orgPolicies = response.data != null && response.data.length > 0 ? response.data : [];\n this.orgPolicies.forEach((op) => {\n this.policiesEnabledMap.set(op.type, op.enabled);\n });\n\n this.loading = false;\n }\n\n async edit(policy: BasePolicy) {\n const dialogRef = PolicyEditComponent.open(this.dialogService, {\n data: {\n policy: policy,\n organizationId: this.organizationId,\n policiesEnabledMap: this.policiesEnabledMap,\n },\n });\n\n const result = await lastValueFrom(dialogRef.closed);\n if (result === PolicyEditDialogResult.Saved) {\n await this.load();\n }\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { combineLatest, Subject, takeUntil } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { UserVerificationModule } from \"../../../../auth/shared/components/user-verification\";\nimport { SharedModule } from \"../../../../shared/shared.module\";\n\nclass CountBasedLocalizationKey {\n singular: string;\n plural: string;\n\n getKey(count: number) {\n return count == 1 ? this.singular : this.plural;\n }\n\n constructor(singular: string, plural: string) {\n this.singular = singular;\n this.plural = plural;\n }\n}\n\nclass OrganizationContentSummaryItem {\n count: number;\n\n get localizationKey(): string {\n return this.localizationKeyOptions.getKey(this.count);\n }\n\n private localizationKeyOptions: CountBasedLocalizationKey;\n\n constructor(count: number, localizationKeyOptions: CountBasedLocalizationKey) {\n this.count = count;\n this.localizationKeyOptions = localizationKeyOptions;\n }\n}\n\nclass OrganizationContentSummary {\n totalItemCount = 0;\n itemCountByType: OrganizationContentSummaryItem[] = [];\n}\n\nexport interface DeleteOrganizationDialogParams {\n organizationId: string;\n\n requestType: \"InvalidFamiliesForEnterprise\" | \"RegularDelete\";\n}\n\nexport enum DeleteOrganizationDialogResult {\n Deleted = \"deleted\",\n Canceled = \"canceled\",\n}\n\n@Component({\n selector: \"app-delete-organization\",\n standalone: true,\n imports: [SharedModule, UserVerificationModule],\n templateUrl: \"delete-organization-dialog.component.html\",\n})\nexport class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n loaded: boolean;\n deleteOrganizationRequestType: \"InvalidFamiliesForEnterprise\" | \"RegularDelete\" = \"RegularDelete\";\n organization: Organization;\n organizationContentSummary: OrganizationContentSummary = new OrganizationContentSummary();\n secret: Verification;\n\n protected formGroup = this.formBuilder.group({\n secret: new FormControl(null, [Validators.required]),\n });\n formPromise: Promise;\n\n constructor(\n @Inject(DIALOG_DATA) private params: DeleteOrganizationDialogParams,\n private dialogRef: DialogRef,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private userVerificationService: UserVerificationService,\n private cipherService: CipherService,\n private organizationService: OrganizationService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private formBuilder: FormBuilder,\n ) {}\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async ngOnInit(): Promise {\n this.deleteOrganizationRequestType = this.params.requestType;\n\n combineLatest([\n this.organizationService.get$(this.params.organizationId),\n this.cipherService.getAllFromApiForOrganization(this.params.organizationId),\n ])\n .pipe(takeUntil(this.destroy$))\n .subscribe(([organization, ciphers]) => {\n this.organization = organization;\n this.organizationContentSummary = this.buildOrganizationContentSummary(ciphers);\n this.loaded = true;\n });\n }\n\n protected submit = async () => {\n await this.userVerificationService\n .buildRequest(this.formGroup.value.secret)\n .then((request) => this.organizationApiService.delete(this.organization.id, request));\n\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"organizationDeleted\"),\n this.i18nService.t(\"organizationDeletedDesc\"),\n );\n this.dialogRef.close(DeleteOrganizationDialogResult.Deleted);\n };\n\n private buildOrganizationContentSummary(ciphers: CipherView[]): OrganizationContentSummary {\n const organizationContentSummary = new OrganizationContentSummary();\n const organizationItems = ciphers.filter((item) => item.deletedDate == null);\n\n if (organizationItems.length < 1) {\n return organizationContentSummary;\n }\n\n organizationContentSummary.totalItemCount = organizationItems.length;\n for (const cipherType of Utils.iterateEnum(CipherType)) {\n const count = this.getOrganizationItemCountByType(organizationItems, cipherType);\n if (count > 0) {\n organizationContentSummary.itemCountByType.push(\n new OrganizationContentSummaryItem(\n count,\n this.getOrganizationItemLocalizationKeysByType(CipherType[cipherType]),\n ),\n );\n }\n }\n\n return organizationContentSummary;\n }\n\n private getOrganizationItemCountByType(items: CipherView[], type: CipherType) {\n return items.filter((item) => item.type == type).length;\n }\n\n private getOrganizationItemLocalizationKeysByType(type: string): CountBasedLocalizationKey {\n return new CountBasedLocalizationKey(`type${type}`, `type${type}Plural`);\n }\n}\n\n/**\n * Strongly typed helper to open a Delete Organization dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openDeleteOrganizationDialog(\n dialogService: DialogService,\n config: DialogConfig,\n) {\n return dialogService.open(\n DeleteOrganizationDialogComponent,\n config,\n );\n}\n","
\n \n {{ \"deleteOrganization\" | i18n }}\n
\n \n {{ \"deletingOrganizationIsPermanentWarning\" | i18n: organization?.name }}\n \n

\n \n {{ \"orgCreatedSponsorshipInvalid\" | i18n }}\n \n \n 0\">\n {{ \"deletingOrganizationContentWarning\" | i18n: organization?.name }}\n

    \n
  • \n {{ type.count }} {{ type.localizationKey | i18n }}\n
  • \n
\n {{ \"deletingOrganizationActiveUserAccountsWarning\" | i18n }}\n \n \n

\n \n
\n
\n \n \n
\n
\n
\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n name: \"userType\",\n})\nexport class UserTypePipe implements PipeTransform {\n constructor(private i18nService: I18nService) {}\n\n transform(value?: OrganizationUserType, unknownText?: string): string {\n if (value == null) {\n return unknownText ?? this.i18nService.t(\"unknown\");\n }\n switch (value) {\n case OrganizationUserType.Owner:\n return this.i18nService.t(\"owner\");\n case OrganizationUserType.Admin:\n return this.i18nService.t(\"admin\");\n case OrganizationUserType.User:\n return this.i18nService.t(\"user\");\n case OrganizationUserType.Custom:\n return this.i18nService.t(\"custom\");\n }\n }\n}\n","\n\n
\n \n {{ \"permission\" | i18n }}\n \n \n \n \n \n\n \n {{ selectorLabelText }}\n \n {{ selectorHelpText }}\n \n
\n\n\n \n \n {{ columnHeader }}\n \n
\n {{ \"permission\" | i18n }}\n
\n \n {{ \"role\" | i18n }}\n {{ \"group\" | i18n }}\n \n \n
\n \n \n \n
\n \n
\n
\n {{ item.labelName }}\n \n {{ \"invited\" | i18n }}\n \n
\n
\n {{ $any(item).email }}\n
\n
\n
\n\n
\n \n {{ item.labelName }}\n
\n \n\n \n \n \n\n \n \n {{ permissionLabelId(item.readonlyPermission) | i18n }}\n \n \n \n\n \n {{ $any(item).role | userType: \"-\" }}\n \n\n \n {{ $any(item).viaGroupName ?? \"-\" }}\n \n\n \n \n \n \n \n {{ emptySelectionText }}\n \n
\n
\n","import { Component, forwardRef, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n FormGroup,\n NG_VALUE_ACCESSOR,\n} from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { FormSelectionList } from \"@bitwarden/angular/utils/form-selection-list\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SelectItemView } from \"@bitwarden/components/src/multi-select/models/select-item-view\";\n\nimport {\n AccessItemType,\n AccessItemValue,\n AccessItemView,\n CollectionPermission,\n getPermissionList,\n Permission,\n} from \"./access-selector.models\";\n\nexport enum PermissionMode {\n /**\n * No permission controls or column present. No permission values are emitted.\n */\n Hidden = \"hidden\",\n\n /**\n * No permission controls. Column rendered an if available on an item. No permission values are emitted\n */\n Readonly = \"readonly\",\n\n /**\n * Permission Controls and column present. Permission values are emitted.\n */\n Edit = \"edit\",\n}\n\n@Component({\n selector: \"bit-access-selector\",\n templateUrl: \"access-selector.component.html\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AccessSelectorComponent),\n multi: true,\n },\n ],\n})\nexport class AccessSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\n private destroy$ = new Subject();\n private notifyOnChange: (v: unknown) => void;\n private notifyOnTouch: () => void;\n private pauseChangeNotification: boolean;\n\n /**\n * Updates the enabled/disabled state of provided row form group based on the item's readonly state.\n * If a row is enabled, it also updates the enabled/disabled state of the permission control\n * based on the item's accessAllItems state and the current value of `permissionMode`.\n * @param controlRow - The form group for the row to update\n * @param item - The access item that is represented by the row\n */\n private updateRowControlDisableState = (\n controlRow: FormGroup>,\n item: AccessItemView,\n ) => {\n // Disable entire row form group if readonly\n if (item.readonly) {\n controlRow.disable();\n } else {\n controlRow.enable();\n\n // The enable() above also enables the permission control, so we need to disable it again\n // Disable permission control if accessAllItems is enabled or not in Edit mode\n if (this.permissionMode != PermissionMode.Edit) {\n controlRow.controls.permission.disable();\n }\n }\n };\n\n /**\n * Updates the enabled/disabled state of ALL row form groups based on each item's readonly state.\n */\n private updateAllRowControlDisableStates = () => {\n this.selectionList.forEachControlItem((controlRow, item) => {\n this.updateRowControlDisableState(controlRow as FormGroup>, item);\n });\n };\n\n /**\n * The internal selection list that tracks the value of this form control / component.\n * It's responsible for keeping items sorted and synced with the rendered form controls\n * @protected\n */\n protected selectionList = new FormSelectionList((item) => {\n const permissionControl = this.formBuilder.control(this.initialPermission);\n\n const fg = this.formBuilder.group>({\n id: new FormControl(item.id),\n type: new FormControl(item.type),\n permission: permissionControl,\n });\n\n this.updateRowControlDisableState(fg, item);\n\n return fg;\n }, this._itemComparator.bind(this));\n\n /**\n * Internal form group for this component.\n * @protected\n */\n protected formGroup = this.formBuilder.group({\n items: this.selectionList.formArray,\n });\n\n protected itemType = AccessItemType;\n protected permissionList: Permission[];\n protected initialPermission = CollectionPermission.View;\n\n /**\n * When disabled, the access selector will make the assumption that a readonly state is desired.\n * The PermissionMode will be set to Readonly\n * The Multi-Select control will be hidden\n * The delete action on each row item will be hidden\n * The readonly permission label/property needs to configured on the access item views being passed into the component\n */\n disabled: boolean;\n\n /**\n * List of all selectable items that. Sorted internally.\n */\n @Input()\n get items(): AccessItemView[] {\n return this.selectionList.allItems;\n }\n\n set items(val: AccessItemView[]) {\n const selected = (this.selectionList.formArray.getRawValue() ?? []).concat(\n val.filter((m) => m.readonly),\n );\n this.selectionList.populateItems(\n val.map((m) => {\n m.icon = m.icon ?? this.itemIcon(m); // Ensure an icon is set\n return m;\n }),\n selected,\n );\n }\n\n /**\n * Permission mode that controls if the permission form controls and column should be present.\n */\n @Input()\n get permissionMode(): PermissionMode {\n return this._permissionMode;\n }\n\n set permissionMode(value: PermissionMode) {\n this._permissionMode = value;\n // Update any internal permission controls\n this.updateAllRowControlDisableStates();\n }\n private _permissionMode: PermissionMode = PermissionMode.Hidden;\n\n /**\n * Column header for the selected items table\n */\n @Input() columnHeader: string;\n\n /**\n * Label used for the ng selector\n */\n @Input() selectorLabelText: string;\n\n /**\n * Helper text displayed under the ng selector\n */\n @Input() selectorHelpText: string;\n\n /**\n * Text that is shown in the table when no items are selected\n */\n @Input() emptySelectionText: string;\n\n /**\n * Flag for if the member roles column should be present\n */\n @Input() showMemberRoles: boolean;\n\n /**\n * Flag for if the group column should be present\n */\n @Input() showGroupColumn: boolean;\n\n /**\n * Hide the multi-select so that new items cannot be added\n */\n @Input() hideMultiSelect = false;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n private readonly i18nService: I18nService,\n ) {}\n\n /** Required for NG_VALUE_ACCESSOR */\n registerOnChange(fn: any): void {\n this.notifyOnChange = fn;\n }\n\n /** Required for NG_VALUE_ACCESSOR */\n registerOnTouched(fn: any): void {\n this.notifyOnTouch = fn;\n }\n\n /** Required for NG_VALUE_ACCESSOR */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n\n // Keep the internal FormGroup in sync\n if (this.disabled) {\n this.permissionMode = PermissionMode.Readonly;\n this.formGroup.disable();\n } else {\n this.formGroup.enable();\n\n // The enable() above automatically enables all the row controls,\n // so we need to disable the readonly ones again\n this.updateAllRowControlDisableStates();\n }\n }\n\n /** Required for NG_VALUE_ACCESSOR */\n writeValue(selectedItems: AccessItemValue[]): void {\n // Modifying the selection list, mistakenly fires valueChanges in the\n // internal form array, so we need to know to pause external notification\n this.pauseChangeNotification = true;\n\n // Always clear the internal selection list on a new value\n this.selectionList.deselectAll();\n\n // We need to also select any read only items to appear in the table\n this.selectionList.selectItems(this.items.filter((m) => m.readonly).map((m) => m.id));\n\n // If the new value is null, then we're done\n if (selectedItems == null) {\n this.pauseChangeNotification = false;\n return;\n }\n\n // Unable to handle other value types, throw\n if (!Array.isArray(selectedItems)) {\n throw new Error(\"The access selector component only supports Array form values!\");\n }\n\n // Iterate and internally select each item\n for (const value of selectedItems) {\n this.selectionList.selectItem(value.id, value);\n }\n\n this.pauseChangeNotification = false;\n }\n\n async ngOnInit() {\n this.permissionList = getPermissionList();\n // Watch the internal formArray for changes and propagate them\n this.selectionList.formArray.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((v) => {\n if (!this.notifyOnChange || this.pauseChangeNotification) {\n return;\n }\n // Disabled form arrays emit values for disabled controls, we override this to emit an empty array to avoid\n // emitting values for disabled controls that are \"readonly\" in the table\n if (this.selectionList.formArray.disabled) {\n this.notifyOnChange([]);\n return;\n }\n this.notifyOnChange(v);\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected handleBlur() {\n if (!this.notifyOnTouch) {\n return;\n }\n\n this.notifyOnTouch();\n }\n\n protected selectItems(items: SelectItemView[]) {\n this.pauseChangeNotification = true;\n this.selectionList.selectItems(items.map((i) => i.id));\n this.pauseChangeNotification = false;\n if (this.notifyOnChange != undefined) {\n this.notifyOnChange(this.selectionList.formArray.value);\n }\n }\n\n protected itemIcon(item: AccessItemView) {\n switch (item.type) {\n case AccessItemType.Collection:\n return \"bwi-collection\";\n case AccessItemType.Group:\n return \"bwi-users\";\n case AccessItemType.Member:\n return \"bwi-user\";\n }\n }\n\n protected permissionLabelId(perm: CollectionPermission) {\n return this.permissionList.find((p) => p.perm == perm)?.labelId;\n }\n\n protected canEditItemPermission(item: AccessItemView) {\n return this.permissionMode == PermissionMode.Edit && !item.readonly;\n }\n\n private _itemComparator(a: AccessItemView, b: AccessItemView) {\n return (\n a.type - b.type ||\n this.i18nService.collator.compare(a.listName, b.listName) ||\n this.i18nService.collator.compare(a.labelName, b.labelName) ||\n Number(b.readonly) - Number(a.readonly)\n );\n }\n}\n","import { OrganizationUserUserDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport {\n OrganizationUserStatusType,\n OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { SelectItemView } from \"@bitwarden/components\";\n\nimport { CollectionAccessSelectionView, GroupView } from \"../../../core\";\n\n/**\n * Permission options that replace/correspond with manage, readOnly, and hidePassword server fields.\n */\nexport enum CollectionPermission {\n View = \"view\",\n ViewExceptPass = \"viewExceptPass\",\n Edit = \"edit\",\n EditExceptPass = \"editExceptPass\",\n Manage = \"manage\",\n}\n\nexport enum AccessItemType {\n Collection,\n Group,\n Member,\n}\n\n/**\n * A \"generic\" type that describes an item that can be selected from a\n * ng-select list and have its collection permission modified.\n *\n * Currently, it supports Collections, Groups, and Members. Members require some additional\n * details to render in the AccessSelectorComponent so their type is defined separately\n * and then joined back with the base type.\n *\n */\nexport type AccessItemView = SelectItemView & {\n /**\n * Flag that this item cannot be modified.\n * This will disable the permission editor and will keep\n * the item always selected.\n */\n readonly?: boolean;\n\n /**\n * Optional permission that will be rendered for this\n * item if it set to readonly.\n */\n readonlyPermission?: CollectionPermission;\n} & (\n | {\n type: AccessItemType.Collection;\n viaGroupName?: string;\n }\n | {\n type: AccessItemType.Group;\n }\n | {\n type: AccessItemType.Member; // Members have a few extra details required to display, so they're added here\n email: string;\n role: OrganizationUserType;\n status: OrganizationUserStatusType;\n }\n );\n\n/**\n * A type that is emitted as a value for the ngControl\n */\nexport type AccessItemValue = {\n id: string;\n permission?: CollectionPermission;\n type: AccessItemType;\n};\n\nexport type Permission = {\n perm: CollectionPermission;\n labelId: string;\n};\n\nexport const getPermissionList = (): Permission[] => {\n const permissions = [\n { perm: CollectionPermission.View, labelId: \"canView\" },\n { perm: CollectionPermission.ViewExceptPass, labelId: \"canViewExceptPass\" },\n { perm: CollectionPermission.Edit, labelId: \"canEdit\" },\n { perm: CollectionPermission.EditExceptPass, labelId: \"canEditExceptPass\" },\n { perm: CollectionPermission.Manage, labelId: \"canManage\" },\n ];\n\n return permissions;\n};\n\n/**\n * Converts the CollectionAccessSelectionView interface to one of the new CollectionPermission values\n * for the dropdown in the AccessSelectorComponent\n * @param value\n */\nexport const convertToPermission = (\n value: CollectionAccessSelectionView | undefined,\n): CollectionPermission | undefined => {\n if (value == null) {\n return undefined;\n }\n if (value.manage) {\n return CollectionPermission.Manage;\n } else if (value.readOnly) {\n return value.hidePasswords ? CollectionPermission.ViewExceptPass : CollectionPermission.View;\n } else {\n return value.hidePasswords ? CollectionPermission.EditExceptPass : CollectionPermission.Edit;\n }\n};\n\n/**\n * Converts an AccessItemValue back into a CollectionAccessView class using the CollectionPermission\n * to determine the values for `manage`, `readOnly`, and `hidePassword`\n * @param value\n */\nexport const convertToSelectionView = (value: AccessItemValue) => {\n return new CollectionAccessSelectionView({\n id: value.id,\n readOnly: readOnly(value.permission),\n hidePasswords: hidePassword(value.permission),\n manage: value.permission === CollectionPermission.Manage,\n });\n};\n\nconst readOnly = (perm: CollectionPermission) =>\n [CollectionPermission.View, CollectionPermission.ViewExceptPass].includes(perm);\n\nconst hidePassword = (perm: CollectionPermission) =>\n [CollectionPermission.ViewExceptPass, CollectionPermission.EditExceptPass].includes(perm);\n\nexport function mapGroupToAccessItemView(group: GroupView): AccessItemView {\n return {\n id: group.id,\n type: AccessItemType.Group,\n listName: group.name,\n labelName: group.name,\n };\n}\n\n// TODO: Use view when user apis are migrated to a service\nexport function mapUserToAccessItemView(user: OrganizationUserUserDetailsResponse): AccessItemView {\n return {\n id: user.id,\n type: AccessItemType.Member,\n email: user.email,\n role: user.type,\n listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,\n labelName: user.name ?? user.email,\n status: user.status,\n };\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../../../shared\";\n\nimport { AccessSelectorComponent } from \"./access-selector.component\";\nimport { UserTypePipe } from \"./user-type.pipe\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [AccessSelectorComponent, UserTypePipe],\n exports: [AccessSelectorComponent],\n})\nexport class AccessSelectorModule {}\n","import { firstValueFrom } from \"rxjs\";\n\nimport {\n DefaultRegistrationFinishService,\n PasswordInputResult,\n RegistrationFinishService,\n} from \"@bitwarden/auth/angular\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterFinishRequest } from \"@bitwarden/common/auth/models/request/registration/register-finish.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { AcceptOrganizationInviteService } from \"../../../organization-invite/accept-organization.service\";\n\nexport class WebRegistrationFinishService\n extends DefaultRegistrationFinishService\n implements RegistrationFinishService\n{\n constructor(\n protected cryptoService: CryptoService,\n protected accountApiService: AccountApiService,\n private acceptOrgInviteService: AcceptOrganizationInviteService,\n private policyApiService: PolicyApiServiceAbstraction,\n private logService: LogService,\n private policyService: PolicyService,\n ) {\n super(cryptoService, accountApiService);\n }\n\n override async getMasterPasswordPolicyOptsFromOrgInvite(): Promise {\n // If there's a deep linked org invite, use it to get the password policies\n const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n\n if (orgInvite == null) {\n return null;\n }\n\n let policies: Policy[] | null = null;\n try {\n policies = await this.policyApiService.getPoliciesByToken(\n orgInvite.organizationId,\n orgInvite.token,\n orgInvite.email,\n orgInvite.organizationUserId,\n );\n } catch (e) {\n this.logService.error(e);\n }\n\n if (policies == null) {\n return null;\n }\n\n const masterPasswordPolicyOpts: MasterPasswordPolicyOptions = await firstValueFrom(\n this.policyService.masterPasswordPolicyOptions$(policies),\n );\n\n return masterPasswordPolicyOpts;\n }\n\n // Note: the org invite token and email verification are mutually exclusive. Only one will be present.\n override async buildRegisterRequest(\n email: string,\n emailVerificationToken: string,\n passwordInputResult: PasswordInputResult,\n encryptedUserKey: EncryptedString,\n userAsymmetricKeys: [string, EncString],\n ): Promise {\n const registerRequest = await super.buildRegisterRequest(\n email,\n emailVerificationToken,\n passwordInputResult,\n encryptedUserKey,\n userAsymmetricKeys,\n );\n\n // web specific logic\n // Org invites are deep linked. Non-existent accounts are redirected to the register page.\n // Org user id and token are included here only for validation and two factor purposes.\n const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n if (orgInvite != null) {\n registerRequest.organizationUserId = orgInvite.organizationUserId;\n registerRequest.orgInviteToken = orgInvite.token;\n }\n // Invite is accepted after login (on deep link redirect).\n\n return registerRequest;\n }\n}\n","import { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { RotateableKeySet } from \"../../../../../auth/src/common/models\";\n\nexport class WebauthnRotateCredentialRequest {\n id: string;\n encryptedPublicKey: EncString;\n encryptedUserKey: EncString;\n\n constructor(id: string, encryptedPublicKey: EncString, encryptedUserKey: EncString) {\n this.id = id;\n this.encryptedPublicKey = encryptedPublicKey;\n this.encryptedUserKey = encryptedUserKey;\n }\n\n static fromRotateableKeyset(\n id: string,\n keyset: RotateableKeySet,\n ): WebauthnRotateCredentialRequest {\n return new WebauthnRotateCredentialRequest(\n id,\n keyset.encryptedPublicKey,\n keyset.encryptedPrivateKey,\n );\n }\n}\n","import { ChallengeResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\n\nexport class CredentialCreateOptionsView {\n constructor(\n readonly options: ChallengeResponse,\n readonly token: string,\n ) {}\n}\n","import { CredentialCreateOptionsView } from \"./credential-create-options.view\";\n\n/**\n * Represents a WebAuthn credential that has been created by an authenticator but not yet saved to the server.\n */\nexport class PendingWebauthnLoginCredentialView {\n constructor(\n readonly createOptions: CredentialCreateOptionsView,\n readonly deviceResponse: PublicKeyCredential,\n readonly supportsPrf: boolean,\n ) {}\n}\n","import { WebauthnLoginCredentialPrfStatus } from \"../enums/webauthn-login-credential-prf-status.enum\";\n\nexport class WebauthnLoginCredentialView {\n constructor(\n readonly id: string,\n readonly name: string,\n readonly prfStatus: WebauthnLoginCredentialPrfStatus,\n ) {}\n}\n","import { inject, Injectable } from \"@angular/core\";\n\nimport { RotateableKeySet } from \"@bitwarden/auth/common\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\n\n@Injectable({ providedIn: \"root\" })\nexport class RotateableKeySetService {\n private readonly cryptoService = inject(CryptoService);\n private readonly encryptService = inject(EncryptService);\n\n /**\n * Create a new rotateable key set for the current user, using the provided external key.\n * For more information on rotateable key sets, see {@link RotateableKeySet}\n *\n * @param externalKey The `ExternalKey` used to encrypt {@link RotateableKeySet.encryptedPrivateKey}\n * @returns RotateableKeySet containing the current users `UserKey`\n */\n async createKeySet(\n externalKey: ExternalKey,\n ): Promise> {\n const [publicKey, encryptedPrivateKey] = await this.cryptoService.makeKeyPair(externalKey);\n\n const userKey = await this.cryptoService.getUserKey();\n const rawPublicKey = Utils.fromB64ToArray(publicKey);\n const encryptedUserKey = await this.cryptoService.rsaEncrypt(userKey.key, rawPublicKey);\n const encryptedPublicKey = await this.encryptService.encrypt(rawPublicKey, userKey);\n return new RotateableKeySet(encryptedUserKey, encryptedPublicKey, encryptedPrivateKey);\n }\n\n /**\n * Rotates the current user's `UserKey` and updates the provided `RotateableKeySet` with the new keys.\n *\n * @param keySet The current `RotateableKeySet` for the user\n * @returns The updated `RotateableKeySet` with the new `UserKey`\n */\n async rotateKeySet(\n keySet: RotateableKeySet,\n oldUserKey: SymmetricCryptoKey,\n newUserKey: SymmetricCryptoKey,\n ): Promise> {\n // validate parameters\n if (!keySet) {\n throw new Error(\"failed to rotate key set: keySet is required\");\n }\n if (!oldUserKey) {\n throw new Error(\"failed to rotate key set: oldUserKey is required\");\n }\n if (!newUserKey) {\n throw new Error(\"failed to rotate key set: newUserKey is required\");\n }\n\n const publicKey = await this.encryptService.decryptToBytes(\n keySet.encryptedPublicKey,\n oldUserKey,\n );\n const newEncryptedPublicKey = await this.encryptService.encrypt(publicKey, newUserKey);\n const newEncryptedUserKey = await this.encryptService.rsaEncrypt(newUserKey.key, publicKey);\n\n const newRotateableKeySet = new RotateableKeySet(\n newEncryptedUserKey,\n newEncryptedPublicKey,\n keySet.encryptedPrivateKey,\n );\n\n return newRotateableKeySet;\n }\n}\n","import { WebAuthnLoginAssertionResponseRequest } from \"@bitwarden/common/auth/services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\n/**\n * Request sent to the server to save a newly created prf key set for a credential.\n */\nexport class EnableCredentialEncryptionRequest {\n /**\n * The response received from the authenticator.\n */\n deviceResponse: WebAuthnLoginAssertionResponseRequest;\n\n /**\n * An encrypted token containing information the server needs to verify the credential.\n */\n token: string;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedUserKey } */\n encryptedUserKey?: string;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedPublicKey } */\n encryptedPublicKey?: string;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedPrivateKey } */\n encryptedPrivateKey?: string;\n}\n","import { WebauthnLoginAttestationResponseRequest } from \"./webauthn-login-attestation-response.request\";\n\n/**\n * Request sent to the server to save a newly created webauthn login credential.\n */\nexport class SaveCredentialRequest {\n /**\n * The response received from the authenticator.\n * This contains all information needed for future authentication flows.\n */\n deviceResponse: WebauthnLoginAttestationResponseRequest;\n\n /** Nickname chosen by the user to identify this credential */\n name: string;\n\n /**\n * Token required by the server to complete the creation.\n * It contains encrypted information that the server needs to verify the credential.\n */\n token: string;\n\n /**\n * True if the credential was created with PRF support.\n */\n supportsPrf: boolean;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedUserKey } */\n encryptedUserKey?: string;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedPublicKey } */\n encryptedPublicKey?: string;\n\n /** Used for vault encryption. See {@link RotateableKeySet.encryptedPrivateKey } */\n encryptedPrivateKey?: string;\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n/**\n * An abstract class that represents responses received from the webauthn authenticator.\n * It contains data that is commonly returned during different types of authenticator interactions.\n */\nexport abstract class WebauthnLoginAuthenticatorResponseRequest {\n id: string;\n rawId: string;\n type: string;\n extensions: Record;\n\n constructor(credential: PublicKeyCredential) {\n this.id = credential.id;\n this.rawId = Utils.fromBufferToB64(credential.rawId);\n this.type = credential.type;\n this.extensions = {}; // Extensions are handled client-side\n }\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { WebauthnLoginAuthenticatorResponseRequest } from \"./webauthn-login-authenticator-response.request\";\n\n/**\n * The response received from an authenticator after a successful attestation.\n * This request is used to save newly created webauthn login credentials to the server.\n */\nexport class WebauthnLoginAttestationResponseRequest extends WebauthnLoginAuthenticatorResponseRequest {\n response: {\n attestationObject: string;\n clientDataJson: string;\n };\n\n constructor(credential: PublicKeyCredential) {\n super(credential);\n\n if (!(credential.response instanceof AuthenticatorAttestationResponse)) {\n throw new Error(\"Invalid authenticator response\");\n }\n\n this.response = {\n attestationObject: Utils.fromBufferToUrlB64(credential.response.attestationObject),\n clientDataJson: Utils.fromBufferToUrlB64(credential.response.clientDataJSON),\n };\n }\n}\n","import { ChallengeResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\n/**\n * Options provided by the server to be used during attestation (i.e. creation of a new webauthn credential)\n */\nexport class WebauthnLoginCredentialCreateOptionsResponse extends BaseResponse {\n /** Options to be provided to the webauthn authenticator */\n options: ChallengeResponse;\n\n /**\n * Contains an encrypted version of the {@link options}.\n * Used by the server to validate the attestation response of newly created credentials.\n */\n token: string;\n\n constructor(response: unknown) {\n super(response);\n this.options = new ChallengeResponse(this.getResponseProperty(\"options\"));\n this.token = this.getResponseProperty(\"token\");\n }\n}\n","import { RotateableKeySet } from \"@bitwarden/auth/common\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { WebauthnLoginCredentialPrfStatus } from \"../../../enums/webauthn-login-credential-prf-status.enum\";\n\n/**\n * A webauthn login credential received from the server.\n */\nexport class WebauthnLoginCredentialResponse extends BaseResponse {\n id: string;\n name: string;\n prfStatus: WebauthnLoginCredentialPrfStatus;\n encryptedPublicKey?: string;\n encryptedUserKey?: string;\n\n constructor(response: unknown) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.name = this.getResponseProperty(\"Name\");\n this.prfStatus = this.getResponseProperty(\"PrfStatus\");\n this.encryptedPublicKey = this.getResponseProperty(\"EncryptedPublicKey\");\n this.encryptedUserKey = this.getResponseProperty(\"EncryptedUserKey\");\n }\n\n getRotateableKeyset(): RotateableKeySet {\n if (!EncString.isSerializedEncString(this.encryptedUserKey)) {\n throw new Error(\"Invalid encrypted user key\");\n }\n if (!EncString.isSerializedEncString(this.encryptedPublicKey)) {\n throw new Error(\"Invalid encrypted public key\");\n }\n\n return new RotateableKeySet(\n new EncString(this.encryptedUserKey),\n new EncString(this.encryptedPublicKey),\n );\n }\n\n hasPrfKeyset(): boolean {\n return this.encryptedUserKey != null && this.encryptedPublicKey != null;\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { CredentialAssertionOptionsResponse } from \"@bitwarden/common/auth/services/webauthn-login/response/credential-assertion-options.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { EnableCredentialEncryptionRequest } from \"./request/enable-credential-encryption.request\";\nimport { SaveCredentialRequest } from \"./request/save-credential.request\";\nimport { WebauthnLoginCredentialCreateOptionsResponse } from \"./response/webauthn-login-credential-create-options.response\";\nimport { WebauthnLoginCredentialResponse } from \"./response/webauthn-login-credential.response\";\n\n@Injectable({ providedIn: \"root\" })\nexport class WebAuthnLoginAdminApiService {\n constructor(private apiService: ApiService) {}\n\n async getCredentialCreateOptions(\n request: SecretVerificationRequest,\n ): Promise {\n const response = await this.apiService.send(\n \"POST\",\n \"/webauthn/attestation-options\",\n request,\n true,\n true,\n );\n return new WebauthnLoginCredentialCreateOptionsResponse(response);\n }\n\n async getCredentialAssertionOptions(\n request: SecretVerificationRequest,\n ): Promise {\n const response = await this.apiService.send(\n \"POST\",\n \"/webauthn/assertion-options\",\n request,\n true,\n true,\n );\n return new CredentialAssertionOptionsResponse(response);\n }\n\n async saveCredential(request: SaveCredentialRequest): Promise {\n await this.apiService.send(\"POST\", \"/webauthn\", request, true, true);\n return true;\n }\n\n async getCredentials(): Promise> {\n const response = await this.apiService.send(\"GET\", \"/webauthn\", null, true, true);\n return new ListResponse(\n response,\n WebauthnLoginCredentialResponse,\n );\n }\n\n async deleteCredential(credentialId: string, request: SecretVerificationRequest): Promise {\n await this.apiService.send(\"POST\", `/webauthn/${credentialId}/delete`, request, true, true);\n }\n\n async updateCredential(request: EnableCredentialEncryptionRequest): Promise {\n await this.apiService.send(\"PUT\", `/webauthn`, request, true, true);\n }\n}\n","import { Injectable, Optional } from \"@angular/core\";\nimport { BehaviorSubject, filter, from, map, Observable, shareReplay, switchMap, tap } from \"rxjs\";\n\nimport { PrfKeySet, UserKeyRotationDataProvider } from \"@bitwarden/auth/common\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { WebAuthnLoginPrfCryptoServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-prf-crypto.service.abstraction\";\nimport { WebauthnRotateCredentialRequest } from \"@bitwarden/common/auth/models/request/webauthn-rotate-credential.request\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\n\nimport { CredentialCreateOptionsView } from \"../../views/credential-create-options.view\";\nimport { PendingWebauthnLoginCredentialView } from \"../../views/pending-webauthn-login-credential.view\";\nimport { WebauthnLoginCredentialView } from \"../../views/webauthn-login-credential.view\";\nimport { RotateableKeySetService } from \"../rotateable-key-set.service\";\n\nimport { EnableCredentialEncryptionRequest } from \"./request/enable-credential-encryption.request\";\nimport { SaveCredentialRequest } from \"./request/save-credential.request\";\nimport { WebauthnLoginAttestationResponseRequest } from \"./request/webauthn-login-attestation-response.request\";\nimport { WebAuthnLoginAdminApiService } from \"./webauthn-login-admin-api.service\";\n\n@Injectable({ providedIn: \"root\" })\n/**\n * Service for managing WebAuthnLogin credentials.\n */\nexport class WebauthnLoginAdminService\n implements UserKeyRotationDataProvider\n{\n static readonly MaxCredentialCount = 5;\n\n private navigatorCredentials: CredentialsContainer;\n private _refresh$ = new BehaviorSubject(undefined);\n private _loading$ = new BehaviorSubject(true);\n private readonly credentials$ = this._refresh$.pipe(\n tap(() => this._loading$.next(true)),\n switchMap(() => this.fetchCredentials$()),\n tap(() => this._loading$.next(false)),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n\n /**\n * An Observable that emits a boolean indicating whether the service is currently fetching\n * WebAuthnLogin credentials from the server.\n */\n readonly loading$ = this._loading$.asObservable();\n\n constructor(\n private apiService: WebAuthnLoginAdminApiService,\n private userVerificationService: UserVerificationService,\n private rotateableKeySetService: RotateableKeySetService,\n private webAuthnLoginPrfCryptoService: WebAuthnLoginPrfCryptoServiceAbstraction,\n @Optional() navigatorCredentials?: CredentialsContainer,\n @Optional() private logService?: LogService,\n ) {\n // Default parameters don't work when used with Angular DI\n this.navigatorCredentials = navigatorCredentials ?? navigator.credentials;\n }\n\n /**\n * Get the credential assertion options needed for initiating the WebAuthnLogin credential update process.\n * The options contains assertion options and other data for the authenticator.\n * This method requires user verification.\n *\n * @param verification User verification data to be used for the request.\n * @returns The credential assertion options and a token to be used for the credential update request.\n */\n async getCredentialAssertOptions(\n verification: Verification,\n ): Promise {\n const request = await this.userVerificationService.buildRequest(verification);\n const response = await this.apiService.getCredentialAssertionOptions(request);\n return new WebAuthnLoginCredentialAssertionOptionsView(response.options, response.token);\n }\n\n /**\n * Get the credential attestation options needed for initiating the WebAuthnLogin credential creation process.\n * The options contains a challenge and other data for the authenticator.\n * This method requires user verification.\n *\n * @param verification User verification data to be used for the request.\n * @returns The credential attestation options and a token to be used for the credential creation request.\n */\n\n async getCredentialAttestationOptions(\n verification: Verification,\n ): Promise {\n const request = await this.userVerificationService.buildRequest(verification);\n const response = await this.apiService.getCredentialCreateOptions(request);\n return new CredentialCreateOptionsView(response.options, response.token);\n }\n\n /**\n * Create a credential using the given options. This triggers the browsers WebAuthn API to create a credential.\n *\n * @param credentialOptions Options received from the server using `getCredentialCreateOptions`.\n * @returns A pending credential that can be saved to server directly or be used to create a key set.\n */\n async createCredential(\n credentialOptions: CredentialCreateOptionsView,\n ): Promise {\n const nativeOptions: CredentialCreationOptions = {\n publicKey: credentialOptions.options,\n };\n // TODO: Remove `any` when typescript typings add support for PRF\n nativeOptions.publicKey.extensions = {\n prf: {},\n } as any;\n\n try {\n const response = await this.navigatorCredentials.create(nativeOptions);\n if (!(response instanceof PublicKeyCredential)) {\n return undefined;\n }\n // TODO: Remove `any` when typescript typings add support for PRF\n const supportsPrf = Boolean((response.getClientExtensionResults() as any).prf?.enabled);\n return new PendingWebauthnLoginCredentialView(credentialOptions, response, supportsPrf);\n } catch (error) {\n this.logService?.error(error);\n return undefined;\n }\n }\n\n /**\n * Create a key set from the given pending credential. The credential must support PRF.\n * This will trigger the browsers WebAuthn API to generate a PRF-output.\n *\n * @param pendingCredential A credential created using `createCredential`.\n * @returns A key set that can be saved to the server. Undefined is returned if the credential doesn't support PRF.\n */\n async createKeySet(\n pendingCredential: PendingWebauthnLoginCredentialView,\n ): Promise {\n const nativeOptions: CredentialRequestOptions = {\n publicKey: {\n challenge: pendingCredential.createOptions.options.challenge,\n allowCredentials: [{ id: pendingCredential.deviceResponse.rawId, type: \"public-key\" }],\n rpId: pendingCredential.createOptions.options.rp.id,\n timeout: pendingCredential.createOptions.options.timeout,\n userVerification:\n pendingCredential.createOptions.options.authenticatorSelection.userVerification,\n // TODO: Remove `any` when typescript typings add support for PRF\n extensions: {\n prf: { eval: { first: await this.webAuthnLoginPrfCryptoService.getLoginWithPrfSalt() } },\n } as any,\n },\n };\n\n try {\n const response = await this.navigatorCredentials.get(nativeOptions);\n if (!(response instanceof PublicKeyCredential)) {\n return undefined;\n }\n\n // TODO: Remove `any` when typescript typings add support for PRF\n const prfResult = (response.getClientExtensionResults() as any).prf?.results?.first;\n\n if (prfResult === undefined) {\n return undefined;\n }\n\n const symmetricPrfKey =\n await this.webAuthnLoginPrfCryptoService.createSymmetricKeyFromPrf(prfResult);\n return await this.rotateableKeySetService.createKeySet(symmetricPrfKey);\n } catch (error) {\n this.logService?.error(error);\n return undefined;\n }\n }\n\n /**\n * Save a pending credential to the server. This will also save the key set if it is provided.\n *\n * @param name User provided name for the credential.\n * @param credential A pending credential created using `createCredential`.\n * @param prfKeySet A key set created using `createKeySet`.\n */\n async saveCredential(\n name: string,\n credential: PendingWebauthnLoginCredentialView,\n prfKeySet?: PrfKeySet,\n ) {\n const request = new SaveCredentialRequest();\n request.deviceResponse = new WebauthnLoginAttestationResponseRequest(credential.deviceResponse);\n request.token = credential.createOptions.token;\n request.name = name;\n request.supportsPrf = credential.supportsPrf;\n request.encryptedUserKey = prfKeySet?.encryptedUserKey.encryptedString;\n request.encryptedPublicKey = prfKeySet?.encryptedPublicKey.encryptedString;\n request.encryptedPrivateKey = prfKeySet?.encryptedPrivateKey.encryptedString;\n await this.apiService.saveCredential(request);\n this.refresh();\n }\n\n /**\n * Enable encryption for a credential that has already been saved to the server.\n * This will update the KeySet associated with the credential in the database.\n * We short circuit the process here incase the WebAuthnLoginCredential doesn't support PRF or\n * if there was a problem with the Credential Assertion.\n *\n * @param assertionOptions Options received from the server using `getCredentialAssertOptions`.\n * @returns void\n */\n async enableCredentialEncryption(\n assertionOptions: WebAuthnLoginCredentialAssertionView,\n ): Promise {\n if (assertionOptions === undefined || assertionOptions?.prfKey === undefined) {\n throw new Error(\"invalid credential\");\n }\n\n const prfKeySet: PrfKeySet = await this.rotateableKeySetService.createKeySet(\n assertionOptions.prfKey,\n );\n\n const request = new EnableCredentialEncryptionRequest();\n request.token = assertionOptions.token;\n request.deviceResponse = assertionOptions.deviceResponse;\n request.encryptedUserKey = prfKeySet.encryptedUserKey.encryptedString;\n request.encryptedPublicKey = prfKeySet.encryptedPublicKey.encryptedString;\n request.encryptedPrivateKey = prfKeySet.encryptedPrivateKey.encryptedString;\n await this.apiService.updateCredential(request);\n this.refresh();\n }\n\n /**\n * List of webauthn credentials saved on the server.\n *\n * **Note:**\n * - Subscribing might trigger a network request if the credentials haven't been fetched yet.\n * - The observable is shared and will not create unnecessary duplicate requests.\n * - The observable will automatically re-fetch if the user adds or removes a credential.\n * - The observable is lazy and will only fetch credentials when subscribed to.\n * - Don't subscribe to this in the constructor of a long-running service, as it will keep the observable alive.\n */\n getCredentials$(): Observable {\n return this.credentials$;\n }\n\n /**\n * Subscribe to a single credential by id.\n *\n * @param credentialId The id of the credential to subscribe to.\n * @returns An observable that emits the credential with the given id.\n */\n getCredential$(credentialId: string): Observable {\n return this.credentials$.pipe(\n map((credentials) => credentials.find((c) => c.id === credentialId)),\n filter((c) => c !== undefined),\n );\n }\n\n /**\n * Delete a credential from the server. This method requires user verification.\n *\n * @param credentialId The id of the credential to delete.\n * @param verification User verification data to be used for the request.\n * @returns A promise that resolves when the credential has been deleted.\n */\n async deleteCredential(credentialId: string, verification: Verification): Promise {\n const request = await this.userVerificationService.buildRequest(verification);\n await this.apiService.deleteCredential(credentialId, request);\n this.refresh();\n }\n\n private fetchCredentials$(): Observable {\n return from(this.apiService.getCredentials()).pipe(\n map((response) =>\n response.data.map(\n (credential) =>\n new WebauthnLoginCredentialView(credential.id, credential.name, credential.prfStatus),\n ),\n ),\n );\n }\n\n private refresh() {\n this._refresh$.next();\n }\n\n /**\n * Creates rotate credential requests for the purpose of user key rotation.\n * This works by fetching the current webauthn credentials, filtering out the ones that have a PRF keyset,\n * and rotating these using the rotateable key set service.\n *\n * @param oldUserKey The old user key\n * @param newUserKey The new user key\n * @param userId The user id\n * @returns A promise that returns an array of rotate credential requests when resolved.\n */\n async getRotatedData(\n oldUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (!oldUserKey) {\n throw new Error(\"oldUserKey is required\");\n }\n if (!newUserKey) {\n throw new Error(\"newUserKey is required\");\n }\n\n return Promise.all(\n (await this.apiService.getCredentials()).data\n .filter((credential) => credential.hasPrfKeyset())\n .map(async (response) => {\n const keyset = response.getRotateableKeyset();\n const rotatedKeyset = await this.rotateableKeySetService.rotateKeySet(\n keyset,\n oldUserKey,\n newUserKey,\n );\n const request = new WebauthnRotateCredentialRequest(\n response.id,\n rotatedKeyset.encryptedPublicKey,\n rotatedKeyset.encryptedUserKey,\n );\n return request;\n }),\n );\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { EmergencyAccessApiService } from \"./services/emergency-access-api.service\";\nimport { EmergencyAccessService } from \"./services/emergency-access.service\";\n\n@NgModule({\n declarations: [],\n imports: [],\n providers: [EmergencyAccessApiService, EmergencyAccessService],\n})\nexport class EmergencyAccessModule {}\n","export enum EmergencyAccessStatusType {\n Invited = 0,\n Accepted = 1,\n Confirmed = 2,\n RecoveryInitiated = 3,\n RecoveryApproved = 4,\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { CipherResponse } from \"@bitwarden/common/vault/models/response/cipher.response\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessGranteeDetailsResponse extends BaseResponse {\n id: string;\n granteeId: string;\n name: string;\n email: string;\n type: EmergencyAccessType;\n status: EmergencyAccessStatusType;\n waitTimeDays: number;\n creationDate: string;\n avatarColor: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.granteeId = this.getResponseProperty(\"GranteeId\");\n this.name = this.getResponseProperty(\"Name\");\n this.email = this.getResponseProperty(\"Email\");\n this.type = this.getResponseProperty(\"Type\");\n this.status = this.getResponseProperty(\"Status\");\n this.waitTimeDays = this.getResponseProperty(\"WaitTimeDays\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n }\n}\n\nexport class EmergencyAccessGrantorDetailsResponse extends BaseResponse {\n id: string;\n grantorId: string;\n name: string;\n email: string;\n type: EmergencyAccessType;\n status: EmergencyAccessStatusType;\n waitTimeDays: number;\n creationDate: string;\n avatarColor: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.grantorId = this.getResponseProperty(\"GrantorId\");\n this.name = this.getResponseProperty(\"Name\");\n this.email = this.getResponseProperty(\"Email\");\n this.type = this.getResponseProperty(\"Type\");\n this.status = this.getResponseProperty(\"Status\");\n this.waitTimeDays = this.getResponseProperty(\"WaitTimeDays\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n }\n}\n\nexport class EmergencyAccessTakeoverResponse extends BaseResponse {\n keyEncrypted: string;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n\n constructor(response: any) {\n super(response);\n\n this.keyEncrypted = this.getResponseProperty(\"KeyEncrypted\");\n this.kdf = this.getResponseProperty(\"Kdf\");\n this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n }\n}\n\nexport class EmergencyAccessViewResponse extends BaseResponse {\n keyEncrypted: string;\n ciphers: CipherResponse[] = [];\n\n constructor(response: any) {\n super(response);\n\n this.keyEncrypted = this.getResponseProperty(\"KeyEncrypted\");\n\n const ciphers = this.getResponseProperty(\"Ciphers\");\n if (ciphers != null) {\n this.ciphers = ciphers.map((c: any) => new CipherResponse(c));\n }\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { EmergencyAccessAcceptRequest } from \"../request/emergency-access-accept.request\";\nimport { EmergencyAccessConfirmRequest } from \"../request/emergency-access-confirm.request\";\nimport { EmergencyAccessInviteRequest } from \"../request/emergency-access-invite.request\";\nimport { EmergencyAccessPasswordRequest } from \"../request/emergency-access-password.request\";\nimport { EmergencyAccessUpdateRequest } from \"../request/emergency-access-update.request\";\nimport {\n EmergencyAccessGranteeDetailsResponse,\n EmergencyAccessGrantorDetailsResponse,\n EmergencyAccessTakeoverResponse,\n EmergencyAccessViewResponse,\n} from \"../response/emergency-access.response\";\n\n@Injectable()\nexport class EmergencyAccessApiService {\n constructor(private apiService: ApiService) {}\n\n async getEmergencyAccessTrusted(): Promise> {\n const r = await this.apiService.send(\"GET\", \"/emergency-access/trusted\", null, true, true);\n return new ListResponse(r, EmergencyAccessGranteeDetailsResponse);\n }\n\n async getEmergencyAccessGranted(): Promise> {\n const r = await this.apiService.send(\"GET\", \"/emergency-access/granted\", null, true, true);\n return new ListResponse(r, EmergencyAccessGrantorDetailsResponse);\n }\n\n async getEmergencyAccess(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/emergency-access/\" + id, null, true, true);\n return new EmergencyAccessGranteeDetailsResponse(r);\n }\n\n async getEmergencyGrantorPolicies(id: string): Promise> {\n const r = await this.apiService.send(\n \"GET\",\n \"/emergency-access/\" + id + \"/policies\",\n null,\n true,\n true,\n );\n return new ListResponse(r, PolicyResponse);\n }\n\n putEmergencyAccess(id: string, request: EmergencyAccessUpdateRequest): Promise {\n return this.apiService.send(\"PUT\", \"/emergency-access/\" + id, request, true, false);\n }\n\n deleteEmergencyAccess(id: string): Promise {\n return this.apiService.send(\"DELETE\", \"/emergency-access/\" + id, null, true, false);\n }\n\n postEmergencyAccessInvite(request: EmergencyAccessInviteRequest): Promise {\n return this.apiService.send(\"POST\", \"/emergency-access/invite\", request, true, false);\n }\n\n postEmergencyAccessReinvite(id: string): Promise {\n return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/reinvite\", null, true, false);\n }\n\n postEmergencyAccessAccept(id: string, request: EmergencyAccessAcceptRequest): Promise {\n return this.apiService.send(\n \"POST\",\n \"/emergency-access/\" + id + \"/accept\",\n request,\n true,\n false,\n );\n }\n\n postEmergencyAccessConfirm(id: string, request: EmergencyAccessConfirmRequest): Promise {\n return this.apiService.send(\n \"POST\",\n \"/emergency-access/\" + id + \"/confirm\",\n request,\n true,\n false,\n );\n }\n\n postEmergencyAccessInitiate(id: string): Promise {\n return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/initiate\", null, true, false);\n }\n\n postEmergencyAccessApprove(id: string): Promise {\n return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/approve\", null, true, false);\n }\n\n postEmergencyAccessReject(id: string): Promise {\n return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/reject\", null, true, false);\n }\n\n async postEmergencyAccessTakeover(id: string): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/emergency-access/\" + id + \"/takeover\",\n null,\n true,\n true,\n );\n return new EmergencyAccessTakeoverResponse(r);\n }\n\n async postEmergencyAccessPassword(\n id: string,\n request: EmergencyAccessPasswordRequest,\n ): Promise {\n await this.apiService.send(\n \"POST\",\n \"/emergency-access/\" + id + \"/password\",\n request,\n true,\n true,\n );\n }\n\n async postEmergencyAccessView(id: string): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/emergency-access/\" + id + \"/view\",\n null,\n true,\n true,\n );\n return new EmergencyAccessViewResponse(r);\n }\n}\n","export class EmergencyAccessAcceptRequest {\n token: string;\n}\n","export class EmergencyAccessConfirmRequest {\n key: string;\n}\n","import { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessInviteRequest {\n email: string;\n type: EmergencyAccessType;\n waitTimeDays: number;\n}\n","export class EmergencyAccessPasswordRequest {\n newMasterPasswordHash: string;\n key: string;\n}\n","import { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessUpdateRequest {\n type: EmergencyAccessType;\n waitTimeDays: number;\n keyEncrypted?: string;\n}\n\nexport class EmergencyAccessWithIdRequest extends EmergencyAccessUpdateRequest {\n id: string;\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { UserKeyRotationDataProvider } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyData } from \"@bitwarden/common/admin-console/models/data/policy.data\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport {\n Argon2KdfConfig,\n KdfConfig,\n PBKDF2KdfConfig,\n} from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\nimport { GranteeEmergencyAccess, GrantorEmergencyAccess } from \"../models/emergency-access\";\nimport { EmergencyAccessAcceptRequest } from \"../request/emergency-access-accept.request\";\nimport { EmergencyAccessConfirmRequest } from \"../request/emergency-access-confirm.request\";\nimport { EmergencyAccessInviteRequest } from \"../request/emergency-access-invite.request\";\nimport { EmergencyAccessPasswordRequest } from \"../request/emergency-access-password.request\";\nimport {\n EmergencyAccessUpdateRequest,\n EmergencyAccessWithIdRequest,\n} from \"../request/emergency-access-update.request\";\n\nimport { EmergencyAccessApiService } from \"./emergency-access-api.service\";\n\n@Injectable()\nexport class EmergencyAccessService\n implements UserKeyRotationDataProvider\n{\n constructor(\n private emergencyAccessApiService: EmergencyAccessApiService,\n private apiService: ApiService,\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n private cipherService: CipherService,\n private logService: LogService,\n ) {}\n\n /**\n * Gets an emergency access by id.\n * @param id emergency access id\n */\n getEmergencyAccess(id: string): Promise {\n return this.emergencyAccessApiService.getEmergencyAccess(id);\n }\n\n /**\n * Gets all emergency access that the user has been granted.\n */\n async getEmergencyAccessTrusted(): Promise {\n return (await this.emergencyAccessApiService.getEmergencyAccessTrusted()).data;\n }\n\n /**\n * Gets all emergency access that the user has granted.\n */\n async getEmergencyAccessGranted(): Promise {\n return (await this.emergencyAccessApiService.getEmergencyAccessGranted()).data;\n }\n\n /**\n * Returns policies that apply to the grantor.\n * Intended for grantee.\n * @param id emergency access id\n */\n async getGrantorPolicies(id: string): Promise {\n const response = await this.emergencyAccessApiService.getEmergencyGrantorPolicies(id);\n let policies: Policy[];\n if (response.data != null && response.data.length > 0) {\n policies = response.data.map((policyResponse) => new Policy(new PolicyData(policyResponse)));\n }\n return policies;\n }\n\n /**\n * Invites the email address to be an emergency contact.\n * Step 1 of the 3 step setup flow.\n * Intended for grantor.\n * @param email email address of trusted emergency contact\n * @param type type of emergency access\n * @param waitTimeDays number of days to wait before granting access\n */\n async invite(email: string, type: EmergencyAccessType, waitTimeDays: number): Promise {\n const request = new EmergencyAccessInviteRequest();\n request.email = email.trim();\n request.type = type;\n request.waitTimeDays = waitTimeDays;\n\n await this.emergencyAccessApiService.postEmergencyAccessInvite(request);\n }\n\n /**\n * Sends another email for an existing emergency access invitation.\n * Intended for grantor.\n * @param id emergency access id\n */\n reinvite(id: string): Promise {\n return this.emergencyAccessApiService.postEmergencyAccessReinvite(id);\n }\n\n /**\n * Edits an existing emergency access.\n * Intended for grantor.\n * @param id emergency access id\n * @param type type of emergency access\n * @param waitTimeDays number of days to wait before granting access\n */\n async update(id: string, type: EmergencyAccessType, waitTimeDays: number) {\n const request = new EmergencyAccessUpdateRequest();\n request.type = type;\n request.waitTimeDays = waitTimeDays;\n\n await this.emergencyAccessApiService.putEmergencyAccess(id, request);\n }\n\n /**\n * Accepts an emergency access invitation.\n * Step 2 of the 3 step setup flow.\n * Intended for grantee.\n * @param id emergency access id\n * @param token secret token provided in email\n */\n async accept(id: string, token: string): Promise {\n const request = new EmergencyAccessAcceptRequest();\n request.token = token;\n\n await this.emergencyAccessApiService.postEmergencyAccessAccept(id, request);\n }\n\n /**\n * Encrypts user key with grantee's public key and sends to bitwarden.\n * Step 3 of the 3 step setup flow.\n * Intended for grantor.\n * @param id emergency access id\n * @param token secret token provided in email\n */\n async confirm(id: string, granteeId: string) {\n const userKey = await this.cryptoService.getUserKey();\n if (!userKey) {\n throw new Error(\"No user key found\");\n }\n const publicKeyResponse = await this.apiService.getUserPublicKey(granteeId);\n const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n try {\n this.logService.debug(\n \"User's fingerprint: \" +\n (await this.cryptoService.getFingerprint(granteeId, publicKey)).join(\"-\"),\n );\n } catch {\n // Ignore errors since it's just a debug message\n }\n\n const request = new EmergencyAccessConfirmRequest();\n request.key = await this.encryptKey(userKey, publicKey);\n await this.emergencyAccessApiService.postEmergencyAccessConfirm(id, request);\n }\n\n /**\n * Deletes an existing emergency access.\n * Intended for either grantor or grantee.\n * @param id emergency access id\n */\n delete(id: string): Promise {\n return this.emergencyAccessApiService.deleteEmergencyAccess(id);\n }\n\n /**\n * Requests access to grantor's vault.\n * Intended for grantee.\n * @param id emergency access id\n */\n requestAccess(id: string): Promise {\n return this.emergencyAccessApiService.postEmergencyAccessInitiate(id);\n }\n\n /**\n * Approves access to grantor's vault.\n * Intended for grantor.\n * @param id emergency access id\n */\n approve(id: string): Promise {\n return this.emergencyAccessApiService.postEmergencyAccessApprove(id);\n }\n\n /**\n * Rejects access to grantor's vault.\n * Intended for grantor.\n * @param id emergency access id\n */\n reject(id: string): Promise {\n return this.emergencyAccessApiService.postEmergencyAccessReject(id);\n }\n\n /**\n * Gets the grantor ciphers for an emergency access in view mode.\n * Intended for grantee.\n * @param id emergency access id\n */\n async getViewOnlyCiphers(id: string): Promise {\n const response = await this.emergencyAccessApiService.postEmergencyAccessView(id);\n\n const activeUserPrivateKey = await this.cryptoService.getPrivateKey();\n\n if (activeUserPrivateKey == null) {\n throw new Error(\"Active user does not have a private key, cannot get view only ciphers.\");\n }\n\n const grantorKeyBuffer = await this.cryptoService.rsaDecrypt(\n response.keyEncrypted,\n activeUserPrivateKey,\n );\n const grantorUserKey = new SymmetricCryptoKey(grantorKeyBuffer) as UserKey;\n\n const ciphers = await this.encryptService.decryptItems(\n response.ciphers.map((c) => new Cipher(c)),\n grantorUserKey,\n );\n return ciphers.sort(this.cipherService.getLocaleSortingFunction());\n }\n\n /**\n * Changes the password for an emergency access.\n * Intended for grantee.\n * @param id emergency access id\n * @param masterPassword new master password\n * @param email email address of grantee (must be consistent or login will fail)\n */\n async takeover(id: string, masterPassword: string, email: string) {\n const takeoverResponse = await this.emergencyAccessApiService.postEmergencyAccessTakeover(id);\n\n const activeUserPrivateKey = await this.cryptoService.getPrivateKey();\n\n if (activeUserPrivateKey == null) {\n throw new Error(\"Active user does not have a private key, cannot complete a takeover.\");\n }\n\n const grantorKeyBuffer = await this.cryptoService.rsaDecrypt(\n takeoverResponse.keyEncrypted,\n activeUserPrivateKey,\n );\n if (grantorKeyBuffer == null) {\n throw new Error(\"Failed to decrypt grantor key\");\n }\n\n const grantorUserKey = new SymmetricCryptoKey(grantorKeyBuffer) as UserKey;\n\n let config: KdfConfig;\n\n switch (takeoverResponse.kdf) {\n case KdfType.PBKDF2_SHA256:\n config = new PBKDF2KdfConfig(takeoverResponse.kdfIterations);\n break;\n case KdfType.Argon2id:\n config = new Argon2KdfConfig(\n takeoverResponse.kdfIterations,\n takeoverResponse.kdfMemory,\n takeoverResponse.kdfParallelism,\n );\n break;\n }\n\n const masterKey = await this.cryptoService.makeMasterKey(masterPassword, email, config);\n const masterKeyHash = await this.cryptoService.hashMasterKey(masterPassword, masterKey);\n\n const encKey = await this.cryptoService.encryptUserKeyWithMasterKey(masterKey, grantorUserKey);\n\n const request = new EmergencyAccessPasswordRequest();\n request.newMasterPasswordHash = masterKeyHash;\n request.key = encKey[1].encryptedString;\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.emergencyAccessApiService.postEmergencyAccessPassword(id, request);\n }\n\n /**\n * Returns existing emergency access keys re-encrypted with new user key.\n * Intended for grantor.\n * @param originalUserKey the original user key\n * @param newUserKey the new user key\n * @param userId the user id\n * @throws Error if newUserKey is nullish\n * @returns an array of re-encrypted emergency access requests or an empty array if there are no requests\n */\n async getRotatedData(\n originalUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (newUserKey == null) {\n throw new Error(\"New user key is required for rotation.\");\n }\n\n const requests: EmergencyAccessWithIdRequest[] = [];\n const existingEmergencyAccess =\n await this.emergencyAccessApiService.getEmergencyAccessTrusted();\n\n if (!existingEmergencyAccess || existingEmergencyAccess.data.length === 0) {\n return requests;\n }\n\n // Any Invited or Accepted requests won't have the key yet, so we don't need to update them\n const allowedStatuses = new Set([\n EmergencyAccessStatusType.Confirmed,\n EmergencyAccessStatusType.RecoveryInitiated,\n EmergencyAccessStatusType.RecoveryApproved,\n ]);\n const filteredAccesses = existingEmergencyAccess.data.filter((d) =>\n allowedStatuses.has(d.status),\n );\n\n for (const details of filteredAccesses) {\n // Get public key of grantee\n const publicKeyResponse = await this.apiService.getUserPublicKey(details.granteeId);\n const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n // Encrypt new user key with public key\n const encryptedKey = await this.encryptKey(newUserKey, publicKey);\n\n const updateRequest = new EmergencyAccessWithIdRequest();\n updateRequest.id = details.id;\n updateRequest.type = details.type;\n updateRequest.waitTimeDays = details.waitTimeDays;\n updateRequest.keyEncrypted = encryptedKey;\n requests.push(updateRequest);\n }\n return requests;\n }\n\n private async encryptKey(userKey: UserKey, publicKey: Uint8Array): Promise {\n return (await this.cryptoService.rsaEncrypt(userKey.key, publicKey)).encryptedString;\n }\n}\n","import { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { RouterService } from \"../../core/router.service\";\n\n/**\n * Guard to persist and apply deep links to handle users who are not unlocked.\n * @returns returns true. If user is not Unlocked will store URL to state for redirect once\n * user is unlocked/Authenticated.\n */\nexport function deepLinkGuard(): CanActivateFn {\n return async (route, routerState) => {\n // Inject Services\n const authService = inject(AuthService);\n const router = inject(Router);\n const routerService = inject(RouterService);\n\n // Fetch State\n const currentUrl = routerState.url;\n const transientPreviousUrl = routerService.getPreviousUrl();\n const authStatus = await authService.getAuthStatus();\n\n // Evaluate State\n /** before anything else, check if the user is already unlocked. */\n if (authStatus === AuthenticationStatus.Unlocked) {\n const persistedPreLoginUrl = await routerService.getAndClearLoginRedirectUrl();\n if (!Utils.isNullOrEmpty(persistedPreLoginUrl)) {\n return router.navigateByUrl(persistedPreLoginUrl);\n }\n return true;\n }\n /**\n * At this point the user is either `locked` or `loggedOut`, it doesn't matter.\n * We opt to persist the currentUrl over the transient previousUrl. This supports\n * the case where a user is locked out of their vault and they deep link from\n * the \"lock\" page.\n *\n * When the user is locked out of their vault the currentUrl contains \"lock\" so it will\n * not be persisted, the previousUrl will be persisted instead.\n */\n if (isValidUrl(currentUrl)) {\n await routerService.persistLoginRedirectUrl(currentUrl);\n } else if (isValidUrl(transientPreviousUrl)) {\n await routerService.persistLoginRedirectUrl(transientPreviousUrl);\n }\n return true;\n };\n\n function isValidUrl(url: string | null | undefined): boolean {\n return !Utils.isNullOrEmpty(url) && !url?.toLocaleLowerCase().includes(\"/lock\");\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { AcceptOrganizationComponent } from \"./accept-organization.component\";\nimport { AcceptOrganizationInviteService } from \"./accept-organization.service\";\n\n@NgModule({\n declarations: [AcceptOrganizationComponent],\n imports: [SharedModule],\n providers: [AcceptOrganizationInviteService],\n})\nexport class AcceptOrganizationInviteModule {}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { CheckboxModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { UserVerificationModule } from \"../../shared/components/user-verification\";\n\nimport { CreateCredentialDialogComponent } from \"./create-credential-dialog/create-credential-dialog.component\";\nimport { DeleteCredentialDialogComponent } from \"./delete-credential-dialog/delete-credential-dialog.component\";\nimport { EnableEncryptionDialogComponent } from \"./enable-encryption-dialog/enable-encryption-dialog.component\";\nimport { WebauthnLoginSettingsComponent } from \"./webauthn-login-settings.component\";\n\n@NgModule({\n imports: [SharedModule, FormsModule, ReactiveFormsModule, UserVerificationModule, CheckboxModule],\n declarations: [\n WebauthnLoginSettingsComponent,\n CreateCredentialDialogComponent,\n DeleteCredentialDialogComponent,\n EnableEncryptionDialogComponent,\n ],\n exports: [WebauthnLoginSettingsComponent],\n})\nexport class WebauthnLoginSettingsModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { PasswordCalloutComponent } from \"@bitwarden/auth/angular\";\n\nimport { SharedModule } from \"../../shared\";\nimport { EmergencyAccessModule } from \"../emergency-access\";\nimport { UserKeyRotationModule } from \"../key-rotation/user-key-rotation.module\";\n\nimport { ChangePasswordComponent } from \"./change-password.component\";\nimport { WebauthnLoginSettingsModule } from \"./webauthn-login-settings\";\n\n@NgModule({\n imports: [\n SharedModule,\n WebauthnLoginSettingsModule,\n EmergencyAccessModule,\n PasswordCalloutComponent,\n UserKeyRotationModule,\n ],\n declarations: [ChangePasswordComponent],\n providers: [],\n exports: [ChangePasswordComponent],\n})\nexport class AuthSettingsModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { AcceptOrganizationInviteModule } from \"./organization-invite/accept-organization.module\";\nimport { AuthSettingsModule } from \"./settings/settings.module\";\n\n@NgModule({\n imports: [AuthSettingsModule, AcceptOrganizationInviteModule],\n declarations: [],\n providers: [],\n exports: [AuthSettingsModule],\n})\nexport class AuthModule {}\n","import { inject, Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\n\nimport { UpdateKeyRequest } from \"./request/update-key.request\";\n\n@Injectable()\nexport class UserKeyRotationApiService {\n readonly apiService = inject(ApiService);\n\n postUserKeyUpdate(request: UpdateKeyRequest): Promise {\n return this.apiService.send(\"POST\", \"/accounts/key\", request, true, false);\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { UserKeyRotationApiService } from \"./user-key-rotation-api.service\";\nimport { UserKeyRotationService } from \"./user-key-rotation.service\";\n\n@NgModule({\n providers: [UserKeyRotationService, UserKeyRotationApiService],\n})\nexport class UserKeyRotationModule {}\n","import { OrganizationUserResetPasswordWithIdRequest } from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { WebauthnRotateCredentialRequest } from \"@bitwarden/common/auth/models/request/webauthn-rotate-credential.request\";\nimport { SendWithIdRequest } from \"@bitwarden/common/src/tools/send/models/request/send-with-id.request\";\nimport { CipherWithIdRequest } from \"@bitwarden/common/src/vault/models/request/cipher-with-id.request\";\nimport { FolderWithIdRequest } from \"@bitwarden/common/src/vault/models/request/folder-with-id.request\";\n\nimport { EmergencyAccessWithIdRequest } from \"../../emergency-access/request/emergency-access-update.request\";\n\nexport class UpdateKeyRequest {\n masterPasswordHash: string;\n key: string;\n privateKey: string;\n ciphers: CipherWithIdRequest[] = [];\n folders: FolderWithIdRequest[] = [];\n sends: SendWithIdRequest[] = [];\n emergencyAccessKeys: EmergencyAccessWithIdRequest[] = [];\n resetPasswordKeys: OrganizationUserResetPasswordWithIdRequest[] = [];\n webauthnKeys: WebauthnRotateCredentialRequest[] = [];\n}\n","import { Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountInfo } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { MasterPasswordVerification } from \"@bitwarden/common/auth/types/verification\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\nimport { OrganizationUserResetPasswordService } from \"../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service\";\nimport { WebauthnLoginAdminService } from \"../core\";\nimport { EmergencyAccessService } from \"../emergency-access\";\n\nimport { UpdateKeyRequest } from \"./request/update-key.request\";\nimport { UserKeyRotationApiService } from \"./user-key-rotation-api.service\";\n\n@Injectable()\nexport class UserKeyRotationService {\n constructor(\n private userVerificationService: UserVerificationService,\n private apiService: UserKeyRotationApiService,\n private cipherService: CipherService,\n private folderService: FolderService,\n private sendService: SendService,\n private emergencyAccessService: EmergencyAccessService,\n private resetPasswordService: OrganizationUserResetPasswordService,\n private deviceTrustService: DeviceTrustServiceAbstraction,\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n private syncService: SyncService,\n private webauthnLoginAdminService: WebauthnLoginAdminService,\n ) {}\n\n /**\n * Creates a new user key and re-encrypts all required data with the it.\n * @param masterPassword current master password (used for validation)\n */\n async rotateUserKeyAndEncryptedData(\n masterPassword: string,\n user: { id: UserId } & AccountInfo,\n ): Promise {\n if (!masterPassword) {\n throw new Error(\"Invalid master password\");\n }\n\n if ((await this.syncService.getLastSync()) === null) {\n throw new Error(\n \"The local vault is de-synced and the keys cannot be rotated. Please log out and log back in to resolve this issue.\",\n );\n }\n\n // Verify master password\n // UV service sets master key on success since it is stored in memory and can be lost on refresh\n const verification = {\n type: VerificationType.MasterPassword,\n secret: masterPassword,\n } as MasterPasswordVerification;\n\n const { masterKey } = await this.userVerificationService.verifyUserByMasterPassword(\n verification,\n user.id,\n user.email,\n );\n\n const [newUserKey, newEncUserKey] = await this.cryptoService.makeUserKey(masterKey);\n\n if (!newUserKey || !newEncUserKey) {\n throw new Error(\"User key could not be created\");\n }\n\n // Create new request\n const request = new UpdateKeyRequest();\n\n // Add new user key\n request.key = newEncUserKey.encryptedString;\n\n // Add master key hash\n const masterPasswordHash = await this.cryptoService.hashMasterKey(masterPassword, masterKey);\n request.masterPasswordHash = masterPasswordHash;\n\n // Get original user key\n // Note: We distribute the legacy key, but not all domains actually use it. If any of those\n // domains break their legacy support it will break the migration process for legacy users.\n const originalUserKey = await this.cryptoService.getUserKeyWithLegacySupport(user.id);\n\n // Add re-encrypted data\n request.privateKey = await this.encryptPrivateKey(newUserKey, user.id);\n\n const rotatedCiphers = await this.cipherService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedCiphers != null) {\n request.ciphers = rotatedCiphers;\n }\n\n const rotatedFolders = await this.folderService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedFolders != null) {\n request.folders = rotatedFolders;\n }\n\n const rotatedSends = await this.sendService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedSends != null) {\n request.sends = rotatedSends;\n }\n\n const rotatedEmergencyAccessKeys = await this.emergencyAccessService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedEmergencyAccessKeys != null) {\n request.emergencyAccessKeys = rotatedEmergencyAccessKeys;\n }\n\n // Note: Reset password keys request model has user verification\n // properties, but the rotation endpoint uses its own MP hash.\n const rotatedResetPasswordKeys = await this.resetPasswordService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedResetPasswordKeys != null) {\n request.resetPasswordKeys = rotatedResetPasswordKeys;\n }\n\n const rotatedWebauthnKeys = await this.webauthnLoginAdminService.getRotatedData(\n originalUserKey,\n newUserKey,\n user.id,\n );\n if (rotatedWebauthnKeys != null) {\n request.webauthnKeys = rotatedWebauthnKeys;\n }\n\n await this.apiService.postUserKeyUpdate(request);\n\n // TODO PM-2199: Add device trust rotation support to the user key rotation endpoint\n await this.deviceTrustService.rotateDevicesTrust(user.id, newUserKey, masterPasswordHash);\n }\n\n private async encryptPrivateKey(\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n const privateKey = await firstValueFrom(\n this.cryptoService.userPrivateKeyWithLegacySupport$(userId),\n );\n if (!privateKey) {\n throw new Error(\"No private key found for user key rotation\");\n }\n return (await this.encryptService.encrypt(privateKey, newUserKey)).encryptedString;\n }\n}\n","import { OrganizationKeysRequest } from \"../../../models/request/organization-keys.request\";\n\nexport class OrganizationUserAcceptInitRequest {\n token: string;\n key: string;\n keys: OrganizationKeysRequest;\n collectionName: string;\n}\n","export class OrganizationUserAcceptRequest {\n token: string;\n // Used to auto-enroll in master password reset\n resetPasswordKey: string;\n}\n","import { Injectable } from \"@angular/core\";\nimport { BehaviorSubject, firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport {\n OrganizationUserAcceptRequest,\n OrganizationUserAcceptInitRequest,\n} from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n GlobalState,\n GlobalStateProvider,\n KeyDefinition,\n ORGANIZATION_INVITE_DISK,\n} from \"@bitwarden/common/platform/state\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\n\nimport { OrganizationInvite } from \"./organization-invite\";\n\n// We're storing the organization invite for 2 reasons:\n// 1. If the org requires a MP policy check, we need to keep track that the user has already been redirected when they return.\n// 2. The MP policy check happens on login/register flows, we need to store the token to retrieve the policies then.\nexport const ORGANIZATION_INVITE = new KeyDefinition(\n ORGANIZATION_INVITE_DISK,\n \"organizationInvite\",\n {\n deserializer: (invite) => (invite ? OrganizationInvite.fromJSON(invite) : null),\n },\n);\n\n@Injectable()\nexport class AcceptOrganizationInviteService {\n private organizationInvitationState: GlobalState;\n private orgNameSubject: BehaviorSubject = new BehaviorSubject(null);\n private policyCache: Policy[];\n\n // Fix URL encoding of space issue with Angular\n orgName$ = this.orgNameSubject.pipe(map((orgName) => orgName.replace(/\\+/g, \" \")));\n\n constructor(\n private readonly apiService: ApiService,\n private readonly authService: AuthService,\n private readonly cryptoService: CryptoService,\n private readonly encryptService: EncryptService,\n private readonly policyApiService: PolicyApiServiceAbstraction,\n private readonly policyService: PolicyService,\n private readonly logService: LogService,\n private readonly organizationApiService: OrganizationApiServiceAbstraction,\n private readonly organizationUserService: OrganizationUserService,\n private readonly i18nService: I18nService,\n private readonly globalStateProvider: GlobalStateProvider,\n ) {\n this.organizationInvitationState = this.globalStateProvider.get(ORGANIZATION_INVITE);\n }\n\n /** Returns the currently stored organization invite */\n async getOrganizationInvite(): Promise {\n return await firstValueFrom(this.organizationInvitationState.state$);\n }\n\n /**\n * Stores a new organization invite\n * @param invite an organization invite\n * @throws if the invite is nullish\n */\n async setOrganizationInvitation(invite: OrganizationInvite): Promise {\n if (invite == null) {\n throw new Error(\"Invite cannot be null. Use clearOrganizationInvitation instead.\");\n }\n await this.organizationInvitationState.update(() => invite);\n }\n\n /** Clears the currently stored organization invite */\n async clearOrganizationInvitation(): Promise {\n await this.organizationInvitationState.update(() => null);\n }\n\n /**\n * Validates and accepts the organization invitation if possible.\n * Note: Users might need to pass a MP policy check before accepting an invite to an existing organization. If the user\n * has not passed this check, they will be logged out and the invite will be stored for later use.\n * @param invite an organization invite\n * @returns a promise that resolves a boolean indicating if the invite was accepted.\n */\n async validateAndAcceptInvite(invite: OrganizationInvite): Promise {\n if (invite == null) {\n throw new Error(\"Invite cannot be null.\");\n }\n\n // Creation of a new org\n if (invite.initOrganization) {\n await this.acceptAndInitOrganization(invite);\n return true;\n }\n\n // Accepting an org invite from existing org\n if (await this.masterPasswordPolicyCheckRequired(invite)) {\n await this.setOrganizationInvitation(invite);\n this.authService.logOut(() => {\n /* Do nothing */\n });\n return false;\n }\n\n // We know the user has already logged in and passed a MP policy check\n await this.accept(invite);\n return true;\n }\n\n private async acceptAndInitOrganization(invite: OrganizationInvite): Promise {\n await this.prepareAcceptAndInitRequest(invite).then((request) =>\n this.organizationUserService.postOrganizationUserAcceptInit(\n invite.organizationId,\n invite.organizationUserId,\n request,\n ),\n );\n await this.apiService.refreshIdentityToken();\n await this.clearOrganizationInvitation();\n }\n\n private async prepareAcceptAndInitRequest(\n invite: OrganizationInvite,\n ): Promise {\n const request = new OrganizationUserAcceptInitRequest();\n request.token = invite.token;\n\n const [encryptedOrgKey, orgKey] = await this.cryptoService.makeOrgKey();\n const [orgPublicKey, encryptedOrgPrivateKey] = await this.cryptoService.makeKeyPair(orgKey);\n const collection = await this.encryptService.encrypt(\n this.i18nService.t(\"defaultCollection\"),\n orgKey,\n );\n\n request.key = encryptedOrgKey.encryptedString;\n request.keys = new OrganizationKeysRequest(\n orgPublicKey,\n encryptedOrgPrivateKey.encryptedString,\n );\n request.collectionName = collection.encryptedString;\n\n return request;\n }\n\n private async accept(invite: OrganizationInvite): Promise {\n await this.prepareAcceptRequest(invite).then((request) =>\n this.organizationUserService.postOrganizationUserAccept(\n invite.organizationId,\n invite.organizationUserId,\n request,\n ),\n );\n\n await this.apiService.refreshIdentityToken();\n await this.clearOrganizationInvitation();\n }\n\n private async prepareAcceptRequest(\n invite: OrganizationInvite,\n ): Promise {\n const request = new OrganizationUserAcceptRequest();\n request.token = invite.token;\n\n if (await this.resetPasswordEnrollRequired(invite)) {\n const response = await this.organizationApiService.getKeys(invite.organizationId);\n\n if (response == null) {\n throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n }\n\n const publicKey = Utils.fromB64ToArray(response.publicKey);\n\n // RSA Encrypt user's encKey.key with organization public key\n const userKey = await this.cryptoService.getUserKey();\n const encryptedKey = await this.cryptoService.rsaEncrypt(userKey.key, publicKey);\n\n // Add reset password key to accept request\n request.resetPasswordKey = encryptedKey.encryptedString;\n }\n return request;\n }\n\n private async resetPasswordEnrollRequired(invite: OrganizationInvite): Promise {\n const policies = await this.getPolicies(invite);\n\n if (policies == null || policies.length === 0) {\n return false;\n }\n\n const result = this.policyService.getResetPasswordPolicyOptions(\n policies,\n invite.organizationId,\n );\n // Return true if policy enabled and auto-enroll enabled\n return result[1] && result[0].autoEnrollEnabled;\n }\n\n private async masterPasswordPolicyCheckRequired(invite: OrganizationInvite): Promise {\n const policies = await this.getPolicies(invite);\n\n if (policies == null || policies.length === 0) {\n return false;\n }\n const hasMasterPasswordPolicy = policies.some(\n (p) => p.type === PolicyType.MasterPassword && p.enabled,\n );\n\n let storedInvite = await this.getOrganizationInvite();\n if (storedInvite?.email !== invite.email) {\n // clear stored invites if the email doesn't match\n await this.clearOrganizationInvitation();\n storedInvite = null;\n }\n // if we don't have an org invite stored, we know the user hasn't been redirected yet to check the MP policy\n const hasNotCheckedMasterPasswordYet = storedInvite == null;\n return hasMasterPasswordPolicy && hasNotCheckedMasterPasswordYet;\n }\n\n private async getPolicies(invite: OrganizationInvite): Promise {\n // if policies are not cached, fetch them\n if (this.policyCache == null) {\n try {\n this.policyCache = await this.policyApiService.getPoliciesByToken(\n invite.organizationId,\n invite.token,\n invite.email,\n invite.organizationUserId,\n );\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n return this.policyCache;\n }\n}\n","import { Params } from \"@angular/router\";\nimport { Jsonify } from \"type-fest\";\n\nexport class OrganizationInvite {\n email: string;\n initOrganization: boolean;\n orgSsoIdentifier: string;\n orgUserHasExistingUser: boolean;\n organizationId: string;\n organizationName: string;\n organizationUserId: string;\n token: string;\n\n static fromJSON(json: Jsonify): OrganizationInvite | null {\n if (json == null) {\n return null;\n }\n\n return Object.assign(new OrganizationInvite(), json);\n }\n\n static fromParams(params: Params): OrganizationInvite | null {\n if (params == null) {\n return null;\n }\n\n return Object.assign(new OrganizationInvite(), {\n email: params.email,\n initOrganization: params.initOrganization?.toLocaleLowerCase() === \"true\",\n orgSsoIdentifier: params.orgSsoIdentifier,\n orgUserHasExistingUser: params.orgUserHasExistingUser?.toLocaleLowerCase() === \"true\",\n organizationId: params.organizationId,\n organizationName: params.organizationName,\n organizationUserId: params.organizationUserId,\n token: params.token,\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { PasswordCalloutComponent } from \"@bitwarden/auth/angular\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { RegisterFormComponent } from \"./register-form.component\";\n\n@NgModule({\n imports: [SharedModule, PasswordCalloutComponent],\n declarations: [RegisterFormComponent],\n exports: [RegisterFormComponent],\n})\nexport class RegisterFormModule {}\n","import { Component } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { TypographyModule } from \"@bitwarden/components\";\n\n/**\n * Component for the Danger Zone section of the Account/Organization Settings page.\n */\n@Component({\n selector: \"app-danger-zone\",\n templateUrl: \"danger-zone.component.html\",\n standalone: true,\n imports: [TypographyModule, JslibModule],\n})\nexport class DangerZoneComponent {}\n","

{{ \"dangerZone\" | i18n }}

\n\n
\n

{{ \"dangerZoneDesc\" | i18n }}

\n\n
\n \n
\n
\n","export class UpdateProfileRequest {\n name: string;\n masterPasswordHint: string;\n culture = \"en-US\"; // deprecated\n\n constructor(name: string, masterPasswordHint: string) {\n this.name = name;\n this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;\n }\n}\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\n@Component({\n selector: \"selectable-avatar\",\n template: `\n \n \n `,\n})\nexport class SelectableAvatarComponent {\n @Input() id: string;\n @Input() text: string;\n @Input() title: string;\n @Input() color: string;\n @Input() border = false;\n @Input() selected = false;\n @Output() select = new EventEmitter();\n\n onFire() {\n this.select.emit(this.color);\n }\n\n get classList() {\n return [\"tw-rounded-full tw-inline-block\"]\n .concat([\"tw-cursor-pointer\", \"tw-outline\", \"tw-outline-solid\", \"tw-outline-offset-1\"])\n .concat(\n this.selected\n ? [\"tw-outline-[3px]\", \"tw-outline-primary-600\"]\n : [\n \"tw-outline-0\",\n \"hover:tw-outline-1\",\n \"hover:tw-outline-primary-300\",\n \"focus:tw-outline-2\",\n \"focus:tw-outline-primary-600\",\n ],\n );\n }\n}\n","\n \n
\n \n {{ \"loading\" | i18n }}\n
\n

{{ \"pickAnAvatarColor\" | i18n }}

\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n \n \n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport {\n Component,\n ElementRef,\n Inject,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { BehaviorSubject, debounceTime, firstValueFrom, Subject, takeUntil } from \"rxjs\";\n\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { ProfileResponse } from \"@bitwarden/common/models/response/profile.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService } from \"@bitwarden/components\";\n\ntype ChangeAvatarDialogData = {\n profile: ProfileResponse;\n};\n\n@Component({\n templateUrl: \"change-avatar-dialog.component.html\",\n encapsulation: ViewEncapsulation.None,\n})\nexport class ChangeAvatarDialogComponent implements OnInit, OnDestroy {\n profile: ProfileResponse;\n\n @ViewChild(\"colorPicker\") colorPickerElement: ElementRef;\n\n loading = false;\n defaultColorPalette: NamedAvatarColor[] = [\n { name: \"brightBlue\", color: \"#16cbfc\" },\n { name: \"green\", color: \"#94cc4b\" },\n { name: \"orange\", color: \"#ffb520\" },\n { name: \"lavender\", color: \"#e5beed\" },\n { name: \"yellow\", color: \"#fcff41\" },\n { name: \"indigo\", color: \"#acbdf7\" },\n { name: \"teal\", color: \"#8ecdc5\" },\n { name: \"salmon\", color: \"#ffa3a3\" },\n { name: \"pink\", color: \"#ffa2d4\" },\n ];\n customColorSelected = false;\n currentSelection: string;\n\n protected customColor$ = new BehaviorSubject(null);\n protected customTextColor$ = new BehaviorSubject(\"#000000\");\n private destroy$ = new Subject();\n\n constructor(\n @Inject(DIALOG_DATA) protected data: ChangeAvatarDialogData,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private avatarService: AvatarService,\n private dialogRef: DialogRef,\n ) {\n this.profile = data.profile;\n }\n\n async ngOnInit() {\n //localize the default colors\n this.defaultColorPalette.forEach((c) => (c.name = this.i18nService.t(c.name)));\n\n this.customColor$\n .pipe(debounceTime(200), takeUntil(this.destroy$))\n .subscribe((color: string | null) => {\n if (color == null) {\n return;\n }\n this.customTextColor$.next(Utils.pickTextColorBasedOnBgColor(color));\n this.customColorSelected = true;\n this.currentSelection = color;\n });\n\n await this.setSelection(await firstValueFrom(this.avatarService.avatarColor$));\n }\n\n async showCustomPicker() {\n this.customColorSelected = true;\n this.colorPickerElement.nativeElement.click();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.setSelection(this.customColor$.value);\n }\n\n async generateAvatarColor() {\n Utils.stringToColor(this.profile.name.toString());\n }\n\n submit = async () => {\n if (Utils.validateHexColor(this.currentSelection) || this.currentSelection == null) {\n await this.avatarService.setAvatarColor(this.currentSelection);\n this.dialogRef.close();\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"avatarUpdated\"));\n } else {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n }\n };\n\n async ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async setSelection(color: string | null) {\n this.defaultColorPalette.filter((x) => x.selected).forEach((c) => (c.selected = false));\n\n if (color == null) {\n return;\n }\n\n color = color.toLowerCase();\n\n this.customColorSelected = false;\n //Allow for toggle\n if (this.currentSelection === color) {\n this.currentSelection = null;\n } else {\n const selectedColorIndex = this.defaultColorPalette.findIndex((c) => c.color === color);\n if (selectedColorIndex !== -1) {\n this.defaultColorPalette[selectedColorIndex].selected = true;\n this.currentSelection = color;\n } else {\n this.customColor$.next(color);\n }\n }\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(ChangeAvatarDialogComponent, config);\n }\n}\n\nexport class NamedAvatarColor {\n name: string;\n color: string;\n selected? = false;\n}\n","
\n \n {{ \"loading\" | i18n }}\n
\n
\n
\n
\n \n {{ \"name\" | i18n }}\n \n \n \n {{ \"email\" | i18n }}\n \n \n
\n
\n
\n \n \n \n \n Customize\n \n
\n \n \n
\n
\n \n
\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UpdateProfileRequest } from \"@bitwarden/common/auth/models/request/update-profile.request\";\nimport { ProfileResponse } from \"@bitwarden/common/models/response/profile.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { ChangeAvatarDialogComponent } from \"./change-avatar-dialog.component\";\n\n@Component({\n selector: \"app-profile\",\n templateUrl: \"profile.component.html\",\n})\nexport class ProfileComponent implements OnInit {\n loading = true;\n profile: ProfileResponse;\n fingerprintMaterial: string;\n private destroy$ = new Subject();\n\n protected formGroup = new FormGroup({\n name: new FormControl(null),\n email: new FormControl(null),\n });\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private stateService: StateService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n this.profile = await this.apiService.getProfile();\n this.loading = false;\n this.fingerprintMaterial = await this.stateService.getUserId();\n this.formGroup.get(\"name\").setValue(this.profile.name);\n this.formGroup.get(\"email\").setValue(this.profile.email);\n\n this.formGroup\n .get(\"name\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((name) => {\n this.profile.name = name;\n });\n }\n\n openChangeAvatar = async () => {\n ChangeAvatarDialogComponent.open(this.dialogService, {\n data: { profile: this.profile },\n });\n };\n\n async ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n submit = async () => {\n const request = new UpdateProfileRequest(\n this.formGroup.get(\"name\").value,\n this.profile.masterPasswordHint,\n );\n await this.apiService.putProfile(request);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"accountUpdated\"));\n };\n}\n","
\n \n {{ data.apiKeyTitle | i18n }}\n
\n

{{ data.apiKeyDescription | i18n }}

\n \n \n {{ data.apiKeyWarning | i18n }}\n \n

\n client_id:
\n {{ clientId }}\n

\n

\n client_secret:
\n {{ clientSecret }}\n

\n

\n scope:
\n {{ data.scope }}\n

\n

\n grant_type:
\n {{ data.grantType }}\n

\n \n
\n
\n \n \n
\n
\n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"@bitwarden/common/auth/models/response/api-key.response\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport type ApiKeyDialogData = {\n keyType: string;\n isRotation?: boolean;\n entityId: string;\n postKey: (entityId: string, request: SecretVerificationRequest) => Promise;\n scope: string;\n grantType: string;\n apiKeyTitle: string;\n apiKeyWarning: string;\n apiKeyDescription: string;\n};\n@Component({\n selector: \"app-api-key\",\n templateUrl: \"api-key.component.html\",\n})\nexport class ApiKeyComponent {\n clientId: string;\n clientSecret: string;\n\n formGroup = this.formBuilder.group({\n masterPassword: [null as Verification, [Validators.required]],\n });\n constructor(\n @Inject(DIALOG_DATA) protected data: ApiKeyDialogData,\n private formBuilder: FormBuilder,\n private userVerificationService: UserVerificationService,\n ) {}\n\n submit = async () => {\n if (this.formGroup.invalid) {\n this.formGroup.markAllAsTouched();\n return;\n }\n const response = await this.userVerificationService\n .buildRequest(this.formGroup.value.masterPassword)\n .then((request) => this.data.postKey(this.data.entityId, request));\n this.clientSecret = response.apiKey;\n this.clientId = `${this.data.keyType}.${this.data.entityId}`;\n };\n /**\n * Strongly typed helper to open a ApiKeyComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open = (dialogService: DialogService, config: DialogConfig) => {\n return dialogService.open(ApiKeyComponent, config);\n };\n}\n","import { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorProviderRequest extends SecretVerificationRequest {\n type: TwoFactorProviderType;\n}\n","import { Directive, EventEmitter, Output } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { TwoFactorProviderRequest } from \"@bitwarden/common/auth/models/request/two-factor-provider.request\";\nimport { AuthResponseBase } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Directive()\nexport abstract class TwoFactorBaseComponent {\n @Output() onUpdated = new EventEmitter();\n\n type: TwoFactorProviderType;\n organizationId: string;\n twoFactorProviderType = TwoFactorProviderType;\n enabled = false;\n authed = false;\n\n protected hashedSecret: string;\n protected verificationType: VerificationType;\n protected componentName = \"\";\n\n constructor(\n protected apiService: ApiService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected logService: LogService,\n protected userVerificationService: UserVerificationService,\n protected dialogService: DialogService,\n ) {}\n\n protected auth(authResponse: AuthResponseBase) {\n this.hashedSecret = authResponse.secret;\n this.verificationType = authResponse.verificationType;\n this.authed = true;\n }\n\n /** @deprecated used for formPromise flows.*/\n protected async enable(enableFunction: () => Promise) {\n try {\n await enableFunction();\n this.onUpdated.emit(true);\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n /**\n * @deprecated used for formPromise flows.\n * TODO: Remove this method when formPromises are removed from all flows.\n * */\n protected async disable(promise: Promise) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"disable\" },\n content: { key: \"twoStepDisableDesc\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n try {\n const request = await this.buildRequestModel(TwoFactorProviderRequest);\n request.type = this.type;\n if (this.organizationId != null) {\n promise = this.apiService.putTwoFactorOrganizationDisable(this.organizationId, request);\n } else {\n promise = this.apiService.putTwoFactorDisable(request);\n }\n await promise;\n this.enabled = false;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"twoStepDisabled\"));\n this.onUpdated.emit(false);\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n protected async disableMethod() {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"disable\" },\n content: { key: \"twoStepDisableDesc\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n const request = await this.buildRequestModel(TwoFactorProviderRequest);\n request.type = this.type;\n if (this.organizationId != null) {\n await this.apiService.putTwoFactorOrganizationDisable(this.organizationId, request);\n } else {\n await this.apiService.putTwoFactorDisable(request);\n }\n this.enabled = false;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"twoStepDisabled\"));\n this.onUpdated.emit(false);\n }\n\n protected async buildRequestModel(\n requestClass: new () => T,\n ) {\n return this.userVerificationService.buildRequest(\n {\n secret: this.hashedSecret,\n type: this.verificationType,\n },\n requestClass,\n true,\n );\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorDuoRequest extends SecretVerificationRequest {\n clientId: string;\n clientSecret: string;\n host: string;\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n Duo\n \n \n \n \n {{ \"twoStepLoginProviderEnabled\" | i18n }}\n \n \"Duo\n {{ \"twoFactorDuoClientId\" | i18n }}: {{ clientId }}\n
\n {{ \"twoFactorDuoClientSecret\" | i18n }}: {{ clientSecret }}\n
\n {{ \"twoFactorDuoApiHostname\" | i18n }}: {{ host }}\n
\n \n \"Duo\n

{{ \"twoFactorDuoDesc\" | i18n }}

\n \n {{ \"twoFactorDuoClientId\" | i18n }}\n \n \n \n {{ \"twoFactorDuoClientSecret\" | i18n }}\n \n \n \n {{ \"twoFactorDuoApiHostname\" | i18n }}\n \n \n
\n
\n \n \n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { UpdateTwoFactorDuoRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-duo.request\";\nimport { TwoFactorDuoResponse } from \"@bitwarden/common/auth/models/response/two-factor-duo.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorBaseComponent } from \"./two-factor-base.component\";\n\n@Component({\n selector: \"app-two-factor-duo\",\n templateUrl: \"two-factor-duo.component.html\",\n})\nexport class TwoFactorDuoComponent extends TwoFactorBaseComponent {\n @Output() onChangeStatus: EventEmitter = new EventEmitter();\n\n type = TwoFactorProviderType.Duo;\n formGroup = this.formBuilder.group({\n clientId: [\"\", [Validators.required]],\n clientSecret: [\"\", [Validators.required]],\n host: [\"\", [Validators.required]],\n });\n override componentName = \"app-two-factor-duo\";\n\n constructor(\n @Inject(DIALOG_DATA) protected data: TwoFactorDuoComponentConfig,\n apiService: ApiService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n userVerificationService: UserVerificationService,\n dialogService: DialogService,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n ) {\n super(\n apiService,\n i18nService,\n platformUtilsService,\n logService,\n userVerificationService,\n dialogService,\n );\n }\n\n get clientId() {\n return this.formGroup.get(\"clientId\").value;\n }\n get clientSecret() {\n return this.formGroup.get(\"clientSecret\").value;\n }\n get host() {\n return this.formGroup.get(\"host\").value;\n }\n set clientId(value: string) {\n this.formGroup.get(\"clientId\").setValue(value);\n }\n set clientSecret(value: string) {\n this.formGroup.get(\"clientSecret\").setValue(value);\n }\n set host(value: string) {\n this.formGroup.get(\"host\").setValue(value);\n }\n\n async ngOnInit() {\n if (!this.data?.authResponse) {\n throw Error(\"TwoFactorDuoComponent requires a TwoFactorDuoResponse to initialize\");\n }\n\n super.auth(this.data.authResponse);\n this.processResponse(this.data.authResponse.response);\n\n if (this.data.organizationId) {\n this.type = TwoFactorProviderType.OrganizationDuo;\n this.organizationId = this.data.organizationId;\n }\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n if (this.enabled) {\n await this.disableMethod();\n } else {\n await this.enable();\n }\n this.onChangeStatus.emit(this.enabled);\n };\n\n protected async enable() {\n const request = await this.buildRequestModel(UpdateTwoFactorDuoRequest);\n request.clientId = this.clientId;\n request.clientSecret = this.clientSecret;\n request.host = this.host;\n\n let response: TwoFactorDuoResponse;\n\n if (this.organizationId != null) {\n response = await this.apiService.putTwoFactorOrganizationDuo(this.organizationId, request);\n } else {\n response = await this.apiService.putTwoFactorDuo(request);\n }\n\n this.processResponse(response);\n this.onUpdated.emit(true);\n }\n\n onClose = () => {\n this.dialogRef.close(this.enabled);\n };\n\n private processResponse(response: TwoFactorDuoResponse) {\n this.clientId = response.clientId;\n this.clientSecret = response.clientSecret;\n this.host = response.host;\n this.enabled = response.enabled;\n }\n\n /**\n * Strongly typed helper to open a TwoFactorDuoComponentComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open = (\n dialogService: DialogService,\n config: DialogConfig,\n ) => {\n return dialogService.open(TwoFactorDuoComponent, config);\n };\n}\n\ntype TwoFactorDuoComponentConfig = {\n authResponse: AuthResponse;\n organizationId?: string;\n};\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorAuthenticatorRequest extends SecretVerificationRequest {\n token: string;\n key: string;\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n {{ \"authenticatorAppTitle\" | i18n }}\n \n \n \n \n

{{ \"twoStepLoginProviderEnabled\" | i18n }}

\n {{ \"twoStepAuthenticatorReaddDesc\" | i18n }}\n
\n

{{ \"twoStepAuthenticatorNeedApp\" | i18n }}

\n
\n \n

\n {{ \"twoStepAuthenticatorInstructionPrefix\" | i18n }}\n Aegis\n {{ \"twoStepAuthenticatorInstructionInfix1\" | i18n }}\n 2FAS\n {{ \"twoStepAuthenticatorInstructionInfix2\" | i18n }}\n Bitwarden Authenticator\n {{ \"twoStepAuthenticatorInstructionSuffix\" | i18n }}\n

\n\n

\n \n \n \n\n \n \n \n \n

\n {{ \"twoStepAuthenticatorScanCodeV2\" | i18n }}\n
\n
\n

\n \n \n

\n {{ \"twoStepAuthenticatorQRCanvasError\" | i18n }}\n

\n
\n \n
\n {{ key }}\n

\n \n {{ \"twoStepAuthenticatorEnterCodeV2\" | i18n }}\n \n \n \n \n \n {{ (enabled ? \"disable\" : \"enable\") | i18n }}\n \n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-authenticator.request\";\nimport { TwoFactorAuthenticatorResponse } from \"@bitwarden/common/auth/models/response/two-factor-authenticator.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorBaseComponent } from \"./two-factor-base.component\";\n\n// NOTE: There are additional options available but these are just the ones we are current using.\n// See: https://github.com/neocotic/qrious#examples\ninterface QRiousOptions {\n element: HTMLElement;\n value: string;\n size: number;\n}\n\ndeclare global {\n interface Window {\n QRious: new (options: QRiousOptions) => unknown;\n }\n}\n\n@Component({\n selector: \"app-two-factor-authenticator\",\n templateUrl: \"two-factor-authenticator.component.html\",\n})\nexport class TwoFactorAuthenticatorComponent\n extends TwoFactorBaseComponent\n implements OnInit, OnDestroy\n{\n @Output() onChangeStatus = new EventEmitter();\n type = TwoFactorProviderType.Authenticator;\n key: string;\n\n override componentName = \"app-two-factor-authenticator\";\n qrScriptError = false;\n private qrScript: HTMLScriptElement;\n\n formGroup = this.formBuilder.group({\n token: new FormControl(null, [Validators.required, Validators.minLength(6)]),\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected data: AuthResponse,\n private dialogRef: DialogRef,\n apiService: ApiService,\n i18nService: I18nService,\n userVerificationService: UserVerificationService,\n private formBuilder: FormBuilder,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n private accountService: AccountService,\n dialogService: DialogService,\n ) {\n super(\n apiService,\n i18nService,\n platformUtilsService,\n logService,\n userVerificationService,\n dialogService,\n );\n this.qrScript = window.document.createElement(\"script\");\n this.qrScript.src = \"scripts/qrious.min.js\";\n this.qrScript.async = true;\n }\n\n async ngOnInit() {\n window.document.body.appendChild(this.qrScript);\n await this.auth(this.data);\n }\n\n ngOnDestroy() {\n window.document.body.removeChild(this.qrScript);\n }\n\n validateTokenControl() {\n this.formGroup.controls.token.markAsTouched();\n }\n\n async auth(authResponse: AuthResponse) {\n super.auth(authResponse);\n return this.processResponse(authResponse.response);\n }\n\n submit = async () => {\n if (this.formGroup.invalid && !this.enabled) {\n return;\n }\n if (this.enabled) {\n await this.disableMethod();\n this.dialogRef.close(this.enabled);\n } else {\n await this.enable();\n }\n this.onChangeStatus.emit(this.enabled);\n };\n\n protected async enable() {\n const request = await this.buildRequestModel(UpdateTwoFactorAuthenticatorRequest);\n request.token = this.formGroup.value.token;\n request.key = this.key;\n\n const response = await this.apiService.putTwoFactorAuthenticator(request);\n await this.processResponse(response);\n this.onUpdated.emit(true);\n }\n\n private async processResponse(response: TwoFactorAuthenticatorResponse) {\n this.formGroup.get(\"token\").setValue(null);\n this.enabled = response.enabled;\n this.key = response.key;\n\n await this.waitForQRiousToLoadOrError().catch((error) => {\n this.logService.error(error);\n this.qrScriptError = true;\n });\n\n await this.createQRCode();\n }\n\n private async waitForQRiousToLoadOrError(): Promise {\n // Check if QRious is already loaded or if there was an error loading it either way don't wait for it to try and load again\n if (typeof window.QRious !== \"undefined\" || this.qrScriptError) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n this.qrScript.onload = () => resolve();\n this.qrScript.onerror = () =>\n reject(new Error(this.i18nService.t(\"twoStepAuthenticatorQRCanvasError\")));\n });\n }\n\n private async createQRCode() {\n if (this.qrScriptError) {\n return;\n }\n const email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n new window.QRious({\n element: document.getElementById(\"qr\"),\n value:\n \"otpauth://totp/Bitwarden:\" +\n Utils.encodeRFC3986URIComponent(email) +\n \"?secret=\" +\n encodeURIComponent(this.key) +\n \"&issuer=Bitwarden\",\n size: 160,\n });\n }\n\n static open(\n dialogService: DialogService,\n config: DialogConfig>,\n ) {\n return dialogService.open(TwoFactorAuthenticatorComponent, config);\n }\n\n async launchExternalUrl(url: string) {\n const hostname = new URL(url).hostname;\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.i18nService.t(\"continueToExternalUrlTitle\", hostname),\n content: this.i18nService.t(\"continueToExternalUrlDesc\"),\n type: \"info\",\n acceptButtonText: { key: \"continue\" },\n });\n if (confirmed) {\n this.platformUtilsService.launchUri(url);\n }\n }\n\n async launchBitwardenUrl(url: string) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.i18nService.t(\"twoStepContinueToBitwardenUrlTitle\"),\n content: this.i18nService.t(\"twoStepContinueToBitwardenUrlDesc\"),\n type: \"info\",\n acceptButtonText: { key: \"continue\" },\n });\n if (confirmed) {\n this.platformUtilsService.launchUri(url);\n }\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorEmailRequest extends SecretVerificationRequest {\n token: string;\n email: string;\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n {{ \"emailTitle\" | i18n }}\n \n \n \n \n {{ \"twoStepLoginProviderEnabled\" | i18n }}\n \n {{ \"email\" | i18n }}: {{ email }}\n \n \n

\n {{ \"twoFactorEmailDesc\" | i18n }}\n \"Email\n

\n \n 1. {{ \"twoFactorEmailEnterEmail\" | i18n }}\n \n \n
\n \n \n {{ \"emailSent\" | i18n }}\n \n
\n \n 2. {{ \"twoFactorEmailEnterCode\" | i18n }}\n \n \n
\n
\n \n \n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { UpdateTwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-email.request\";\nimport { TwoFactorEmailResponse } from \"@bitwarden/common/auth/models/response/two-factor-email.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorBaseComponent } from \"./two-factor-base.component\";\n\n@Component({\n selector: \"app-two-factor-email\",\n templateUrl: \"two-factor-email.component.html\",\n outputs: [\"onUpdated\"],\n})\nexport class TwoFactorEmailComponent extends TwoFactorBaseComponent {\n @Output() onChangeStatus: EventEmitter = new EventEmitter();\n type = TwoFactorProviderType.Email;\n sentEmail: string;\n emailPromise: Promise;\n override componentName = \"app-two-factor-email\";\n formGroup = this.formBuilder.group({\n token: [\"\", [Validators.required]],\n email: [\"\", [Validators.email, Validators.required]],\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected data: AuthResponse,\n apiService: ApiService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n userVerificationService: UserVerificationService,\n private accountService: AccountService,\n dialogService: DialogService,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n ) {\n super(\n apiService,\n i18nService,\n platformUtilsService,\n logService,\n userVerificationService,\n dialogService,\n );\n }\n get token() {\n return this.formGroup.get(\"token\").value;\n }\n set token(value: string) {\n this.formGroup.get(\"token\").setValue(value);\n }\n get email() {\n return this.formGroup.get(\"email\").value;\n }\n set email(value: string) {\n this.formGroup.get(\"email\").setValue(value);\n }\n\n async ngOnInit() {\n await this.auth(this.data);\n }\n\n auth(authResponse: AuthResponse) {\n super.auth(authResponse);\n return this.processResponse(authResponse.response);\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.enabled) {\n await this.disableEmail();\n this.onChangeStatus.emit(false);\n } else {\n if (this.formGroup.invalid) {\n return;\n }\n await this.enable();\n this.onChangeStatus.emit(true);\n }\n };\n\n private disableEmail() {\n return super.disableMethod();\n }\n\n sendEmail = async () => {\n const request = await this.buildRequestModel(TwoFactorEmailRequest);\n request.email = this.email;\n this.emailPromise = this.apiService.postTwoFactorEmailSetup(request);\n await this.emailPromise;\n this.sentEmail = this.email;\n };\n\n protected async enable() {\n const request = await this.buildRequestModel(UpdateTwoFactorEmailRequest);\n request.email = this.email;\n request.token = this.token;\n\n const response = await this.apiService.putTwoFactorEmail(request);\n await this.processResponse(response);\n this.onUpdated.emit(true);\n }\n\n onClose = () => {\n this.dialogRef.close(this.enabled);\n };\n\n private async processResponse(response: TwoFactorEmailResponse) {\n this.token = null;\n this.email = response.email;\n this.enabled = response.enabled;\n if (!this.enabled && (this.email == null || this.email === \"\")) {\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n }\n }\n /**\n * Strongly typed helper to open a TwoFactorEmailComponentComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open(\n dialogService: DialogService,\n config: DialogConfig>,\n ) {\n return dialogService.open(TwoFactorEmailComponent, config);\n }\n}\n","\n \n {{ \"twoStepLogin\" | i18n }}\n {{ \"recoveryCodeTitle\" | i18n }}\n \n \n \n

{{ \"twoFactorRecoveryYourCode\" | i18n }}:

\n {{ code }}\n
\n \n {{ \"twoFactorRecoveryNoCode\" | i18n }}\n \n
\n \n \n \n \n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorRecoverResponse } from \"@bitwarden/common/auth/models/response/two-factor-recover.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-two-factor-recovery\",\n templateUrl: \"two-factor-recovery.component.html\",\n})\nexport class TwoFactorRecoveryComponent {\n type = -1;\n code: string;\n authed: boolean;\n twoFactorProviderType = TwoFactorProviderType;\n\n constructor(\n @Inject(DIALOG_DATA) protected data: any,\n private i18nService: I18nService,\n ) {\n this.auth(data.response);\n }\n\n auth(authResponse: any) {\n this.authed = true;\n this.processResponse(authResponse.response);\n }\n\n print() {\n const w = window.open();\n w.document.write(\n '
' +\n \"

\" +\n this.i18nService.t(\"twoFactorRecoveryYourCode\") +\n \":

\" +\n \"\" +\n this.code +\n \"
\" +\n '

' +\n new Date() +\n \"

\",\n );\n w.onafterprint = () => w.close();\n w.print();\n }\n\n private formatString(s: string) {\n if (s == null) {\n return null;\n }\n return s\n .replace(/(.{4})/g, \"$1 \")\n .trim()\n .toUpperCase();\n }\n\n private processResponse(response: TwoFactorRecoverResponse) {\n this.code = this.formatString(response.code);\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(TwoFactorRecoveryComponent, config);\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorWebAuthnDeleteRequest extends SecretVerificationRequest {\n id: number;\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorWebAuthnRequest extends SecretVerificationRequest {\n deviceResponse: PublicKeyCredential;\n name: string;\n id: number;\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n {{ \"webAuthnTitle\" | i18n }}\n \n \n \n {{ \"twoStepLoginProviderEnabled\" | i18n }}\n \n \n

{{ \"twoFactorWebAuthnWarning\" | i18n }}

\n
    \n
  • {{ \"twoFactorWebAuthnSupportWeb\" | i18n }}
  • \n
\n
\n \"FIDO2\n
    \n
  • \n \n \n {{ \"webAuthnkeyX\" | i18n: i + 1 }}\n \n \n {{ k.name }}\n \n \n \n {{ \"webAuthnMigrated\" | i18n }}\n \n \n 1 && k.configured\">\n \n -\n {{ \"remove\" | i18n }}\n \n
  • \n
\n
\n

{{ \"twoFactorWebAuthnAdd\" | i18n }}:

\n
    \n
  1. {{ \"twoFactorU2fGiveName\" | i18n }}
  2. \n
  3. {{ \"twoFactorU2fPlugInReadKey\" | i18n }}
  4. \n
  5. {{ \"twoFactorU2fTouchButton\" | i18n }}
  6. \n
  7. {{ \"twoFactorU2fSaveForm\" | i18n }}
  8. \n
\n
\n \n {{ \"name\" | i18n }}\n \n \n
\n \n {{ \"readKey\" | i18n }}\n \n \n \n \n \n \n \n {{ \"twoFactorU2fWaiting\" | i18n }}...\n \n \n \n {{ \"twoFactorU2fClickSave\" | i18n }}\n \n \n \n {{ \"twoFactorU2fProblemReadingTryAgain\" | i18n }}\n \n \n
\n \n \n {{ \"save\" | i18n }}\n \n \n {{ \"disableAllKeys\" | i18n }}\n \n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, NgZone, Output } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-web-authn.request\";\nimport {\n ChallengeResponse,\n TwoFactorWebAuthnResponse,\n} from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorBaseComponent } from \"./two-factor-base.component\";\n\ninterface Key {\n id: number;\n name: string;\n configured: boolean;\n migrated?: boolean;\n removePromise: Promise | null;\n}\n\n@Component({\n selector: \"app-two-factor-webauthn\",\n templateUrl: \"two-factor-webauthn.component.html\",\n})\nexport class TwoFactorWebAuthnComponent extends TwoFactorBaseComponent {\n @Output() onChangeStatus = new EventEmitter();\n type = TwoFactorProviderType.WebAuthn;\n name: string;\n keys: Key[];\n keyIdAvailable: number = null;\n keysConfiguredCount = 0;\n webAuthnError: boolean;\n webAuthnListening: boolean;\n webAuthnResponse: PublicKeyCredential;\n challengePromise: Promise;\n formPromise: Promise;\n\n override componentName = \"app-two-factor-webauthn\";\n\n protected formGroup = new FormGroup({\n name: new FormControl({ value: \"\", disabled: !this.keyIdAvailable }),\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected data: AuthResponse,\n private dialogRef: DialogRef,\n apiService: ApiService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n private ngZone: NgZone,\n logService: LogService,\n userVerificationService: UserVerificationService,\n dialogService: DialogService,\n ) {\n super(\n apiService,\n i18nService,\n platformUtilsService,\n logService,\n userVerificationService,\n dialogService,\n );\n this.auth(data);\n }\n\n auth(authResponse: AuthResponse) {\n super.auth(authResponse);\n this.processResponse(authResponse.response);\n }\n\n submit = async () => {\n if (this.webAuthnResponse == null || this.keyIdAvailable == null) {\n // Should never happen.\n return Promise.reject();\n }\n const request = await this.buildRequestModel(UpdateTwoFactorWebAuthnRequest);\n request.deviceResponse = this.webAuthnResponse;\n request.id = this.keyIdAvailable;\n request.name = this.formGroup.value.name;\n\n return this.enableWebAuth(request);\n };\n\n private enableWebAuth(request: any) {\n return super.enable(async () => {\n this.formPromise = this.apiService.putTwoFactorWebAuthn(request);\n const response = await this.formPromise;\n this.processResponse(response);\n });\n }\n\n disable = async () => {\n await this.disableWebAuth();\n if (!this.enabled) {\n this.onChangeStatus.emit(this.enabled);\n this.dialogRef.close();\n }\n };\n\n private async disableWebAuth() {\n return super.disable(this.formPromise);\n }\n\n async remove(key: Key) {\n if (this.keysConfiguredCount <= 1 || key.removePromise != null) {\n return;\n }\n const name = key.name != null ? key.name : this.i18nService.t(\"webAuthnkeyX\", key.id as any);\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: name,\n content: { key: \"removeU2fConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n const request = await this.buildRequestModel(UpdateTwoFactorWebAuthnDeleteRequest);\n request.id = key.id;\n try {\n key.removePromise = this.apiService.deleteTwoFactorWebAuthn(request);\n const response = await key.removePromise;\n key.removePromise = null;\n await this.processResponse(response);\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n readKey = async () => {\n if (this.keyIdAvailable == null) {\n return;\n }\n const request = await this.buildRequestModel(SecretVerificationRequest);\n this.challengePromise = this.apiService.getTwoFactorWebAuthnChallenge(request);\n const challenge = await this.challengePromise;\n this.readDevice(challenge);\n };\n\n private readDevice(webAuthnChallenge: ChallengeResponse) {\n // eslint-disable-next-line\n console.log(\"listening for key...\");\n this.resetWebAuthn(true);\n\n navigator.credentials\n .create({\n publicKey: webAuthnChallenge,\n })\n .then((data: PublicKeyCredential) => {\n this.ngZone.run(() => {\n this.webAuthnListening = false;\n this.webAuthnResponse = data;\n });\n })\n .catch((err) => {\n // eslint-disable-next-line\n console.error(err);\n this.resetWebAuthn(false);\n // TODO: Should we display the actual error?\n this.webAuthnError = true;\n });\n }\n\n private resetWebAuthn(listening = false) {\n this.webAuthnResponse = null;\n this.webAuthnError = false;\n this.webAuthnListening = listening;\n }\n\n private processResponse(response: TwoFactorWebAuthnResponse) {\n this.resetWebAuthn();\n this.keys = [];\n this.keyIdAvailable = null;\n this.formGroup.get(\"name\").enable();\n this.formGroup.get(\"name\").setValue(null);\n this.keysConfiguredCount = 0;\n for (let i = 1; i <= 5; i++) {\n if (response.keys != null) {\n const key = response.keys.filter((k) => k.id === i);\n if (key.length > 0) {\n this.keysConfiguredCount++;\n this.keys.push({\n id: i,\n name: key[0].name,\n configured: true,\n migrated: key[0].migrated,\n removePromise: null,\n });\n continue;\n }\n }\n this.keys.push({ id: i, name: null, configured: false, removePromise: null });\n if (this.keyIdAvailable == null) {\n this.keyIdAvailable = i;\n }\n }\n this.enabled = response.enabled;\n this.onChangeStatus.emit(this.enabled);\n }\n\n static open(\n dialogService: DialogService,\n config: DialogConfig>,\n ) {\n return dialogService.open(TwoFactorWebAuthnComponent, config);\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorYubikeyOtpRequest extends SecretVerificationRequest {\n key1: string;\n key2: string;\n key3: string;\n key4: string;\n key5: string;\n nfc: boolean;\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n YubiKey\n \n \n \n {{ \"twoStepLoginProviderEnabled\" | i18n }}\n \n \n

{{ \"twoFactorYubikeyWarning\" | i18n }}

\n
    \n
  • {{ \"twoFactorYubikeySupportUsb\" | i18n }}
  • \n
  • {{ \"twoFactorYubikeySupportMobile\" | i18n }}
  • \n
\n
\n \"YubiKey\n

{{ \"twoFactorYubikeyAdd\" | i18n }}:

\n
    \n
  1. {{ \"twoFactorYubikeyPlugIn\" | i18n }}
  2. \n
  3. {{ \"twoFactorYubikeySelectKey\" | i18n }}
  4. \n
  5. {{ \"twoFactorYubikeyTouchButton\" | i18n }}
  6. \n
  7. {{ \"twoFactorYubikeySaveForm\" | i18n }}
  8. \n
\n
\n
\n
\n
\n {{ \"yubikeyX\" | i18n: i + 1 }}\n \n \n \n
\n {{ keys[i].existingKey }}\n \n
\n
\n
\n
\n

{{ \"nfcSupport\" | i18n }}

\n \n {{ \"twoFactorYubikeySupportsNfc\" | i18n }}\n \n {{ \"twoFactorYubikeySupportsNfcDesc\" | i18n }}\n \n
\n \n \n \n {{ \"disableAllKeys\" | i18n }}\n \n \n {{ \"close\" | i18n }}\n \n \n
\n
\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormArray, FormBuilder, FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { TwoFactorYubiKeyResponse } from \"@bitwarden/common/auth/models/response/two-factor-yubi-key.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorBaseComponent } from \"./two-factor-base.component\";\n\ninterface Key {\n key: string;\n existingKey: string;\n}\n\n@Component({\n selector: \"app-two-factor-yubikey\",\n templateUrl: \"two-factor-yubikey.component.html\",\n})\nexport class TwoFactorYubiKeyComponent extends TwoFactorBaseComponent {\n type = TwoFactorProviderType.Yubikey;\n keys: Key[];\n anyKeyHasNfc = false;\n\n formPromise: Promise;\n disablePromise: Promise;\n\n override componentName = \"app-two-factor-yubikey\";\n formGroup: FormGroup<{\n formKeys: FormArray>;\n anyKeyHasNfc: FormControl;\n }>;\n\n get keysFormControl() {\n return this.formGroup.controls.formKeys.controls;\n }\n\n get anyKeyHasNfcFormControl() {\n return this.formGroup.controls.anyKeyHasNfc;\n }\n\n constructor(\n @Inject(DIALOG_DATA) protected data: AuthResponse,\n apiService: ApiService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n userVerificationService: UserVerificationService,\n dialogService: DialogService,\n private formBuilder: FormBuilder,\n private toastService: ToastService,\n ) {\n super(\n apiService,\n i18nService,\n platformUtilsService,\n logService,\n userVerificationService,\n dialogService,\n );\n }\n\n ngOnInit() {\n this.auth(this.data);\n this.formGroup = this.formBuilder.group({\n formKeys: this.formBuilder.array([]),\n anyKeyHasNfc: this.formBuilder.control(this.anyKeyHasNfc),\n });\n this.refreshFormArrayData();\n }\n\n refreshFormArrayData() {\n const formKeys = this.formGroup.get(\"formKeys\");\n formKeys.clear();\n this.keys.forEach((val) => {\n const fb = this.formBuilder.group({\n key: val.key,\n existingKey: val.existingKey,\n });\n formKeys.push(fb);\n });\n }\n\n auth(authResponse: AuthResponse) {\n super.auth(authResponse);\n this.processResponse(authResponse.response);\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n await this.enable();\n };\n\n disable = async () => {\n await this.disableMethod();\n\n if (!this.enabled) {\n for (let i = 0; i < this.keys.length; i++) {\n this.remove(i);\n }\n }\n };\n\n protected async enable() {\n const keys = this.formGroup.controls.formKeys.value;\n const request = await this.buildRequestModel(UpdateTwoFactorYubikeyOtpRequest);\n request.key1 = keys != null && keys.length > 0 ? keys[0].key : null;\n request.key2 = keys != null && keys.length > 1 ? keys[1].key : null;\n request.key3 = keys != null && keys.length > 2 ? keys[2].key : null;\n request.key4 = keys != null && keys.length > 3 ? keys[3].key : null;\n request.key5 = keys != null && keys.length > 4 ? keys[4].key : null;\n request.nfc = this.formGroup.value.anyKeyHasNfc;\n\n this.processResponse(await this.apiService.putTwoFactorYubiKey(request));\n this.refreshFormArrayData();\n this.toastService.showToast({\n title: this.i18nService.t(\"success\"),\n message: this.i18nService.t(\"yubikeysUpdated\"),\n variant: \"success\",\n });\n this.onUpdated.emit(this.enabled);\n }\n\n remove(pos: number) {\n this.keys[pos].key = null;\n this.keys[pos].existingKey = null;\n\n this.keysFormControl[pos].setValue({\n existingKey: null,\n key: null,\n });\n }\n\n private processResponse(response: TwoFactorYubiKeyResponse) {\n this.enabled = response.enabled;\n this.anyKeyHasNfc = response.nfc || !response.enabled;\n this.keys = [\n { key: response.key1, existingKey: this.padRight(response.key1) },\n { key: response.key2, existingKey: this.padRight(response.key2) },\n { key: response.key3, existingKey: this.padRight(response.key3) },\n { key: response.key4, existingKey: this.padRight(response.key4) },\n { key: response.key5, existingKey: this.padRight(response.key5) },\n ];\n }\n\n private padRight(str: string, character = \"•\", size = 44) {\n if (str == null || character == null || str.length >= size) {\n return str;\n }\n const max = (size - str.length) / character.length;\n for (let i = 0; i < max; i++) {\n str += character;\n }\n return str;\n }\n\n static open(\n dialogService: DialogService,\n config: DialogConfig>,\n ) {\n return dialogService.open(TwoFactorYubiKeyComponent, config);\n }\n}\n","\n\n\n
\n

{{ \"twoStepLogin\" | i18n }}

\n

{{ \"twoStepLoginEnforcement\" | i18n }}

\n
\n\n

{{ \"twoStepLoginDesc\" | i18n }}

\n \n

\n \n {{ \"twoStepLoginEnterpriseDescStart\" | i18n }}\n {{ \"twoStepLoginPolicy\" | i18n }}.\n
\n {{ \"twoStepLoginOrganizationDuoDesc\" | i18n }}\n
\n
\n

{{ \"twoStepLoginOrganizationSsoDesc\" | i18n }}

\n
\n \n {{ \"twoStepLoginTeamsDesc\" | i18n }}\n
\n {{ \"twoStepLoginOrganizationDuoDesc\" | i18n }}\n
\n

\n \n \n

{{ \"twoStepLoginRecoveryWarning\" | i18n }}

\n \n
\n

\n {{ \"providers\" | i18n }}\n \n \n {{ \"loading\" | i18n }}\n \n

\n \n {{ \"twoStepLoginPolicyUserWarning\" | i18n }}\n \n
    \n
  • \n
    \n \n
    \n
    \n

    \n \n {{ p.name }}\n

    \n \n \n {{ \"enabled\" | i18n }}\n \n \n \n {{ p.description }}\n \n
    \n \n {{ \"manage\" | i18n }}\n \n
    \n
  • \n
\n
\n\n\n\n\n\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, OnDestroy, OnInit, Type, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport {\n first,\n firstValueFrom,\n lastValueFrom,\n Observable,\n Subject,\n Subscription,\n takeUntil,\n} from \"rxjs\";\n\nimport { ModalRef } from \"@bitwarden/angular/components/modal/modal.ref\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorAuthenticatorResponse } from \"@bitwarden/common/auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"@bitwarden/common/auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"@bitwarden/common/auth/models/response/two-factor-email.response\";\nimport { TwoFactorWebAuthnResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"@bitwarden/common/auth/models/response/two-factor-yubi-key.response\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorAuthenticatorComponent } from \"./two-factor-authenticator.component\";\nimport { TwoFactorDuoComponent } from \"./two-factor-duo.component\";\nimport { TwoFactorEmailComponent } from \"./two-factor-email.component\";\nimport { TwoFactorRecoveryComponent } from \"./two-factor-recovery.component\";\nimport { TwoFactorVerifyComponent } from \"./two-factor-verify.component\";\nimport { TwoFactorWebAuthnComponent } from \"./two-factor-webauthn.component\";\nimport { TwoFactorYubiKeyComponent } from \"./two-factor-yubikey.component\";\n\n@Component({\n selector: \"app-two-factor-setup\",\n templateUrl: \"two-factor-setup.component.html\",\n})\nexport class TwoFactorSetupComponent implements OnInit, OnDestroy {\n @ViewChild(\"yubikeyTemplate\", { read: ViewContainerRef, static: true })\n yubikeyModalRef: ViewContainerRef;\n\n organizationId: string;\n organization: Organization;\n providers: any[] = [];\n canAccessPremium$: Observable;\n showPolicyWarning = false;\n loading = true;\n modal: ModalRef;\n formPromise: Promise;\n\n tabbedHeader = true;\n\n protected destroy$ = new Subject();\n private twoFactorAuthPolicyAppliesToActiveUser: boolean;\n protected twoFactorSetupSubscription: Subscription;\n\n constructor(\n protected dialogService: DialogService,\n protected apiService: ApiService,\n protected modalService: ModalService,\n protected messagingService: MessagingService,\n protected policyService: PolicyService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n this.canAccessPremium$ = billingAccountProfileStateService.hasPremiumFromAnySource$;\n }\n\n async ngOnInit() {\n for (const key in TwoFactorProviders) {\n // eslint-disable-next-line\n if (!TwoFactorProviders.hasOwnProperty(key)) {\n continue;\n }\n\n const p = (TwoFactorProviders as any)[key];\n if (this.filterProvider(p.type)) {\n continue;\n }\n\n this.providers.push({\n type: p.type,\n name: p.name,\n description: p.description,\n enabled: false,\n premium: p.premium,\n sort: p.sort,\n });\n }\n\n this.providers.sort((a: any, b: any) => a.sort - b.sort);\n\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.TwoFactorAuthentication)\n .pipe(takeUntil(this.destroy$))\n .subscribe((policyAppliesToActiveUser) => {\n this.twoFactorAuthPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n });\n\n await this.load();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async load() {\n this.loading = true;\n const providerList = await this.getTwoFactorProviders();\n providerList.data.forEach((p) => {\n this.providers.forEach((p2) => {\n if (p.type === p2.type) {\n p2.enabled = p.enabled;\n }\n });\n });\n this.evaluatePolicies();\n this.loading = false;\n }\n\n async callTwoFactorVerifyDialog(type?: TwoFactorProviderType) {\n const twoFactorVerifyDialogRef = TwoFactorVerifyComponent.open(this.dialogService, {\n data: { type: type, organizationId: this.organizationId },\n });\n return await lastValueFrom(twoFactorVerifyDialogRef.closed);\n }\n\n async manage(type: TwoFactorProviderType) {\n // clear any existing subscriptions before creating a new one\n this.twoFactorSetupSubscription?.unsubscribe();\n\n switch (type) {\n case TwoFactorProviderType.Authenticator: {\n const result: AuthResponse =\n await this.callTwoFactorVerifyDialog(type);\n if (!result) {\n return;\n }\n const authComp: DialogRef = TwoFactorAuthenticatorComponent.open(\n this.dialogService,\n { data: result },\n );\n this.twoFactorSetupSubscription = authComp.componentInstance.onChangeStatus\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe((enabled: boolean) => {\n authComp.close();\n this.updateStatus(enabled, TwoFactorProviderType.Authenticator);\n });\n break;\n }\n case TwoFactorProviderType.Yubikey: {\n const result: AuthResponse =\n await this.callTwoFactorVerifyDialog(type);\n if (!result) {\n return;\n }\n const yubiComp: DialogRef = TwoFactorYubiKeyComponent.open(\n this.dialogService,\n { data: result },\n );\n yubiComp.componentInstance.onUpdated\n .pipe(takeUntil(this.destroy$))\n .subscribe((enabled: boolean) => {\n this.updateStatus(enabled, TwoFactorProviderType.Yubikey);\n });\n break;\n }\n case TwoFactorProviderType.Duo: {\n const result: AuthResponse =\n await this.callTwoFactorVerifyDialog(type);\n if (!result) {\n return;\n }\n const duoComp: DialogRef = TwoFactorDuoComponent.open(this.dialogService, {\n data: {\n authResponse: result,\n },\n });\n this.twoFactorSetupSubscription = duoComp.componentInstance.onChangeStatus\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe((enabled: boolean) => {\n duoComp.close();\n this.updateStatus(enabled, TwoFactorProviderType.Duo);\n });\n break;\n }\n case TwoFactorProviderType.Email: {\n const result: AuthResponse =\n await this.callTwoFactorVerifyDialog(type);\n if (!result) {\n return;\n }\n const emailComp: DialogRef = TwoFactorEmailComponent.open(\n this.dialogService,\n {\n data: result,\n },\n );\n this.twoFactorSetupSubscription = emailComp.componentInstance.onChangeStatus\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe((enabled: boolean) => {\n emailComp.close();\n this.updateStatus(enabled, TwoFactorProviderType.Email);\n });\n break;\n }\n case TwoFactorProviderType.WebAuthn: {\n const result: AuthResponse =\n await this.callTwoFactorVerifyDialog(type);\n if (!result) {\n return;\n }\n const webAuthnComp: DialogRef = TwoFactorWebAuthnComponent.open(\n this.dialogService,\n { data: result },\n );\n this.twoFactorSetupSubscription = webAuthnComp.componentInstance.onChangeStatus\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe((enabled: boolean) => {\n webAuthnComp.close();\n this.updateStatus(enabled, TwoFactorProviderType.WebAuthn);\n });\n break;\n }\n default:\n break;\n }\n }\n\n async recoveryCode() {\n const result = await this.callTwoFactorVerifyDialog(-1 as TwoFactorProviderType);\n if (result) {\n const recoverComp = TwoFactorRecoveryComponent.open(this.dialogService, { data: result });\n await lastValueFrom(recoverComp.closed);\n }\n }\n\n async premiumRequired() {\n if (!(await firstValueFrom(this.canAccessPremium$))) {\n this.messagingService.send(\"premiumRequired\");\n return;\n }\n }\n\n protected getTwoFactorProviders() {\n return this.apiService.getTwoFactorProviders();\n }\n\n protected filterProvider(type: TwoFactorProviderType) {\n return type === TwoFactorProviderType.OrganizationDuo;\n }\n\n protected async openModal(ref: ViewContainerRef, type: Type): Promise {\n const [modal, childComponent] = await this.modalService.openViewRef(type, ref);\n this.modal = modal;\n\n return childComponent;\n }\n\n protected updateStatus(enabled: boolean, type: TwoFactorProviderType) {\n if (!enabled && this.modal != null) {\n this.modal.close();\n }\n this.providers.forEach((p) => {\n if (p.type === type && enabled !== undefined) {\n p.enabled = enabled;\n }\n });\n this.evaluatePolicies();\n }\n\n private evaluatePolicies() {\n if (this.organizationId == null && this.providers.filter((p) => p.enabled).length === 1) {\n this.showPolicyWarning = this.twoFactorAuthPolicyAppliesToActiveUser;\n } else {\n this.showPolicyWarning = false;\n }\n }\n\n get isEnterpriseOrg() {\n return this.organization?.productTierType === ProductTierType.Enterprise;\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, Output } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { TwoFactorResponse } from \"@bitwarden/common/auth/types/two-factor-response\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\ntype TwoFactorVerifyDialogData = {\n type: TwoFactorProviderType;\n organizationId: string;\n};\n\n@Component({\n selector: \"app-two-factor-verify\",\n templateUrl: \"two-factor-verify.component.html\",\n})\nexport class TwoFactorVerifyComponent {\n type: TwoFactorProviderType;\n organizationId: string;\n @Output() onAuthed = new EventEmitter>();\n\n formPromise: Promise;\n\n protected formGroup = new FormGroup({\n secret: new FormControl(null),\n });\n invalidSecret: boolean = false;\n\n constructor(\n @Inject(DIALOG_DATA) protected data: TwoFactorVerifyDialogData,\n private dialogRef: DialogRef,\n private apiService: ApiService,\n private i18nService: I18nService,\n private userVerificationService: UserVerificationService,\n ) {\n this.type = data.type;\n this.organizationId = data.organizationId;\n }\n\n submit = async () => {\n try {\n let hashedSecret: string;\n this.formPromise = this.userVerificationService\n .buildRequest(this.formGroup.value.secret)\n .then((request) => {\n hashedSecret =\n this.formGroup.value.secret.type === VerificationType.MasterPassword\n ? request.masterPasswordHash\n : request.otp;\n return this.apiCall(request);\n });\n\n const response = await this.formPromise;\n this.dialogRef.close({\n response: response,\n secret: hashedSecret,\n verificationType: this.formGroup.value.secret.type,\n });\n } catch (e) {\n if (e instanceof ErrorResponse && e.statusCode === 400) {\n this.invalidSecret = true;\n }\n throw e;\n }\n };\n\n get dialogTitle(): string {\n switch (this.type) {\n case -1 as TwoFactorProviderType:\n return this.i18nService.t(\"recoveryCodeTitle\");\n case TwoFactorProviderType.Duo:\n return \"Duo\";\n case TwoFactorProviderType.Email:\n return this.i18nService.t(\"emailTitle\");\n case TwoFactorProviderType.WebAuthn:\n return this.i18nService.t(\"webAuthnTitle\");\n case TwoFactorProviderType.Authenticator:\n return this.i18nService.t(\"authenticatorAppTitle\");\n case TwoFactorProviderType.Yubikey:\n return \"Yubikey\";\n }\n }\n\n private apiCall(request: SecretVerificationRequest): Promise {\n switch (this.type) {\n case -1 as TwoFactorProviderType:\n return this.apiService.getTwoFactorRecover(request);\n case TwoFactorProviderType.Duo:\n case TwoFactorProviderType.OrganizationDuo:\n if (this.organizationId != null) {\n return this.apiService.getTwoFactorOrganizationDuo(this.organizationId, request);\n } else {\n return this.apiService.getTwoFactorDuo(request);\n }\n case TwoFactorProviderType.Email:\n return this.apiService.getTwoFactorEmail(request);\n case TwoFactorProviderType.WebAuthn:\n return this.apiService.getTwoFactorWebAuthn(request);\n case TwoFactorProviderType.Authenticator:\n return this.apiService.getTwoFactorAuthenticator(request);\n case TwoFactorProviderType.Yubikey:\n return this.apiService.getTwoFactorYubiKey(request);\n }\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open>(TwoFactorVerifyComponent, config);\n }\n}\n","
\n \n \n {{ \"twoStepLogin\" | i18n }}\n {{ dialogTitle }}\n \n \n \n \n \n \n \n \n \n
\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { SharedModule } from \"../../../../shared/shared.module\";\n\nimport { UserVerificationPromptComponent } from \"./user-verification-prompt.component\";\nimport { UserVerificationComponent } from \"./user-verification.component\";\n\n@NgModule({\n imports: [SharedModule, FormsModule, ReactiveFormsModule],\n declarations: [UserVerificationComponent, UserVerificationPromptComponent],\n exports: [UserVerificationComponent, UserVerificationPromptComponent],\n})\nexport class UserVerificationModule {}\n","import { Directive } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { ModalRef } from \"../../components/modal/modal.ref\";\n\nexport interface UserVerificationPromptParams {\n confirmDescription: string;\n confirmButtonText: string;\n modalTitle: string;\n}\n\n/**\n * Used to verify the user's identity (using their master password or email-based OTP for Key Connector users). You can customize all of the text in the modal.\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent instead.\n */\n@Directive()\nexport class UserVerificationPromptComponent {\n confirmDescription = this.config.confirmDescription;\n confirmButtonText = this.config.confirmButtonText;\n modalTitle = this.config.modalTitle;\n\n formGroup = this.formBuilder.group({\n secret: this.formBuilder.control(null),\n });\n\n protected invalidSecret = false;\n\n constructor(\n private modalRef: ModalRef,\n protected config: UserVerificationPromptParams,\n protected userVerificationService: UserVerificationService,\n private formBuilder: FormBuilder,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n ) {}\n\n get secret() {\n return this.formGroup.controls.secret;\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n try {\n //Incorrect secret will throw an invalid password error.\n await this.userVerificationService.verifyUser(this.secret.value);\n this.invalidSecret = false;\n } catch (e) {\n this.invalidSecret = true;\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"error\"), e.message);\n return;\n }\n\n this.close(true);\n };\n\n close(success: boolean) {\n this.modalRef.close(success);\n }\n}\n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport {\n UserVerificationPromptComponent as BaseUserVerificationPrompt,\n UserVerificationPromptParams,\n} from \"@bitwarden/angular/auth/components/user-verification-prompt.component\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n/**\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent instead.\n */\n@Component({\n templateUrl: \"user-verification-prompt.component.html\",\n})\nexport class UserVerificationPromptComponent extends BaseUserVerificationPrompt {\n constructor(\n @Inject(DIALOG_DATA) data: UserVerificationPromptParams,\n private dialogRef: DialogRef,\n userVerificationService: UserVerificationService,\n formBuilder: FormBuilder,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n ) {\n super(null, data, userVerificationService, formBuilder, platformUtilsService, i18nService);\n }\n\n override close(success: boolean) {\n this.dialogRef.close(success);\n }\n}\n\n/**\n * Strongly typed helper to open a UserVerificationPrompt\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openUserVerificationPrompt = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(\n UserVerificationPromptComponent,\n config,\n );\n};\n","
\n \n {{ modalTitle | i18n }}\n \n

{{ confirmDescription | i18n }}

\n \n
\n \n \n \n \n
\n
\n","import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ControlValueAccessor, FormControl, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Collects the user's master password, or if they are not using a password, prompts for an OTP via email.\n * This is exposed to the parent component via the ControlValueAccessor interface (e.g. bind it to a FormControl).\n * Use UserVerificationService to verify the user's input.\n *\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent or UserVerificationFormInputComponent instead.\n * Each client specific component should eventually be converted over to use one of these new components.\n */\n@Directive({\n selector: \"app-user-verification\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class UserVerificationComponent implements ControlValueAccessor, OnInit, OnDestroy {\n private _invalidSecret = false;\n @Input()\n get invalidSecret() {\n return this._invalidSecret;\n }\n set invalidSecret(value: boolean) {\n this._invalidSecret = value;\n this.invalidSecretChange.emit(value);\n\n // ISSUE: This is pretty hacky but unfortunately there is no way of knowing if the parent\n // control has been marked as touched, see: https://github.com/angular/angular/issues/10887\n // When that functionality has been added we should also look into forwarding reactive form\n // controls errors so that we don't need a separate input/output `invalidSecret`.\n if (value) {\n this.secret.markAsTouched();\n }\n this.secret.updateValueAndValidity({ emitEvent: false });\n }\n @Output() invalidSecretChange = new EventEmitter();\n\n hasMasterPassword = true;\n disableRequestOTP = false;\n sentCode = false;\n\n secret = new FormControl(\"\", [\n Validators.required,\n () => {\n if (this.invalidSecret) {\n return {\n invalidSecret: {\n message: this.hasMasterPassword\n ? this.i18nService.t(\"incorrectPassword\")\n : this.i18nService.t(\"incorrectCode\"),\n },\n };\n }\n },\n ]);\n\n private onChange: (value: Verification) => void;\n private destroy$ = new Subject();\n\n constructor(\n private cryptoService: CryptoService,\n private userVerificationService: UserVerificationService,\n private i18nService: I18nService,\n ) {}\n\n async ngOnInit() {\n this.hasMasterPassword = await this.userVerificationService.hasMasterPasswordAndMasterKeyHash();\n this.processChanges(this.secret.value);\n\n this.secret.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((secret: string) => this.processChanges(secret));\n }\n\n requestOTP = async () => {\n if (!this.hasMasterPassword) {\n this.disableRequestOTP = true;\n try {\n await this.userVerificationService.requestOTP();\n this.sentCode = true;\n } finally {\n this.disableRequestOTP = false;\n }\n }\n };\n\n writeValue(obj: any): void {\n this.secret.setValue(obj);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n // Not implemented\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disableRequestOTP = isDisabled;\n if (isDisabled) {\n this.secret.disable();\n } else {\n this.secret.enable();\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected processChanges(secret: string) {\n this.invalidSecret = false;\n\n if (this.onChange == null) {\n return;\n }\n\n this.onChange({\n type: this.hasMasterPassword ? VerificationType.MasterPassword : VerificationType.OTP,\n secret: Utils.isNullOrWhitespace(secret) ? null : secret,\n });\n }\n}\n","\n \n {{ \"masterPass\" | i18n }}\n \n \n {{ \"confirmIdentity\" | i18n }}\n \n\n\n
\n \n \n \n \n {{ \"codeSent\" | i18n }}\n \n
\n\n \n {{ \"verificationCode\" | i18n }}\n \n {{ \"confirmIdentity\" | i18n }}\n \n
\n","import { animate, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { UserVerificationComponent as BaseComponent } from \"@bitwarden/angular/auth/components/user-verification.component\";\n\n/**\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent or UserVerificationFormInputComponent instead.\n * Each client specific component should eventually be converted over to use one of these new components.\n */\n@Component({\n selector: \"app-user-verification\",\n templateUrl: \"user-verification.component.html\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: UserVerificationComponent,\n },\n ],\n animations: [\n trigger(\"sent\", [\n transition(\":enter\", [style({ opacity: 0 }), animate(\"100ms\", style({ opacity: 1 }))]),\n ]),\n ],\n})\nexport class UserVerificationComponent extends BaseComponent {}\n","import { PlanType } from \"../../../billing/enums\";\n\nimport { OrganizationKeysRequest } from \"./organization-keys.request\";\n\nexport class OrganizationUpgradeRequest {\n businessName: string;\n planType: PlanType;\n additionalSeats: number;\n additionalStorageGb: number;\n premiumAccessAddon: boolean;\n billingAddressCountry: string;\n billingAddressPostalCode: string;\n keys: OrganizationKeysRequest;\n\n useSecretsManager: boolean;\n additionalSmSeats: number;\n additionalServiceAccounts: number;\n}\n","import { OrganizationCreateRequest } from \"../../../models/request/organization-create.request\";\n\nexport class ProviderOrganizationCreateRequest {\n constructor(\n public clientOwnerEmail: string,\n public organizationCreateRequest: OrganizationCreateRequest,\n ) {}\n}\n","\n \n {{ \"loading\" | i18n }}\n\n\n

{{ \"uploadLicenseFileOrg\" | i18n }}

\n
\n \n {{ \"licenseFile\" | i18n }}\n
\n \n {{ selectedFile?.name ?? (\"noFileChosen\" | i18n) }}\n
\n \n {{ \"licenseFileDesc\" | i18n: \"bitwarden_organization_license.json\" }}\n
\n \n
\n
\n\n \n \n \n \n \n

{{ \"chooseYourPlan\" | i18n }}

\n \n
\n \n {{ selectableProduct.nameLocalizationKey | i18n }}\n {{ selectableProduct.descriptionLocalizationKey | i18n: \"1\" }}\n \n
    \n
  • {{ \"includeAllTeamsFeatures\" | i18n }}
  • \n
  • {{ \"onPremHostingOptional\" | i18n }}
  • \n
  • {{ \"includeSsoAuthentication\" | i18n }}
  • \n
  • \n {{ \"includeEnterprisePolicies\" | i18n }}\n
  • \n
  • \n {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n
  • \n
\n \n \n \n
    \n
  • {{ \"includeAllTeamsStarterFeatures\" | i18n }}
  • \n
  • {{ \"chooseMonthlyOrAnnualBilling\" | i18n }}
  • \n
  • {{ \"abilityToAddMoreThanNMembers\" | i18n: 10 }}
  • \n
  • \n {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n
  • \n
\n \n \n
    \n
  • \n {{ \"limitedUsers\" | i18n: selectableProduct.PasswordManager.maxSeats }}\n
  • \n \n {{ \"addShareLimitedUsers\" | i18n: selectableProduct.PasswordManager.maxSeats }}\n \n
  • \n {{ \"addShareUnlimitedUsers\" | i18n }}\n
  • \n
  • \n {{\n \"limitedCollections\" | i18n: selectableProduct.PasswordManager.maxCollections\n }}\n
  • \n
  • \n {{\n \"addShareLimitedUsers\"\n | i18n: selectableProduct.PasswordManager.maxAdditionalSeats\n }}\n
  • \n
  • \n {{ \"createUnlimitedCollections\" | i18n }}\n
  • \n
  • \n {{\n \"gbEncryptedFileStorage\"\n | i18n: selectableProduct.PasswordManager.baseStorageGb + \"GB\"\n }}\n
  • \n
  • \n {{ \"controlAccessWithGroups\" | i18n }}\n
  • \n
  • {{ \"trackAuditLogs\" | i18n }}
  • \n
  • \n {{ \"syncUsersFromDirectory\" | i18n }}\n
  • \n
  • \n {{ \"onPremHostingOptional\" | i18n }}\n
  • \n
  • {{ \"usersGetPremium\" | i18n }}
  • \n
  • \n {{ \"priorityCustomerSupport\" | i18n }}\n
  • \n
  • \n {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n
  • \n
\n
\n
\n
\n
\n \n \n {{\n (selectableProduct.isAnnual\n ? selectableProduct.PasswordManager.basePrice / 12\n : selectableProduct.PasswordManager.basePrice\n ) | currency: \"$\"\n }}\n /{{ \"month\" | i18n }},\n {{ \"includesXUsers\" | i18n: selectableProduct.PasswordManager.baseSeats }}\n \n {{ (\"additionalUsers\" | i18n).toLowerCase() }}\n {{\n (selectableProduct.isAnnual\n ? selectableProduct.PasswordManager.seatPrice / 12\n : selectableProduct.PasswordManager.seatPrice\n ) | currency: \"$\"\n }}\n /{{ \"month\" | i18n }}\n \n \n \n \n {{\n \"costPerUser\"\n | i18n\n : ((selectableProduct.isAnnual\n ? selectableProduct.PasswordManager.seatPrice / 12\n : selectableProduct.PasswordManager.seatPrice\n )\n | currency: \"$\")\n }}\n /{{ \"month\" | i18n }}\n \n {{\n \"freeForever\" | i18n\n }}\n
\n
\n
\n \n \n

{{ \"users\" | i18n }}

\n
\n \n {{ \"userSeats\" | i18n }}\n \n {{ \"userSeatsHowManyDesc\" | i18n }}\n \n
\n
\n \n

{{ \"addons\" | i18n }}

\n \n \n {{ \"additionalUserSeats\" | i18n }}\n \n {{\n \"userSeatsAdditionalDesc\"\n | i18n\n : selectedPlan.PasswordManager.baseSeats\n : (seatPriceMonthly(selectedPlan) | currency: \"$\")\n }}\n \n \n \n
\n \n {{ \"additionalStorageGb\" | i18n }}\n \n {{\n \"additionalStorageIntervalDesc\"\n | i18n\n : \"1 GB\"\n : (additionalStoragePriceMonthly(selectedPlan) | currency: \"$\")\n : (\"month\" | i18n)\n }}\n \n
\n
\n \n \n \n {{ \"premiumAccess\" | i18n }}\n \n {{\n \"premiumAccessDesc\" | i18n: (3.33 | currency: \"$\") : (\"month\" | i18n)\n }}\n \n \n \n \n

{{ \"summary\" | i18n }}

\n \n
\n \n {{ (selectablePlan.isAnnual ? \"annually\" : \"monthly\") | i18n }}\n \n \n {{ \"basePrice\" | i18n }}:\n {{\n (selectablePlan.isAnnual\n ? selectablePlan.PasswordManager.basePrice / 12\n : selectablePlan.PasswordManager.basePrice\n ) | currency: \"$\"\n }}\n × 12\n {{ \"monthAbbr\" | i18n }}\n =\n \n {{\n selectablePlan.PasswordManager.basePrice | currency: \"$\"\n }}\n {{ \"freeWithSponsorship\" | i18n }}\n \n \n {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n /{{ \"year\" | i18n }}\n \n

\n \n {{ \"additionalUsers\" | i18n }}:\n {{ \"users\" | i18n }}:\n {{ formGroup.controls[\"additionalSeats\"].value || 0 }} ×\n {{\n (selectablePlan.isAnnual\n ? selectablePlan.PasswordManager.seatPrice / 12\n : selectablePlan.PasswordManager.seatPrice\n ) | currency: \"$\"\n }}\n × 12 {{ \"monthAbbr\" | i18n }} =\n {{\n passwordManagerSeatTotal(selectablePlan, formGroup.value.additionalSeats)\n | currency: \"$\"\n }}\n /{{ \"year\" | i18n }}\n

\n \n {{ \"additionalStorageGb\" | i18n }}:\n {{ formGroup.controls[\"additionalStorage\"].value || 0 }} ×\n {{\n (selectablePlan.isAnnual\n ? selectablePlan.PasswordManager.additionalStoragePricePerGb / 12\n : selectablePlan.PasswordManager.additionalStoragePricePerGb\n ) | currency: \"$\"\n }}\n × 12 {{ \"monthAbbr\" | i18n }} =\n {{ additionalStorageTotal(selectablePlan) | currency: \"$\" }} /{{ \"year\" | i18n }}\n

\n
\n \n \n {{ \"basePrice\" | i18n }}:\n {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n {{ \"monthAbbr\" | i18n }}\n =\n {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n /{{ \"month\" | i18n }}\n

\n \n {{ \"additionalUsers\" | i18n }}:\n {{ \"users\" | i18n }}:\n {{ formGroup.controls[\"additionalSeats\"].value || 0 }} ×\n {{ selectablePlan.PasswordManager.seatPrice | currency: \"$\" }}\n {{ \"monthAbbr\" | i18n }} =\n {{\n passwordManagerSeatTotal(selectablePlan, formGroup.value.additionalSeats)\n | currency: \"$\"\n }}\n /{{ \"month\" | i18n }}\n

\n \n {{ \"additionalStorageGb\" | i18n }}:\n {{ formGroup.controls[\"additionalStorage\"].value || 0 }} ×\n {{ selectablePlan.PasswordManager.additionalStoragePricePerGb | currency: \"$\" }}\n {{ \"monthAbbr\" | i18n }} =\n {{ additionalStorageTotal(selectablePlan) | currency: \"$\" }} /{{ \"month\" | i18n }}\n

\n
\n \n
\n
\n
\n \n\n \n \n \n \n\n \n \n

\n {{ (createOrganization ? \"paymentInformation\" : \"billingInformation\") | i18n }}\n

\n

\n {{ paymentDesc }}\n

\n \n \n
\n
\n {{ \"passwordManagerPlanPrice\" | i18n }}: {{ passwordManagerSubtotal | currency: \"USD $\" }}\n
\n \n {{ \"secretsManagerPlanPrice\" | i18n }}: {{ secretsManagerSubtotal | currency: \"USD $\" }}\n
\n
\n \n {{ \"estimatedTax\" | i18n }}: {{ taxCharges | currency: \"USD $\" }}\n \n
\n
\n

\n {{ \"total\" | i18n }}: {{ total | currency: \"USD $\" }}/{{\n selectedPlanInterval | i18n\n }}\n

\n
\n \n \n \n
\n \n \n {{ \"singleOrgBlockCreateMessage\" | i18n }}\n \n \n \n \n {{ \"submit\" | i18n }}\n \n \n {{ \"cancel\" | i18n }}\n \n \n\n","import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { OrganizationCreateRequest } from \"@bitwarden/common/admin-console/models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { OrganizationUpgradeRequest } from \"@bitwarden/common/admin-console/models/request/organization-upgrade.request\";\nimport { ProviderOrganizationCreateRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider.response\";\nimport { PaymentMethodType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { BillingResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\nimport { OrganizationCreateModule } from \"../../admin-console/organizations/create/organization-create.module\";\nimport { BillingSharedModule, secretsManagerSubscribeFormFactory } from \"../shared\";\nimport { PaymentComponent } from \"../shared/payment.component\";\nimport { TaxInfoComponent } from \"../shared/tax-info.component\";\n\ninterface OnSuccessArgs {\n organizationId: string;\n}\n\nconst Allowed2020PlansForLegacyProviders = [\n PlanType.TeamsMonthly2020,\n PlanType.TeamsAnnually2020,\n PlanType.EnterpriseAnnually2020,\n PlanType.EnterpriseMonthly2020,\n];\n\n@Component({\n selector: \"app-organization-plans\",\n templateUrl: \"organization-plans.component.html\",\n standalone: true,\n imports: [BillingSharedModule, OrganizationCreateModule],\n})\nexport class OrganizationPlansComponent implements OnInit, OnDestroy {\n @ViewChild(PaymentComponent) paymentComponent: PaymentComponent;\n @ViewChild(TaxInfoComponent) taxComponent: TaxInfoComponent;\n\n @Input() organizationId: string;\n @Input() showFree = true;\n @Input() showCancel = false;\n @Input() acceptingSponsorship = false;\n @Input() currentPlan: PlanResponse;\n selectedFile: File;\n\n @Input()\n get productTier(): ProductTierType {\n return this._productTier;\n }\n\n set productTier(product: ProductTierType) {\n this._productTier = product;\n this.formGroup?.controls?.productTier?.setValue(product);\n }\n\n private _productTier = ProductTierType.Free;\n\n @Input()\n get plan(): PlanType {\n return this._plan;\n }\n\n set plan(plan: PlanType) {\n this._plan = plan;\n this.formGroup?.controls?.plan?.setValue(plan);\n }\n\n private _plan = PlanType.Free;\n @Input() providerId?: string;\n @Output() onSuccess = new EventEmitter();\n @Output() onCanceled = new EventEmitter();\n @Output() onTrialBillingSuccess = new EventEmitter();\n\n loading = true;\n selfHosted = false;\n productTypes = ProductTierType;\n formPromise: Promise;\n singleOrgPolicyAppliesToActiveUser = false;\n isInTrialFlow = false;\n discount = 0;\n\n secretsManagerSubscription = secretsManagerSubscribeFormFactory(this.formBuilder);\n\n selfHostedForm = this.formBuilder.group({\n file: [null, [Validators.required]],\n });\n\n formGroup = this.formBuilder.group({\n name: [\"\"],\n billingEmail: [\"\", [Validators.email]],\n businessOwned: [false],\n premiumAccessAddon: [false],\n additionalStorage: [0, [Validators.min(0), Validators.max(99)]],\n additionalSeats: [0, [Validators.min(0), Validators.max(100000)]],\n clientOwnerEmail: [\"\", [Validators.email]],\n plan: [this.plan],\n productTier: [this.productTier],\n secretsManager: this.secretsManagerSubscription,\n });\n\n passwordManagerPlans: PlanResponse[];\n secretsManagerPlans: PlanResponse[];\n organization: Organization;\n sub: OrganizationSubscriptionResponse;\n billing: BillingResponse;\n provider: ProviderResponse;\n\n private destroy$ = new Subject();\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private cryptoService: CryptoService,\n private router: Router,\n private syncService: SyncService,\n private policyService: PolicyService,\n private organizationService: OrganizationService,\n private logService: LogService,\n private messagingService: MessagingService,\n private formBuilder: FormBuilder,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private providerApiService: ProviderApiServiceAbstraction,\n ) {\n this.selfHosted = platformUtilsService.isSelfHost();\n }\n\n async ngOnInit() {\n if (this.organizationId) {\n this.organization = await this.organizationService.get(this.organizationId);\n this.billing = await this.organizationApiService.getBilling(this.organizationId);\n this.sub = await this.organizationApiService.getSubscription(this.organizationId);\n }\n\n if (!this.selfHosted) {\n const plans = await this.apiService.getPlans();\n this.passwordManagerPlans = plans.data.filter((plan) => !!plan.PasswordManager);\n this.secretsManagerPlans = plans.data.filter((plan) => !!plan.SecretsManager);\n\n if (\n this.productTier === ProductTierType.Enterprise ||\n this.productTier === ProductTierType.Teams\n ) {\n this.formGroup.controls.businessOwned.setValue(true);\n }\n }\n\n if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n const upgradedPlan = this.passwordManagerPlans.find((plan) =>\n this.currentPlan.productTier === ProductTierType.Free\n ? plan.type === PlanType.FamiliesAnnually\n : plan.upgradeSortOrder == this.currentPlan.upgradeSortOrder + 1,\n );\n\n this.plan = upgradedPlan.type;\n this.productTier = upgradedPlan.productTier;\n }\n\n if (this.hasProvider) {\n this.formGroup.controls.businessOwned.setValue(true);\n this.changedOwnedBusiness();\n this.provider = await this.providerApiService.getProvider(this.providerId);\n const providerDefaultPlan = this.passwordManagerPlans.find(\n (plan) => plan.type === PlanType.TeamsAnnually,\n );\n this.plan = providerDefaultPlan.type;\n this.productTier = providerDefaultPlan.productTier;\n }\n\n if (!this.createOrganization) {\n this.upgradeFlowPrefillForm();\n } else {\n this.formGroup.controls.name.addValidators([Validators.required, Validators.maxLength(50)]);\n this.formGroup.controls.billingEmail.addValidators(Validators.required);\n }\n\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.SingleOrg)\n .pipe(takeUntil(this.destroy$))\n .subscribe((policyAppliesToActiveUser) => {\n this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n });\n\n if (!this.selfHosted) {\n this.changedProduct();\n }\n\n this.loading = false;\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n get singleOrgPolicyBlock() {\n return this.singleOrgPolicyAppliesToActiveUser && !this.hasProvider;\n }\n\n get createOrganization() {\n return this.organizationId == null;\n }\n\n get upgradeRequiresPaymentMethod() {\n return (\n this.organization?.productTierType === ProductTierType.Free &&\n !this.showFree &&\n !this.billing?.paymentSource\n );\n }\n\n get selectedPlan() {\n return this.passwordManagerPlans.find(\n (plan) => plan.type === this.formGroup.controls.plan.value,\n );\n }\n\n get selectedSecretsManagerPlan() {\n return this.secretsManagerPlans.find(\n (plan) => plan.type === this.formGroup.controls.plan.value,\n );\n }\n\n get selectedPlanInterval() {\n return this.selectedPlan.isAnnual ? \"year\" : \"month\";\n }\n\n isProviderQualifiedFor2020Plan() {\n const targetDate = new Date(\"2023-11-06\");\n\n if (!this.provider || !this.provider.creationDate) {\n return false;\n }\n\n const creationDate = new Date(this.provider.creationDate);\n return creationDate < targetDate;\n }\n\n get selectableProducts() {\n if (this.acceptingSponsorship) {\n const familyPlan = this.passwordManagerPlans.find(\n (plan) => plan.type === PlanType.FamiliesAnnually,\n );\n this.discount = familyPlan.PasswordManager.basePrice;\n return [familyPlan];\n }\n\n const businessOwnedIsChecked = this.formGroup.controls.businessOwned.value;\n\n const result = this.passwordManagerPlans.filter(\n (plan) =>\n plan.type !== PlanType.Custom &&\n (!businessOwnedIsChecked || plan.canBeUsedByBusiness) &&\n (this.showFree || plan.productTier !== ProductTierType.Free) &&\n (plan.isAnnual ||\n plan.productTier === ProductTierType.Free ||\n plan.productTier === ProductTierType.TeamsStarter) &&\n (!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&\n (!this.hasProvider || plan.productTier !== ProductTierType.TeamsStarter) &&\n ((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||\n (this.isProviderQualifiedFor2020Plan() &&\n Allowed2020PlansForLegacyProviders.includes(plan.type))),\n );\n\n result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n\n return result;\n }\n\n get selectablePlans() {\n const selectedProductTierType = this.formGroup.controls.productTier.value;\n const result =\n this.passwordManagerPlans?.filter(\n (plan) =>\n plan.productTier === selectedProductTierType &&\n ((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||\n (this.isProviderQualifiedFor2020Plan() &&\n Allowed2020PlansForLegacyProviders.includes(plan.type))),\n ) || [];\n\n result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n return result;\n }\n\n get hasProvider() {\n return this.providerId != null;\n }\n\n additionalStoragePriceMonthly(selectedPlan: PlanResponse) {\n if (!selectedPlan.isAnnual) {\n return selectedPlan.PasswordManager.additionalStoragePricePerGb;\n }\n return selectedPlan.PasswordManager.additionalStoragePricePerGb / 12;\n }\n\n seatPriceMonthly(selectedPlan: PlanResponse) {\n if (!selectedPlan.isAnnual) {\n return selectedPlan.PasswordManager.seatPrice;\n }\n return selectedPlan.PasswordManager.seatPrice / 12;\n }\n\n additionalStorageTotal(plan: PlanResponse): number {\n if (!plan.PasswordManager.hasAdditionalStorageOption) {\n return 0;\n }\n\n return (\n plan.PasswordManager.additionalStoragePricePerGb *\n Math.abs(this.formGroup.controls.additionalStorage.value || 0)\n );\n }\n\n passwordManagerSeatTotal(plan: PlanResponse, seats: number): number {\n if (!plan.PasswordManager.hasAdditionalSeatsOption) {\n return 0;\n }\n\n return plan.PasswordManager.seatPrice * Math.abs(seats || 0);\n }\n\n secretsManagerSeatTotal(plan: PlanResponse, seats: number): number {\n if (!plan.SecretsManager.hasAdditionalSeatsOption) {\n return 0;\n }\n\n return plan.SecretsManager.seatPrice * Math.abs(seats || 0);\n }\n\n additionalServiceAccountTotal(plan: PlanResponse): number {\n if (!plan.SecretsManager.hasAdditionalServiceAccountOption) {\n return 0;\n }\n\n return (\n plan.SecretsManager.additionalPricePerServiceAccount *\n Math.abs(this.secretsManagerForm.value.additionalServiceAccounts || 0)\n );\n }\n\n get passwordManagerSubtotal() {\n let subTotal = this.selectedPlan.PasswordManager.basePrice;\n if (\n this.selectedPlan.PasswordManager.hasAdditionalSeatsOption &&\n this.formGroup.controls.additionalSeats.value\n ) {\n subTotal += this.passwordManagerSeatTotal(\n this.selectedPlan,\n this.formGroup.value.additionalSeats,\n );\n }\n if (\n this.selectedPlan.PasswordManager.hasAdditionalStorageOption &&\n this.formGroup.controls.additionalStorage.value\n ) {\n subTotal += this.additionalStorageTotal(this.selectedPlan);\n }\n if (\n this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n this.formGroup.controls.premiumAccessAddon.value\n ) {\n subTotal += this.selectedPlan.PasswordManager.premiumAccessOptionPrice;\n }\n return subTotal - this.discount;\n }\n\n get secretsManagerSubtotal() {\n const plan = this.selectedSecretsManagerPlan;\n const formValues = this.secretsManagerForm.value;\n\n if (!this.planOffersSecretsManager || !formValues.enabled) {\n return 0;\n }\n\n return (\n plan.SecretsManager.basePrice +\n this.secretsManagerSeatTotal(plan, formValues.userSeats) +\n this.additionalServiceAccountTotal(plan)\n );\n }\n\n get freeTrial() {\n return this.selectedPlan.trialPeriodDays != null;\n }\n\n get taxCharges() {\n return this.taxComponent != null && this.taxComponent.taxRate != null\n ? (this.taxComponent.taxRate / 100) *\n (this.passwordManagerSubtotal + this.secretsManagerSubtotal)\n : 0;\n }\n\n get total() {\n return this.passwordManagerSubtotal + this.secretsManagerSubtotal + this.taxCharges || 0;\n }\n\n get paymentDesc() {\n if (this.acceptingSponsorship) {\n return this.i18nService.t(\"paymentSponsored\");\n } else if (this.freeTrial && this.createOrganization) {\n return this.i18nService.t(\"paymentChargedWithTrial\");\n } else {\n return this.i18nService.t(\"paymentCharged\", this.i18nService.t(this.selectedPlanInterval));\n }\n }\n\n get secretsManagerForm() {\n return this.formGroup.controls.secretsManager;\n }\n\n get planOffersSecretsManager() {\n return this.selectedSecretsManagerPlan != null;\n }\n\n get teamsStarterPlanIsAvailable() {\n return this.selectablePlans.some((plan) => plan.type === PlanType.TeamsStarter);\n }\n\n changedProduct() {\n const selectedPlan = this.selectablePlans[0];\n\n this.setPlanType(selectedPlan.type);\n this.handlePremiumAddonAccess(selectedPlan.PasswordManager.hasPremiumAccessOption);\n this.handleAdditionalStorage(selectedPlan.PasswordManager.hasAdditionalStorageOption);\n this.handleAdditionalSeats(selectedPlan.PasswordManager.hasAdditionalSeatsOption);\n this.handleSecretsManagerForm();\n }\n\n setPlanType(planType: PlanType) {\n this.formGroup.controls.plan.setValue(planType);\n }\n\n handlePremiumAddonAccess(hasPremiumAccessOption: boolean) {\n this.formGroup.controls.premiumAccessAddon.setValue(!hasPremiumAccessOption);\n }\n\n handleAdditionalStorage(selectedPlanHasAdditionalStorageOption: boolean) {\n if (!selectedPlanHasAdditionalStorageOption || !this.currentPlan) {\n this.formGroup.controls.additionalStorage.setValue(0);\n return;\n }\n\n if (this.organization?.maxStorageGb) {\n this.formGroup.controls.additionalStorage.setValue(\n this.organization.maxStorageGb - this.currentPlan.PasswordManager.baseStorageGb,\n );\n }\n }\n\n handleAdditionalSeats(selectedPlanHasAdditionalSeatsOption: boolean) {\n if (!selectedPlanHasAdditionalSeatsOption) {\n this.formGroup.controls.additionalSeats.setValue(0);\n return;\n }\n\n if (this.currentPlan && !this.currentPlan.PasswordManager.hasAdditionalSeatsOption) {\n this.formGroup.controls.additionalSeats.setValue(this.currentPlan.PasswordManager.baseSeats);\n return;\n }\n\n if (this.organization) {\n this.formGroup.controls.additionalSeats.setValue(this.organization.seats);\n return;\n }\n\n this.formGroup.controls.additionalSeats.setValue(1);\n }\n\n handleSecretsManagerForm() {\n if (this.planOffersSecretsManager) {\n this.secretsManagerForm.enable();\n }\n\n if (this.organization?.useSecretsManager) {\n this.secretsManagerForm.controls.enabled.setValue(true);\n }\n\n if (this.secretsManagerForm.controls.enabled.value) {\n this.secretsManagerForm.controls.userSeats.setValue(this.sub?.smSeats || 1);\n this.secretsManagerForm.controls.additionalServiceAccounts.setValue(\n this.sub?.smServiceAccounts - this.currentPlan.SecretsManager?.baseServiceAccount || 0,\n );\n }\n\n this.secretsManagerForm.updateValueAndValidity();\n }\n\n changedOwnedBusiness() {\n if (!this.formGroup.controls.businessOwned.value || this.selectedPlan.canBeUsedByBusiness) {\n return;\n }\n if (this.teamsStarterPlanIsAvailable) {\n this.formGroup.controls.productTier.setValue(ProductTierType.TeamsStarter);\n this.formGroup.controls.plan.setValue(PlanType.TeamsStarter);\n } else {\n this.formGroup.controls.productTier.setValue(ProductTierType.Teams);\n this.formGroup.controls.plan.setValue(PlanType.TeamsAnnually);\n }\n this.changedProduct();\n }\n\n changedCountry() {\n this.paymentComponent.hideBank = this.taxComponent.taxFormGroup?.value.country !== \"US\";\n // Bank Account payments are only available for US customers\n if (\n this.paymentComponent.hideBank &&\n this.paymentComponent.method === PaymentMethodType.BankAccount\n ) {\n this.paymentComponent.method = PaymentMethodType.Card;\n this.paymentComponent.changeMethod();\n }\n }\n\n cancel() {\n this.onCanceled.emit();\n }\n\n setSelectedFile(event: Event) {\n const fileInputEl = event.target;\n this.selectedFile = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;\n }\n\n submit = async () => {\n if (!this.taxComponent?.taxFormGroup.valid && this.taxComponent?.taxFormGroup.touched) {\n this.taxComponent?.taxFormGroup.markAllAsTouched();\n return;\n }\n\n if (this.singleOrgPolicyBlock) {\n return;\n }\n const doSubmit = async (): Promise => {\n let orgId: string = null;\n if (this.createOrganization) {\n const orgKey = await this.cryptoService.makeOrgKey();\n const key = orgKey[0].encryptedString;\n const collection = await this.cryptoService.encrypt(\n this.i18nService.t(\"defaultCollection\"),\n orgKey[1],\n );\n const collectionCt = collection.encryptedString;\n const orgKeys = await this.cryptoService.makeKeyPair(orgKey[1]);\n\n if (this.selfHosted) {\n orgId = await this.createSelfHosted(key, collectionCt, orgKeys);\n } else {\n orgId = await this.createCloudHosted(key, collectionCt, orgKeys, orgKey[1]);\n }\n\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"organizationCreated\"),\n this.i18nService.t(\"organizationReadyToGo\"),\n );\n } else {\n orgId = await this.updateOrganization(orgId);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"organizationUpgraded\"),\n );\n }\n\n await this.apiService.refreshIdentityToken();\n await this.syncService.fullSync(true);\n\n if (!this.acceptingSponsorship && !this.isInTrialFlow) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/organizations/\" + orgId]);\n }\n\n if (this.isInTrialFlow) {\n this.onTrialBillingSuccess.emit({\n orgId: orgId,\n subLabelText: this.billingSubLabelText(),\n });\n }\n\n return orgId;\n };\n\n this.formPromise = doSubmit();\n const organizationId = await this.formPromise;\n this.onSuccess.emit({ organizationId: organizationId });\n // TODO: No one actually listening to this message?\n this.messagingService.send(\"organizationCreated\", { organizationId });\n };\n\n private async updateOrganization(orgId: string) {\n const request = new OrganizationUpgradeRequest();\n request.additionalSeats = this.formGroup.controls.additionalSeats.value;\n request.additionalStorageGb = this.formGroup.controls.additionalStorage.value;\n request.premiumAccessAddon =\n this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n this.formGroup.controls.premiumAccessAddon.value;\n request.planType = this.selectedPlan.type;\n request.billingAddressCountry = this.taxComponent.taxFormGroup?.value.country;\n request.billingAddressPostalCode = this.taxComponent.taxFormGroup?.value.postalCode;\n\n // Secrets Manager\n this.buildSecretsManagerRequest(request);\n\n if (this.upgradeRequiresPaymentMethod) {\n const tokenResult = await this.paymentComponent.createPaymentToken();\n const paymentRequest = new PaymentRequest();\n paymentRequest.paymentToken = tokenResult[0];\n paymentRequest.paymentMethodType = tokenResult[1];\n paymentRequest.country = this.taxComponent.taxFormGroup?.value.country;\n paymentRequest.postalCode = this.taxComponent.taxFormGroup?.value.postalCode;\n await this.organizationApiService.updatePayment(this.organizationId, paymentRequest);\n }\n\n // Backfill pub/priv key if necessary\n if (!this.organization.hasPublicAndPrivateKeys) {\n const orgShareKey = await this.cryptoService.getOrgKey(this.organizationId);\n const orgKeys = await this.cryptoService.makeKeyPair(orgShareKey);\n request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n }\n\n const result = await this.organizationApiService.upgrade(this.organizationId, request);\n if (!result.success && result.paymentIntentClientSecret != null) {\n await this.paymentComponent.handleStripeCardPayment(result.paymentIntentClientSecret, null);\n }\n return this.organizationId;\n }\n\n private async createCloudHosted(\n key: string,\n collectionCt: string,\n orgKeys: [string, EncString],\n orgKey: SymmetricCryptoKey,\n ) {\n const request = new OrganizationCreateRequest();\n request.key = key;\n request.collectionName = collectionCt;\n request.name = this.formGroup.controls.name.value;\n request.billingEmail = this.formGroup.controls.billingEmail.value;\n request.initiationPath = \"New organization creation in-product\";\n request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n\n if (this.selectedPlan.type === PlanType.Free) {\n request.planType = PlanType.Free;\n } else {\n const tokenResult = await this.paymentComponent.createPaymentToken();\n\n request.paymentToken = tokenResult[0];\n request.paymentMethodType = tokenResult[1];\n request.additionalSeats = this.formGroup.controls.additionalSeats.value;\n request.additionalStorageGb = this.formGroup.controls.additionalStorage.value;\n request.premiumAccessAddon =\n this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n this.formGroup.controls.premiumAccessAddon.value;\n request.planType = this.selectedPlan.type;\n request.billingAddressPostalCode = this.taxComponent.taxFormGroup?.value.postalCode;\n request.billingAddressCountry = this.taxComponent.taxFormGroup?.value.country;\n if (this.taxComponent.taxFormGroup?.value.includeTaxId) {\n request.taxIdNumber = this.taxComponent.taxFormGroup?.value.taxId;\n request.billingAddressLine1 = this.taxComponent.taxFormGroup?.value.line1;\n request.billingAddressLine2 = this.taxComponent.taxFormGroup?.value.line2;\n request.billingAddressCity = this.taxComponent.taxFormGroup?.value.city;\n request.billingAddressState = this.taxComponent.taxFormGroup?.value.state;\n }\n }\n\n // Secrets Manager\n this.buildSecretsManagerRequest(request);\n\n if (this.hasProvider) {\n const providerRequest = new ProviderOrganizationCreateRequest(\n this.formGroup.controls.clientOwnerEmail.value,\n request,\n );\n const providerKey = await this.cryptoService.getProviderKey(this.providerId);\n providerRequest.organizationCreateRequest.key = (\n await this.cryptoService.encrypt(orgKey.key, providerKey)\n ).encryptedString;\n const orgId = (\n await this.apiService.postProviderCreateOrganization(this.providerId, providerRequest)\n ).organizationId;\n\n return orgId;\n } else {\n return (await this.organizationApiService.create(request)).id;\n }\n }\n\n private async createSelfHosted(key: string, collectionCt: string, orgKeys: [string, EncString]) {\n if (!this.selectedFile) {\n throw new Error(this.i18nService.t(\"selectFile\"));\n }\n\n const fd = new FormData();\n fd.append(\"license\", this.selectedFile);\n fd.append(\"key\", key);\n fd.append(\"collectionName\", collectionCt);\n const response = await this.organizationApiService.createLicense(fd);\n const orgId = response.id;\n\n await this.apiService.refreshIdentityToken();\n\n // Org Keys live outside of the OrganizationLicense - add the keys to the org here\n const request = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n await this.organizationApiService.updateKeys(orgId, request);\n\n return orgId;\n }\n\n private billingSubLabelText(): string {\n const selectedPlan = this.selectedPlan;\n const price =\n selectedPlan.PasswordManager.basePrice === 0\n ? selectedPlan.PasswordManager.seatPrice\n : selectedPlan.PasswordManager.basePrice;\n let text = \"\";\n\n if (selectedPlan.isAnnual) {\n text += `${this.i18nService.t(\"annual\")} ($${price}/${this.i18nService.t(\"yr\")})`;\n } else {\n text += `${this.i18nService.t(\"monthly\")} ($${price}/${this.i18nService.t(\"monthAbbr\")})`;\n }\n\n return text;\n }\n\n private buildSecretsManagerRequest(\n request: OrganizationCreateRequest | OrganizationUpgradeRequest,\n ): void {\n const formValues = this.secretsManagerForm.value;\n\n request.useSecretsManager = this.planOffersSecretsManager && formValues.enabled;\n\n if (!request.useSecretsManager) {\n return;\n }\n\n if (this.selectedSecretsManagerPlan.SecretsManager.hasAdditionalSeatsOption) {\n request.additionalSmSeats = formValues.userSeats;\n }\n\n if (this.selectedSecretsManagerPlan.SecretsManager.hasAdditionalServiceAccountOption) {\n request.additionalServiceAccounts = formValues.additionalServiceAccounts;\n }\n }\n\n private upgradeFlowPrefillForm() {\n if (this.acceptingSponsorship) {\n this.formGroup.controls.productTier.setValue(ProductTierType.Families);\n this.changedProduct();\n return;\n }\n\n if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n const upgradedPlan = this.passwordManagerPlans.find((plan) => {\n if (this.currentPlan.productTier === ProductTierType.Free) {\n return plan.type === PlanType.FamiliesAnnually;\n }\n\n if (\n this.currentPlan.productTier === ProductTierType.Families &&\n !this.teamsStarterPlanIsAvailable\n ) {\n return plan.type === PlanType.TeamsAnnually;\n }\n\n return plan.upgradeSortOrder === this.currentPlan.upgradeSortOrder + 1;\n });\n\n this.plan = upgradedPlan.type;\n this.productTier = upgradedPlan.productTier;\n this.changedProduct();\n }\n }\n\n private planIsEnabled(plan: PlanResponse) {\n return !plan.disabled && !plan.legacyYear;\n }\n}\n","export class StorageRequest {\n storageGbAdjustment: number;\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PaymentResponse } from \"@bitwarden/common/billing/models/response/payment.response\";\nimport { StorageRequest } from \"@bitwarden/common/models/request/storage.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PaymentComponent } from \"./payment.component\";\n\nexport interface AdjustStorageDialogData {\n storageGbPrice: number;\n add: boolean;\n organizationId?: string;\n interval?: string;\n}\n\nexport enum AdjustStorageDialogResult {\n Adjusted = \"adjusted\",\n Cancelled = \"cancelled\",\n}\n\n@Component({\n templateUrl: \"adjust-storage.component.html\",\n})\nexport class AdjustStorageComponent {\n storageGbPrice: number;\n add: boolean;\n organizationId: string;\n interval: string;\n\n @ViewChild(PaymentComponent, { static: true }) paymentComponent: PaymentComponent;\n\n protected DialogResult = AdjustStorageDialogResult;\n protected formGroup = new FormGroup({\n storageAdjustment: new FormControl(0, [\n Validators.required,\n Validators.min(0),\n Validators.max(99),\n ]),\n });\n\n constructor(\n private dialogRef: DialogRef,\n @Inject(DIALOG_DATA) protected data: AdjustStorageDialogData,\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private logService: LogService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n ) {\n this.storageGbPrice = data.storageGbPrice;\n this.add = data.add;\n this.organizationId = data.organizationId;\n this.interval = data.interval || \"year\";\n }\n\n submit = async () => {\n const request = new StorageRequest();\n request.storageGbAdjustment = this.formGroup.value.storageAdjustment;\n if (!this.add) {\n request.storageGbAdjustment *= -1;\n }\n\n let paymentFailed = false;\n const action = async () => {\n let response: Promise;\n if (this.organizationId == null) {\n response = this.apiService.postAccountStorage(request);\n } else {\n response = this.organizationApiService.updateStorage(this.organizationId, request);\n }\n const result = await response;\n if (result != null && result.paymentIntentClientSecret != null) {\n try {\n await this.paymentComponent.handleStripeCardPayment(\n result.paymentIntentClientSecret,\n null,\n );\n } catch {\n paymentFailed = true;\n }\n }\n };\n await action();\n this.dialogRef.close(AdjustStorageDialogResult.Adjusted);\n if (paymentFailed) {\n this.platformUtilsService.showToast(\n \"warning\",\n null,\n this.i18nService.t(\"couldNotChargeCardPayInvoice\"),\n { timeout: 10000 },\n );\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"../billing\"], { relativeTo: this.activatedRoute });\n } else {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"adjustedStorage\", request.storageGbAdjustment.toString()),\n );\n }\n };\n\n get adjustedStorageTotal(): number {\n return this.storageGbPrice * this.formGroup.value.storageAdjustment;\n }\n}\n\n/**\n * Strongly typed helper to open an AdjustStorageDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAdjustStorageDialog(\n dialogService: DialogService,\n config: DialogConfig,\n) {\n return dialogService.open(AdjustStorageComponent, config);\n}\n","
\n \n \n

{{ (add ? \"storageAddNote\" : \"storageRemoveNote\") | i18n }}

\n
\n \n {{ (add ? \"gbStorageAdd\" : \"gbStorageRemove\") | i18n }}\n \n \n {{ \"total\" | i18n }}:\n {{ formGroup.get(\"storageAdjustment\").value || 0 }} GB ×\n {{ storageGbPrice | currency: \"$\" }} = {{ adjustedStorageTotal | currency: \"$\" }} /{{\n interval | i18n\n }}\n \n \n
\n
\n \n \n \n {{ \"cancel\" | i18n }}\n \n \n
\n
\n\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PaymentMethodWarningsServiceAbstraction as PaymentMethodWarningService } from \"@bitwarden/common/billing/abstractions/payment-method-warnings-service.abstraction\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { PaymentComponent } from \"./payment.component\";\nimport { TaxInfoComponent } from \"./tax-info.component\";\n\nexport interface AdjustPaymentDialogData {\n organizationId: string;\n currentType: PaymentMethodType;\n}\n\nexport enum AdjustPaymentDialogResult {\n Adjusted = \"adjusted\",\n Cancelled = \"cancelled\",\n}\n\n@Component({\n templateUrl: \"adjust-payment-dialog.component.html\",\n})\nexport class AdjustPaymentDialogComponent {\n @ViewChild(PaymentComponent, { static: true }) paymentComponent: PaymentComponent;\n @ViewChild(TaxInfoComponent, { static: true }) taxInfoComponent: TaxInfoComponent;\n\n organizationId: string;\n currentType: PaymentMethodType;\n paymentMethodType = PaymentMethodType;\n\n protected DialogResult = AdjustPaymentDialogResult;\n protected formGroup = new FormGroup({});\n\n constructor(\n private dialogRef: DialogRef,\n @Inject(DIALOG_DATA) protected data: AdjustPaymentDialogData,\n private apiService: ApiService,\n private i18nService: I18nService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private paymentMethodWarningService: PaymentMethodWarningService,\n private configService: ConfigService,\n private toastService: ToastService,\n ) {\n this.organizationId = data.organizationId;\n this.currentType = data.currentType;\n }\n\n submit = async () => {\n if (!this.taxInfoComponent?.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) {\n this.taxInfoComponent.taxFormGroup.markAllAsTouched();\n return;\n }\n const request = new PaymentRequest();\n const response = this.paymentComponent.createPaymentToken().then((result) => {\n request.paymentToken = result[0];\n request.paymentMethodType = result[1];\n request.postalCode = this.taxInfoComponent.taxFormGroup?.value.postalCode;\n request.country = this.taxInfoComponent.taxFormGroup?.value.country;\n if (this.organizationId == null) {\n return this.apiService.postAccountPayment(request);\n } else {\n request.taxId = this.taxInfoComponent.taxFormGroup?.value.taxId;\n request.state = this.taxInfoComponent.taxFormGroup?.value.state;\n request.line1 = this.taxInfoComponent.taxFormGroup?.value.line1;\n request.line2 = this.taxInfoComponent.taxFormGroup?.value.line2;\n request.city = this.taxInfoComponent.taxFormGroup?.value.city;\n request.state = this.taxInfoComponent.taxFormGroup?.value.state;\n return this.organizationApiService.updatePayment(this.organizationId, request);\n }\n });\n await response;\n const showPaymentMethodWarningBanners = await firstValueFrom(\n this.configService.getFeatureFlag$(FeatureFlag.ShowPaymentMethodWarningBanners),\n );\n if (this.organizationId && showPaymentMethodWarningBanners) {\n await this.paymentMethodWarningService.removeSubscriptionRisk(this.organizationId);\n }\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"updatedPaymentMethod\"),\n });\n this.dialogRef.close(AdjustPaymentDialogResult.Adjusted);\n };\n\n changeCountry() {\n if (this.taxInfoComponent.taxInfo.country === \"US\") {\n this.paymentComponent.hideBank = !this.organizationId;\n } else {\n this.paymentComponent.hideBank = true;\n if (this.paymentComponent.method === PaymentMethodType.BankAccount) {\n this.paymentComponent.method = PaymentMethodType.Card;\n this.paymentComponent.changeMethod();\n }\n }\n }\n}\n\n/**\n * Strongly typed helper to open a AdjustPaymentDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAdjustPaymentDialog(\n dialogService: DialogService,\n config: DialogConfig,\n) {\n return dialogService.open(AdjustPaymentDialogComponent, config);\n}\n","
\n \n \n \n \n \n \n \n \n {{ \"cancel\" | i18n }}\n \n \n \n\n","export class VerifyBankRequest {\n amount1: number;\n amount2: number;\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, ElementRef, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BitPayInvoiceRequest } from \"@bitwarden/common/billing/models/request/bit-pay-invoice.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface AddCreditDialogData {\n organizationId: string;\n}\n\nexport enum AddCreditDialogResult {\n Added = \"added\",\n Cancelled = \"cancelled\",\n}\n\nexport type PayPalConfig = {\n businessId?: string;\n buttonAction?: string;\n};\n\n@Component({\n templateUrl: \"add-credit-dialog.component.html\",\n})\nexport class AddCreditDialogComponent implements OnInit {\n @ViewChild(\"ppButtonForm\", { read: ElementRef, static: true }) ppButtonFormRef: ElementRef;\n\n paymentMethodType = PaymentMethodType;\n ppButtonFormAction: string;\n ppButtonBusinessId: string;\n ppButtonCustomField: string;\n ppLoading = false;\n subject: string;\n returnUrl: string;\n organizationId: string;\n\n private userId: string;\n private name: string;\n private email: string;\n private region: string;\n\n protected DialogResult = AddCreditDialogResult;\n protected formGroup = new FormGroup({\n method: new FormControl(PaymentMethodType.PayPal),\n creditAmount: new FormControl(null, [Validators.required]),\n });\n\n constructor(\n private dialogRef: DialogRef,\n @Inject(DIALOG_DATA) protected data: AddCreditDialogData,\n private accountService: AccountService,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private organizationService: OrganizationService,\n private logService: LogService,\n private configService: ConfigService,\n ) {\n this.organizationId = data.organizationId;\n const payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;\n this.ppButtonFormAction = payPalConfig.buttonAction;\n this.ppButtonBusinessId = payPalConfig.businessId;\n }\n\n async ngOnInit() {\n if (this.organizationId != null) {\n if (this.creditAmount == null) {\n this.creditAmount = \"20.00\";\n }\n this.ppButtonCustomField = \"organization_id:\" + this.organizationId;\n const org = await this.organizationService.get(this.organizationId);\n if (org != null) {\n this.subject = org.name;\n this.name = org.name;\n }\n } else {\n if (this.creditAmount == null) {\n this.creditAmount = \"10.00\";\n }\n const [userId, email] = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n );\n this.userId = userId;\n this.subject = email;\n this.email = this.subject;\n this.ppButtonCustomField = \"user_id:\" + this.userId;\n }\n this.region = await firstValueFrom(this.configService.cloudRegion$);\n this.ppButtonCustomField += \",account_credit:1\";\n this.ppButtonCustomField += `,region:${this.region}`;\n this.returnUrl = window.location.href;\n }\n\n get creditAmount() {\n return this.formGroup.value.creditAmount;\n }\n set creditAmount(value: string) {\n this.formGroup.get(\"creditAmount\").setValue(value);\n }\n\n get method() {\n return this.formGroup.value.method;\n }\n\n submit = async () => {\n if (this.creditAmount == null || this.creditAmount === \"\") {\n return;\n }\n\n if (this.method === PaymentMethodType.PayPal) {\n this.ppButtonFormRef.nativeElement.submit();\n this.ppLoading = true;\n return;\n }\n if (this.method === PaymentMethodType.BitPay) {\n const req = new BitPayInvoiceRequest();\n req.email = this.email;\n req.name = this.name;\n req.credit = true;\n req.amount = this.creditAmountNumber;\n req.organizationId = this.organizationId;\n req.userId = this.userId;\n req.returnUrl = this.returnUrl;\n const bitPayUrl: string = await this.apiService.postBitPayInvoice(req);\n this.platformUtilsService.launchUri(bitPayUrl);\n return;\n }\n this.dialogRef.close(AddCreditDialogResult.Added);\n };\n\n formatAmount() {\n try {\n if (this.creditAmount != null && this.creditAmount !== \"\") {\n const floatAmount = Math.abs(parseFloat(this.creditAmount));\n if (floatAmount > 0) {\n this.creditAmount = parseFloat((Math.round(floatAmount * 100) / 100).toString())\n .toFixed(2)\n .toString();\n return;\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n this.creditAmount = \"\";\n }\n\n get creditAmountNumber(): number {\n if (this.creditAmount != null && this.creditAmount !== \"\") {\n try {\n return parseFloat(this.creditAmount);\n } catch (e) {\n this.logService.error(e);\n }\n }\n return null;\n }\n}\n\n/**\n * Strongly typed helper to open a AddCreditDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAddCreditDialog(\n dialogService: DialogService,\n config: DialogConfig,\n) {\n return dialogService.open(AddCreditDialogComponent, config);\n}\n","
\n \n \n

{{ \"creditDelayed\" | i18n }}

\n
\n \n \n PayPal\n \n \n Bitcoin\n \n \n
\n
\n \n {{ \"amount\" | i18n }}\n \n $USD\n \n
\n
\n \n \n \n {{ \"cancel\" | i18n }}\n \n \n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n","\n \n \n {{ \"refresh\" | i18n }}\n \n\n\n\n \n

{{ \"paymentMethod\" | i18n }}

\n\n \n \n {{ \"loading\" | i18n }}\n \n \n \n

\n {{ (isCreditBalance ? \"accountCredit\" : \"accountBalance\") | i18n }}\n

\n

{{ creditOrBalance | currency: \"$\" }}

\n

{{ \"creditAppliedDesc\" | i18n }}

\n \n
\n \n

{{ \"paymentMethod\" | i18n }}

\n

{{ \"noPaymentMethod\" | i18n }}

\n \n \n

\n {{ \"verifyBankAccountDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}\n

\n \n \n {{ \"amountX\" | i18n: \"1\" }}\n \n $0.\n \n \n {{ \"amountX\" | i18n: \"2\" }}\n \n $0.\n \n \n \n \n

\n \n {{ paymentSource.description }}\n

\n
\n \n

\n {{ \"paymentChargedWithUnpaidSubscription\" | i18n }}\n

\n
\n \n

{{ \"taxInformation\" | i18n }}

\n

{{ \"taxInformationDesc\" | i18n }}

\n
\n \n {{ \"loading\" | i18n }}\n
\n
\n \n \n
\n
\n
\n
\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BillingPaymentResponse } from \"@bitwarden/common/billing/models/response/billing-payment.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { SubscriptionResponse } from \"@bitwarden/common/billing/models/response/subscription.response\";\nimport { VerifyBankRequest } from \"@bitwarden/common/models/request/verify-bank.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { AddCreditDialogResult, openAddCreditDialog } from \"./add-credit-dialog.component\";\nimport {\n AdjustPaymentDialogResult,\n openAdjustPaymentDialog,\n} from \"./adjust-payment-dialog.component\";\nimport { TaxInfoComponent } from \"./tax-info.component\";\n\n@Component({\n templateUrl: \"payment-method.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class PaymentMethodComponent implements OnInit {\n @ViewChild(TaxInfoComponent) taxInfo: TaxInfoComponent;\n\n loading = false;\n firstLoaded = false;\n billing: BillingPaymentResponse;\n org: OrganizationSubscriptionResponse;\n sub: SubscriptionResponse;\n paymentMethodType = PaymentMethodType;\n organizationId: string;\n isUnpaid = false;\n\n verifyBankForm = this.formBuilder.group({\n amount1: new FormControl(null, [\n Validators.required,\n Validators.max(99),\n Validators.min(0),\n ]),\n amount2: new FormControl(null, [\n Validators.required,\n Validators.max(99),\n Validators.min(0),\n ]),\n });\n\n taxForm = this.formBuilder.group({});\n\n constructor(\n protected apiService: ApiService,\n protected organizationApiService: OrganizationApiServiceAbstraction,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n private router: Router,\n private logService: LogService,\n private route: ActivatedRoute,\n private formBuilder: FormBuilder,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.params.subscribe(async (params) => {\n if (params.organizationId) {\n this.organizationId = params.organizationId;\n } else if (this.platformUtilsService.isSelfHost()) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/settings/subscription\"]);\n return;\n }\n\n await this.load();\n this.firstLoaded = true;\n });\n }\n\n load = async () => {\n if (this.loading) {\n return;\n }\n this.loading = true;\n\n if (this.forOrganization) {\n const billingPromise = this.organizationApiService.getBilling(this.organizationId);\n const organizationSubscriptionPromise = this.organizationApiService.getSubscription(\n this.organizationId,\n );\n\n [this.billing, this.org] = await Promise.all([\n billingPromise,\n organizationSubscriptionPromise,\n ]);\n } else {\n const billingPromise = this.apiService.getUserBillingPayment();\n const subPromise = this.apiService.getUserSubscription();\n\n [this.billing, this.sub] = await Promise.all([billingPromise, subPromise]);\n }\n\n this.isUnpaid = this.subscription?.status === \"unpaid\" ?? false;\n\n this.loading = false;\n };\n\n addCredit = async () => {\n const dialogRef = openAddCreditDialog(this.dialogService, {\n data: {\n organizationId: this.organizationId,\n },\n });\n const result = await lastValueFrom(dialogRef.closed);\n if (result === AddCreditDialogResult.Added) {\n await this.load();\n }\n };\n\n changePayment = async () => {\n const dialogRef = openAdjustPaymentDialog(this.dialogService, {\n data: {\n organizationId: this.organizationId,\n currentType: this.paymentSource !== null ? this.paymentSource.type : null,\n },\n });\n const result = await lastValueFrom(dialogRef.closed);\n if (result === AdjustPaymentDialogResult.Adjusted) {\n await this.load();\n }\n };\n\n verifyBank = async () => {\n if (this.loading || !this.forOrganization) {\n return;\n }\n\n const request = new VerifyBankRequest();\n request.amount1 = this.verifyBankForm.value.amount1;\n request.amount2 = this.verifyBankForm.value.amount2;\n await this.organizationApiService.verifyBank(this.organizationId, request);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"verifiedBankAccount\"));\n await this.load();\n };\n\n submitTaxInfo = async () => {\n await this.taxInfo.submitTaxInfo();\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"taxInfoUpdated\"));\n };\n\n get isCreditBalance() {\n return this.billing == null || this.billing.balance <= 0;\n }\n\n get creditOrBalance() {\n return Math.abs(this.billing != null ? this.billing.balance : 0);\n }\n\n get paymentSource() {\n return this.billing != null ? this.billing.paymentSource : null;\n }\n\n get forOrganization() {\n return this.organizationId != null;\n }\n\n get headerClass() {\n return this.forOrganization ? [\"page-header\"] : [\"tabbed-header\"];\n }\n\n get paymentSourceClasses() {\n if (this.paymentSource == null) {\n return [];\n }\n switch (this.paymentSource.type) {\n case PaymentMethodType.Card:\n return [\"bwi-credit-card\"];\n case PaymentMethodType.BankAccount:\n return [\"bwi-bank\"];\n case PaymentMethodType.Check:\n return [\"bwi-money\"];\n case PaymentMethodType.PayPal:\n return [\"bwi-paypal text-primary\"];\n default:\n return [];\n }\n }\n\n get subscription() {\n return this.sub?.subscription ?? this.org?.subscription ?? null;\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { AddCreditDialogComponent } from \"./add-credit-dialog.component\";\nimport { AdjustPaymentDialogComponent } from \"./adjust-payment-dialog.component\";\nimport { AdjustStorageComponent } from \"./adjust-storage.component\";\nimport { BillingHistoryComponent } from \"./billing-history.component\";\nimport { OffboardingSurveyComponent } from \"./offboarding-survey.component\";\nimport { PaymentMethodComponent } from \"./payment-method.component\";\nimport { PaymentComponent } from \"./payment.component\";\nimport { SecretsManagerSubscribeComponent } from \"./sm-subscribe.component\";\nimport { TaxInfoComponent } from \"./tax-info.component\";\nimport { UpdateLicenseDialogComponent } from \"./update-license-dialog.component\";\nimport { UpdateLicenseComponent } from \"./update-license.component\";\n\n@NgModule({\n imports: [SharedModule, PaymentComponent, TaxInfoComponent, HeaderModule],\n declarations: [\n AddCreditDialogComponent,\n AdjustPaymentDialogComponent,\n AdjustStorageComponent,\n BillingHistoryComponent,\n PaymentMethodComponent,\n SecretsManagerSubscribeComponent,\n UpdateLicenseComponent,\n UpdateLicenseDialogComponent,\n OffboardingSurveyComponent,\n ],\n exports: [\n SharedModule,\n PaymentComponent,\n TaxInfoComponent,\n AdjustStorageComponent,\n BillingHistoryComponent,\n SecretsManagerSubscribeComponent,\n UpdateLicenseComponent,\n UpdateLicenseDialogComponent,\n OffboardingSurveyComponent,\n ],\n})\nexport class BillingSharedModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { PaymentMethodWarningsComponent } from \"./payment-method-warnings.component\";\n\n@NgModule({\n imports: [BannerModule, SharedModule],\n declarations: [PaymentMethodWarningsComponent],\n exports: [PaymentMethodWarningsComponent],\n})\nexport class PaymentMethodWarningsModule {}\n","\n \n {{ \"maintainYourSubscription\" | i18n: warning.organizationName }}\n {{ \"addAPaymentMethod\" | i18n }}.\n \n\n","import { Component } from \"@angular/core\";\nimport { map, Observable } from \"rxjs\";\n\nimport { PaymentMethodWarningsServiceAbstraction as PaymentMethodWarningService } from \"@bitwarden/common/billing/abstractions/payment-method-warnings-service.abstraction\";\n\ntype Warning = {\n organizationId: string;\n organizationName: string;\n};\n\n@Component({\n selector: \"app-payment-method-warnings\",\n templateUrl: \"payment-method-warnings.component.html\",\n})\nexport class PaymentMethodWarningsComponent {\n constructor(private paymentMethodWarningService: PaymentMethodWarningService) {}\n\n protected warnings$: Observable =\n this.paymentMethodWarningService.paymentMethodWarnings$.pipe(\n map((warnings) =>\n Object.entries(warnings ?? [])\n .filter(([_, warning]) => warning.risksSubscriptionFailure && !warning.acknowledged)\n .map(([organizationId, { organizationName }]) => ({\n organizationId,\n organizationName,\n })),\n ),\n );\n\n protected async closeWarning(organizationId: string): Promise {\n await this.paymentMethodWarningService.acknowledge(organizationId);\n }\n}\n","
\n
\n \n \n \n \n {{ \"creditCard\" | i18n }}\n \n \n \n \n {{ \"bankAccount\" | i18n }}\n \n \n PayPal\n \n \n \n \n {{ \"accountCredit\" | i18n }}\n \n \n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n {{ \"verifyBankAccountInitialDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}\n \n
\n \n {{ \"routingNumber\" | i18n }}\n \n \n \n {{ \"accountNumber\" | i18n }}\n \n \n \n {{ \"accountHolderName\" | i18n }}\n \n \n\n \n {{ \"bankAccountType\" | i18n }}\n \n \n \n \n \n \n
\n
\n \n
\n
\n {{ \"paypalClickSubmit\" | i18n }}\n
\n
\n \n \n {{ \"makeSureEnoughCredit\" | i18n }}\n \n \n
\n","import { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { AbstractThemingService } from \"@bitwarden/angular/platform/services/theming/theming.service.abstraction\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n selector: \"app-payment\",\n templateUrl: \"payment.component.html\",\n standalone: true,\n imports: [SharedModule],\n})\nexport class PaymentComponent implements OnInit, OnDestroy {\n @Input() showMethods = true;\n @Input() showOptions = true;\n @Input() hideBank = false;\n @Input() hidePaypal = false;\n @Input() hideCredit = false;\n @Input() trialFlow = false;\n\n @Input()\n set method(value: PaymentMethodType) {\n this._method = value;\n this.paymentForm?.controls.method.setValue(value, { emitEvent: false });\n }\n\n get method(): PaymentMethodType {\n return this._method;\n }\n private _method: PaymentMethodType = PaymentMethodType.Card;\n\n private destroy$ = new Subject();\n protected paymentForm = new FormGroup({\n method: new FormControl(this.method),\n bank: new FormGroup({\n routing_number: new FormControl(null, [Validators.required]),\n account_number: new FormControl(null, [Validators.required]),\n account_holder_name: new FormControl(null, [Validators.required]),\n account_holder_type: new FormControl(\"\", [Validators.required]),\n currency: new FormControl(\"USD\"),\n country: new FormControl(\"US\"),\n }),\n });\n paymentMethodType = PaymentMethodType;\n\n private btScript: HTMLScriptElement;\n private btInstance: any = null;\n private stripeScript: HTMLScriptElement;\n private stripe: any = null;\n private stripeElements: any = null;\n private stripeCardNumberElement: any = null;\n private stripeCardExpiryElement: any = null;\n private stripeCardCvcElement: any = null;\n private StripeElementStyle: any;\n private StripeElementClasses: any;\n\n constructor(\n private apiService: ApiService,\n private logService: LogService,\n private themingService: AbstractThemingService,\n ) {\n this.stripeScript = window.document.createElement(\"script\");\n this.stripeScript.src = \"https://js.stripe.com/v3/?advancedFraudSignals=false\";\n this.stripeScript.async = true;\n this.stripeScript.onload = () => {\n this.stripe = (window as any).Stripe(process.env.STRIPE_KEY);\n this.stripeElements = this.stripe.elements();\n this.setStripeElement();\n };\n this.btScript = window.document.createElement(\"script\");\n this.btScript.src = `scripts/dropin.js?cache=${process.env.CACHE_TAG}`;\n this.btScript.async = true;\n this.StripeElementStyle = {\n base: {\n color: null,\n fontFamily:\n '\"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif, ' +\n '\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"',\n fontSize: \"14px\",\n fontSmoothing: \"antialiased\",\n \"::placeholder\": {\n color: null,\n },\n },\n invalid: {\n color: null,\n },\n };\n this.StripeElementClasses = {\n focus: \"is-focused\",\n empty: \"is-empty\",\n invalid: \"is-invalid\",\n };\n }\n async ngOnInit() {\n if (!this.showOptions) {\n this.hidePaypal = this.method !== PaymentMethodType.PayPal;\n this.hideBank = this.method !== PaymentMethodType.BankAccount;\n this.hideCredit = this.method !== PaymentMethodType.Credit;\n }\n this.subscribeToTheme();\n window.document.head.appendChild(this.stripeScript);\n if (!this.hidePaypal) {\n window.document.head.appendChild(this.btScript);\n }\n this.paymentForm\n .get(\"method\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((v) => {\n this.method = v;\n this.changeMethod();\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n window.document.head.removeChild(this.stripeScript);\n window.setTimeout(() => {\n Array.from(window.document.querySelectorAll(\"iframe\")).forEach((el) => {\n if (el.src != null && el.src.indexOf(\"stripe\") > -1) {\n try {\n window.document.body.removeChild(el);\n } catch (e) {\n this.logService.error(e);\n }\n }\n });\n }, 500);\n if (!this.hidePaypal) {\n window.document.head.removeChild(this.btScript);\n window.setTimeout(() => {\n Array.from(window.document.head.querySelectorAll(\"script\")).forEach((el) => {\n if (el.src != null && el.src.indexOf(\"paypal\") > -1) {\n try {\n window.document.head.removeChild(el);\n } catch (e) {\n this.logService.error(e);\n }\n }\n });\n const btStylesheet = window.document.head.querySelector(\"#braintree-dropin-stylesheet\");\n if (btStylesheet != null) {\n try {\n window.document.head.removeChild(btStylesheet);\n } catch (e) {\n this.logService.error(e);\n }\n }\n }, 500);\n }\n }\n\n changeMethod() {\n this.btInstance = null;\n if (this.method === PaymentMethodType.PayPal) {\n window.setTimeout(() => {\n (window as any).braintree.dropin.create(\n {\n authorization: process.env.BRAINTREE_KEY,\n container: \"#bt-dropin-container\",\n paymentOptionPriority: [\"paypal\"],\n paypal: {\n flow: \"vault\",\n buttonStyle: {\n label: \"pay\",\n size: \"medium\",\n shape: \"pill\",\n color: \"blue\",\n tagline: \"false\",\n },\n },\n },\n (createErr: any, instance: any) => {\n if (createErr != null) {\n // eslint-disable-next-line\n console.error(createErr);\n return;\n }\n this.btInstance = instance;\n },\n );\n }, 250);\n } else {\n this.setStripeElement();\n }\n }\n\n createPaymentToken(): Promise<[string, PaymentMethodType]> {\n return new Promise((resolve, reject) => {\n if (this.method === PaymentMethodType.Credit) {\n resolve([null, this.method]);\n } else if (this.method === PaymentMethodType.PayPal) {\n this.btInstance\n .requestPaymentMethod()\n .then((payload: any) => {\n resolve([payload.nonce, this.method]);\n })\n .catch((err: any) => {\n reject(err.message);\n });\n } else if (\n this.method === PaymentMethodType.Card ||\n this.method === PaymentMethodType.BankAccount\n ) {\n if (this.method === PaymentMethodType.Card) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.apiService\n .postSetupPayment()\n .then((clientSecret) =>\n this.stripe.handleCardSetup(clientSecret, this.stripeCardNumberElement),\n )\n .then((result: any) => {\n if (result.error) {\n reject(result.error.message);\n } else if (result.setupIntent && result.setupIntent.status === \"succeeded\") {\n resolve([result.setupIntent.payment_method, this.method]);\n } else {\n reject();\n }\n });\n } else {\n this.stripe\n .createToken(\"bank_account\", this.paymentForm.get(\"bank\").value)\n .then((result: any) => {\n if (result.error) {\n reject(result.error.message);\n } else if (result.token && result.token.id != null) {\n resolve([result.token.id, this.method]);\n } else {\n reject();\n }\n });\n }\n }\n });\n }\n\n handleStripeCardPayment(clientSecret: string, successCallback: () => Promise): Promise {\n return new Promise((resolve, reject) => {\n if (this.showMethods && this.stripeCardNumberElement == null) {\n reject();\n return;\n }\n const handleCardPayment = () =>\n this.showMethods\n ? this.stripe.handleCardSetup(clientSecret, this.stripeCardNumberElement)\n : this.stripe.handleCardSetup(clientSecret);\n return handleCardPayment().then(async (result: any) => {\n if (result.error) {\n reject(result.error.message);\n } else if (result.paymentIntent && result.paymentIntent.status === \"succeeded\") {\n if (successCallback != null) {\n await successCallback();\n }\n resolve();\n } else {\n reject();\n }\n });\n });\n }\n\n private setStripeElement() {\n window.setTimeout(() => {\n if (this.showMethods && this.method === PaymentMethodType.Card) {\n if (this.stripeCardNumberElement == null) {\n this.stripeCardNumberElement = this.stripeElements.create(\"cardNumber\", {\n style: this.StripeElementStyle,\n classes: this.StripeElementClasses,\n placeholder: \"\",\n });\n }\n if (this.stripeCardExpiryElement == null) {\n this.stripeCardExpiryElement = this.stripeElements.create(\"cardExpiry\", {\n style: this.StripeElementStyle,\n classes: this.StripeElementClasses,\n });\n }\n if (this.stripeCardCvcElement == null) {\n this.stripeCardCvcElement = this.stripeElements.create(\"cardCvc\", {\n style: this.StripeElementStyle,\n classes: this.StripeElementClasses,\n placeholder: \"\",\n });\n }\n this.stripeCardNumberElement.mount(\"#stripe-card-number-element\");\n this.stripeCardExpiryElement.mount(\"#stripe-card-expiry-element\");\n this.stripeCardCvcElement.mount(\"#stripe-card-cvc-element\");\n }\n }, 50);\n }\n\n private subscribeToTheme() {\n this.themingService.theme$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n const style = getComputedStyle(document.documentElement);\n this.StripeElementStyle.base.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n this.StripeElementStyle.base[\"::placeholder\"].color = `rgb(${style.getPropertyValue(\n \"--color-text-muted\",\n )})`;\n this.StripeElementStyle.invalid.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n this.StripeElementStyle.invalid.borderColor = `rgb(${style.getPropertyValue(\n \"--color-danger-600\",\n )})`;\n });\n }\n}\n","
\n

{{ \"moreFromBitwarden\" | i18n }}

\n
\n
\n \n
\n
\n \n

{{ \"secretsManagerForPlan\" | i18n: planName }}

\n
\n {{ \"secretsManagerForPlanDesc\" | i18n }}\n
    \n
  • {{ \"limitedUsers\" | i18n: maxUsers }}
  • \n
  • {{ \"unlimitedSecrets\" | i18n }}
  • \n
  • \n {{ \"projectsIncluded\" | i18n: maxProjects }}\n
  • \n \n
  • {{ \"unlimitedProjects\" | i18n }}
  • \n
    \n
  • {{ \"machineAccountsIncluded\" | i18n: serviceAccountsIncluded }}
  • \n
  • \n {{\n \"additionalMachineAccountCost\" | i18n: (monthlyCostPerServiceAccount | currency: \"$\")\n }}\n
  • \n
\n
\n\n
\n \n {{ \"costPerUser\" | i18n: (monthlyCostPerUser | currency: \"$\") }} /{{ \"month\" | i18n }}\n \n \n {{ \"freeForever\" | i18n }}\n \n
\n\n \n \n {{ \"subscribeToSecretsManager\" | i18n }}\n {{ \"addSecretsManagerUpgradeDesc\" | i18n }}\n \n\n \n
\n \n {{ \"userSeats\" | i18n }}\n \n {{ \"userSeatsHowManyDesc\" | i18n }}\n \n
\n
\n \n {{ \"additionalMachineAccounts\" | i18n }}\n \n \n {{ \"includedMachineAccounts\" | i18n: serviceAccountsIncluded }}\n {{\n \"addAdditionalMachineAccounts\" | i18n: (monthlyCostPerServiceAccount | currency: \"$\")\n }}\n \n \n
\n\n \n
\n
\n\n","import { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject, startWith, takeUntil } from \"rxjs\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { BillingCustomerDiscount } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { SecretsManagerLogo } from \"../../layouts/secrets-manager-logo\";\n\nexport interface SecretsManagerSubscription {\n enabled: boolean;\n userSeats: number;\n additionalServiceAccounts: number;\n}\n\nexport const secretsManagerSubscribeFormFactory = (\n formBuilder: FormBuilder,\n): FormGroup> =>\n formBuilder.group({\n enabled: [false],\n userSeats: [1, [Validators.required, Validators.min(1), Validators.max(100000)]],\n additionalServiceAccounts: [\n 0,\n [Validators.required, Validators.min(0), Validators.max(100000)],\n ],\n });\n\n@Component({\n selector: \"sm-subscribe\",\n templateUrl: \"sm-subscribe.component.html\",\n})\nexport class SecretsManagerSubscribeComponent implements OnInit, OnDestroy {\n @Input() formGroup: FormGroup>;\n @Input() upgradeOrganization: boolean;\n @Input() showSubmitButton = false;\n @Input() selectedPlan: PlanResponse;\n @Input() customerDiscount: BillingCustomerDiscount;\n\n logo = SecretsManagerLogo;\n productTypes = ProductTierType;\n\n private destroy$ = new Subject();\n\n constructor(private i18nService: I18nService) {}\n\n ngOnInit() {\n this.formGroup.controls.enabled.valueChanges\n .pipe(startWith(this.formGroup.value.enabled), takeUntil(this.destroy$))\n .subscribe((enabled) => {\n if (enabled) {\n this.formGroup.controls.userSeats.enable();\n this.formGroup.controls.additionalServiceAccounts.enable();\n } else {\n this.formGroup.controls.userSeats.disable();\n this.formGroup.controls.additionalServiceAccounts.disable();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n discountPrice = (price: number) => {\n const discount =\n !!this.customerDiscount && this.customerDiscount.active\n ? price * (this.customerDiscount.percentOff / 100)\n : 0;\n\n return price - discount;\n };\n\n get product() {\n return this.selectedPlan.productTier;\n }\n\n get planName() {\n switch (this.product) {\n case ProductTierType.Free:\n return this.i18nService.t(\"free2PersonOrganization\");\n case ProductTierType.Teams:\n case ProductTierType.TeamsStarter:\n return this.i18nService.t(\"planNameTeams\");\n case ProductTierType.Enterprise:\n return this.i18nService.t(\"planNameEnterprise\");\n }\n }\n\n get serviceAccountsIncluded() {\n return this.selectedPlan.SecretsManager.baseServiceAccount;\n }\n\n get monthlyCostPerServiceAccount() {\n return this.selectedPlan.isAnnual\n ? this.discountPrice(this.selectedPlan.SecretsManager.additionalPricePerServiceAccount) / 12\n : this.discountPrice(this.selectedPlan.SecretsManager.additionalPricePerServiceAccount);\n }\n\n get maxUsers() {\n return this.selectedPlan.SecretsManager.maxSeats;\n }\n\n get maxProjects() {\n return this.selectedPlan.SecretsManager.maxProjects;\n }\n\n get monthlyCostPerUser() {\n return this.selectedPlan.isAnnual\n ? this.discountPrice(this.selectedPlan.SecretsManager.seatPrice) / 12\n : this.discountPrice(this.selectedPlan.SecretsManager.seatPrice);\n }\n}\n","
\n
\n
\n \n {{ \"country\" | i18n }}\n \n \n \n \n
\n
\n \n {{ \"zipPostalCode\" | i18n }}\n \n \n
\n
\n \n \n {{ \"includeVAT\" | i18n }}\n \n
\n
\n
\n
\n \n {{ \"taxIdNumber\" | i18n }}\n \n \n
\n
\n
\n
\n \n {{ \"address1\" | i18n }}\n \n \n
\n
\n \n {{ \"address2\" | i18n }}\n \n \n
\n
\n \n {{ \"cityTown\" | i18n }}\n \n \n
\n
\n \n {{ \"stateProvince\" | i18n }}\n \n \n
\n
\n
\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { TaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/tax-info-update.request\";\nimport { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\nimport { TaxRateResponse } from \"@bitwarden/common/billing/models/response/tax-rate.response\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { SharedModule } from \"../../shared\";\n\ntype TaxInfoView = Omit & {\n includeTaxId: boolean;\n [key: string]: unknown;\n};\n\ntype CountryList = {\n name: string;\n value: string;\n disabled: boolean;\n};\n\n@Component({\n selector: \"app-tax-info\",\n templateUrl: \"tax-info.component.html\",\n standalone: true,\n imports: [SharedModule],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class TaxInfoComponent {\n @Input() trialFlow = false;\n @Output() onCountryChanged = new EventEmitter();\n private destroy$ = new Subject();\n\n taxFormGroup = new FormGroup({\n country: new FormControl(null, [Validators.required]),\n postalCode: new FormControl(null),\n includeTaxId: new FormControl(null),\n taxId: new FormControl(null),\n line1: new FormControl(null),\n line2: new FormControl(null),\n city: new FormControl(null),\n state: new FormControl(null),\n });\n\n loading = true;\n organizationId: string;\n providerId: string;\n taxInfo: TaxInfoView = {\n taxId: null,\n line1: null,\n line2: null,\n city: null,\n state: null,\n postalCode: null,\n country: \"US\",\n includeTaxId: false,\n };\n countryList: CountryList[] = [\n { name: \"-- Select --\", value: \"\", disabled: false },\n { name: \"United States\", value: \"US\", disabled: false },\n { name: \"China\", value: \"CN\", disabled: false },\n { name: \"France\", value: \"FR\", disabled: false },\n { name: \"Germany\", value: \"DE\", disabled: false },\n { name: \"Canada\", value: \"CA\", disabled: false },\n { name: \"United Kingdom\", value: \"GB\", disabled: false },\n { name: \"Australia\", value: \"AU\", disabled: false },\n { name: \"India\", value: \"IN\", disabled: false },\n { name: \"\", value: \"-\", disabled: true },\n { name: \"Afghanistan\", value: \"AF\", disabled: false },\n { name: \"Åland Islands\", value: \"AX\", disabled: false },\n { name: \"Albania\", value: \"AL\", disabled: false },\n { name: \"Algeria\", value: \"DZ\", disabled: false },\n { name: \"American Samoa\", value: \"AS\", disabled: false },\n { name: \"Andorra\", value: \"AD\", disabled: false },\n { name: \"Angola\", value: \"AO\", disabled: false },\n { name: \"Anguilla\", value: \"AI\", disabled: false },\n { name: \"Antarctica\", value: \"AQ\", disabled: false },\n { name: \"Antigua and Barbuda\", value: \"AG\", disabled: false },\n { name: \"Argentina\", value: \"AR\", disabled: false },\n { name: \"Armenia\", value: \"AM\", disabled: false },\n { name: \"Aruba\", value: \"AW\", disabled: false },\n { name: \"Austria\", value: \"AT\", disabled: false },\n { name: \"Azerbaijan\", value: \"AZ\", disabled: false },\n { name: \"Bahamas\", value: \"BS\", disabled: false },\n { name: \"Bahrain\", value: \"BH\", disabled: false },\n { name: \"Bangladesh\", value: \"BD\", disabled: false },\n { name: \"Barbados\", value: \"BB\", disabled: false },\n { name: \"Belarus\", value: \"BY\", disabled: false },\n { name: \"Belgium\", value: \"BE\", disabled: false },\n { name: \"Belize\", value: \"BZ\", disabled: false },\n { name: \"Benin\", value: \"BJ\", disabled: false },\n { name: \"Bermuda\", value: \"BM\", disabled: false },\n { name: \"Bhutan\", value: \"BT\", disabled: false },\n { name: \"Bolivia, Plurinational State of\", value: \"BO\", disabled: false },\n { name: \"Bonaire, Sint Eustatius and Saba\", value: \"BQ\", disabled: false },\n { name: \"Bosnia and Herzegovina\", value: \"BA\", disabled: false },\n { name: \"Botswana\", value: \"BW\", disabled: false },\n { name: \"Bouvet Island\", value: \"BV\", disabled: false },\n { name: \"Brazil\", value: \"BR\", disabled: false },\n { name: \"British Indian Ocean Territory\", value: \"IO\", disabled: false },\n { name: \"Brunei Darussalam\", value: \"BN\", disabled: false },\n { name: \"Bulgaria\", value: \"BG\", disabled: false },\n { name: \"Burkina Faso\", value: \"BF\", disabled: false },\n { name: \"Burundi\", value: \"BI\", disabled: false },\n { name: \"Cambodia\", value: \"KH\", disabled: false },\n { name: \"Cameroon\", value: \"CM\", disabled: false },\n { name: \"Cape Verde\", value: \"CV\", disabled: false },\n { name: \"Cayman Islands\", value: \"KY\", disabled: false },\n { name: \"Central African Republic\", value: \"CF\", disabled: false },\n { name: \"Chad\", value: \"TD\", disabled: false },\n { name: \"Chile\", value: \"CL\", disabled: false },\n { name: \"Christmas Island\", value: \"CX\", disabled: false },\n { name: \"Cocos (Keeling) Islands\", value: \"CC\", disabled: false },\n { name: \"Colombia\", value: \"CO\", disabled: false },\n { name: \"Comoros\", value: \"KM\", disabled: false },\n { name: \"Congo\", value: \"CG\", disabled: false },\n { name: \"Congo, the Democratic Republic of the\", value: \"CD\", disabled: false },\n { name: \"Cook Islands\", value: \"CK\", disabled: false },\n { name: \"Costa Rica\", value: \"CR\", disabled: false },\n { name: \"Côte d'Ivoire\", value: \"CI\", disabled: false },\n { name: \"Croatia\", value: \"HR\", disabled: false },\n { name: \"Cuba\", value: \"CU\", disabled: false },\n { name: \"Curaçao\", value: \"CW\", disabled: false },\n { name: \"Cyprus\", value: \"CY\", disabled: false },\n { name: \"Czech Republic\", value: \"CZ\", disabled: false },\n { name: \"Denmark\", value: \"DK\", disabled: false },\n { name: \"Djibouti\", value: \"DJ\", disabled: false },\n { name: \"Dominica\", value: \"DM\", disabled: false },\n { name: \"Dominican Republic\", value: \"DO\", disabled: false },\n { name: \"Ecuador\", value: \"EC\", disabled: false },\n { name: \"Egypt\", value: \"EG\", disabled: false },\n { name: \"El Salvador\", value: \"SV\", disabled: false },\n { name: \"Equatorial Guinea\", value: \"GQ\", disabled: false },\n { name: \"Eritrea\", value: \"ER\", disabled: false },\n { name: \"Estonia\", value: \"EE\", disabled: false },\n { name: \"Ethiopia\", value: \"ET\", disabled: false },\n { name: \"Falkland Islands (Malvinas)\", value: \"FK\", disabled: false },\n { name: \"Faroe Islands\", value: \"FO\", disabled: false },\n { name: \"Fiji\", value: \"FJ\", disabled: false },\n { name: \"Finland\", value: \"FI\", disabled: false },\n { name: \"French Guiana\", value: \"GF\", disabled: false },\n { name: \"French Polynesia\", value: \"PF\", disabled: false },\n { name: \"French Southern Territories\", value: \"TF\", disabled: false },\n { name: \"Gabon\", value: \"GA\", disabled: false },\n { name: \"Gambia\", value: \"GM\", disabled: false },\n { name: \"Georgia\", value: \"GE\", disabled: false },\n { name: \"Ghana\", value: \"GH\", disabled: false },\n { name: \"Gibraltar\", value: \"GI\", disabled: false },\n { name: \"Greece\", value: \"GR\", disabled: false },\n { name: \"Greenland\", value: \"GL\", disabled: false },\n { name: \"Grenada\", value: \"GD\", disabled: false },\n { name: \"Guadeloupe\", value: \"GP\", disabled: false },\n { name: \"Guam\", value: \"GU\", disabled: false },\n { name: \"Guatemala\", value: \"GT\", disabled: false },\n { name: \"Guernsey\", value: \"GG\", disabled: false },\n { name: \"Guinea\", value: \"GN\", disabled: false },\n { name: \"Guinea-Bissau\", value: \"GW\", disabled: false },\n { name: \"Guyana\", value: \"GY\", disabled: false },\n { name: \"Haiti\", value: \"HT\", disabled: false },\n { name: \"Heard Island and McDonald Islands\", value: \"HM\", disabled: false },\n { name: \"Holy See (Vatican City State)\", value: \"VA\", disabled: false },\n { name: \"Honduras\", value: \"HN\", disabled: false },\n { name: \"Hong Kong\", value: \"HK\", disabled: false },\n { name: \"Hungary\", value: \"HU\", disabled: false },\n { name: \"Iceland\", value: \"IS\", disabled: false },\n { name: \"Indonesia\", value: \"ID\", disabled: false },\n { name: \"Iran, Islamic Republic of\", value: \"IR\", disabled: false },\n { name: \"Iraq\", value: \"IQ\", disabled: false },\n { name: \"Ireland\", value: \"IE\", disabled: false },\n { name: \"Isle of Man\", value: \"IM\", disabled: false },\n { name: \"Israel\", value: \"IL\", disabled: false },\n { name: \"Italy\", value: \"IT\", disabled: false },\n { name: \"Jamaica\", value: \"JM\", disabled: false },\n { name: \"Japan\", value: \"JP\", disabled: false },\n { name: \"Jersey\", value: \"JE\", disabled: false },\n { name: \"Jordan\", value: \"JO\", disabled: false },\n { name: \"Kazakhstan\", value: \"KZ\", disabled: false },\n { name: \"Kenya\", value: \"KE\", disabled: false },\n { name: \"Kiribati\", value: \"KI\", disabled: false },\n { name: \"Korea, Democratic People's Republic of\", value: \"KP\", disabled: false },\n { name: \"Korea, Republic of\", value: \"KR\", disabled: false },\n { name: \"Kuwait\", value: \"KW\", disabled: false },\n { name: \"Kyrgyzstan\", value: \"KG\", disabled: false },\n { name: \"Lao People's Democratic Republic\", value: \"LA\", disabled: false },\n { name: \"Latvia\", value: \"LV\", disabled: false },\n { name: \"Lebanon\", value: \"LB\", disabled: false },\n { name: \"Lesotho\", value: \"LS\", disabled: false },\n { name: \"Liberia\", value: \"LR\", disabled: false },\n { name: \"Libya\", value: \"LY\", disabled: false },\n { name: \"Liechtenstein\", value: \"LI\", disabled: false },\n { name: \"Lithuania\", value: \"LT\", disabled: false },\n { name: \"Luxembourg\", value: \"LU\", disabled: false },\n { name: \"Macao\", value: \"MO\", disabled: false },\n { name: \"Macedonia, the former Yugoslav Republic of\", value: \"MK\", disabled: false },\n { name: \"Madagascar\", value: \"MG\", disabled: false },\n { name: \"Malawi\", value: \"MW\", disabled: false },\n { name: \"Malaysia\", value: \"MY\", disabled: false },\n { name: \"Maldives\", value: \"MV\", disabled: false },\n { name: \"Mali\", value: \"ML\", disabled: false },\n { name: \"Malta\", value: \"MT\", disabled: false },\n { name: \"Marshall Islands\", value: \"MH\", disabled: false },\n { name: \"Martinique\", value: \"MQ\", disabled: false },\n { name: \"Mauritania\", value: \"MR\", disabled: false },\n { name: \"Mauritius\", value: \"MU\", disabled: false },\n { name: \"Mayotte\", value: \"YT\", disabled: false },\n { name: \"Mexico\", value: \"MX\", disabled: false },\n { name: \"Micronesia, Federated States of\", value: \"FM\", disabled: false },\n { name: \"Moldova, Republic of\", value: \"MD\", disabled: false },\n { name: \"Monaco\", value: \"MC\", disabled: false },\n { name: \"Mongolia\", value: \"MN\", disabled: false },\n { name: \"Montenegro\", value: \"ME\", disabled: false },\n { name: \"Montserrat\", value: \"MS\", disabled: false },\n { name: \"Morocco\", value: \"MA\", disabled: false },\n { name: \"Mozambique\", value: \"MZ\", disabled: false },\n { name: \"Myanmar\", value: \"MM\", disabled: false },\n { name: \"Namibia\", value: \"NA\", disabled: false },\n { name: \"Nauru\", value: \"NR\", disabled: false },\n { name: \"Nepal\", value: \"NP\", disabled: false },\n { name: \"Netherlands\", value: \"NL\", disabled: false },\n { name: \"New Caledonia\", value: \"NC\", disabled: false },\n { name: \"New Zealand\", value: \"NZ\", disabled: false },\n { name: \"Nicaragua\", value: \"NI\", disabled: false },\n { name: \"Niger\", value: \"NE\", disabled: false },\n { name: \"Nigeria\", value: \"NG\", disabled: false },\n { name: \"Niue\", value: \"NU\", disabled: false },\n { name: \"Norfolk Island\", value: \"NF\", disabled: false },\n { name: \"Northern Mariana Islands\", value: \"MP\", disabled: false },\n { name: \"Norway\", value: \"NO\", disabled: false },\n { name: \"Oman\", value: \"OM\", disabled: false },\n { name: \"Pakistan\", value: \"PK\", disabled: false },\n { name: \"Palau\", value: \"PW\", disabled: false },\n { name: \"Palestinian Territory, Occupied\", value: \"PS\", disabled: false },\n { name: \"Panama\", value: \"PA\", disabled: false },\n { name: \"Papua New Guinea\", value: \"PG\", disabled: false },\n { name: \"Paraguay\", value: \"PY\", disabled: false },\n { name: \"Peru\", value: \"PE\", disabled: false },\n { name: \"Philippines\", value: \"PH\", disabled: false },\n { name: \"Pitcairn\", value: \"PN\", disabled: false },\n { name: \"Poland\", value: \"PL\", disabled: false },\n { name: \"Portugal\", value: \"PT\", disabled: false },\n { name: \"Puerto Rico\", value: \"PR\", disabled: false },\n { name: \"Qatar\", value: \"QA\", disabled: false },\n { name: \"Réunion\", value: \"RE\", disabled: false },\n { name: \"Romania\", value: \"RO\", disabled: false },\n { name: \"Russian Federation\", value: \"RU\", disabled: false },\n { name: \"Rwanda\", value: \"RW\", disabled: false },\n { name: \"Saint Barthélemy\", value: \"BL\", disabled: false },\n { name: \"Saint Helena, Ascension and Tristan da Cunha\", value: \"SH\", disabled: false },\n { name: \"Saint Kitts and Nevis\", value: \"KN\", disabled: false },\n { name: \"Saint Lucia\", value: \"LC\", disabled: false },\n { name: \"Saint Martin (French part)\", value: \"MF\", disabled: false },\n { name: \"Saint Pierre and Miquelon\", value: \"PM\", disabled: false },\n { name: \"Saint Vincent and the Grenadines\", value: \"VC\", disabled: false },\n { name: \"Samoa\", value: \"WS\", disabled: false },\n { name: \"San Marino\", value: \"SM\", disabled: false },\n { name: \"Sao Tome and Principe\", value: \"ST\", disabled: false },\n { name: \"Saudi Arabia\", value: \"SA\", disabled: false },\n { name: \"Senegal\", value: \"SN\", disabled: false },\n { name: \"Serbia\", value: \"RS\", disabled: false },\n { name: \"Seychelles\", value: \"SC\", disabled: false },\n { name: \"Sierra Leone\", value: \"SL\", disabled: false },\n { name: \"Singapore\", value: \"SG\", disabled: false },\n { name: \"Sint Maarten (Dutch part)\", value: \"SX\", disabled: false },\n { name: \"Slovakia\", value: \"SK\", disabled: false },\n { name: \"Slovenia\", value: \"SI\", disabled: false },\n { name: \"Solomon Islands\", value: \"SB\", disabled: false },\n { name: \"Somalia\", value: \"SO\", disabled: false },\n { name: \"South Africa\", value: \"ZA\", disabled: false },\n { name: \"South Georgia and the South Sandwich Islands\", value: \"GS\", disabled: false },\n { name: \"South Sudan\", value: \"SS\", disabled: false },\n { name: \"Spain\", value: \"ES\", disabled: false },\n { name: \"Sri Lanka\", value: \"LK\", disabled: false },\n { name: \"Sudan\", value: \"SD\", disabled: false },\n { name: \"Suriname\", value: \"SR\", disabled: false },\n { name: \"Svalbard and Jan Mayen\", value: \"SJ\", disabled: false },\n { name: \"Swaziland\", value: \"SZ\", disabled: false },\n { name: \"Sweden\", value: \"SE\", disabled: false },\n { name: \"Switzerland\", value: \"CH\", disabled: false },\n { name: \"Syrian Arab Republic\", value: \"SY\", disabled: false },\n { name: \"Taiwan\", value: \"TW\", disabled: false },\n { name: \"Tajikistan\", value: \"TJ\", disabled: false },\n { name: \"Tanzania, United Republic of\", value: \"TZ\", disabled: false },\n { name: \"Thailand\", value: \"TH\", disabled: false },\n { name: \"Timor-Leste\", value: \"TL\", disabled: false },\n { name: \"Togo\", value: \"TG\", disabled: false },\n { name: \"Tokelau\", value: \"TK\", disabled: false },\n { name: \"Tonga\", value: \"TO\", disabled: false },\n { name: \"Trinidad and Tobago\", value: \"TT\", disabled: false },\n { name: \"Tunisia\", value: \"TN\", disabled: false },\n { name: \"Turkey\", value: \"TR\", disabled: false },\n { name: \"Turkmenistan\", value: \"TM\", disabled: false },\n { name: \"Turks and Caicos Islands\", value: \"TC\", disabled: false },\n { name: \"Tuvalu\", value: \"TV\", disabled: false },\n { name: \"Uganda\", value: \"UG\", disabled: false },\n { name: \"Ukraine\", value: \"UA\", disabled: false },\n { name: \"United Arab Emirates\", value: \"AE\", disabled: false },\n { name: \"United States Minor Outlying Islands\", value: \"UM\", disabled: false },\n { name: \"Uruguay\", value: \"UY\", disabled: false },\n { name: \"Uzbekistan\", value: \"UZ\", disabled: false },\n { name: \"Vanuatu\", value: \"VU\", disabled: false },\n { name: \"Venezuela, Bolivarian Republic of\", value: \"VE\", disabled: false },\n { name: \"Viet Nam\", value: \"VN\", disabled: false },\n { name: \"Virgin Islands, British\", value: \"VG\", disabled: false },\n { name: \"Virgin Islands, U.S.\", value: \"VI\", disabled: false },\n { name: \"Wallis and Futuna\", value: \"WF\", disabled: false },\n { name: \"Western Sahara\", value: \"EH\", disabled: false },\n { name: \"Yemen\", value: \"YE\", disabled: false },\n { name: \"Zambia\", value: \"ZM\", disabled: false },\n { name: \"Zimbabwe\", value: \"ZW\", disabled: false },\n ];\n taxRates: TaxRateResponse[];\n\n constructor(\n private apiService: ApiService,\n private route: ActivatedRoute,\n private logService: LogService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n ) {}\n\n get country(): string {\n return this.taxFormGroup.get(\"country\").value;\n }\n\n set country(country: string) {\n this.taxFormGroup.get(\"country\").setValue(country);\n }\n\n get postalCode(): string {\n return this.taxFormGroup.get(\"postalCode\").value;\n }\n\n set postalCode(postalCode: string) {\n this.taxFormGroup.get(\"postalCode\").setValue(postalCode);\n }\n\n get includeTaxId(): boolean {\n return this.taxFormGroup.get(\"includeTaxId\").value;\n }\n\n set includeTaxId(includeTaxId: boolean) {\n this.taxFormGroup.get(\"includeTaxId\").setValue(includeTaxId);\n }\n\n get taxId(): string {\n return this.taxFormGroup.get(\"taxId\").value;\n }\n\n set taxId(taxId: string) {\n this.taxFormGroup.get(\"taxId\").setValue(taxId);\n }\n\n get line1(): string {\n return this.taxFormGroup.get(\"line1\").value;\n }\n\n set line1(line1: string) {\n this.taxFormGroup.get(\"line1\").setValue(line1);\n }\n\n get line2(): string {\n return this.taxFormGroup.get(\"line2\").value;\n }\n\n set line2(line2: string) {\n this.taxFormGroup.get(\"line2\").setValue(line2);\n }\n\n get city(): string {\n return this.taxFormGroup.get(\"city\").value;\n }\n\n set city(city: string) {\n this.taxFormGroup.get(\"city\").setValue(city);\n }\n\n get state(): string {\n return this.taxFormGroup.get(\"state\").value;\n }\n\n set state(state: string) {\n this.taxFormGroup.get(\"state\").setValue(state);\n }\n\n async ngOnInit() {\n // Provider setup\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.subscribe((params) => {\n this.providerId = params.providerId;\n });\n\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.parent.params.subscribe(async (params) => {\n this.organizationId = params.organizationId;\n if (this.organizationId) {\n try {\n const taxInfo = await this.organizationApiService.getTaxInfo(this.organizationId);\n if (taxInfo) {\n this.taxId = taxInfo.taxId;\n this.state = taxInfo.state;\n this.line1 = taxInfo.line1;\n this.line2 = taxInfo.line2;\n this.city = taxInfo.city;\n this.state = taxInfo.state;\n this.postalCode = taxInfo.postalCode;\n this.country = taxInfo.country || \"US\";\n this.includeTaxId =\n this.countrySupportsTax(this.country) &&\n (!!taxInfo.taxId ||\n !!taxInfo.line1 ||\n !!taxInfo.line2 ||\n !!taxInfo.city ||\n !!taxInfo.state);\n this.setTaxInfoObject();\n }\n } catch (e) {\n this.logService.error(e);\n }\n } else {\n try {\n const taxInfo = await this.apiService.getTaxInfo();\n if (taxInfo) {\n this.postalCode = taxInfo.postalCode;\n this.country = taxInfo.country || \"US\";\n }\n this.setTaxInfoObject();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n if (this.country === \"US\") {\n this.taxFormGroup.get(\"postalCode\").setValidators([Validators.required]);\n this.taxFormGroup.get(\"postalCode\").updateValueAndValidity();\n }\n\n if (this.country !== \"US\") {\n this.onCountryChanged.emit();\n }\n });\n\n this.taxFormGroup\n .get(\"country\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((value) => {\n if (value === \"US\") {\n this.taxFormGroup.get(\"postalCode\").setValidators([Validators.required]);\n } else {\n this.taxFormGroup.get(\"postalCode\").clearValidators();\n }\n this.taxFormGroup.get(\"postalCode\").updateValueAndValidity();\n this.setTaxInfoObject();\n this.changeCountry();\n });\n\n try {\n const taxRates = await this.apiService.getTaxRates();\n if (taxRates) {\n this.taxRates = taxRates.data;\n }\n } catch (e) {\n this.logService.error(e);\n } finally {\n this.loading = false;\n }\n }\n\n get taxRate() {\n if (this.taxRates != null) {\n const localTaxRate = this.taxRates.find(\n (x) => x.country === this.country && x.postalCode === this.postalCode,\n );\n return localTaxRate?.rate ?? null;\n }\n }\n\n setTaxInfoObject() {\n this.taxInfo.country = this.country;\n this.taxInfo.postalCode = this.postalCode;\n this.taxInfo.includeTaxId = this.includeTaxId;\n this.taxInfo.taxId = this.taxId;\n this.taxInfo.line1 = this.line1;\n this.taxInfo.line2 = this.line2;\n this.taxInfo.city = this.city;\n this.taxInfo.state = this.state;\n }\n\n get showTaxIdCheckbox() {\n return (\n (this.organizationId || this.providerId) &&\n this.country !== \"US\" &&\n this.countrySupportsTax(this.taxInfo.country)\n );\n }\n\n get showTaxIdFields() {\n return (\n (this.organizationId || this.providerId) &&\n this.includeTaxId &&\n this.countrySupportsTax(this.country)\n );\n }\n\n getTaxInfoRequest(): TaxInfoUpdateRequest {\n if (this.organizationId || this.providerId) {\n const request = new ExpandedTaxInfoUpdateRequest();\n request.country = this.country;\n request.postalCode = this.postalCode;\n\n if (this.includeTaxId) {\n request.taxId = this.taxId;\n request.line1 = this.line1;\n request.line2 = this.line2;\n request.city = this.city;\n request.state = this.state;\n } else {\n request.taxId = null;\n request.line1 = null;\n request.line2 = null;\n request.city = null;\n request.state = null;\n }\n return request;\n } else {\n const request = new TaxInfoUpdateRequest();\n request.postalCode = this.postalCode;\n request.country = this.country;\n return request;\n }\n }\n\n submitTaxInfo(): Promise {\n this.taxFormGroup.updateValueAndValidity();\n this.taxFormGroup.markAllAsTouched();\n const request = this.getTaxInfoRequest();\n return this.organizationId\n ? this.organizationApiService.updateTaxInfo(\n this.organizationId,\n request as ExpandedTaxInfoUpdateRequest,\n )\n : this.apiService.putTaxInfo(request);\n }\n\n changeCountry() {\n if (!this.countrySupportsTax(this.country)) {\n this.includeTaxId = false;\n this.taxId = null;\n this.line1 = null;\n this.line2 = null;\n this.city = null;\n this.state = null;\n this.setTaxInfoObject();\n }\n this.onCountryChanged.emit();\n }\n\n countrySupportsTax(countryCode: string) {\n return this.taxSupportedCountryCodes.includes(countryCode);\n }\n\n private taxSupportedCountryCodes: string[] = [\n \"CN\",\n \"FR\",\n \"DE\",\n \"CA\",\n \"GB\",\n \"AU\",\n \"IN\",\n \"AD\",\n \"AR\",\n \"AT\",\n \"BE\",\n \"BO\",\n \"BR\",\n \"BG\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"HR\",\n \"CY\",\n \"CZ\",\n \"DK\",\n \"DO\",\n \"EC\",\n \"EG\",\n \"SV\",\n \"EE\",\n \"FI\",\n \"GE\",\n \"GR\",\n \"HK\",\n \"HU\",\n \"IS\",\n \"ID\",\n \"IQ\",\n \"IE\",\n \"IL\",\n \"IT\",\n \"JP\",\n \"KE\",\n \"KR\",\n \"LV\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"MY\",\n \"MT\",\n \"MX\",\n \"NL\",\n \"NZ\",\n \"NO\",\n \"PE\",\n \"PH\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"RU\",\n \"SA\",\n \"RS\",\n \"SG\",\n \"SK\",\n \"SI\",\n \"ZA\",\n \"ES\",\n \"SE\",\n \"CH\",\n \"TW\",\n \"TH\",\n \"TR\",\n \"UA\",\n \"AE\",\n \"UY\",\n \"VE\",\n \"VN\",\n ];\n}\n","import { Directive, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom } from \"rxjs\";\nimport { first, switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive()\nexport abstract class BaseAcceptComponent implements OnInit {\n loading = true;\n authed = false;\n email: string;\n actionPromise: Promise;\n\n protected requiredParameters: string[] = [];\n protected failedShortMessage = \"inviteAcceptFailedShort\";\n protected failedMessage = \"inviteAcceptFailed\";\n\n // TODO: remove when email verification flag is removed\n registerRoute$ = this.registerRouteService.registerRoute$();\n\n private destroy$ = new Subject();\n\n constructor(\n protected router: Router,\n protected platformUtilService: PlatformUtilsService,\n protected i18nService: I18nService,\n protected route: ActivatedRoute,\n protected authService: AuthService,\n protected registerRouteService: RegisterRouteService,\n ) {}\n\n abstract authedHandler(qParams: Params): Promise;\n abstract unauthedHandler(qParams: Params): Promise;\n\n async ngOnInit() {\n this.route.queryParams\n .pipe(\n first(),\n switchMap(async (qParams) => {\n let error = this.requiredParameters.some(\n (e) => qParams?.[e] == null || qParams[e] === \"\",\n );\n let errorMessage: string = null;\n if (!error) {\n this.email = qParams.email;\n\n const status = await firstValueFrom(this.authService.activeAccountStatus$);\n if (status !== AuthenticationStatus.LoggedOut) {\n try {\n await this.authedHandler(qParams);\n } catch (e) {\n error = true;\n errorMessage = e.message;\n }\n } else {\n await this.unauthedHandler(qParams);\n }\n }\n\n if (error) {\n const message =\n errorMessage != null\n ? this.i18nService.t(this.failedShortMessage, errorMessage)\n : this.i18nService.t(this.failedMessage);\n this.platformUtilService.showToast(\"error\", null, message, { timeout: 10000 });\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n }\n\n this.loading = false;\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n}\n","import { Component, Input, OnDestroy } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\n\nimport { SharedModule } from \"../shared\";\n\ntype SizeTypes = \"xlarge\" | \"large\" | \"default\" | \"small\" | \"xsmall\";\n@Component({\n selector: \"dynamic-avatar\",\n standalone: true,\n imports: [SharedModule],\n template: `\n \n \n `,\n})\nexport class DynamicAvatarComponent implements OnDestroy {\n @Input() border = false;\n @Input() id: string;\n @Input() text: string;\n @Input() title: string;\n @Input() size: SizeTypes = \"default\";\n private destroy$ = new Subject();\n\n color$ = this.avatarService.avatarColor$;\n\n constructor(private avatarService: AvatarService) {\n if (this.text) {\n this.text = this.text.toUpperCase();\n }\n }\n\n async ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../app/shared\";\n\nimport { EnvironmentSelectorComponent } from \"./environment-selector.component\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [EnvironmentSelectorComponent],\n exports: [EnvironmentSelectorComponent],\n})\nexport class EnvironmentSelectorModule {}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class ApiKeyResponse extends BaseResponse {\n apiKey: string;\n revisionDate: Date;\n\n constructor(response: any) {\n super(response);\n this.apiKey = this.getResponseProperty(\"ApiKey\");\n this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { SsoConfigApi } from \"../api/sso-config.api\";\n\nexport class OrganizationSsoResponse extends BaseResponse {\n enabled: boolean;\n identifier: string;\n data: SsoConfigApi;\n urls: SsoUrls;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.identifier = this.getResponseProperty(\"Identifier\");\n this.data =\n this.getResponseProperty(\"Data\") != null\n ? new SsoConfigApi(this.getResponseProperty(\"Data\"))\n : null;\n this.urls = new SsoUrls(this.getResponseProperty(\"Urls\"));\n }\n}\n\nclass SsoUrls extends BaseResponse {\n callbackPath: string;\n signedOutCallbackPath: string;\n spEntityId: string;\n spEntityIdStatic: string;\n spMetadataUrl: string;\n spAcsUrl: string;\n\n constructor(response: any) {\n super(response);\n this.callbackPath = this.getResponseProperty(\"CallbackPath\");\n this.signedOutCallbackPath = this.getResponseProperty(\"SignedOutCallbackPath\");\n this.spEntityId = this.getResponseProperty(\"SpEntityId\");\n this.spEntityIdStatic = this.getResponseProperty(\"SpEntityIdStatic\");\n this.spMetadataUrl = this.getResponseProperty(\"SpMetadataUrl\");\n this.spAcsUrl = this.getResponseProperty(\"SpAcsUrl\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { ProfileResponse } from \"../../../models/response/profile.response\";\n\nexport class PaymentResponse extends BaseResponse {\n userProfile: ProfileResponse;\n paymentIntentClientSecret: string;\n success: boolean;\n\n constructor(response: any) {\n super(response);\n const userProfile = this.getResponseProperty(\"UserProfile\");\n if (userProfile != null) {\n this.userProfile = new ProfileResponse(userProfile);\n }\n this.paymentIntentClientSecret = this.getResponseProperty(\"PaymentIntentClientSecret\");\n this.success = this.getResponseProperty(\"Success\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationApiKeyType } from \"../../enums\";\n\nexport class OrganizationApiKeyInformationResponse extends BaseResponse {\n keyType: OrganizationApiKeyType;\n\n constructor(response: any) {\n super(response);\n this.keyType = this.getResponseProperty(\"KeyType\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationAutoEnrollStatusResponse extends BaseResponse {\n id: string;\n resetPasswordEnabled: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.resetPasswordEnabled = this.getResponseProperty(\"ResetPasswordEnabled\");\n }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class KeysResponse extends BaseResponse {\n privateKey: string;\n publicKey: string;\n\n constructor(response: any) {\n super(response);\n this.privateKey = this.getResponseProperty(\"PrivateKey\");\n this.publicKey = this.getResponseProperty(\"PublicKey\");\n }\n}\n","import { KeysResponse } from \"../../../models/response/keys.response\";\n\nexport class OrganizationKeysResponse extends KeysResponse {\n constructor(response: any) {\n super(response);\n }\n}\n","import { map, Observable, firstValueFrom } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { ORGANIZATIONS_DISK, StateProvider, UserKeyDefinition } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { InternalOrganizationServiceAbstraction } from \"../../abstractions/organization/organization.service.abstraction\";\nimport { OrganizationData } from \"../../models/data/organization.data\";\nimport { Organization } from \"../../models/domain/organization\";\n\n/**\n * The `KeyDefinition` for accessing organization lists in application state.\n * @todo Ideally this wouldn't require a `fromJSON()` call, but `OrganizationData`\n * has some properties that contain functions. This should probably get\n * cleaned up.\n */\nexport const ORGANIZATIONS = UserKeyDefinition.record(\n ORGANIZATIONS_DISK,\n \"organizations\",\n {\n deserializer: (obj: Jsonify) => OrganizationData.fromJSON(obj),\n clearOn: [\"logout\"],\n },\n);\n\n/**\n * Filter out organizations from an observable that __do not__ offer a\n * families-for-enterprise sponsorship to members.\n * @returns a function that can be used in `Observable` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToExcludeOrganizationsWithoutFamilySponsorshipSupport() {\n return map((orgs) => orgs.filter((o) => o.canManageSponsorships));\n}\n\n/**\n * Filter out organizations from an observable that the organization user\n * __is not__ a direct member of. This will exclude organizations only\n * accessible as a provider.\n * @returns a function that can be used in `Observable` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToExcludeProviderOrganizations() {\n return map((orgs) => orgs.filter((o) => o.isMember));\n}\n\n/**\n * Map an observable stream of organizations down to a boolean indicating\n * if any organizations exist (`orgs.length > 0`).\n * @returns a function that can be used in `Observable` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToBooleanHasAnyOrganizations() {\n return map((orgs) => orgs.length > 0);\n}\n\n/**\n * Map an observable stream of organizations down to a single organization.\n * @param `organizationId` The ID of the organization you'd like to subscribe to\n * @returns a function that can be used in `Observable` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToSingleOrganization(organizationId: string) {\n return map((orgs) => orgs?.find((o) => o.id === organizationId));\n}\n\nexport class OrganizationService implements InternalOrganizationServiceAbstraction {\n organizations$ = this.getOrganizationsFromState$();\n memberOrganizations$ = this.organizations$.pipe(mapToExcludeProviderOrganizations());\n\n constructor(private stateProvider: StateProvider) {}\n\n get$(id: string): Observable {\n return this.organizations$.pipe(mapToSingleOrganization(id));\n }\n\n getAll$(userId?: UserId): Observable {\n return this.getOrganizationsFromState$(userId);\n }\n\n async getAll(userId?: string): Promise {\n return await firstValueFrom(this.getOrganizationsFromState$(userId as UserId));\n }\n\n canManageSponsorships$ = this.organizations$.pipe(\n mapToExcludeOrganizationsWithoutFamilySponsorshipSupport(),\n mapToBooleanHasAnyOrganizations(),\n );\n\n async hasOrganizations(): Promise {\n return await firstValueFrom(this.organizations$.pipe(mapToBooleanHasAnyOrganizations()));\n }\n\n async upsert(organization: OrganizationData, userId?: UserId): Promise {\n await this.stateFor(userId).update((existingOrganizations) => {\n const organizations = existingOrganizations ?? {};\n organizations[organization.id] = organization;\n return organizations;\n });\n }\n\n async get(id: string): Promise {\n return await firstValueFrom(this.organizations$.pipe(mapToSingleOrganization(id)));\n }\n\n /**\n * @deprecated For the CLI only\n * @param id id of the organization\n */\n async getFromState(id: string): Promise {\n return await firstValueFrom(this.organizations$.pipe(mapToSingleOrganization(id)));\n }\n\n async replace(organizations: { [id: string]: OrganizationData }, userId?: UserId): Promise {\n await this.stateFor(userId).update(() => organizations);\n }\n\n // Ideally this method would be renamed to organizations$() and the\n // $organizations observable as it stands would be removed. This will\n // require updates to callers, and so this method exists as a temporary\n // workaround until we have time & a plan to update callers.\n //\n // It can be thought of as \"organizations$ but with a userId option\".\n private getOrganizationsFromState$(userId?: UserId): Observable {\n return this.stateFor(userId).state$.pipe(this.mapOrganizationRecordToArray());\n }\n\n /**\n * Accepts a record of `OrganizationData`, which is how we store the\n * organization list as a JSON object on disk, to an array of\n * `Organization`, which is how the data is published to callers of the\n * service.\n * @returns a function that can be used to pipe organization data from\n * stored state to an exposed object easily consumable by others.\n */\n private mapOrganizationRecordToArray() {\n return map, Organization[]>((orgs) =>\n Object.values(orgs ?? {})?.map((o) => new Organization(o)),\n );\n }\n\n /**\n * Fetches the organization list from on disk state for the specified user.\n * @param userId the user ID to fetch the organization list for. Defaults to\n * the currently active user.\n * @returns an observable of organization state as it is stored on disk.\n */\n private stateFor(userId?: UserId) {\n return userId\n ? this.stateProvider.getUser(userId, ORGANIZATIONS)\n : this.stateProvider.getActive(ORGANIZATIONS);\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationDomainSsoDetailsResponse extends BaseResponse {\n id: string;\n organizationIdentifier: string;\n ssoAvailable: boolean;\n domainName: string;\n verifiedDate?: Date;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"id\");\n this.organizationIdentifier = this.getResponseProperty(\"organizationIdentifier\");\n this.ssoAvailable = this.getResponseProperty(\"ssoAvailable\");\n this.domainName = this.getResponseProperty(\"domainName\");\n this.verifiedDate = this.getResponseProperty(\"verifiedDate\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationDomainResponse extends BaseResponse {\n id: string;\n organizationId: string;\n txt: string;\n domainName: string;\n creationDate: string;\n nextRunDate: string;\n jobRunCount: number;\n verifiedDate?: string;\n lastCheckedDate?: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"id\");\n this.organizationId = this.getResponseProperty(\"organizationId\");\n this.txt = this.getResponseProperty(\"txt\");\n this.domainName = this.getResponseProperty(\"domainName\");\n this.creationDate = this.getResponseProperty(\"creationDate\");\n this.nextRunDate = this.getResponseProperty(\"nextRunDate\");\n this.jobRunCount = this.getResponseProperty(\"jobRunCount\");\n this.verifiedDate = this.getResponseProperty(\"verifiedDate\");\n this.lastCheckedDate = this.getResponseProperty(\"lastCheckedDate\");\n }\n}\n","export class OrganizationDomainSsoDetailsRequest {\n constructor(public email: string) {}\n}\n","import { map } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport {\n ORGANIZATION_MANAGEMENT_PREFERENCES_DISK,\n StateProvider,\n UserKeyDefinition,\n} from \"../../../platform/state\";\nimport {\n OrganizationManagementPreference,\n OrganizationManagementPreferencesService,\n} from \"../../abstractions/organization-management-preferences/organization-management-preferences.service\";\n\n/**\n * This helper function can be used to quickly create `KeyDefinitions` that\n * target the `ORGANIZATION_MANAGEMENT_PREFERENCES_DISK` `StateDefinition`\n * and that have the default deserializer and `clearOn` options. Any\n * contenders for options to add to this service will likely use these same\n * options.\n */\nfunction buildKeyDefinition(key: string): UserKeyDefinition {\n return new UserKeyDefinition(ORGANIZATION_MANAGEMENT_PREFERENCES_DISK, key, {\n deserializer: (obj: Jsonify) => obj as T,\n clearOn: [\"logout\"],\n });\n}\n\nexport const AUTO_CONFIRM_FINGERPRINTS = buildKeyDefinition(\"autoConfirmFingerPrints\");\n\nexport class DefaultOrganizationManagementPreferencesService\n implements OrganizationManagementPreferencesService\n{\n constructor(private stateProvider: StateProvider) {}\n\n autoConfirmFingerPrints = this.buildOrganizationManagementPreference(\n AUTO_CONFIRM_FINGERPRINTS,\n false,\n );\n\n /**\n * Returns an `OrganizationManagementPreference` object for the provided\n * `KeyDefinition`. This object can then be used by callers to subscribe to\n * a given key, or set its value in state.\n */\n private buildOrganizationManagementPreference(\n keyDefinition: UserKeyDefinition,\n defaultValue: T,\n ) {\n return new OrganizationManagementPreference(\n this.getKeyFromState(keyDefinition).state$.pipe(map((x) => x ?? defaultValue)),\n this.setKeyInStateFn(keyDefinition),\n );\n }\n\n /**\n * Returns the full `ActiveUserState` value for a given `keyDefinition`\n * The returned value can then be called for subscription || set operations\n */\n private getKeyFromState(keyDefinition: UserKeyDefinition) {\n return this.stateProvider.getActive(keyDefinition);\n }\n\n /**\n * Returns a function that can be called to set the given `keyDefinition` in state\n */\n private setKeyInStateFn(keyDefinition: UserKeyDefinition) {\n return async (value: T) => {\n await this.getKeyFromState(keyDefinition).update(() => value);\n };\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { KdfType } from \"../../../../platform/enums\";\nimport { OrganizationUserStatusType, OrganizationUserType } from \"../../../enums\";\nimport { PermissionsApi } from \"../../../models/api/permissions.api\";\nimport { SelectionReadOnlyResponse } from \"../../../models/response/selection-read-only.response\";\n\nexport class OrganizationUserResponse extends BaseResponse {\n id: string;\n userId: string;\n type: OrganizationUserType;\n status: OrganizationUserStatusType;\n externalId: string;\n accessSecretsManager: boolean;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n hasMasterPassword: boolean;\n collections: SelectionReadOnlyResponse[] = [];\n groups: string[] = [];\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.type = this.getResponseProperty(\"Type\");\n this.status = this.getResponseProperty(\"Status\");\n this.permissions = new PermissionsApi(this.getResponseProperty(\"Permissions\"));\n this.externalId = this.getResponseProperty(\"ExternalId\");\n this.accessSecretsManager = this.getResponseProperty(\"AccessSecretsManager\");\n this.resetPasswordEnrolled = this.getResponseProperty(\"ResetPasswordEnrolled\");\n this.hasMasterPassword = this.getResponseProperty(\"HasMasterPassword\");\n\n const collections = this.getResponseProperty(\"Collections\");\n if (collections != null) {\n this.collections = collections.map((c: any) => new SelectionReadOnlyResponse(c));\n }\n const groups = this.getResponseProperty(\"Groups\");\n if (groups != null) {\n this.groups = groups;\n }\n }\n}\n\nexport class OrganizationUserUserDetailsResponse extends OrganizationUserResponse {\n name: string;\n email: string;\n avatarColor: string;\n twoFactorEnabled: boolean;\n usesKeyConnector: boolean;\n\n constructor(response: any) {\n super(response);\n this.name = this.getResponseProperty(\"Name\");\n this.email = this.getResponseProperty(\"Email\");\n this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n this.twoFactorEnabled = this.getResponseProperty(\"TwoFactorEnabled\");\n this.usesKeyConnector = this.getResponseProperty(\"UsesKeyConnector\") ?? false;\n }\n}\n\nexport class OrganizationUserDetailsResponse extends OrganizationUserResponse {\n constructor(response: any) {\n super(response);\n }\n}\n\nexport class OrganizationUserResetPasswordDetailsResponse extends BaseResponse {\n organizationUserId: string;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n resetPasswordKey: string;\n encryptedPrivateKey: string;\n\n constructor(response: any) {\n super(response);\n this.organizationUserId = this.getResponseProperty(\"OrganizationUserId\");\n this.kdf = this.getResponseProperty(\"Kdf\");\n this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n this.resetPasswordKey = this.getResponseProperty(\"ResetPasswordKey\");\n this.encryptedPrivateKey = this.getResponseProperty(\"EncryptedPrivateKey\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationUserBulkResponse extends BaseResponse {\n id: string;\n error: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.error = this.getResponseProperty(\"Error\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationUserBulkPublicKeyResponse extends BaseResponse {\n id: string;\n userId: string;\n key: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.key = this.getResponseProperty(\"Key\");\n }\n}\n","export class OrganizationUserBulkRequest {\n ids: string[];\n\n constructor(ids: string[]) {\n this.ids = ids == null ? [] : ids;\n }\n}\n","import Domain from \"../../../platform/models/domain/domain-base\";\n\nexport class ResetPasswordPolicyOptions extends Domain {\n autoEnrollEnabled = false;\n}\n","import { combineLatest, firstValueFrom, map, Observable, of } from \"rxjs\";\n\nimport { UserKeyDefinition, POLICIES_DISK, StateProvider } from \"../../../platform/state\";\nimport { PolicyId, UserId } from \"../../../types/guid\";\nimport { OrganizationService } from \"../../abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService as InternalPolicyServiceAbstraction } from \"../../abstractions/policy/policy.service.abstraction\";\nimport { OrganizationUserStatusType, PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Organization } from \"../../models/domain/organization\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { ResetPasswordPolicyOptions } from \"../../models/domain/reset-password-policy-options\";\n\nconst policyRecordToArray = (policiesMap: { [id: string]: PolicyData }) =>\n Object.values(policiesMap || {}).map((f) => new Policy(f));\n\nexport const POLICIES = UserKeyDefinition.record(POLICIES_DISK, \"policies\", {\n deserializer: (policyData) => policyData,\n clearOn: [\"logout\"],\n});\n\nexport class PolicyService implements InternalPolicyServiceAbstraction {\n private activeUserPolicyState = this.stateProvider.getActive(POLICIES);\n private activeUserPolicies$ = this.activeUserPolicyState.state$.pipe(\n map((policyData) => policyRecordToArray(policyData)),\n );\n\n policies$ = this.activeUserPolicies$;\n\n constructor(\n private stateProvider: StateProvider,\n private organizationService: OrganizationService,\n ) {}\n\n get$(policyType: PolicyType) {\n const filteredPolicies$ = this.activeUserPolicies$.pipe(\n map((policies) => policies.filter((p) => p.type === policyType)),\n );\n\n return combineLatest([filteredPolicies$, this.organizationService.organizations$]).pipe(\n map(\n ([policies, organizations]) =>\n this.enforcedPolicyFilter(policies, organizations)?.at(0) ?? null,\n ),\n );\n }\n\n getAll$(policyType: PolicyType, userId?: UserId) {\n const filteredPolicies$ = this.stateProvider.getUserState$(POLICIES, userId).pipe(\n map((policyData) => policyRecordToArray(policyData)),\n map((policies) => policies.filter((p) => p.type === policyType)),\n );\n\n return combineLatest([filteredPolicies$, this.organizationService.getAll$(userId)]).pipe(\n map(([policies, organizations]) => this.enforcedPolicyFilter(policies, organizations)),\n );\n }\n\n async getAll(policyType: PolicyType) {\n return await firstValueFrom(\n this.policies$.pipe(map((policies) => policies.filter((p) => p.type === policyType))),\n );\n }\n\n policyAppliesToActiveUser$(policyType: PolicyType) {\n return this.get$(policyType).pipe(map((policy) => policy != null));\n }\n\n async policyAppliesToUser(policyType: PolicyType) {\n return await firstValueFrom(this.policyAppliesToActiveUser$(policyType));\n }\n\n private enforcedPolicyFilter(policies: Policy[], organizations: Organization[]) {\n const orgDict = Object.fromEntries(organizations.map((o) => [o.id, o]));\n return policies.filter((policy) => {\n const organization = orgDict[policy.organizationId];\n\n // This shouldn't happen, i.e. the user should only have policies for orgs they are a member of\n // But if it does, err on the side of enforcing the policy\n if (organization == null) {\n return true;\n }\n\n return (\n policy.enabled &&\n organization.status >= OrganizationUserStatusType.Accepted &&\n organization.usePolicies &&\n !this.isExemptFromPolicy(policy.type, organization)\n );\n });\n }\n\n masterPasswordPolicyOptions$(policies?: Policy[]): Observable {\n const observable = policies ? of(policies) : this.policies$;\n return observable.pipe(\n map((obsPolicies) => {\n let enforcedOptions: MasterPasswordPolicyOptions = null;\n const filteredPolicies = obsPolicies.filter((p) => p.type === PolicyType.MasterPassword);\n\n if (filteredPolicies == null || filteredPolicies.length === 0) {\n return enforcedOptions;\n }\n\n filteredPolicies.forEach((currentPolicy) => {\n if (!currentPolicy.enabled || currentPolicy.data == null) {\n return;\n }\n\n if (enforcedOptions == null) {\n enforcedOptions = new MasterPasswordPolicyOptions();\n }\n\n if (\n currentPolicy.data.minComplexity != null &&\n currentPolicy.data.minComplexity > enforcedOptions.minComplexity\n ) {\n enforcedOptions.minComplexity = currentPolicy.data.minComplexity;\n }\n\n if (\n currentPolicy.data.minLength != null &&\n currentPolicy.data.minLength > enforcedOptions.minLength\n ) {\n enforcedOptions.minLength = currentPolicy.data.minLength;\n }\n\n if (currentPolicy.data.requireUpper) {\n enforcedOptions.requireUpper = true;\n }\n\n if (currentPolicy.data.requireLower) {\n enforcedOptions.requireLower = true;\n }\n\n if (currentPolicy.data.requireNumbers) {\n enforcedOptions.requireNumbers = true;\n }\n\n if (currentPolicy.data.requireSpecial) {\n enforcedOptions.requireSpecial = true;\n }\n\n if (currentPolicy.data.enforceOnLogin) {\n enforcedOptions.enforceOnLogin = true;\n }\n });\n\n return enforcedOptions;\n }),\n );\n }\n\n evaluateMasterPassword(\n passwordStrength: number,\n newPassword: string,\n enforcedPolicyOptions: MasterPasswordPolicyOptions,\n ): boolean {\n if (enforcedPolicyOptions == null) {\n return true;\n }\n\n if (\n enforcedPolicyOptions.minComplexity > 0 &&\n enforcedPolicyOptions.minComplexity > passwordStrength\n ) {\n return false;\n }\n\n if (\n enforcedPolicyOptions.minLength > 0 &&\n enforcedPolicyOptions.minLength > newPassword.length\n ) {\n return false;\n }\n\n if (enforcedPolicyOptions.requireUpper && newPassword.toLocaleLowerCase() === newPassword) {\n return false;\n }\n\n if (enforcedPolicyOptions.requireLower && newPassword.toLocaleUpperCase() === newPassword) {\n return false;\n }\n\n if (enforcedPolicyOptions.requireNumbers && !/[0-9]/.test(newPassword)) {\n return false;\n }\n\n // eslint-disable-next-line\n if (enforcedPolicyOptions.requireSpecial && !/[!@#$%\\^&*]/g.test(newPassword)) {\n return false;\n }\n\n return true;\n }\n\n getResetPasswordPolicyOptions(\n policies: Policy[],\n orgId: string,\n ): [ResetPasswordPolicyOptions, boolean] {\n const resetPasswordPolicyOptions = new ResetPasswordPolicyOptions();\n\n if (policies == null || orgId == null) {\n return [resetPasswordPolicyOptions, false];\n }\n\n const policy = policies.find(\n (p) => p.organizationId === orgId && p.type === PolicyType.ResetPassword && p.enabled,\n );\n resetPasswordPolicyOptions.autoEnrollEnabled = policy?.data?.autoEnrollEnabled ?? false;\n\n return [resetPasswordPolicyOptions, policy?.enabled ?? false];\n }\n\n async upsert(policy: PolicyData): Promise {\n await this.activeUserPolicyState.update((policies) => {\n policies ??= {};\n policies[policy.id] = policy;\n return policies;\n });\n }\n\n async replace(policies: { [id: string]: PolicyData }): Promise {\n await this.activeUserPolicyState.update(() => policies);\n }\n\n /**\n * Determines whether an orgUser is exempt from a specific policy because of their role\n * Generally orgUsers who can manage policies are exempt from them, but some policies are stricter\n */\n private isExemptFromPolicy(policyType: PolicyType, organization: Organization) {\n switch (policyType) {\n case PolicyType.MaximumVaultTimeout:\n // Max Vault Timeout applies to everyone except owners\n return organization.isOwner;\n case PolicyType.PasswordGenerator:\n // password generation policy applies to everyone\n return false;\n default:\n return organization.canManagePolicies;\n }\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { ProviderType } from \"../../../enums\";\n\nexport class ProviderResponse extends BaseResponse {\n id: string;\n name: string;\n businessName: string;\n billingEmail: string;\n creationDate: Date;\n type: ProviderType;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.name = this.getResponseProperty(\"Name\");\n this.businessName = this.getResponseProperty(\"BusinessName\");\n this.billingEmail = this.getResponseProperty(\"BillingEmail\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.type = this.getResponseProperty(\"Type\");\n }\n}\n","import { ProviderStatusType, ProviderUserStatusType, ProviderUserType } from \"../../enums\";\nimport { ProviderData } from \"../data/provider.data\";\n\nexport class Provider {\n id: string;\n name: string;\n status: ProviderUserStatusType;\n type: ProviderUserType;\n enabled: boolean;\n userId: string;\n useEvents: boolean;\n providerStatus: ProviderStatusType;\n\n constructor(obj?: ProviderData) {\n if (obj == null) {\n return;\n }\n\n this.id = obj.id;\n this.name = obj.name;\n this.status = obj.status;\n this.type = obj.type;\n this.enabled = obj.enabled;\n this.userId = obj.userId;\n this.useEvents = obj.useEvents;\n this.providerStatus = obj.providerStatus;\n }\n\n get canAccess() {\n if (this.isProviderAdmin) {\n return true;\n }\n return this.enabled && this.status === ProviderUserStatusType.Confirmed;\n }\n\n get canCreateOrganizations() {\n return this.enabled && this.isProviderAdmin;\n }\n\n get canManageUsers() {\n return this.isProviderAdmin;\n }\n\n get canAccessEventLogs() {\n return this.isProviderAdmin;\n }\n\n get isProviderAdmin() {\n return this.type === ProviderUserType.ProviderAdmin;\n }\n}\n","import { firstValueFrom, map, Observable, of, switchMap, take } from \"rxjs\";\n\nimport { PROVIDERS_DISK, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { ProviderService as ProviderServiceAbstraction } from \"../abstractions/provider.service\";\nimport { ProviderData } from \"../models/data/provider.data\";\nimport { Provider } from \"../models/domain/provider\";\n\nexport const PROVIDERS = UserKeyDefinition.record(PROVIDERS_DISK, \"providers\", {\n deserializer: (obj: ProviderData) => obj,\n clearOn: [\"logout\"],\n});\n\nfunction mapToSingleProvider(providerId: string) {\n return map((providers) => providers?.find((p) => p.id === providerId));\n}\n\nexport class ProviderService implements ProviderServiceAbstraction {\n constructor(private stateProvider: StateProvider) {}\n\n private providers$(userId?: UserId): Observable {\n // FIXME: Can be replaced with `getUserStateOrDefault$` if we weren't trying to pick this.\n return (\n userId != null\n ? this.stateProvider.getUser(userId, PROVIDERS).state$\n : this.stateProvider.activeUserId$.pipe(\n take(1),\n switchMap((userId) =>\n userId != null ? this.stateProvider.getUser(userId, PROVIDERS).state$ : of(null),\n ),\n )\n ).pipe(this.mapProviderRecordToArray());\n }\n\n private mapProviderRecordToArray() {\n return map, Provider[]>((providers) =>\n Object.values(providers ?? {})?.map((o) => new Provider(o)),\n );\n }\n\n get$(id: string): Observable {\n return this.providers$().pipe(mapToSingleProvider(id));\n }\n\n async get(id: string): Promise {\n return await firstValueFrom(this.providers$().pipe(mapToSingleProvider(id)));\n }\n\n async getAll(): Promise {\n return await firstValueFrom(this.providers$());\n }\n\n async save(providers: { [id: string]: ProviderData }, userId?: UserId) {\n await this.stateProvider.setUserState(PROVIDERS, providers, userId);\n }\n}\n","import { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\n\nexport abstract class UserVerificationApiServiceAbstraction {\n postAccountVerifyOTP: (request: VerifyOTPRequest) => Promise;\n postAccountRequestOTP: () => Promise;\n postAccountVerifyPassword: (\n request: SecretVerificationRequest,\n ) => Promise;\n}\n","import { CredentialAssertionOptionsResponse } from \"../../services/webauthn-login/response/credential-assertion-options.response\";\n\nexport class WebAuthnLoginApiServiceAbstraction {\n getCredentialAssertionOptions: () => Promise;\n}\n","import { combineLatestWith, map, distinctUntilChanged, shareReplay, combineLatest } from \"rxjs\";\n\nimport {\n AccountInfo,\n InternalAccountService,\n accountInfoEqual,\n} from \"../../auth/abstractions/account.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { MessagingService } from \"../../platform/abstractions/messaging.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport {\n ACCOUNT_DISK,\n GlobalState,\n GlobalStateProvider,\n KeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\n\nexport const ACCOUNT_ACCOUNTS = KeyDefinition.record(\n ACCOUNT_DISK,\n \"accounts\",\n {\n deserializer: (accountInfo) => accountInfo,\n },\n);\n\nexport const ACCOUNT_ACTIVE_ACCOUNT_ID = new KeyDefinition(ACCOUNT_DISK, \"activeAccountId\", {\n deserializer: (id: UserId) => id,\n});\n\nexport const ACCOUNT_ACTIVITY = KeyDefinition.record(ACCOUNT_DISK, \"activity\", {\n deserializer: (activity) => new Date(activity),\n});\n\nconst LOGGED_OUT_INFO: AccountInfo = {\n email: \"\",\n emailVerified: false,\n name: undefined,\n};\n\nexport class AccountServiceImplementation implements InternalAccountService {\n private accountsState: GlobalState>;\n private activeAccountIdState: GlobalState;\n\n accounts$;\n activeAccount$;\n accountActivity$;\n sortedUserIds$;\n nextUpAccount$;\n\n constructor(\n private messagingService: MessagingService,\n private logService: LogService,\n private globalStateProvider: GlobalStateProvider,\n ) {\n this.accountsState = this.globalStateProvider.get(ACCOUNT_ACCOUNTS);\n this.activeAccountIdState = this.globalStateProvider.get(ACCOUNT_ACTIVE_ACCOUNT_ID);\n\n this.accounts$ = this.accountsState.state$.pipe(\n map((accounts) => (accounts == null ? {} : accounts)),\n );\n this.activeAccount$ = this.activeAccountIdState.state$.pipe(\n combineLatestWith(this.accounts$),\n map(([id, accounts]) => (id ? { id, ...accounts[id] } : undefined)),\n distinctUntilChanged((a, b) => a?.id === b?.id && accountInfoEqual(a, b)),\n shareReplay({ bufferSize: 1, refCount: false }),\n );\n this.accountActivity$ = this.globalStateProvider\n .get(ACCOUNT_ACTIVITY)\n .state$.pipe(map((activity) => activity ?? {}));\n this.sortedUserIds$ = this.accountActivity$.pipe(\n map((activity) => {\n return Object.entries(activity)\n .map(([userId, lastActive]: [UserId, Date]) => ({ userId, lastActive }))\n .sort((a, b) => b.lastActive.getTime() - a.lastActive.getTime()) // later dates first\n .map((a) => a.userId);\n }),\n );\n this.nextUpAccount$ = combineLatest([\n this.accounts$,\n this.activeAccount$,\n this.sortedUserIds$,\n ]).pipe(\n map(([accounts, activeAccount, sortedUserIds]) => {\n const nextId = sortedUserIds.find((id) => id !== activeAccount?.id && accounts[id] != null);\n return nextId ? { id: nextId, ...accounts[nextId] } : null;\n }),\n );\n }\n\n async addAccount(userId: UserId, accountData: AccountInfo): Promise {\n if (!Utils.isGuid(userId)) {\n throw new Error(\"userId is required\");\n }\n\n await this.accountsState.update((accounts) => {\n accounts ||= {};\n accounts[userId] = accountData;\n return accounts;\n });\n await this.setAccountActivity(userId, new Date());\n }\n\n async setAccountName(userId: UserId, name: string): Promise {\n await this.setAccountInfo(userId, { name });\n }\n\n async setAccountEmail(userId: UserId, email: string): Promise {\n await this.setAccountInfo(userId, { email });\n }\n\n async setAccountEmailVerified(userId: UserId, emailVerified: boolean): Promise {\n await this.setAccountInfo(userId, { emailVerified });\n }\n\n async clean(userId: UserId) {\n await this.setAccountInfo(userId, LOGGED_OUT_INFO);\n await this.removeAccountActivity(userId);\n }\n\n async switchAccount(userId: UserId): Promise {\n let updateActivity = false;\n await this.activeAccountIdState.update(\n (_, accounts) => {\n if (userId == null) {\n // indicates no account is active\n return null;\n }\n\n if (accounts?.[userId] == null) {\n throw new Error(\"Account does not exist\");\n }\n updateActivity = true;\n return userId;\n },\n {\n combineLatestWith: this.accounts$,\n shouldUpdate: (id) => {\n // update only if userId changes\n return id !== userId;\n },\n },\n );\n\n if (updateActivity) {\n await this.setAccountActivity(userId, new Date());\n }\n }\n\n async setAccountActivity(userId: UserId, lastActivity: Date): Promise {\n if (!Utils.isGuid(userId)) {\n // only store for valid userIds\n return;\n }\n\n await this.globalStateProvider.get(ACCOUNT_ACTIVITY).update(\n (activity) => {\n activity ||= {};\n activity[userId] = lastActivity;\n return activity;\n },\n {\n shouldUpdate: (oldActivity) => oldActivity?.[userId]?.getTime() !== lastActivity?.getTime(),\n },\n );\n }\n\n async removeAccountActivity(userId: UserId): Promise {\n await this.globalStateProvider.get(ACCOUNT_ACTIVITY).update(\n (activity) => {\n if (activity == null) {\n return activity;\n }\n delete activity[userId];\n return activity;\n },\n { shouldUpdate: (oldActivity) => oldActivity?.[userId] != null },\n );\n }\n\n // TODO: update to use our own account status settings. Requires inverting direction of state service accounts flow\n async delete(): Promise {\n try {\n this.messagingService?.send(\"logout\");\n } catch (e) {\n this.logService.error(e);\n throw e;\n }\n }\n\n private async setAccountInfo(userId: UserId, update: Partial): Promise {\n function newAccountInfo(oldAccountInfo: AccountInfo): AccountInfo {\n return { ...oldAccountInfo, ...update };\n }\n await this.accountsState.update(\n (accounts) => {\n accounts[userId] = newAccountInfo(accounts[userId]);\n return accounts;\n },\n {\n // Avoid unnecessary updates\n // TODO: Faster comparison, maybe include a hash on the objects?\n shouldUpdate: (accounts) => {\n if (accounts?.[userId] == null) {\n throw new Error(\"Account does not exist\");\n }\n\n return !accountInfoEqual(accounts[userId], newAccountInfo(accounts[userId]));\n },\n },\n );\n }\n}\n","import { NotificationType } from \"../../enums\";\n\nimport { BaseResponse } from \"./base.response\";\n\nexport class NotificationResponse extends BaseResponse {\n contextId: string;\n type: NotificationType;\n payload: any;\n\n constructor(response: any) {\n super(response);\n this.contextId = this.getResponseProperty(\"ContextId\");\n this.type = this.getResponseProperty(\"Type\");\n\n const payload = this.getResponseProperty(\"Payload\");\n switch (this.type) {\n case NotificationType.SyncCipherCreate:\n case NotificationType.SyncCipherDelete:\n case NotificationType.SyncCipherUpdate:\n case NotificationType.SyncLoginDelete:\n this.payload = new SyncCipherNotification(payload);\n break;\n case NotificationType.SyncFolderCreate:\n case NotificationType.SyncFolderDelete:\n case NotificationType.SyncFolderUpdate:\n this.payload = new SyncFolderNotification(payload);\n break;\n case NotificationType.SyncVault:\n case NotificationType.SyncCiphers:\n case NotificationType.SyncOrganizations:\n case NotificationType.SyncOrgKeys:\n case NotificationType.SyncSettings:\n case NotificationType.LogOut:\n this.payload = new UserNotification(payload);\n break;\n case NotificationType.SyncSendCreate:\n case NotificationType.SyncSendUpdate:\n case NotificationType.SyncSendDelete:\n this.payload = new SyncSendNotification(payload);\n break;\n case NotificationType.AuthRequest:\n case NotificationType.AuthRequestResponse:\n this.payload = new AuthRequestPushNotification(payload);\n break;\n default:\n break;\n }\n }\n}\n\nexport class SyncCipherNotification extends BaseResponse {\n id: string;\n userId: string;\n organizationId: string;\n collectionIds: string[];\n revisionDate: Date;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.collectionIds = this.getResponseProperty(\"CollectionIds\");\n this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n }\n}\n\nexport class SyncFolderNotification extends BaseResponse {\n id: string;\n userId: string;\n revisionDate: Date;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n }\n}\n\nexport class UserNotification extends BaseResponse {\n userId: string;\n date: Date;\n\n constructor(response: any) {\n super(response);\n this.userId = this.getResponseProperty(\"UserId\");\n this.date = new Date(this.getResponseProperty(\"Date\"));\n }\n}\n\nexport class SyncSendNotification extends BaseResponse {\n id: string;\n userId: string;\n revisionDate: Date;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n }\n}\n\nexport class AuthRequestPushNotification extends BaseResponse {\n id: string;\n userId: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n }\n}\n","export class UpdateAvatarRequest {\n avatarColor: string;\n\n constructor(avatarColor: string) {\n this.avatarColor = avatarColor;\n }\n}\n","import { Observable } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { UpdateAvatarRequest } from \"../../models/request/update-avatar.request\";\nimport { AVATAR_DISK, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { AvatarService as AvatarServiceAbstraction } from \"../abstractions/avatar.service\";\n\nconst AVATAR_COLOR = new UserKeyDefinition(AVATAR_DISK, \"avatarColor\", {\n deserializer: (value) => value,\n clearOn: [],\n});\n\nexport class AvatarService implements AvatarServiceAbstraction {\n avatarColor$: Observable;\n\n constructor(\n private apiService: ApiService,\n private stateProvider: StateProvider,\n ) {\n this.avatarColor$ = this.stateProvider.getActive(AVATAR_COLOR).state$;\n }\n\n async setAvatarColor(color: string): Promise {\n const { avatarColor } = await this.apiService.putAvatar(new UpdateAvatarRequest(color));\n\n await this.stateProvider.setUserState(AVATAR_COLOR, avatarColor);\n }\n\n async setSyncAvatarColor(userId: UserId, color: string): Promise {\n await this.stateProvider.getUser(userId, AVATAR_COLOR).update(() => color);\n }\n\n getUserAvatarColor$(userId: UserId): Observable {\n return this.stateProvider.getUser(userId, AVATAR_COLOR).state$;\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateDevicesTrustRequest extends SecretVerificationRequest {\n currentDevice: DeviceKeysUpdateRequest;\n otherDevices: OtherDeviceKeysUpdateRequest[];\n}\n\nexport class DeviceKeysUpdateRequest {\n encryptedPublicKey: string;\n encryptedUserKey: string;\n}\n\nexport class OtherDeviceKeysUpdateRequest extends DeviceKeysUpdateRequest {\n id: string;\n}\n","import { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\n\nimport { AppIdService } from \"../../platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"../../platform/abstractions/crypto-function.service\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { AbstractStorageService } from \"../../platform/abstractions/storage.service\";\nimport { StorageLocation } from \"../../platform/enums\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { StorageOptions } from \"../../platform/models/domain/storage-options\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport { DEVICE_TRUST_DISK_LOCAL, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { UserKey, DeviceKey } from \"../../types/key\";\nimport { DeviceTrustServiceAbstraction } from \"../abstractions/device-trust.service.abstraction\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { DevicesApiServiceAbstraction } from \"../abstractions/devices-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport {\n DeviceKeysUpdateRequest,\n UpdateDevicesTrustRequest,\n} from \"../models/request/update-devices-trust.request\";\n\n/** Uses disk storage so that the device key can persist after log out and tab removal. */\nexport const DEVICE_KEY = new UserKeyDefinition(\n DEVICE_TRUST_DISK_LOCAL,\n \"deviceKey\",\n {\n deserializer: (deviceKey) =>\n deviceKey ? (SymmetricCryptoKey.fromJSON(deviceKey) as DeviceKey) : null,\n clearOn: [], // Device key is needed to log back into device, so we can't clear it automatically during lock or logout\n },\n);\n\n/** Uses disk storage so that the shouldTrustDevice bool can persist across login. */\nexport const SHOULD_TRUST_DEVICE = new UserKeyDefinition(\n DEVICE_TRUST_DISK_LOCAL,\n \"shouldTrustDevice\",\n {\n deserializer: (shouldTrustDevice) => shouldTrustDevice,\n clearOn: [], // Need to preserve the user setting, so we can't clear it automatically during lock or logout\n },\n);\n\nexport class DeviceTrustService implements DeviceTrustServiceAbstraction {\n private readonly platformSupportsSecureStorage =\n this.platformUtilsService.supportsSecureStorage();\n private readonly deviceKeySecureStorageKey: string = \"_deviceKey\";\n\n supportsDeviceTrust$: Observable;\n\n constructor(\n private keyGenerationService: KeyGenerationService,\n private cryptoFunctionService: CryptoFunctionService,\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n private appIdService: AppIdService,\n private devicesApiService: DevicesApiServiceAbstraction,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private stateProvider: StateProvider,\n private secureStorageService: AbstractStorageService,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n private logService: LogService,\n ) {\n this.supportsDeviceTrust$ = this.userDecryptionOptionsService.userDecryptionOptions$.pipe(\n map((options) => options?.trustedDeviceOption != null ?? false),\n );\n }\n\n /**\n * @description Retrieves the users choice to trust the device which can only happen after decryption\n * Note: this value should only be used once and then reset\n */\n async getShouldTrustDevice(userId: UserId): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot get should trust device.\");\n }\n\n const shouldTrustDevice = await firstValueFrom(\n this.stateProvider.getUserState$(SHOULD_TRUST_DEVICE, userId),\n );\n\n return shouldTrustDevice;\n }\n\n async setShouldTrustDevice(userId: UserId, value: boolean): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot set should trust device.\");\n }\n\n await this.stateProvider.setUserState(SHOULD_TRUST_DEVICE, value, userId);\n }\n\n async trustDeviceIfRequired(userId: UserId): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot trust device if required.\");\n }\n\n const shouldTrustDevice = await this.getShouldTrustDevice(userId);\n if (shouldTrustDevice) {\n await this.trustDevice(userId);\n // reset the trust choice\n await this.setShouldTrustDevice(userId, null);\n }\n }\n\n async trustDevice(userId: UserId): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot trust device.\");\n }\n\n // Attempt to get user key\n const userKey: UserKey = await this.cryptoService.getUserKey(userId);\n\n // If user key is not found, throw error\n if (!userKey) {\n throw new Error(\"User symmetric key not found\");\n }\n\n // Generate deviceKey\n const deviceKey = await this.makeDeviceKey();\n\n // Generate asymmetric RSA key pair: devicePrivateKey, devicePublicKey\n const [devicePublicKey, devicePrivateKey] =\n await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n\n const [\n devicePublicKeyEncryptedUserKey,\n userKeyEncryptedDevicePublicKey,\n deviceKeyEncryptedDevicePrivateKey,\n ] = await Promise.all([\n // Encrypt user key with the DevicePublicKey\n this.cryptoService.rsaEncrypt(userKey.key, devicePublicKey),\n\n // Encrypt devicePublicKey with user key\n this.encryptService.encrypt(devicePublicKey, userKey),\n\n // Encrypt devicePrivateKey with deviceKey\n this.encryptService.encrypt(devicePrivateKey, deviceKey),\n ]);\n\n // Send encrypted keys to server\n const deviceIdentifier = await this.appIdService.getAppId();\n const deviceResponse = await this.devicesApiService.updateTrustedDeviceKeys(\n deviceIdentifier,\n devicePublicKeyEncryptedUserKey.encryptedString,\n userKeyEncryptedDevicePublicKey.encryptedString,\n deviceKeyEncryptedDevicePrivateKey.encryptedString,\n );\n\n // store device key in local/secure storage if enc keys posted to server successfully\n await this.setDeviceKey(userId, deviceKey);\n\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deviceTrusted\"));\n\n return deviceResponse;\n }\n\n async rotateDevicesTrust(\n userId: UserId,\n newUserKey: UserKey,\n masterPasswordHash: string,\n ): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot rotate device's trust.\");\n }\n\n const currentDeviceKey = await this.getDeviceKey(userId);\n if (currentDeviceKey == null) {\n // If the current device doesn't have a device key available to it, then we can't\n // rotate any trust at all, so early return.\n return;\n }\n\n // At this point of rotating their keys, they should still have their old user key in state\n const oldUserKey = await firstValueFrom(this.cryptoService.userKey$(userId));\n\n const deviceIdentifier = await this.appIdService.getAppId();\n const secretVerificationRequest = new SecretVerificationRequest();\n secretVerificationRequest.masterPasswordHash = masterPasswordHash;\n\n // Get the keys that are used in rotating a devices keys from the server\n const currentDeviceKeys = await this.devicesApiService.getDeviceKeys(\n deviceIdentifier,\n secretVerificationRequest,\n );\n\n // Decrypt the existing device public key with the old user key\n const decryptedDevicePublicKey = await this.encryptService.decryptToBytes(\n currentDeviceKeys.encryptedPublicKey,\n oldUserKey,\n );\n\n // Encrypt the brand new user key with the now-decrypted public key for the device\n const encryptedNewUserKey = await this.cryptoService.rsaEncrypt(\n newUserKey.key,\n decryptedDevicePublicKey,\n );\n\n // Re-encrypt the device public key with the new user key\n const encryptedDevicePublicKey = await this.encryptService.encrypt(\n decryptedDevicePublicKey,\n newUserKey,\n );\n\n const currentDeviceUpdateRequest = new DeviceKeysUpdateRequest();\n currentDeviceUpdateRequest.encryptedUserKey = encryptedNewUserKey.encryptedString;\n currentDeviceUpdateRequest.encryptedPublicKey = encryptedDevicePublicKey.encryptedString;\n\n // TODO: For device management, allow this method to take an array of device ids that can be looped over and individually rotated\n // then it can be added to trustRequest.otherDevices.\n\n const trustRequest = new UpdateDevicesTrustRequest();\n trustRequest.masterPasswordHash = masterPasswordHash;\n trustRequest.currentDevice = currentDeviceUpdateRequest;\n trustRequest.otherDevices = [];\n\n await this.devicesApiService.updateTrust(trustRequest, deviceIdentifier);\n }\n\n async getDeviceKey(userId: UserId): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot get device key.\");\n }\n\n try {\n if (this.platformSupportsSecureStorage) {\n const deviceKeyB64 = await this.secureStorageService.get<\n ReturnType\n >(`${userId}${this.deviceKeySecureStorageKey}`, this.getSecureStorageOptions(userId));\n\n const deviceKey = SymmetricCryptoKey.fromJSON(deviceKeyB64) as DeviceKey;\n\n return deviceKey;\n }\n\n const deviceKey = await firstValueFrom(this.stateProvider.getUserState$(DEVICE_KEY, userId));\n\n return deviceKey;\n } catch (e) {\n this.logService.error(\"Failed to get device key\", e);\n }\n }\n\n private async setDeviceKey(userId: UserId, deviceKey: DeviceKey | null): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot set device key.\");\n }\n\n try {\n if (this.platformSupportsSecureStorage) {\n await this.secureStorageService.save(\n `${userId}${this.deviceKeySecureStorageKey}`,\n deviceKey,\n this.getSecureStorageOptions(userId),\n );\n return;\n }\n\n await this.stateProvider.setUserState(DEVICE_KEY, deviceKey?.toJSON(), userId);\n } catch (e) {\n this.logService.error(\"Failed to set device key\", e);\n }\n }\n\n private async makeDeviceKey(): Promise {\n // Create 512-bit device key\n const deviceKey = (await this.keyGenerationService.createKey(512)) as DeviceKey;\n\n return deviceKey;\n }\n\n async decryptUserKeyWithDeviceKey(\n userId: UserId,\n encryptedDevicePrivateKey: EncString,\n encryptedUserKey: EncString,\n deviceKey: DeviceKey,\n ): Promise {\n if (!userId) {\n throw new Error(\"UserId is required. Cannot decrypt user key with device key.\");\n }\n\n if (!deviceKey) {\n // User doesn't have a device key anymore so device is untrusted\n return null;\n }\n\n try {\n // attempt to decrypt encryptedDevicePrivateKey with device key\n const devicePrivateKey = await this.encryptService.decryptToBytes(\n encryptedDevicePrivateKey,\n deviceKey,\n );\n\n // Attempt to decrypt encryptedUserDataKey with devicePrivateKey\n const userKey = await this.cryptoService.rsaDecrypt(\n encryptedUserKey.encryptedString,\n devicePrivateKey,\n );\n\n return new SymmetricCryptoKey(userKey) as UserKey;\n } catch (e) {\n // If either decryption effort fails, we want to remove the device key\n this.logService.error(\"Failed to decrypt using device key. Removing device key.\");\n await this.setDeviceKey(userId, null);\n\n return null;\n }\n }\n\n private getSecureStorageOptions(userId: UserId): StorageOptions {\n return {\n storageLocation: StorageLocation.Disk,\n useSecureStorage: true,\n userId: userId,\n };\n }\n}\n","import { DeviceType } from \"../../../../enums\";\nimport { View } from \"../../../../models/view/view\";\nimport { DeviceResponse } from \"../responses/device.response\";\n\nexport class DeviceView implements View {\n id: string;\n userId: string;\n name: string;\n identifier: string;\n type: DeviceType;\n creationDate: string;\n revisionDate: string;\n\n constructor(deviceResponse: DeviceResponse) {\n Object.assign(this, deviceResponse);\n }\n}\n","import { DeviceType } from \"../../../../enums\";\nimport { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class DeviceResponse extends BaseResponse {\n id: string;\n userId: string;\n name: string;\n identifier: string;\n type: DeviceType;\n creationDate: string;\n revisionDate: string;\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.name = this.getResponseProperty(\"Name\");\n this.identifier = this.getResponseProperty(\"Identifier\");\n this.type = this.getResponseProperty(\"Type\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { DeviceType } from \"../../../enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\n\nexport class ProtectedDeviceResponse extends BaseResponse {\n constructor(response: Jsonify) {\n super(response);\n this.id = this.getResponseProperty(\"id\");\n this.name = this.getResponseProperty(\"name\");\n this.identifier = this.getResponseProperty(\"identifier\");\n this.type = this.getResponseProperty(\"type\");\n this.creationDate = new Date(this.getResponseProperty(\"creationDate\"));\n if (response.encryptedUserKey) {\n this.encryptedUserKey = new EncString(this.getResponseProperty(\"encryptedUserKey\"));\n }\n if (response.encryptedPublicKey) {\n this.encryptedPublicKey = new EncString(this.getResponseProperty(\"encryptedPublicKey\"));\n }\n }\n\n id: string;\n name: string;\n type: DeviceType;\n identifier: string;\n creationDate: Date;\n /**\n * Intended to be the users symmetric key that is encrypted in some form, the current way to encrypt this is with\n * the devices public key.\n */\n encryptedUserKey: EncString;\n /**\n * Intended to be the public key that was generated for a device upon trust and encrypted. Currenly encrypted using\n * a users symmetric key so that when trusted and unlocked a user can decrypt the public key for all their devices.\n * This enabled a user to rotate the keys for all of their devices.\n */\n encryptedPublicKey: EncString;\n}\n","export class TrustedDeviceKeysRequest {\n constructor(\n public encryptedUserKey: string,\n public encryptedPublicKey: string,\n public encryptedPrivateKey: string,\n ) {}\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { KdfType } from \"../../platform/enums/kdf-type.enum\";\nimport { KDF_CONFIG_DISK, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { KdfConfigService as KdfConfigServiceAbstraction } from \"../abstractions/kdf-config.service\";\nimport { Argon2KdfConfig, KdfConfig, PBKDF2KdfConfig } from \"../models/domain/kdf-config\";\n\nexport const KDF_CONFIG = new UserKeyDefinition(KDF_CONFIG_DISK, \"kdfConfig\", {\n deserializer: (kdfConfig: KdfConfig) => {\n if (kdfConfig == null) {\n return null;\n }\n return kdfConfig.kdfType === KdfType.PBKDF2_SHA256\n ? PBKDF2KdfConfig.fromJSON(kdfConfig)\n : Argon2KdfConfig.fromJSON(kdfConfig);\n },\n clearOn: [\"logout\"],\n});\n\nexport class KdfConfigService implements KdfConfigServiceAbstraction {\n constructor(private stateProvider: StateProvider) {}\n async setKdfConfig(userId: UserId, kdfConfig: KdfConfig) {\n if (!userId) {\n throw new Error(\"userId cannot be null\");\n }\n if (kdfConfig === null) {\n throw new Error(\"kdfConfig cannot be null\");\n }\n await this.stateProvider.setUserState(KDF_CONFIG, kdfConfig, userId);\n }\n\n async getKdfConfig(): Promise {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n const state = await firstValueFrom(this.stateProvider.getUser(userId, KDF_CONFIG).state$);\n if (state === null) {\n throw new Error(\"KdfConfig for active user account state is null\");\n }\n return state;\n }\n}\n","export class KeyConnectorUserKeyRequest {\n key: string;\n\n constructor(key: string) {\n this.key = key;\n }\n}\n","import { KeysRequest } from \"../../../models/request/keys.request\";\nimport { KdfType } from \"../../../platform/enums\";\nimport { KdfConfig } from \"../domain/kdf-config\";\n\nexport class SetKeyConnectorKeyRequest {\n key: string;\n keys: KeysRequest;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n orgIdentifier: string;\n\n constructor(key: string, kdfConfig: KdfConfig, orgIdentifier: string, keys: KeysRequest) {\n this.key = key;\n this.kdf = kdfConfig.kdfType;\n this.kdfIterations = kdfConfig.iterations;\n if (kdfConfig.kdfType === KdfType.Argon2id) {\n this.kdfMemory = kdfConfig.memory;\n this.kdfParallelism = kdfConfig.parallelism;\n }\n this.orgIdentifier = orgIdentifier;\n this.keys = keys;\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { OrganizationService } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserType } from \"../../admin-console/enums\";\nimport { KeysRequest } from \"../../models/request/keys.request\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { KdfType } from \"../../platform/enums/kdf-type.enum\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport {\n ActiveUserState,\n KEY_CONNECTOR_DISK,\n StateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { MasterKey } from \"../../types/key\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { KeyConnectorService as KeyConnectorServiceAbstraction } from \"../abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"../abstractions/token.service\";\nimport { Argon2KdfConfig, KdfConfig, PBKDF2KdfConfig } from \"../models/domain/kdf-config\";\nimport { KeyConnectorUserKeyRequest } from \"../models/request/key-connector-user-key.request\";\nimport { SetKeyConnectorKeyRequest } from \"../models/request/set-key-connector-key.request\";\nimport { IdentityTokenResponse } from \"../models/response/identity-token.response\";\n\nexport const USES_KEY_CONNECTOR = new UserKeyDefinition(\n KEY_CONNECTOR_DISK,\n \"usesKeyConnector\",\n {\n deserializer: (usesKeyConnector) => usesKeyConnector,\n clearOn: [\"logout\"],\n },\n);\n\nexport const CONVERT_ACCOUNT_TO_KEY_CONNECTOR = new UserKeyDefinition(\n KEY_CONNECTOR_DISK,\n \"convertAccountToKeyConnector\",\n {\n deserializer: (convertAccountToKeyConnector) => convertAccountToKeyConnector,\n clearOn: [\"logout\"],\n },\n);\n\nexport class KeyConnectorService implements KeyConnectorServiceAbstraction {\n private usesKeyConnectorState: ActiveUserState;\n private convertAccountToKeyConnectorState: ActiveUserState;\n constructor(\n private accountService: AccountService,\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n private cryptoService: CryptoService,\n private apiService: ApiService,\n private tokenService: TokenService,\n private logService: LogService,\n private organizationService: OrganizationService,\n private keyGenerationService: KeyGenerationService,\n private logoutCallback: (logoutReason: LogoutReason, userId?: string) => Promise,\n private stateProvider: StateProvider,\n ) {\n this.usesKeyConnectorState = this.stateProvider.getActive(USES_KEY_CONNECTOR);\n this.convertAccountToKeyConnectorState = this.stateProvider.getActive(\n CONVERT_ACCOUNT_TO_KEY_CONNECTOR,\n );\n }\n\n async setUsesKeyConnector(usesKeyConnector: boolean) {\n await this.usesKeyConnectorState.update(() => usesKeyConnector);\n }\n\n getUsesKeyConnector(): Promise {\n return firstValueFrom(this.usesKeyConnectorState.state$);\n }\n\n async userNeedsMigration() {\n const loggedInUsingSso = await this.tokenService.getIsExternal();\n const requiredByOrganization = (await this.getManagingOrganization()) != null;\n const userIsNotUsingKeyConnector = !(await this.getUsesKeyConnector());\n\n return loggedInUsingSso && requiredByOrganization && userIsNotUsingKeyConnector;\n }\n\n async migrateUser() {\n const organization = await this.getManagingOrganization();\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n const keyConnectorRequest = new KeyConnectorUserKeyRequest(masterKey.encKeyB64);\n\n try {\n await this.apiService.postUserKeyToKeyConnector(\n organization.keyConnectorUrl,\n keyConnectorRequest,\n );\n } catch (e) {\n this.handleKeyConnectorError(e);\n }\n\n await this.apiService.postConvertToKeyConnector();\n }\n\n // TODO: UserKey should be renamed to MasterKey and typed accordingly\n async setMasterKeyFromUrl(url: string, userId: UserId) {\n try {\n const masterKeyResponse = await this.apiService.getMasterKeyFromKeyConnector(url);\n const keyArr = Utils.fromB64ToArray(masterKeyResponse.key);\n const masterKey = new SymmetricCryptoKey(keyArr) as MasterKey;\n await this.masterPasswordService.setMasterKey(masterKey, userId);\n } catch (e) {\n this.handleKeyConnectorError(e);\n }\n }\n\n async getManagingOrganization() {\n const orgs = await this.organizationService.getAll();\n return orgs.find(\n (o) =>\n o.keyConnectorEnabled &&\n o.type !== OrganizationUserType.Admin &&\n o.type !== OrganizationUserType.Owner &&\n !o.isProviderUser,\n );\n }\n\n async convertNewSsoUserToKeyConnector(\n tokenResponse: IdentityTokenResponse,\n orgId: string,\n userId: UserId,\n ) {\n // TODO: Remove after tokenResponse.keyConnectorUrl is deprecated in 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n const {\n kdf,\n kdfIterations,\n kdfMemory,\n kdfParallelism,\n keyConnectorUrl: legacyKeyConnectorUrl,\n userDecryptionOptions,\n } = tokenResponse;\n const password = await this.keyGenerationService.createKey(512);\n const kdfConfig: KdfConfig =\n kdf === KdfType.PBKDF2_SHA256\n ? new PBKDF2KdfConfig(kdfIterations)\n : new Argon2KdfConfig(kdfIterations, kdfMemory, kdfParallelism);\n\n const masterKey = await this.cryptoService.makeMasterKey(\n password.keyB64,\n await this.tokenService.getEmail(),\n kdfConfig,\n );\n const keyConnectorRequest = new KeyConnectorUserKeyRequest(masterKey.encKeyB64);\n await this.masterPasswordService.setMasterKey(masterKey, userId);\n\n const userKey = await this.cryptoService.makeUserKey(masterKey);\n await this.cryptoService.setUserKey(userKey[0], userId);\n await this.cryptoService.setMasterKeyEncryptedUserKey(userKey[1].encryptedString, userId);\n\n const [pubKey, privKey] = await this.cryptoService.makeKeyPair(userKey[0]);\n\n try {\n const keyConnectorUrl =\n legacyKeyConnectorUrl ?? userDecryptionOptions?.keyConnectorOption?.keyConnectorUrl;\n await this.apiService.postUserKeyToKeyConnector(keyConnectorUrl, keyConnectorRequest);\n } catch (e) {\n this.handleKeyConnectorError(e);\n }\n\n const keys = new KeysRequest(pubKey, privKey.encryptedString);\n const setPasswordRequest = new SetKeyConnectorKeyRequest(\n userKey[1].encryptedString,\n kdfConfig,\n orgId,\n keys,\n );\n await this.apiService.postSetKeyConnectorKey(setPasswordRequest);\n }\n\n async setConvertAccountRequired(status: boolean) {\n await this.convertAccountToKeyConnectorState.update(() => status);\n }\n\n getConvertAccountRequired(): Promise {\n return firstValueFrom(this.convertAccountToKeyConnectorState.state$);\n }\n\n async removeConvertAccountRequired() {\n await this.setConvertAccountRequired(null);\n }\n\n private handleKeyConnectorError(e: any) {\n this.logService.error(e);\n if (this.logoutCallback != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.logoutCallback(\"keyConnectorError\");\n }\n throw new Error(\"Key Connector error\");\n }\n}\n","import { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"../../../platform/abstractions/key-generation.service\";\nimport { StateService } from \"../../../platform/abstractions/state.service\";\nimport { EncryptionType } from \"../../../platform/enums\";\nimport { EncryptedString, EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport {\n MASTER_PASSWORD_DISK,\n MASTER_PASSWORD_MEMORY,\n StateProvider,\n UserKeyDefinition,\n} from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { MasterKey, UserKey } from \"../../../types/key\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../abstractions/master-password.service.abstraction\";\nimport { ForceSetPasswordReason } from \"../../models/domain/force-set-password-reason\";\n\n/** Memory since master key shouldn't be available on lock */\nconst MASTER_KEY = new UserKeyDefinition(MASTER_PASSWORD_MEMORY, \"masterKey\", {\n deserializer: (masterKey) => SymmetricCryptoKey.fromJSON(masterKey) as MasterKey,\n clearOn: [\"lock\", \"logout\"],\n});\n\n/** Disk since master key hash is used for unlock */\nconst MASTER_KEY_HASH = new UserKeyDefinition(MASTER_PASSWORD_DISK, \"masterKeyHash\", {\n deserializer: (masterKeyHash) => masterKeyHash,\n clearOn: [\"logout\"],\n});\n\n/** Disk to persist through lock */\nconst MASTER_KEY_ENCRYPTED_USER_KEY = new UserKeyDefinition(\n MASTER_PASSWORD_DISK,\n \"masterKeyEncryptedUserKey\",\n {\n deserializer: (key) => key,\n clearOn: [\"logout\"],\n },\n);\n\n/** Disk to persist through lock and account switches */\nconst FORCE_SET_PASSWORD_REASON = new UserKeyDefinition(\n MASTER_PASSWORD_DISK,\n \"forceSetPasswordReason\",\n {\n deserializer: (reason) => reason,\n clearOn: [\"logout\"],\n },\n);\n\nexport class MasterPasswordService implements InternalMasterPasswordServiceAbstraction {\n constructor(\n private stateProvider: StateProvider,\n private stateService: StateService,\n private keyGenerationService: KeyGenerationService,\n private encryptService: EncryptService,\n ) {}\n\n masterKey$(userId: UserId): Observable {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n return this.stateProvider.getUser(userId, MASTER_KEY).state$;\n }\n\n masterKeyHash$(userId: UserId): Observable {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n return this.stateProvider.getUser(userId, MASTER_KEY_HASH).state$;\n }\n\n forceSetPasswordReason$(userId: UserId): Observable {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n return this.stateProvider\n .getUser(userId, FORCE_SET_PASSWORD_REASON)\n .state$.pipe(map((reason) => reason ?? ForceSetPasswordReason.None));\n }\n\n // TODO: Remove this method and decrypt directly in the service instead\n async getMasterKeyEncryptedUserKey(userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n const key = await firstValueFrom(\n this.stateProvider.getUser(userId, MASTER_KEY_ENCRYPTED_USER_KEY).state$,\n );\n return EncString.fromJSON(key);\n }\n\n async setMasterKey(masterKey: MasterKey, userId: UserId): Promise {\n if (masterKey == null) {\n throw new Error(\"Master key is required.\");\n }\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider.getUser(userId, MASTER_KEY).update((_) => masterKey);\n }\n\n async clearMasterKey(userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider.getUser(userId, MASTER_KEY).update((_) => null);\n }\n\n async setMasterKeyHash(masterKeyHash: string, userId: UserId): Promise {\n if (masterKeyHash == null) {\n throw new Error(\"Master key hash is required.\");\n }\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider.getUser(userId, MASTER_KEY_HASH).update((_) => masterKeyHash);\n }\n\n async clearMasterKeyHash(userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider.getUser(userId, MASTER_KEY_HASH).update((_) => null);\n }\n\n async setMasterKeyEncryptedUserKey(encryptedKey: EncString, userId: UserId): Promise {\n if (encryptedKey == null) {\n throw new Error(\"Encrypted Key is required.\");\n }\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider\n .getUser(userId, MASTER_KEY_ENCRYPTED_USER_KEY)\n .update((_) => encryptedKey.toJSON() as EncryptedString);\n }\n\n async setForceSetPasswordReason(reason: ForceSetPasswordReason, userId: UserId): Promise {\n if (reason == null) {\n throw new Error(\"Reason is required.\");\n }\n if (userId == null) {\n throw new Error(\"User ID is required.\");\n }\n await this.stateProvider.getUser(userId, FORCE_SET_PASSWORD_REASON).update((_) => reason);\n }\n\n async decryptUserKeyWithMasterKey(\n masterKey: MasterKey,\n userKey?: EncString,\n userId?: UserId,\n ): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n userKey ??= await this.getMasterKeyEncryptedUserKey(userId);\n masterKey ??= await firstValueFrom(this.masterKey$(userId));\n\n if (masterKey == null) {\n throw new Error(\"No master key found.\");\n }\n\n // Try one more way to get the user key if it still wasn't found.\n if (userKey == null) {\n const deprecatedKey = await this.stateService.getEncryptedCryptoSymmetricKey({\n userId: userId,\n });\n\n if (deprecatedKey == null) {\n throw new Error(\"No encrypted user key found.\");\n }\n\n userKey = new EncString(deprecatedKey);\n }\n\n let decUserKey: Uint8Array;\n\n if (userKey.encryptionType === EncryptionType.AesCbc256_B64) {\n decUserKey = await this.encryptService.decryptToBytes(userKey, masterKey);\n } else if (userKey.encryptionType === EncryptionType.AesCbc256_HmacSha256_B64) {\n const newKey = await this.keyGenerationService.stretchKey(masterKey);\n decUserKey = await this.encryptService.decryptToBytes(userKey, newKey);\n } else {\n throw new Error(\"Unsupported encryption type.\");\n }\n\n if (decUserKey == null) {\n return null;\n }\n\n return new SymmetricCryptoKey(decUserKey) as UserKey;\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport {\n ActiveUserState,\n GlobalState,\n KeyDefinition,\n SSO_DISK,\n StateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\nimport { SsoLoginServiceAbstraction } from \"../abstractions/sso-login.service.abstraction\";\n\n/**\n * Uses disk storage so that the code verifier can be persisted across sso redirects.\n */\nconst CODE_VERIFIER = new KeyDefinition(SSO_DISK, \"ssoCodeVerifier\", {\n deserializer: (codeVerifier) => codeVerifier,\n});\n\n/**\n * Uses disk storage so that the sso state can be persisted across sso redirects.\n */\nconst SSO_STATE = new KeyDefinition(SSO_DISK, \"ssoState\", {\n deserializer: (state) => state,\n});\n\n/**\n * Uses disk storage so that the organization sso identifier can be persisted across sso redirects.\n */\nconst USER_ORGANIZATION_SSO_IDENTIFIER = new UserKeyDefinition(\n SSO_DISK,\n \"organizationSsoIdentifier\",\n {\n deserializer: (organizationIdentifier) => organizationIdentifier,\n clearOn: [\"logout\"], // Used for login, so not needed past logout\n },\n);\n\n/**\n * Uses disk storage so that the organization sso identifier can be persisted across sso redirects.\n */\nconst GLOBAL_ORGANIZATION_SSO_IDENTIFIER = new KeyDefinition(\n SSO_DISK,\n \"organizationSsoIdentifier\",\n {\n deserializer: (organizationIdentifier) => organizationIdentifier,\n },\n);\n\n/**\n * Uses disk storage so that the user's email can be persisted across sso redirects.\n */\nconst SSO_EMAIL = new KeyDefinition(SSO_DISK, \"ssoEmail\", {\n deserializer: (state) => state,\n});\n\nexport class SsoLoginService implements SsoLoginServiceAbstraction {\n private codeVerifierState: GlobalState;\n private ssoState: GlobalState;\n private orgSsoIdentifierState: GlobalState;\n private ssoEmailState: GlobalState;\n private activeUserOrgSsoIdentifierState: ActiveUserState;\n\n constructor(private stateProvider: StateProvider) {\n this.codeVerifierState = this.stateProvider.getGlobal(CODE_VERIFIER);\n this.ssoState = this.stateProvider.getGlobal(SSO_STATE);\n this.orgSsoIdentifierState = this.stateProvider.getGlobal(GLOBAL_ORGANIZATION_SSO_IDENTIFIER);\n this.ssoEmailState = this.stateProvider.getGlobal(SSO_EMAIL);\n this.activeUserOrgSsoIdentifierState = this.stateProvider.getActive(\n USER_ORGANIZATION_SSO_IDENTIFIER,\n );\n }\n\n getCodeVerifier(): Promise {\n return firstValueFrom(this.codeVerifierState.state$);\n }\n\n async setCodeVerifier(codeVerifier: string): Promise {\n await this.codeVerifierState.update((_) => codeVerifier);\n }\n\n getSsoState(): Promise {\n return firstValueFrom(this.ssoState.state$);\n }\n\n async setSsoState(ssoState: string): Promise {\n await this.ssoState.update((_) => ssoState);\n }\n\n getOrganizationSsoIdentifier(): Promise {\n return firstValueFrom(this.orgSsoIdentifierState.state$);\n }\n\n async setOrganizationSsoIdentifier(organizationIdentifier: string): Promise {\n await this.orgSsoIdentifierState.update((_) => organizationIdentifier);\n }\n\n getSsoEmail(): Promise {\n return firstValueFrom(this.ssoEmailState.state$);\n }\n\n async setSsoEmail(email: string): Promise {\n await this.ssoEmailState.update((_) => email);\n }\n\n getActiveUserOrganizationSsoIdentifier(): Promise {\n return firstValueFrom(this.activeUserOrgSsoIdentifierState.state$);\n }\n\n async setActiveUserOrganizationSsoIdentifier(organizationIdentifier: string): Promise {\n await this.activeUserOrgSsoIdentifierState.update((_) => organizationIdentifier);\n }\n}\n","export class SetTokensResult {\n constructor(accessToken: string, refreshToken?: string, clientIdSecretPair?: [string, string]) {\n this.accessToken = accessToken;\n this.refreshToken = refreshToken;\n this.clientIdSecretPair = clientIdSecretPair;\n }\n accessToken: string;\n refreshToken?: string;\n clientIdSecretPair?: [string, string];\n}\n","import {\n KeyDefinition,\n TOKEN_DISK,\n TOKEN_DISK_LOCAL,\n TOKEN_MEMORY,\n UserKeyDefinition,\n} from \"../../platform/state\";\n\n// Note: all tokens / API key information must be cleared on logout.\n// because we are using secure storage, we must manually call to clean up our tokens.\n// See stateService.deAuthenticateAccount for where we call clearTokens(...)\n\nexport const ACCESS_TOKEN_DISK = new UserKeyDefinition(TOKEN_DISK, \"accessToken\", {\n deserializer: (accessToken) => accessToken,\n clearOn: [], // Manually handled\n});\n\nexport const ACCESS_TOKEN_MEMORY = new UserKeyDefinition(TOKEN_MEMORY, \"accessToken\", {\n deserializer: (accessToken) => accessToken,\n clearOn: [], // Manually handled\n});\n\nexport const REFRESH_TOKEN_DISK = new UserKeyDefinition(TOKEN_DISK, \"refreshToken\", {\n deserializer: (refreshToken) => refreshToken,\n clearOn: [], // Manually handled\n});\n\nexport const REFRESH_TOKEN_MEMORY = new UserKeyDefinition(TOKEN_MEMORY, \"refreshToken\", {\n deserializer: (refreshToken) => refreshToken,\n clearOn: [], // Manually handled\n});\n\nexport const EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL = KeyDefinition.record(\n TOKEN_DISK_LOCAL,\n \"emailTwoFactorTokenRecord\",\n {\n deserializer: (emailTwoFactorTokenRecord) => emailTwoFactorTokenRecord,\n },\n);\n\nexport const API_KEY_CLIENT_ID_DISK = new UserKeyDefinition(TOKEN_DISK, \"apiKeyClientId\", {\n deserializer: (apiKeyClientId) => apiKeyClientId,\n clearOn: [], // Manually handled\n});\n\nexport const API_KEY_CLIENT_ID_MEMORY = new UserKeyDefinition(\n TOKEN_MEMORY,\n \"apiKeyClientId\",\n {\n deserializer: (apiKeyClientId) => apiKeyClientId,\n clearOn: [], // Manually handled\n },\n);\n\nexport const API_KEY_CLIENT_SECRET_DISK = new UserKeyDefinition(\n TOKEN_DISK,\n \"apiKeyClientSecret\",\n {\n deserializer: (apiKeyClientSecret) => apiKeyClientSecret,\n clearOn: [], // Manually handled\n },\n);\n\nexport const API_KEY_CLIENT_SECRET_MEMORY = new UserKeyDefinition(\n TOKEN_MEMORY,\n \"apiKeyClientSecret\",\n {\n deserializer: (apiKeyClientSecret) => apiKeyClientSecret,\n clearOn: [], // Manually handled\n },\n);\n\nexport const SECURITY_STAMP_MEMORY = new UserKeyDefinition(TOKEN_MEMORY, \"securityStamp\", {\n deserializer: (securityStamp) => securityStamp,\n clearOn: [\"logout\"],\n});\n","import { Observable, combineLatest, firstValueFrom, map } from \"rxjs\";\nimport { Opaque } from \"type-fest\";\n\nimport { LogoutReason, decodeJwtTokenToJson } from \"@bitwarden/auth/common\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { AbstractStorageService } from \"../../platform/abstractions/storage.service\";\nimport { StorageLocation } from \"../../platform/enums\";\nimport { EncString, EncryptedString } from \"../../platform/models/domain/enc-string\";\nimport { StorageOptions } from \"../../platform/models/domain/storage-options\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport {\n GlobalState,\n GlobalStateProvider,\n SingleUserStateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"../../types/vault-timeout.type\";\nimport { TokenService as TokenServiceAbstraction } from \"../abstractions/token.service\";\nimport { SetTokensResult } from \"../models/domain/set-tokens-result\";\n\nimport { ACCOUNT_ACTIVE_ACCOUNT_ID } from \"./account.service\";\nimport {\n ACCESS_TOKEN_DISK,\n ACCESS_TOKEN_MEMORY,\n API_KEY_CLIENT_ID_DISK,\n API_KEY_CLIENT_ID_MEMORY,\n API_KEY_CLIENT_SECRET_DISK,\n API_KEY_CLIENT_SECRET_MEMORY,\n EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n REFRESH_TOKEN_DISK,\n REFRESH_TOKEN_MEMORY,\n SECURITY_STAMP_MEMORY,\n} from \"./token.state\";\n\nexport enum TokenStorageLocation {\n Disk = \"disk\",\n SecureStorage = \"secureStorage\",\n Memory = \"memory\",\n}\n\n/**\n * Type representing the structure of a standard Bitwarden decoded access token.\n * src: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1\n * Note: all claims are technically optional so we must verify their existence before using them.\n * Note 2: NumericDate is a number representing a date in seconds since the Unix epoch.\n */\nexport type DecodedAccessToken = {\n /** Issuer - the issuer of the token, typically the URL of the authentication server */\n iss?: string;\n\n /** Not Before - a timestamp defining when the token starts being valid */\n nbf?: number;\n\n /** Issued At - a timestamp of when the token was issued */\n iat?: number;\n\n /** Expiration Time - a NumericDate timestamp of when the token will expire */\n exp?: number;\n\n /** Scope - the scope of the access request, such as the permissions the token grants */\n scope?: string[];\n\n /** Authentication Method Reference - the methods used in the authentication */\n amr?: string[];\n\n /** Client ID - the identifier for the client that requested the token */\n client_id?: string;\n\n /** Subject - the unique identifier for the user */\n sub?: string;\n\n /** Authentication Time - a timestamp of when the user authentication occurred */\n auth_time?: number;\n\n /** Identity Provider - the system or service that authenticated the user */\n idp?: string;\n\n /** Premium - a boolean flag indicating whether the account is premium */\n premium?: boolean;\n\n /** Email - the user's email address */\n email?: string;\n\n /** Email Verified - a boolean flag indicating whether the user's email address has been verified */\n email_verified?: boolean;\n\n /**\n * Security Stamp - a unique identifier which invalidates the access token if it changes in the db\n * (typically after critical account changes like a password change)\n */\n sstamp?: string;\n\n /** Name - the name of the user */\n name?: string;\n\n /** Organization Owners - a list of organization owner identifiers */\n orgowner?: string[];\n\n /** Device - the identifier of the device used */\n device?: string;\n\n /** JWT ID - a unique identifier for the JWT */\n jti?: string;\n};\n\n/**\n * A symmetric key for encrypting the access token before the token is stored on disk.\n * This key should be stored in secure storage.\n * */\nexport type AccessTokenKey = Opaque;\n\nexport class TokenService implements TokenServiceAbstraction {\n private readonly accessTokenKeySecureStorageKey: string = \"_accessTokenKey\";\n\n private readonly refreshTokenSecureStorageKey: string = \"_refreshToken\";\n\n private emailTwoFactorTokenRecordGlobalState: GlobalState>;\n\n private activeUserIdGlobalState: GlobalState;\n\n constructor(\n // Note: we cannot use ActiveStateProvider because if we ever want to inject\n // this service into the AccountService, we will make a circular dependency\n private singleUserStateProvider: SingleUserStateProvider,\n private globalStateProvider: GlobalStateProvider,\n private readonly platformSupportsSecureStorage: boolean,\n private secureStorageService: AbstractStorageService,\n private keyGenerationService: KeyGenerationService,\n private encryptService: EncryptService,\n private logService: LogService,\n private logoutCallback: (logoutReason: LogoutReason, userId?: string) => Promise,\n ) {\n this.initializeState();\n }\n\n hasAccessToken$(userId: UserId): Observable {\n // FIXME Once once vault timeout action is observable, we can use it to determine storage location\n // and avoid the need to check both disk and memory.\n return combineLatest([\n this.singleUserStateProvider.get(userId, ACCESS_TOKEN_DISK).state$,\n this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).state$,\n ]).pipe(map(([disk, memory]) => Boolean(disk || memory)));\n }\n\n private initializeState(): void {\n this.emailTwoFactorTokenRecordGlobalState = this.globalStateProvider.get(\n EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n );\n\n this.activeUserIdGlobalState = this.globalStateProvider.get(ACCOUNT_ACTIVE_ACCOUNT_ID);\n }\n\n async setTokens(\n accessToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n refreshToken?: string,\n clientIdClientSecret?: [string, string],\n ): Promise {\n if (!accessToken) {\n throw new Error(\"Access token is required.\");\n }\n\n // Can't check for falsey b/c 0 is a valid value\n if (vaultTimeout == null) {\n throw new Error(\"Vault Timeout is required.\");\n }\n\n if (vaultTimeoutAction == null) {\n throw new Error(\"Vault Timeout Action is required.\");\n }\n\n // get user id the access token\n const userId: UserId = await this.getUserIdFromAccessToken(accessToken);\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot set tokens.\");\n }\n\n const newAccessToken = await this._setAccessToken(\n accessToken,\n vaultTimeoutAction,\n vaultTimeout,\n userId,\n );\n\n const newTokens = new SetTokensResult(newAccessToken);\n\n if (refreshToken) {\n newTokens.refreshToken = await this.setRefreshToken(\n refreshToken,\n vaultTimeoutAction,\n vaultTimeout,\n userId,\n );\n }\n\n if (clientIdClientSecret != null) {\n const clientId = await this.setClientId(\n clientIdClientSecret[0],\n vaultTimeoutAction,\n vaultTimeout,\n userId,\n );\n const clientSecret = await this.setClientSecret(\n clientIdClientSecret[1],\n vaultTimeoutAction,\n vaultTimeout,\n userId,\n );\n newTokens.clientIdSecretPair = [clientId, clientSecret];\n }\n return newTokens;\n }\n\n private async getAccessTokenKey(userId: UserId): Promise {\n const accessTokenKeyB64 = await this.secureStorageService.get<\n ReturnType\n >(`${userId}${this.accessTokenKeySecureStorageKey}`, this.getSecureStorageOptions(userId));\n\n if (!accessTokenKeyB64) {\n return null;\n }\n\n const accessTokenKey = SymmetricCryptoKey.fromJSON(accessTokenKeyB64) as AccessTokenKey;\n return accessTokenKey;\n }\n\n private async createAndSaveAccessTokenKey(userId: UserId): Promise {\n const newAccessTokenKey = (await this.keyGenerationService.createKey(512)) as AccessTokenKey;\n\n await this.secureStorageService.save(\n `${userId}${this.accessTokenKeySecureStorageKey}`,\n newAccessTokenKey,\n this.getSecureStorageOptions(userId),\n );\n\n // We are having intermittent issues with access token keys not saving into secure storage on windows 10/11.\n // So, let's add a check to ensure we can read the value after writing it.\n const accessTokenKey = await this.getAccessTokenKey(userId);\n\n if (!accessTokenKey) {\n throw new Error(\"New Access token key unable to be retrieved from secure storage.\");\n }\n\n return newAccessTokenKey;\n }\n\n private async clearAccessTokenKey(userId: UserId): Promise {\n await this.secureStorageService.remove(\n `${userId}${this.accessTokenKeySecureStorageKey}`,\n this.getSecureStorageOptions(userId),\n );\n }\n\n private async getOrCreateAccessTokenKey(userId: UserId): Promise {\n if (!this.platformSupportsSecureStorage) {\n throw new Error(\"Platform does not support secure storage. Cannot obtain access token key.\");\n }\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot obtain access token key.\");\n }\n\n // First see if we have an accessTokenKey in secure storage and return it if we do\n // Note: retrieving/saving data from/to secure storage on linux will throw if the\n // distro doesn't have a secure storage provider\n let accessTokenKey: AccessTokenKey = await this.getAccessTokenKey(userId);\n\n if (!accessTokenKey) {\n // Otherwise, create a new one and save it to secure storage, then return it\n accessTokenKey = await this.createAndSaveAccessTokenKey(userId);\n }\n\n return accessTokenKey;\n }\n\n private async encryptAccessToken(accessToken: string, userId: UserId): Promise {\n const accessTokenKey = await this.getOrCreateAccessTokenKey(userId);\n\n return await this.encryptService.encrypt(accessToken, accessTokenKey);\n }\n\n private async decryptAccessToken(\n accessTokenKey: AccessTokenKey,\n encryptedAccessToken: EncString,\n ): Promise {\n if (!accessTokenKey) {\n throw new Error(\n \"decryptAccessToken: Access token key required. Cannot decrypt access token.\",\n );\n }\n\n const decryptedAccessToken = await this.encryptService.decryptToUtf8(\n encryptedAccessToken,\n accessTokenKey,\n );\n\n return decryptedAccessToken;\n }\n\n /**\n * Internal helper for set access token which always requires user id.\n * This is useful because setTokens always will have a user id from the access token whereas\n * the public setAccessToken method does not.\n */\n private async _setAccessToken(\n accessToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId: UserId,\n ): Promise {\n const storageLocation = await this.determineStorageLocation(\n vaultTimeoutAction,\n vaultTimeout,\n true,\n );\n\n switch (storageLocation) {\n case TokenStorageLocation.SecureStorage: {\n // Secure storage implementations have variable length limitations (Windows), so we cannot\n // store the access token directly. Instead, we encrypt with accessTokenKey and store that\n // in secure storage.\n\n let decryptedAccessToken: string = null;\n\n try {\n const encryptedAccessToken: EncString = await this.encryptAccessToken(\n accessToken,\n userId,\n );\n\n // Save the encrypted access token to disk\n await this.singleUserStateProvider\n .get(userId, ACCESS_TOKEN_DISK)\n .update((_) => encryptedAccessToken.encryptedString);\n\n // If we've successfully stored the encrypted access token to disk, we can return the decrypted access token\n // so that the caller can use it immediately.\n decryptedAccessToken = accessToken;\n\n // TODO: PM-6408\n // 2024-02-20: Remove access token from memory so that we migrate to encrypt the access token over time.\n // Remove this call to remove the access token from memory after 3 months.\n await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).update((_) => null);\n } catch (error) {\n this.logService.error(\n `SetAccessToken: storing encrypted access token in secure storage failed. Falling back to disk storage.`,\n error,\n );\n\n // Fall back to disk storage for unecrypted access token\n decryptedAccessToken = await this.singleUserStateProvider\n .get(userId, ACCESS_TOKEN_DISK)\n .update((_) => accessToken);\n }\n\n return decryptedAccessToken;\n }\n case TokenStorageLocation.Disk:\n // Access token stored on disk unencrypted as platform does not support secure storage\n return await this.singleUserStateProvider\n .get(userId, ACCESS_TOKEN_DISK)\n .update((_) => accessToken);\n case TokenStorageLocation.Memory:\n // Access token stored in memory due to vault timeout settings\n return await this.singleUserStateProvider\n .get(userId, ACCESS_TOKEN_MEMORY)\n .update((_) => accessToken);\n }\n }\n\n async setAccessToken(\n accessToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n ): Promise {\n if (!accessToken) {\n throw new Error(\"Access token is required.\");\n }\n const userId: UserId = await this.getUserIdFromAccessToken(accessToken);\n\n // If we don't have a user id, we can't save the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot save access token.\");\n }\n\n // Can't check for falsey b/c 0 is a valid value\n if (vaultTimeout == null) {\n throw new Error(\"Vault Timeout is required.\");\n }\n\n if (vaultTimeoutAction == null) {\n throw new Error(\"Vault Timeout Action is required.\");\n }\n\n return await this._setAccessToken(accessToken, vaultTimeoutAction, vaultTimeout, userId);\n }\n\n async clearAccessToken(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n // If we don't have a user id, we can't clear the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot clear access token.\");\n }\n\n // TODO: re-eval this implementation once we get shared key definitions for vault timeout and vault timeout action data.\n // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n // but we can simply clear all locations to avoid the need to require those parameters.\n\n if (this.platformSupportsSecureStorage) {\n // Always clear the access token key when clearing the access token\n // The next set of the access token will create a new access token key\n await this.clearAccessTokenKey(userId);\n }\n\n // Platform doesn't support secure storage, so use state provider implementation\n await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_DISK).update((_) => null);\n await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).update((_) => null);\n }\n\n async getAccessToken(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n return null;\n }\n\n // Try to get the access token from memory\n const accessTokenMemory = await this.getStateValueByUserIdAndKeyDef(\n userId,\n ACCESS_TOKEN_MEMORY,\n );\n if (accessTokenMemory != null) {\n return accessTokenMemory;\n }\n\n // If memory is null, read from disk\n const accessTokenDisk = await this.getStateValueByUserIdAndKeyDef(userId, ACCESS_TOKEN_DISK);\n if (!accessTokenDisk) {\n return null;\n }\n\n if (this.platformSupportsSecureStorage) {\n let accessTokenKey: AccessTokenKey;\n try {\n accessTokenKey = await this.getAccessTokenKey(userId);\n } catch (error) {\n if (EncString.isSerializedEncString(accessTokenDisk)) {\n this.logService.error(\n \"Access token key retrieval failed. Unable to decrypt encrypted access token. Logging user out.\",\n error,\n );\n await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n return null;\n }\n\n // If the access token key is not found, but the access token is unencrypted then\n // this indicates that this is the pre-migration state where the access token\n // was stored unencrypted on disk. We can return the access token as is.\n // Note: this is likely to only be hit for linux users who don't\n // have a secure storage provider configured.\n return accessTokenDisk;\n }\n\n if (!accessTokenKey) {\n if (EncString.isSerializedEncString(accessTokenDisk)) {\n // The access token is encrypted but we don't have the key to decrypt it for\n // whatever reason so we have to log the user out.\n this.logService.error(\n \"Access token key not found to decrypt encrypted access token. Logging user out.\",\n );\n\n await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n\n return null;\n }\n\n // We know this is an unencrypted access token\n return accessTokenDisk;\n }\n\n try {\n const encryptedAccessTokenEncString = new EncString(accessTokenDisk as EncryptedString);\n\n const decryptedAccessToken = await this.decryptAccessToken(\n accessTokenKey,\n encryptedAccessTokenEncString,\n );\n return decryptedAccessToken;\n } catch (error) {\n // If an error occurs during decryption, logout and then return null.\n // We don't try to recover here since we'd like to know\n // if access token and key are getting out of sync.\n this.logService.error(`Failed to decrypt access token`, error);\n\n await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n\n return null;\n }\n }\n return accessTokenDisk;\n }\n\n // Private because we only ever set the refresh token when also setting the access token\n // and we need the user id from the access token to save to secure storage\n private async setRefreshToken(\n refreshToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId: UserId,\n ): Promise {\n // If we don't have a user id, we can't save the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot save refresh token.\");\n }\n\n // Can't check for falsey b/c 0 is a valid value\n if (vaultTimeout == null) {\n throw new Error(\"Vault Timeout is required.\");\n }\n\n if (vaultTimeoutAction == null) {\n throw new Error(\"Vault Timeout Action is required.\");\n }\n\n const storageLocation = await this.determineStorageLocation(\n vaultTimeoutAction,\n vaultTimeout,\n true,\n );\n\n switch (storageLocation) {\n case TokenStorageLocation.SecureStorage: {\n let decryptedRefreshToken: string = null;\n\n try {\n await this.saveStringToSecureStorage(\n userId,\n this.refreshTokenSecureStorageKey,\n refreshToken,\n );\n\n // Check if the refresh token was able to be saved to secure storage by reading it\n // immediately after setting it. This is needed due to intermittent silent failures on Windows 10/11.\n const refreshTokenSecureStorage = await this.getStringFromSecureStorage(\n userId,\n this.refreshTokenSecureStorageKey,\n );\n\n // Only throw if the refresh token was not saved to secure storage\n // If we only check for a nullish value out of secure storage without considering the input value,\n // then we would end up falling back to disk storage if the input value was null.\n if (refreshToken !== null && !refreshTokenSecureStorage) {\n throw new Error(\"Refresh token failed to save to secure storage.\");\n }\n\n // If we've successfully stored the encrypted refresh token, we can return the decrypted refresh token\n // so that the caller can use it immediately.\n decryptedRefreshToken = refreshToken;\n\n // TODO: PM-6408\n // 2024-02-20: Remove refresh token from memory and disk so that we migrate to secure storage over time.\n // Remove these 2 calls to remove the refresh token from memory and disk after 3 months.\n await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_DISK).update((_) => null);\n await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_MEMORY).update((_) => null);\n } catch (error) {\n // This case could be hit for both Linux users who don't have secure storage configured\n // or for Windows users who have intermittent issues with secure storage.\n this.logService.error(\n `SetRefreshToken: storing refresh token in secure storage failed. Falling back to disk storage.`,\n error,\n );\n\n // Fall back to disk storage for refresh token\n decryptedRefreshToken = await this.singleUserStateProvider\n .get(userId, REFRESH_TOKEN_DISK)\n .update((_) => refreshToken);\n }\n\n return decryptedRefreshToken;\n }\n case TokenStorageLocation.Disk:\n return await this.singleUserStateProvider\n .get(userId, REFRESH_TOKEN_DISK)\n .update((_) => refreshToken);\n\n case TokenStorageLocation.Memory:\n return await this.singleUserStateProvider\n .get(userId, REFRESH_TOKEN_MEMORY)\n .update((_) => refreshToken);\n }\n }\n\n async getRefreshToken(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n return null;\n }\n\n // pre-secure storage migration:\n // Always read memory first b/c faster\n const refreshTokenMemory = await this.getStateValueByUserIdAndKeyDef(\n userId,\n REFRESH_TOKEN_MEMORY,\n );\n\n if (refreshTokenMemory != null) {\n return refreshTokenMemory;\n }\n\n // if memory is null, read from disk and then secure storage\n const refreshTokenDisk = await this.getStateValueByUserIdAndKeyDef(userId, REFRESH_TOKEN_DISK);\n\n if (refreshTokenDisk != null) {\n // This handles the scenario pre-secure storage migration where the refresh token was stored on disk.\n return refreshTokenDisk;\n }\n\n if (this.platformSupportsSecureStorage) {\n try {\n const refreshTokenSecureStorage = await this.getStringFromSecureStorage(\n userId,\n this.refreshTokenSecureStorageKey,\n );\n\n if (refreshTokenSecureStorage != null) {\n return refreshTokenSecureStorage;\n }\n\n this.logService.error(\n \"Refresh token not found in secure storage. Access token will fail to refresh upon expiration or manual refresh.\",\n );\n } catch (error) {\n // This case will be hit for Linux users who don't have secure storage configured.\n\n this.logService.error(`Failed to retrieve refresh token from secure storage`, error);\n\n await this.logoutCallback(\"refreshTokenSecureStorageRetrievalFailure\", userId);\n }\n }\n\n return null;\n }\n\n private async clearRefreshToken(userId: UserId): Promise {\n // If we don't have a user id, we can't clear the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot clear refresh token.\");\n }\n\n // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n // but we can simply clear all locations to avoid the need to require those parameters\n\n if (this.platformSupportsSecureStorage) {\n await this.secureStorageService.remove(\n `${userId}${this.refreshTokenSecureStorageKey}`,\n this.getSecureStorageOptions(userId),\n );\n }\n\n // Platform doesn't support secure storage, so use state provider implementation\n await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_MEMORY).update((_) => null);\n await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_DISK).update((_) => null);\n }\n\n async setClientId(\n clientId: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId?: UserId,\n ): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n // If we don't have a user id, we can't save the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot save client id.\");\n }\n\n // Can't check for falsey b/c 0 is a valid value\n if (vaultTimeout == null) {\n throw new Error(\"Vault Timeout is required.\");\n }\n\n if (vaultTimeoutAction == null) {\n throw new Error(\"Vault Timeout Action is required.\");\n }\n\n const storageLocation = await this.determineStorageLocation(\n vaultTimeoutAction,\n vaultTimeout,\n false, // don't use secure storage for client id\n );\n\n if (storageLocation === TokenStorageLocation.Disk) {\n return await this.singleUserStateProvider\n .get(userId, API_KEY_CLIENT_ID_DISK)\n .update((_) => clientId);\n } else if (storageLocation === TokenStorageLocation.Memory) {\n return await this.singleUserStateProvider\n .get(userId, API_KEY_CLIENT_ID_MEMORY)\n .update((_) => clientId);\n }\n }\n\n async getClientId(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n return undefined;\n }\n\n // Always read memory first b/c faster\n const apiKeyClientIdMemory = await this.getStateValueByUserIdAndKeyDef(\n userId,\n API_KEY_CLIENT_ID_MEMORY,\n );\n\n if (apiKeyClientIdMemory != null) {\n return apiKeyClientIdMemory;\n }\n\n // if memory is null, read from disk\n return await this.getStateValueByUserIdAndKeyDef(userId, API_KEY_CLIENT_ID_DISK);\n }\n\n private async clearClientId(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n // If we don't have a user id, we can't clear the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot clear client id.\");\n }\n\n // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n // but we can simply clear both locations to avoid the need to require those parameters\n\n // Platform doesn't support secure storage, so use state provider implementation\n await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_ID_MEMORY).update((_) => null);\n await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_ID_DISK).update((_) => null);\n }\n\n async setClientSecret(\n clientSecret: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId?: UserId,\n ): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot save client secret.\");\n }\n\n // Can't check for falsey b/c 0 is a valid value\n if (vaultTimeout == null) {\n throw new Error(\"Vault Timeout is required.\");\n }\n\n if (vaultTimeoutAction == null) {\n throw new Error(\"Vault Timeout Action is required.\");\n }\n\n const storageLocation = await this.determineStorageLocation(\n vaultTimeoutAction,\n vaultTimeout,\n false, // don't use secure storage for client secret\n );\n\n if (storageLocation === TokenStorageLocation.Disk) {\n return await this.singleUserStateProvider\n .get(userId, API_KEY_CLIENT_SECRET_DISK)\n .update((_) => clientSecret);\n } else if (storageLocation === TokenStorageLocation.Memory) {\n return await this.singleUserStateProvider\n .get(userId, API_KEY_CLIENT_SECRET_MEMORY)\n .update((_) => clientSecret);\n }\n }\n\n async getClientSecret(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n return undefined;\n }\n\n // Always read memory first b/c faster\n const apiKeyClientSecretMemory = await this.getStateValueByUserIdAndKeyDef(\n userId,\n API_KEY_CLIENT_SECRET_MEMORY,\n );\n\n if (apiKeyClientSecretMemory != null) {\n return apiKeyClientSecretMemory;\n }\n\n // if memory is null, read from disk\n return await this.getStateValueByUserIdAndKeyDef(userId, API_KEY_CLIENT_SECRET_DISK);\n }\n\n private async clearClientSecret(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n // If we don't have a user id, we can't clear the value\n if (!userId) {\n throw new Error(\"User id not found. Cannot clear client secret.\");\n }\n\n // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n // but we can simply clear both locations to avoid the need to require those parameters\n\n // Platform doesn't support secure storage, so use state provider implementation\n await this.singleUserStateProvider\n .get(userId, API_KEY_CLIENT_SECRET_MEMORY)\n .update((_) => null);\n await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_SECRET_DISK).update((_) => null);\n }\n\n async setTwoFactorToken(email: string, twoFactorToken: string): Promise {\n await this.emailTwoFactorTokenRecordGlobalState.update((emailTwoFactorTokenRecord) => {\n emailTwoFactorTokenRecord ??= {};\n\n emailTwoFactorTokenRecord[email] = twoFactorToken;\n return emailTwoFactorTokenRecord;\n });\n }\n\n async getTwoFactorToken(email: string): Promise {\n const emailTwoFactorTokenRecord: Record = await firstValueFrom(\n this.emailTwoFactorTokenRecordGlobalState.state$,\n );\n\n if (!emailTwoFactorTokenRecord) {\n return null;\n }\n\n return emailTwoFactorTokenRecord[email];\n }\n\n async clearTwoFactorToken(email: string): Promise {\n await this.emailTwoFactorTokenRecordGlobalState.update((emailTwoFactorTokenRecord) => {\n emailTwoFactorTokenRecord ??= {};\n delete emailTwoFactorTokenRecord[email];\n return emailTwoFactorTokenRecord;\n });\n }\n\n // TODO: stop accepting optional userIds\n async clearTokens(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot clear tokens.\");\n }\n\n await Promise.all([\n this.clearAccessToken(userId),\n this.clearRefreshToken(userId),\n this.clearClientId(userId),\n this.clearClientSecret(userId),\n ]);\n }\n\n // jwthelper methods\n // ref https://github.com/auth0/angular-jwt/blob/master/src/angularJwt/services/jwt.js\n\n async decodeAccessToken(token?: string): Promise {\n token = token ?? (await this.getAccessToken());\n\n if (token == null) {\n throw new Error(\"Access token not found.\");\n }\n\n return decodeJwtTokenToJson(token) as DecodedAccessToken;\n }\n\n // TODO: PM-6678- tech debt - consider consolidating the return types of all these access\n // token data retrieval methods to return null if something goes wrong instead of throwing an error.\n\n async getTokenExpirationDate(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n // per RFC, exp claim is optional but if it exists, it should be a number\n if (!decoded || typeof decoded.exp !== \"number\") {\n return null;\n }\n\n // The 0 in Date(0) is the key; it sets the date to the epoch\n const expirationDate = new Date(0);\n expirationDate.setUTCSeconds(decoded.exp);\n return expirationDate;\n }\n\n async tokenSecondsRemaining(offsetSeconds = 0): Promise {\n const date = await this.getTokenExpirationDate();\n if (date == null) {\n return 0;\n }\n\n const msRemaining = date.valueOf() - (new Date().valueOf() + offsetSeconds * 1000);\n return Math.round(msRemaining / 1000);\n }\n\n async tokenNeedsRefresh(minutes = 5): Promise {\n const sRemaining = await this.tokenSecondsRemaining();\n return sRemaining < 60 * minutes;\n }\n\n async getUserId(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.sub !== \"string\") {\n throw new Error(\"No user id found\");\n }\n\n return decoded.sub as UserId;\n }\n\n private async getUserIdFromAccessToken(accessToken: string): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken(accessToken);\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.sub !== \"string\") {\n throw new Error(\"No user id found\");\n }\n\n return decoded.sub as UserId;\n }\n\n async getEmail(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.email !== \"string\") {\n throw new Error(\"No email found\");\n }\n\n return decoded.email;\n }\n\n async getEmailVerified(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.email_verified !== \"boolean\") {\n throw new Error(\"No email verification found\");\n }\n\n return decoded.email_verified;\n }\n\n async getName(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.name !== \"string\") {\n return null;\n }\n\n return decoded.name;\n }\n\n async getIssuer(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n if (!decoded || typeof decoded.iss !== \"string\") {\n throw new Error(\"No issuer found\");\n }\n\n return decoded.iss;\n }\n\n async getIsExternal(): Promise {\n let decoded: DecodedAccessToken;\n try {\n decoded = await this.decodeAccessToken();\n } catch (error) {\n throw new Error(\"Failed to decode access token: \" + error.message);\n }\n\n return Array.isArray(decoded.amr) && decoded.amr.includes(\"external\");\n }\n\n async getSecurityStamp(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot get security stamp.\");\n }\n\n const securityStamp = await this.getStateValueByUserIdAndKeyDef(userId, SECURITY_STAMP_MEMORY);\n\n return securityStamp;\n }\n\n async setSecurityStamp(securityStamp: string, userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n if (!userId) {\n throw new Error(\"User id not found. Cannot set security stamp.\");\n }\n\n await this.singleUserStateProvider\n .get(userId, SECURITY_STAMP_MEMORY)\n .update((_) => securityStamp);\n }\n\n private async getStateValueByUserIdAndKeyDef(\n userId: UserId,\n storageLocation: UserKeyDefinition,\n ): Promise {\n // read from single user state provider\n return await firstValueFrom(this.singleUserStateProvider.get(userId, storageLocation).state$);\n }\n\n private async determineStorageLocation(\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n useSecureStorage: boolean,\n ): Promise {\n if (vaultTimeoutAction == null) {\n throw new Error(\n \"TokenService - determineStorageLocation: We expect the vault timeout action to always exist at this point.\",\n );\n }\n\n if (vaultTimeout == null) {\n throw new Error(\n \"TokenService - determineStorageLocation: We expect the vault timeout to always exist at this point.\",\n );\n }\n\n if (\n vaultTimeoutAction === VaultTimeoutAction.LogOut &&\n vaultTimeout !== VaultTimeoutStringType.Never\n ) {\n return TokenStorageLocation.Memory;\n } else {\n if (useSecureStorage && this.platformSupportsSecureStorage) {\n return TokenStorageLocation.SecureStorage;\n }\n\n return TokenStorageLocation.Disk;\n }\n }\n\n private async saveStringToSecureStorage(\n userId: UserId,\n storageKey: string,\n value: string,\n ): Promise {\n await this.secureStorageService.save(\n `${userId}${storageKey}`,\n value,\n this.getSecureStorageOptions(userId),\n );\n }\n\n private async getStringFromSecureStorage(\n userId: UserId,\n storageKey: string,\n ): Promise {\n // If we have a user ID, read from secure storage.\n return await this.secureStorageService.get(\n `${userId}${storageKey}`,\n this.getSecureStorageOptions(userId),\n );\n }\n\n private getSecureStorageOptions(userId: UserId): StorageOptions {\n return {\n storageLocation: StorageLocation.Disk,\n useSecureStorage: true,\n userId: userId,\n };\n }\n}\n","export class VerifyOTPRequest {\n OTP: string;\n\n constructor(OTP: string) {\n this.OTP = OTP;\n }\n}\n","import { PrfKey } from \"../../../../types/key\";\nimport { WebAuthnLoginAssertionResponseRequest } from \"../../../services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\nexport class WebAuthnLoginCredentialAssertionView {\n constructor(\n readonly token: string,\n readonly deviceResponse: WebAuthnLoginAssertionResponseRequest,\n readonly prfKey?: PrfKey,\n ) {}\n}\n","export const TYPE_CHECK = {\n FUNCTION: \"function\",\n NUMBER: \"number\",\n STRING: \"string\",\n} as const;\n\nexport const EVENTS = {\n CHANGE: \"change\",\n INPUT: \"input\",\n KEYDOWN: \"keydown\",\n KEYPRESS: \"keypress\",\n KEYUP: \"keyup\",\n BLUR: \"blur\",\n CLICK: \"click\",\n FOCUS: \"focus\",\n FOCUSIN: \"focusin\",\n FOCUSOUT: \"focusout\",\n SCROLL: \"scroll\",\n RESIZE: \"resize\",\n DOMCONTENTLOADED: \"DOMContentLoaded\",\n LOAD: \"load\",\n MESSAGE: \"message\",\n VISIBILITYCHANGE: \"visibilitychange\",\n MOUSEENTER: \"mouseenter\",\n MOUSELEAVE: \"mouseleave\",\n} as const;\n\nexport const ClearClipboardDelay = {\n Never: null as null,\n TenSeconds: 10,\n TwentySeconds: 20,\n ThirtySeconds: 30,\n OneMinute: 60,\n TwoMinutes: 120,\n FiveMinutes: 300,\n} as const;\n\n/* Context Menu item Ids */\nexport const AUTOFILL_CARD_ID = \"autofill-card\";\nexport const AUTOFILL_ID = \"autofill\";\nexport const SHOW_AUTOFILL_BUTTON = \"show-autofill-button\";\nexport const AUTOFILL_IDENTITY_ID = \"autofill-identity\";\nexport const COPY_IDENTIFIER_ID = \"copy-identifier\";\nexport const COPY_PASSWORD_ID = \"copy-password\";\nexport const COPY_USERNAME_ID = \"copy-username\";\nexport const COPY_VERIFICATION_CODE_ID = \"copy-totp\";\nexport const CREATE_CARD_ID = \"create-card\";\nexport const CREATE_IDENTITY_ID = \"create-identity\";\nexport const CREATE_LOGIN_ID = \"create-login\";\nexport const GENERATE_PASSWORD_ID = \"generate-password\";\nexport const NOOP_COMMAND_SUFFIX = \"noop\";\nexport const ROOT_ID = \"root\";\nexport const SEPARATOR_ID = \"separator\";\n\nexport const NOTIFICATION_BAR_LIFESPAN_MS = 150000; // 150 seconds\n\nexport const AUTOFILL_OVERLAY_HANDLE_REPOSITION = \"autofill-overlay-handle-reposition-event\";\n\nexport const AutofillOverlayVisibility = {\n Off: 0,\n OnButtonClick: 1,\n OnFieldFocus: 2,\n} as const;\n","import { map, Observable } from \"rxjs\";\n\nimport { PolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../admin-console/enums\";\nimport {\n AUTOFILL_SETTINGS_DISK,\n AUTOFILL_SETTINGS_DISK_LOCAL,\n ActiveUserState,\n GlobalState,\n KeyDefinition,\n StateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\nimport { ClearClipboardDelay, AutofillOverlayVisibility } from \"../constants\";\nimport { ClearClipboardDelaySetting, InlineMenuVisibilitySetting } from \"../types\";\n\nconst AUTOFILL_ON_PAGE_LOAD = new UserKeyDefinition(AUTOFILL_SETTINGS_DISK, \"autofillOnPageLoad\", {\n deserializer: (value: boolean) => value ?? false,\n clearOn: [],\n});\n\nconst AUTOFILL_ON_PAGE_LOAD_DEFAULT = new UserKeyDefinition(\n AUTOFILL_SETTINGS_DISK,\n \"autofillOnPageLoadDefault\",\n {\n deserializer: (value: boolean) => value ?? false,\n clearOn: [],\n },\n);\n\nconst AUTOFILL_ON_PAGE_LOAD_CALLOUT_DISMISSED = new UserKeyDefinition(\n AUTOFILL_SETTINGS_DISK,\n \"autofillOnPageLoadCalloutIsDismissed\",\n {\n deserializer: (value: boolean) => value ?? false,\n clearOn: [],\n },\n);\n\nconst AUTOFILL_ON_PAGE_LOAD_POLICY_TOAST_HAS_DISPLAYED = new UserKeyDefinition(\n AUTOFILL_SETTINGS_DISK,\n \"autofillOnPageLoadPolicyToastHasDisplayed\",\n {\n deserializer: (value: boolean) => value ?? false,\n clearOn: [],\n },\n);\n\nconst AUTO_COPY_TOTP = new UserKeyDefinition(AUTOFILL_SETTINGS_DISK, \"autoCopyTotp\", {\n deserializer: (value: boolean) => value ?? true,\n clearOn: [],\n});\n\nconst INLINE_MENU_VISIBILITY = new KeyDefinition(\n AUTOFILL_SETTINGS_DISK_LOCAL,\n \"inlineMenuVisibility\",\n {\n deserializer: (value: InlineMenuVisibilitySetting) => value ?? AutofillOverlayVisibility.Off,\n },\n);\n\nconst ENABLE_CONTEXT_MENU = new KeyDefinition(AUTOFILL_SETTINGS_DISK, \"enableContextMenu\", {\n deserializer: (value: boolean) => value ?? true,\n});\n\nconst CLEAR_CLIPBOARD_DELAY = new UserKeyDefinition(\n AUTOFILL_SETTINGS_DISK_LOCAL,\n \"clearClipboardDelay\",\n {\n deserializer: (value: ClearClipboardDelaySetting) => value ?? ClearClipboardDelay.Never,\n clearOn: [],\n },\n);\n\nexport abstract class AutofillSettingsServiceAbstraction {\n autofillOnPageLoad$: Observable;\n setAutofillOnPageLoad: (newValue: boolean) => Promise;\n autofillOnPageLoadDefault$: Observable;\n setAutofillOnPageLoadDefault: (newValue: boolean) => Promise;\n autofillOnPageLoadCalloutIsDismissed$: Observable;\n setAutofillOnPageLoadCalloutIsDismissed: (newValue: boolean) => Promise;\n activateAutofillOnPageLoadFromPolicy$: Observable;\n setAutofillOnPageLoadPolicyToastHasDisplayed: (newValue: boolean) => Promise;\n autofillOnPageLoadPolicyToastHasDisplayed$: Observable;\n autoCopyTotp$: Observable;\n setAutoCopyTotp: (newValue: boolean) => Promise;\n inlineMenuVisibility$: Observable;\n setInlineMenuVisibility: (newValue: InlineMenuVisibilitySetting) => Promise;\n enableContextMenu$: Observable;\n setEnableContextMenu: (newValue: boolean) => Promise;\n clearClipboardDelay$: Observable;\n setClearClipboardDelay: (newValue: ClearClipboardDelaySetting) => Promise;\n}\n\nexport class AutofillSettingsService implements AutofillSettingsServiceAbstraction {\n private autofillOnPageLoadState: ActiveUserState;\n readonly autofillOnPageLoad$: Observable;\n\n private autofillOnPageLoadDefaultState: ActiveUserState;\n readonly autofillOnPageLoadDefault$: Observable;\n\n private autofillOnPageLoadCalloutIsDismissedState: ActiveUserState;\n readonly autofillOnPageLoadCalloutIsDismissed$: Observable;\n\n readonly activateAutofillOnPageLoadFromPolicy$: Observable;\n\n private autofillOnPageLoadPolicyToastHasDisplayedState: ActiveUserState;\n readonly autofillOnPageLoadPolicyToastHasDisplayed$: Observable;\n\n private autoCopyTotpState: ActiveUserState;\n readonly autoCopyTotp$: Observable;\n\n private inlineMenuVisibilityState: GlobalState;\n readonly inlineMenuVisibility$: Observable;\n\n private enableContextMenuState: GlobalState;\n readonly enableContextMenu$: Observable;\n\n private clearClipboardDelayState: ActiveUserState;\n readonly clearClipboardDelay$: Observable;\n\n constructor(\n private stateProvider: StateProvider,\n private policyService: PolicyService,\n ) {\n this.autofillOnPageLoadState = this.stateProvider.getActive(AUTOFILL_ON_PAGE_LOAD);\n this.autofillOnPageLoad$ = this.autofillOnPageLoadState.state$.pipe(map((x) => x ?? false));\n\n this.autofillOnPageLoadDefaultState = this.stateProvider.getActive(\n AUTOFILL_ON_PAGE_LOAD_DEFAULT,\n );\n this.autofillOnPageLoadDefault$ = this.autofillOnPageLoadDefaultState.state$.pipe(\n map((x) => x ?? true),\n );\n\n this.autofillOnPageLoadCalloutIsDismissedState = this.stateProvider.getActive(\n AUTOFILL_ON_PAGE_LOAD_CALLOUT_DISMISSED,\n );\n this.autofillOnPageLoadCalloutIsDismissed$ =\n this.autofillOnPageLoadCalloutIsDismissedState.state$.pipe(map((x) => x ?? false));\n\n this.activateAutofillOnPageLoadFromPolicy$ = this.policyService.policyAppliesToActiveUser$(\n PolicyType.ActivateAutofill,\n );\n\n this.autofillOnPageLoadPolicyToastHasDisplayedState = this.stateProvider.getActive(\n AUTOFILL_ON_PAGE_LOAD_POLICY_TOAST_HAS_DISPLAYED,\n );\n this.autofillOnPageLoadPolicyToastHasDisplayed$ = this.autofillOnPageLoadState.state$.pipe(\n map((x) => x ?? false),\n );\n\n this.autoCopyTotpState = this.stateProvider.getActive(AUTO_COPY_TOTP);\n this.autoCopyTotp$ = this.autoCopyTotpState.state$.pipe(map((x) => x ?? true));\n\n this.inlineMenuVisibilityState = this.stateProvider.getGlobal(INLINE_MENU_VISIBILITY);\n this.inlineMenuVisibility$ = this.inlineMenuVisibilityState.state$.pipe(\n map((x) => x ?? AutofillOverlayVisibility.Off),\n );\n\n this.enableContextMenuState = this.stateProvider.getGlobal(ENABLE_CONTEXT_MENU);\n this.enableContextMenu$ = this.enableContextMenuState.state$.pipe(map((x) => x ?? true));\n\n this.clearClipboardDelayState = this.stateProvider.getActive(CLEAR_CLIPBOARD_DELAY);\n this.clearClipboardDelay$ = this.clearClipboardDelayState.state$.pipe(\n map((x) => x ?? ClearClipboardDelay.Never),\n );\n }\n\n async setAutofillOnPageLoad(newValue: boolean): Promise {\n await this.autofillOnPageLoadState.update(() => newValue);\n }\n\n async setAutofillOnPageLoadDefault(newValue: boolean): Promise {\n await this.autofillOnPageLoadDefaultState.update(() => newValue);\n }\n\n async setAutofillOnPageLoadCalloutIsDismissed(newValue: boolean): Promise {\n await this.autofillOnPageLoadCalloutIsDismissedState.update(() => newValue);\n }\n\n async setAutofillOnPageLoadPolicyToastHasDisplayed(newValue: boolean): Promise {\n await this.autofillOnPageLoadPolicyToastHasDisplayedState.update(() => newValue);\n }\n\n async setAutoCopyTotp(newValue: boolean): Promise {\n await this.autoCopyTotpState.update(() => newValue);\n }\n\n async setInlineMenuVisibility(newValue: InlineMenuVisibilitySetting): Promise {\n await this.inlineMenuVisibilityState.update(() => newValue);\n }\n\n async setEnableContextMenu(newValue: boolean): Promise {\n await this.enableContextMenuState.update(() => newValue);\n }\n\n async setClearClipboardDelay(newValue: ClearClipboardDelaySetting): Promise {\n await this.clearClipboardDelayState.update(() => newValue);\n }\n}\n","import { map, Observable } from \"rxjs\";\n\nimport {\n BADGE_SETTINGS_DISK,\n ActiveUserState,\n StateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\n\nconst ENABLE_BADGE_COUNTER = new UserKeyDefinition(BADGE_SETTINGS_DISK, \"enableBadgeCounter\", {\n deserializer: (value: boolean) => value ?? true,\n clearOn: [],\n});\n\nexport abstract class BadgeSettingsServiceAbstraction {\n enableBadgeCounter$: Observable;\n setEnableBadgeCounter: (newValue: boolean) => Promise;\n}\n\nexport class BadgeSettingsService implements BadgeSettingsServiceAbstraction {\n private enableBadgeCounterState: ActiveUserState;\n readonly enableBadgeCounter$: Observable;\n\n constructor(private stateProvider: StateProvider) {\n this.enableBadgeCounterState = this.stateProvider.getActive(ENABLE_BADGE_COUNTER);\n this.enableBadgeCounter$ = this.enableBadgeCounterState.state$.pipe(map((x) => x ?? true));\n }\n\n async setEnableBadgeCounter(newValue: boolean): Promise {\n await this.enableBadgeCounterState.update(() => newValue);\n }\n}\n","import { map, Observable, of, switchMap } from \"rxjs\";\n\nimport {\n ActiveUserState,\n BILLING_DISK,\n StateProvider,\n UserKeyDefinition,\n} from \"../../../platform/state\";\nimport {\n BillingAccountProfile,\n BillingAccountProfileStateService,\n} from \"../../abstractions/account/billing-account-profile-state.service\";\n\nexport const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION = new UserKeyDefinition(\n BILLING_DISK,\n \"accountProfile\",\n {\n deserializer: (billingAccountProfile) => billingAccountProfile,\n clearOn: [\"logout\"],\n },\n);\n\nexport class DefaultBillingAccountProfileStateService implements BillingAccountProfileStateService {\n private billingAccountProfileState: ActiveUserState;\n\n hasPremiumFromAnyOrganization$: Observable;\n hasPremiumPersonally$: Observable;\n hasPremiumFromAnySource$: Observable;\n\n constructor(stateProvider: StateProvider) {\n this.billingAccountProfileState = stateProvider.getActive(\n BILLING_ACCOUNT_PROFILE_KEY_DEFINITION,\n );\n\n // Setup an observable that will always track the currently active user\n // but will fallback to emitting null when there is no active user.\n const billingAccountProfileOrNull = stateProvider.activeUserId$.pipe(\n switchMap((userId) =>\n userId != null\n ? stateProvider.getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION).state$\n : of(null),\n ),\n );\n\n this.hasPremiumFromAnyOrganization$ = billingAccountProfileOrNull.pipe(\n map((billingAccountProfile) => !!billingAccountProfile?.hasPremiumFromAnyOrganization),\n );\n\n this.hasPremiumPersonally$ = billingAccountProfileOrNull.pipe(\n map((billingAccountProfile) => !!billingAccountProfile?.hasPremiumPersonally),\n );\n\n this.hasPremiumFromAnySource$ = billingAccountProfileOrNull.pipe(\n map(\n (billingAccountProfile) =>\n billingAccountProfile?.hasPremiumFromAnyOrganization === true ||\n billingAccountProfile?.hasPremiumPersonally === true,\n ),\n );\n }\n\n async setHasPremium(\n hasPremiumPersonally: boolean,\n hasPremiumFromAnyOrganization: boolean,\n ): Promise {\n await this.billingAccountProfileState.update((billingAccountProfile) => {\n return {\n hasPremiumPersonally: hasPremiumPersonally,\n hasPremiumFromAnyOrganization: hasPremiumFromAnyOrganization,\n };\n });\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationBillingMetadataResponse extends BaseResponse {\n isOnSecretsManagerStandalone: boolean;\n\n constructor(response: any) {\n super(response);\n this.isOnSecretsManagerStandalone = this.getResponseProperty(\"IsOnSecretsManagerStandalone\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationBillingStatusResponse extends BaseResponse {\n organizationId: string;\n organizationName: string;\n risksSubscriptionFailure: boolean;\n\n constructor(response: any) {\n super(response);\n\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.organizationName = this.getResponseProperty(\"OrganizationName\");\n this.risksSubscriptionFailure = this.getResponseProperty(\"RisksSubscriptionFailure\");\n }\n}\n","import { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class MaskedPaymentMethodResponse extends BaseResponse {\n type: PaymentMethodType;\n description: string;\n needsVerification: boolean;\n\n constructor(response: any) {\n super(response);\n this.type = this.getResponseProperty(\"Type\");\n this.description = this.getResponseProperty(\"Description\");\n this.needsVerification = this.getResponseProperty(\"NeedsVerification\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { MaskedPaymentMethodResponse } from \"./masked-payment-method.response\";\nimport { TaxInfoResponse } from \"./tax-info.response\";\n\nexport class PaymentInformationResponse extends BaseResponse {\n accountCredit: number;\n paymentMethod?: MaskedPaymentMethodResponse;\n taxInformation?: TaxInfoResponse;\n\n constructor(response: any) {\n super(response);\n this.accountCredit = this.getResponseProperty(\"AccountCredit\");\n\n const paymentMethod = this.getResponseProperty(\"PaymentMethod\");\n if (paymentMethod) {\n this.paymentMethod = new MaskedPaymentMethodResponse(paymentMethod);\n }\n\n const taxInformation = this.getResponseProperty(\"TaxInformation\");\n if (taxInformation) {\n this.taxInformation = new TaxInfoResponse(taxInformation);\n }\n }\n}\n","import { BILLING_DISK, UserKeyDefinition } from \"../../platform/state\";\nimport { PaymentMethodWarning } from \"../models/domain/payment-method-warning\";\n\nexport const PAYMENT_METHOD_WARNINGS_KEY = UserKeyDefinition.record(\n BILLING_DISK,\n \"paymentMethodWarnings\",\n {\n deserializer: (warnings) => ({\n ...warnings,\n savedAt: new Date(warnings.savedAt),\n }),\n clearOn: [\"logout\"],\n },\n);\n","import { UserId } from \"../../../types/guid\";\nimport { ServerConfigResponse } from \"../../models/response/server-config.response\";\n\nexport abstract class ConfigApiServiceAbstraction {\n /**\n * Fetches the server configuration for the given user. If no user is provided, the configuration will not contain user-specific context.\n */\n abstract get(userId: UserId | undefined): Promise;\n}\n","import { FileUploadType } from \"../../enums\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\n\nexport abstract class FileUploadService {\n abstract upload(\n uploadData: { url: string; fileUploadType: FileUploadType },\n fileName: EncString,\n encryptedFileData: EncArrayBuffer,\n fileUploadMethods: FileUploadApiMethods,\n ): Promise;\n}\n\nexport type FileUploadApiMethods = {\n postDirect: (fileData: FormData) => Promise;\n renewFileUploadUrl: () => Promise;\n rollback: () => Promise;\n};\n","import { Observable } from \"rxjs\";\n\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\nexport type StorageUpdateType = \"save\" | \"remove\";\nexport type StorageUpdate = {\n key: string;\n updateType: StorageUpdateType;\n};\n\nexport interface ObservableStorageService {\n /**\n * Provides an {@link Observable} that represents a stream of updates that\n * have happened in this storage service or in the storage this service provides\n * an interface to.\n */\n get updates$(): Observable;\n}\n\nexport abstract class AbstractStorageService {\n abstract get valuesRequireDeserialization(): boolean;\n abstract get(key: string, options?: StorageOptions): Promise;\n abstract has(key: string, options?: StorageOptions): Promise;\n abstract save(key: string, obj: T, options?: StorageOptions): Promise;\n abstract remove(key: string, options?: StorageOptions): Promise;\n}\n","import { Account } from \"../models/domain/account\";\n\nexport class AccountFactory {\n private accountConstructor: new (init: Partial) => T;\n\n constructor(accountConstructor: new (init: Partial) => T) {\n this.accountConstructor = accountConstructor;\n }\n\n create(args: Partial) {\n return new this.accountConstructor(args);\n }\n}\n","import { GlobalState } from \"../models/domain/global-state\";\n\nexport class GlobalStateFactory {\n private globalStateConstructor: new (init: Partial) => T;\n\n constructor(globalStateConstructor: new (init: Partial) => T) {\n this.globalStateConstructor = globalStateConstructor;\n }\n\n create(args?: Partial) {\n return new this.globalStateConstructor(args);\n }\n}\n","import { Account } from \"../models/domain/account\";\nimport { GlobalState } from \"../models/domain/global-state\";\n\nimport { AccountFactory } from \"./account-factory\";\nimport { GlobalStateFactory } from \"./global-state-factory\";\n\nexport class StateFactory<\n TGlobal extends GlobalState = GlobalState,\n TAccount extends Account = Account,\n> {\n private globalStateFactory: GlobalStateFactory;\n private accountFactory: AccountFactory;\n\n constructor(\n globalStateConstructor: new (init: Partial) => TGlobal,\n accountConstructor: new (init: Partial) => TAccount,\n ) {\n this.globalStateFactory = new GlobalStateFactory(globalStateConstructor);\n this.accountFactory = new AccountFactory(accountConstructor);\n }\n\n createGlobal(args: Partial): TGlobal {\n return this.globalStateFactory.create(args);\n }\n\n createAccount(args: Partial): TAccount {\n return this.accountFactory.create(args);\n }\n}\n","import { EMPTY, Observable, filter } from \"rxjs\";\n\nimport { Message, CommandDefinition } from \"./types\";\n\n/**\n * A class that allows for listening to messages coming through the application,\n * allows for listening of all messages or just the messages you care about.\n *\n * @note Consider NOT using messaging at all if you can. State Providers offer an observable stream of\n * data that is persisted. This can serve messages that might have been used to notify of settings changes\n * or vault data changes and those observables should be preferred over messaging.\n */\nexport class MessageListener {\n constructor(private readonly messageStream: Observable>>) {}\n\n /**\n * A stream of all messages sent through the application. It does not contain type information for the\n * other properties on the messages. You are encouraged to instead subscribe to an individual message\n * through {@link messages$}.\n */\n allMessages$ = this.messageStream;\n\n /**\n * Creates an observable stream filtered to just the command given via the {@link CommandDefinition} and typed\n * to the generic contained in the CommandDefinition. Be careful using this method unless all your messages are being\n * sent through `MessageSender.send`, if that isn't the case you should have lower confidence in the message\n * payload being the expected type.\n *\n * @param commandDefinition The CommandDefinition containing the information about the message type you care about.\n */\n messages$>(\n commandDefinition: CommandDefinition,\n ): Observable {\n return this.allMessages$.pipe(\n filter((msg) => msg?.command === commandDefinition.command),\n ) as Observable;\n }\n\n /**\n * A helper property for returning a MessageListener that will never emit any messages and will immediately complete.\n */\n static readonly EMPTY = new MessageListener(EMPTY);\n}\n","import { map } from \"rxjs\";\n\nimport { CommandDefinition } from \"./types\";\n\nexport const getCommand = (\n commandDefinition: CommandDefinition> | string,\n) => {\n if (typeof commandDefinition === \"string\") {\n return commandDefinition;\n } else {\n return commandDefinition.command;\n }\n};\n\nexport const EXTERNAL_SOURCE_TAG = Symbol(\"externalSource\");\n\nexport const isExternalMessage = (message: Record) => {\n return message?.[EXTERNAL_SOURCE_TAG] === true;\n};\n\nexport const tagAsExternal = >() => {\n return map((message: T) => {\n return Object.assign(message, { [EXTERNAL_SOURCE_TAG]: true });\n });\n};\n","import { Subject } from \"rxjs\";\n\nimport { getCommand } from \"./internal\";\nimport { MessageSender } from \"./message.sender\";\nimport { Message, CommandDefinition } from \"./types\";\n\nexport class SubjectMessageSender implements MessageSender {\n constructor(private readonly messagesSubject: Subject>>) {}\n\n send>(\n commandDefinition: string | CommandDefinition,\n payload: Record | T = {},\n ): void {\n const command = getCommand(commandDefinition);\n this.messagesSubject.next(Object.assign(payload ?? {}, { command: command }));\n }\n}\n","export class GlobalState {\n enableDuckDuckGoBrowserIntegration?: boolean;\n}\n","import { Observable, concatMap, distinctUntilChanged, firstValueFrom, share } from \"rxjs\";\n\nimport { AppIdService as AppIdServiceAbstraction } from \"../abstractions/app-id.service\";\nimport { Utils } from \"../misc/utils\";\nimport { APPLICATION_ID_DISK, GlobalStateProvider, KeyDefinition } from \"../state\";\n\nexport const APP_ID_KEY = new KeyDefinition(APPLICATION_ID_DISK, \"appId\", {\n deserializer: (value: string) => value,\n});\nexport const ANONYMOUS_APP_ID_KEY = new KeyDefinition(APPLICATION_ID_DISK, \"anonymousAppId\", {\n deserializer: (value: string) => value,\n});\n\nexport class AppIdService implements AppIdServiceAbstraction {\n appId$: Observable;\n anonymousAppId$: Observable;\n\n constructor(globalStateProvider: GlobalStateProvider) {\n const appIdState = globalStateProvider.get(APP_ID_KEY);\n const anonymousAppIdState = globalStateProvider.get(ANONYMOUS_APP_ID_KEY);\n this.appId$ = appIdState.state$.pipe(\n concatMap(async (appId) => {\n if (!appId) {\n return await appIdState.update(() => Utils.newGuid(), {\n shouldUpdate: (v) => v == null,\n });\n }\n return appId;\n }),\n distinctUntilChanged(),\n share(),\n );\n this.anonymousAppId$ = anonymousAppIdState.state$.pipe(\n concatMap(async (appId) => {\n if (!appId) {\n return await anonymousAppIdState.update(() => Utils.newGuid(), {\n shouldUpdate: (v) => v == null,\n });\n }\n return appId;\n }),\n distinctUntilChanged(),\n share(),\n );\n }\n\n async getAppId(): Promise {\n return await firstValueFrom(this.appId$);\n }\n\n async getAnonymousAppId(): Promise {\n return await firstValueFrom(this.anonymousAppId$);\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { Region } from \"../../abstractions/environment.service\";\n\nexport class ServerConfigResponse extends BaseResponse {\n version: string;\n gitHash: string;\n server: ThirdPartyServerConfigResponse;\n environment: EnvironmentServerConfigResponse;\n featureStates: { [key: string]: string } = {};\n\n constructor(response: any) {\n super(response);\n\n if (response == null) {\n return;\n }\n\n this.version = this.getResponseProperty(\"Version\");\n this.gitHash = this.getResponseProperty(\"GitHash\");\n this.server = new ThirdPartyServerConfigResponse(this.getResponseProperty(\"Server\"));\n this.environment = new EnvironmentServerConfigResponse(this.getResponseProperty(\"Environment\"));\n this.featureStates = this.getResponseProperty(\"FeatureStates\");\n }\n}\n\nexport class EnvironmentServerConfigResponse extends BaseResponse {\n cloudRegion: Region;\n vault: string;\n api: string;\n identity: string;\n notifications: string;\n sso: string;\n\n constructor(data: any = null) {\n super(data);\n\n if (data == null) {\n return;\n }\n\n this.cloudRegion = this.getResponseProperty(\"CloudRegion\");\n this.vault = this.getResponseProperty(\"Vault\");\n this.api = this.getResponseProperty(\"Api\");\n this.identity = this.getResponseProperty(\"Identity\");\n this.notifications = this.getResponseProperty(\"Notifications\");\n this.sso = this.getResponseProperty(\"Sso\");\n }\n}\n\nexport class ThirdPartyServerConfigResponse extends BaseResponse {\n name: string;\n url: string;\n\n constructor(data: any = null) {\n super(data);\n\n if (data == null) {\n return;\n }\n\n this.name = this.getResponseProperty(\"Name\");\n this.url = this.getResponseProperty(\"Url\");\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { AllowedFeatureFlagTypes } from \"../../../enums/feature-flag.enum\";\nimport {\n ServerConfigData,\n ThirdPartyServerConfigData,\n EnvironmentServerConfigData,\n} from \"../../models/data/server-config.data\";\n\nconst dayInMilliseconds = 24 * 3600 * 1000;\n\nexport class ServerConfig {\n version: string;\n gitHash: string;\n server?: ThirdPartyServerConfigData;\n environment?: EnvironmentServerConfigData;\n utcDate: Date;\n featureStates: { [key: string]: AllowedFeatureFlagTypes } = {};\n\n constructor(serverConfigData: ServerConfigData) {\n this.version = serverConfigData.version;\n this.gitHash = serverConfigData.gitHash;\n this.server = serverConfigData.server;\n this.utcDate = new Date(serverConfigData.utcDate);\n this.environment = serverConfigData.environment;\n this.featureStates = serverConfigData.featureStates;\n\n if (this.server?.name == null && this.server?.url == null) {\n this.server = null;\n }\n }\n\n private getAgeInMilliseconds(): number {\n return new Date().getTime() - this.utcDate?.getTime();\n }\n\n isValid(): boolean {\n return this.getAgeInMilliseconds() <= dayInMilliseconds;\n }\n\n static fromJSON(obj: Jsonify): ServerConfig {\n if (obj == null) {\n return null;\n }\n\n return new ServerConfig(obj);\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { AllowedFeatureFlagTypes } from \"../../../enums/feature-flag.enum\";\nimport { Region } from \"../../abstractions/environment.service\";\nimport {\n ServerConfigResponse,\n ThirdPartyServerConfigResponse,\n EnvironmentServerConfigResponse,\n} from \"../response/server-config.response\";\n\nexport class ServerConfigData {\n version: string;\n gitHash: string;\n server?: ThirdPartyServerConfigData;\n environment?: EnvironmentServerConfigData;\n utcDate: string;\n featureStates: { [key: string]: AllowedFeatureFlagTypes } = {};\n\n constructor(serverConfigResponse: Partial) {\n this.version = serverConfigResponse?.version;\n this.gitHash = serverConfigResponse?.gitHash;\n this.server = serverConfigResponse?.server\n ? new ThirdPartyServerConfigData(serverConfigResponse.server)\n : null;\n this.utcDate = new Date().toISOString();\n this.environment = serverConfigResponse?.environment\n ? new EnvironmentServerConfigData(serverConfigResponse.environment)\n : null;\n this.featureStates = serverConfigResponse?.featureStates;\n }\n\n static fromJSON(obj: Jsonify): ServerConfigData {\n return Object.assign(new ServerConfigData({}), obj, {\n server: obj?.server ? ThirdPartyServerConfigData.fromJSON(obj.server) : null,\n environment: obj?.environment ? EnvironmentServerConfigData.fromJSON(obj.environment) : null,\n });\n }\n}\n\nexport class ThirdPartyServerConfigData {\n name: string;\n url: string;\n\n constructor(response: Partial) {\n this.name = response.name;\n this.url = response.url;\n }\n\n static fromJSON(obj: Jsonify): ThirdPartyServerConfigData {\n return Object.assign(new ThirdPartyServerConfigData({}), obj);\n }\n}\n\nexport class EnvironmentServerConfigData {\n cloudRegion: Region;\n vault: string;\n api: string;\n identity: string;\n notifications: string;\n sso: string;\n\n constructor(response: Partial) {\n this.cloudRegion = response.cloudRegion;\n this.vault = response.vault;\n this.api = response.api;\n this.identity = response.identity;\n this.notifications = response.notifications;\n this.sso = response.sso;\n }\n\n static fromJSON(obj: Jsonify): EnvironmentServerConfigData {\n return Object.assign(new EnvironmentServerConfigData({}), obj);\n }\n}\n","import {\n combineLatest,\n firstValueFrom,\n map,\n mergeWith,\n NEVER,\n Observable,\n of,\n shareReplay,\n Subject,\n switchMap,\n tap,\n} from \"rxjs\";\nimport { SemVer } from \"semver\";\n\nimport { AuthService } from \"../../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../../auth/enums/authentication-status\";\nimport {\n DefaultFeatureFlagValue,\n FeatureFlag,\n FeatureFlagValueType,\n} from \"../../../enums/feature-flag.enum\";\nimport { UserId } from \"../../../types/guid\";\nimport { ConfigApiServiceAbstraction } from \"../../abstractions/config/config-api.service.abstraction\";\nimport { ConfigService } from \"../../abstractions/config/config.service\";\nimport { ServerConfig } from \"../../abstractions/config/server-config\";\nimport { EnvironmentService, Region } from \"../../abstractions/environment.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { devFlagEnabled, devFlagValue } from \"../../misc/flags\";\nimport { ServerConfigData } from \"../../models/data/server-config.data\";\nimport { CONFIG_DISK, KeyDefinition, StateProvider, UserKeyDefinition } from \"../../state\";\n\nexport const RETRIEVAL_INTERVAL = devFlagEnabled(\"configRetrievalIntervalMs\")\n ? (devFlagValue(\"configRetrievalIntervalMs\") as number)\n : 3_600_000; // 1 hour\n\nexport type ApiUrl = string;\n\nexport const USER_SERVER_CONFIG = new UserKeyDefinition(CONFIG_DISK, \"serverConfig\", {\n deserializer: (data) => (data == null ? null : ServerConfig.fromJSON(data)),\n clearOn: [\"logout\"],\n});\n\nexport const GLOBAL_SERVER_CONFIGURATIONS = KeyDefinition.record(\n CONFIG_DISK,\n \"byServer\",\n {\n deserializer: (data) => (data == null ? null : ServerConfig.fromJSON(data)),\n },\n);\n\n// FIXME: currently we are limited to api requests for active users. Update to accept a UserId and APIUrl once ApiService supports it.\nexport class DefaultConfigService implements ConfigService {\n private failedFetchFallbackSubject = new Subject();\n\n serverConfig$: Observable;\n\n cloudRegion$: Observable;\n\n constructor(\n private configApiService: ConfigApiServiceAbstraction,\n private environmentService: EnvironmentService,\n private logService: LogService,\n private stateProvider: StateProvider,\n private authService: AuthService,\n ) {\n const apiUrl$ = this.environmentService.environment$.pipe(\n map((environment) => environment.getApiUrl()),\n );\n const userId$ = this.stateProvider.activeUserId$;\n const authStatus$ = userId$.pipe(\n switchMap((userId) => (userId == null ? of(null) : this.authService.authStatusFor$(userId))),\n );\n\n this.serverConfig$ = combineLatest([userId$, apiUrl$, authStatus$]).pipe(\n switchMap(([userId, apiUrl, authStatus]) => {\n if (userId == null || authStatus !== AuthenticationStatus.Unlocked) {\n return this.globalConfigFor$(apiUrl).pipe(\n map((config) => [config, null, apiUrl] as const),\n );\n }\n\n return this.userConfigFor$(userId).pipe(map((config) => [config, userId, apiUrl] as const));\n }),\n tap(async (rec) => {\n const [existingConfig, userId, apiUrl] = rec;\n // Grab new config if older retrieval interval\n if (!existingConfig || this.olderThanRetrievalInterval(existingConfig.utcDate)) {\n await this.renewConfig(existingConfig, userId, apiUrl);\n }\n }),\n switchMap(([existingConfig]) => {\n // If we needed to fetch, stop this emit, we'll get a new one after update\n // This is split up with the above tap because we need to return an observable from a failed promise,\n // which isn't very doable since promises are converted to observables in switchMap\n if (!existingConfig || this.olderThanRetrievalInterval(existingConfig.utcDate)) {\n return NEVER;\n }\n return of(existingConfig);\n }),\n // If fetch fails, we'll emit on this subject to fallback to the existing config\n mergeWith(this.failedFetchFallbackSubject),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n this.cloudRegion$ = this.serverConfig$.pipe(\n map((config) => config?.environment?.cloudRegion ?? Region.US),\n );\n }\n\n getFeatureFlag$(key: Flag) {\n return this.serverConfig$.pipe(\n map((serverConfig) => {\n if (serverConfig?.featureStates == null || serverConfig.featureStates[key] == null) {\n return DefaultFeatureFlagValue[key];\n }\n\n return serverConfig.featureStates[key] as FeatureFlagValueType;\n }),\n );\n }\n\n async getFeatureFlag(key: Flag) {\n return await firstValueFrom(this.getFeatureFlag$(key));\n }\n\n checkServerMeetsVersionRequirement$(minimumRequiredServerVersion: SemVer) {\n return this.serverConfig$.pipe(\n map((serverConfig) => {\n if (serverConfig == null) {\n return false;\n }\n const serverVersion = new SemVer(serverConfig.version);\n return serverVersion.compare(minimumRequiredServerVersion) >= 0;\n }),\n );\n }\n\n async ensureConfigFetched() {\n // Triggering a retrieval for the given user ensures that the config is less than RETRIEVAL_INTERVAL old\n await firstValueFrom(this.serverConfig$);\n }\n\n private olderThanRetrievalInterval(date: Date) {\n return new Date().getTime() - date.getTime() > RETRIEVAL_INTERVAL;\n }\n\n // Updates the on-disk configuration with a newly retrieved configuration\n private async renewConfig(\n existingConfig: ServerConfig,\n userId: UserId,\n apiUrl: string,\n ): Promise {\n try {\n const response = await this.configApiService.get(userId);\n const newConfig = new ServerConfig(new ServerConfigData(response));\n\n // Update the environment region\n if (\n newConfig?.environment?.cloudRegion != null &&\n existingConfig?.environment?.cloudRegion != newConfig.environment.cloudRegion\n ) {\n // Null userId sets global, otherwise sets to the given user\n await this.environmentService.setCloudRegion(userId, newConfig?.environment?.cloudRegion);\n }\n\n if (userId == null) {\n // update global state with new pulled config\n await this.stateProvider.getGlobal(GLOBAL_SERVER_CONFIGURATIONS).update((configs) => {\n return { ...configs, [apiUrl]: newConfig };\n });\n } else {\n // update state with new pulled config\n await this.stateProvider.setUserState(USER_SERVER_CONFIG, newConfig, userId);\n }\n } catch (e) {\n // mutate error to be handled by catchError\n this.logService.error(\n `Unable to fetch ServerConfig from ${apiUrl}: ${(e as Error)?.message}`,\n );\n // Emit the existing config\n this.failedFetchFallbackSubject.next(existingConfig);\n }\n }\n\n private globalConfigFor$(apiUrl: string): Observable {\n return this.stateProvider\n .getGlobal(GLOBAL_SERVER_CONFIGURATIONS)\n .state$.pipe(map((configs) => configs?.[apiUrl]));\n }\n\n private userConfigFor$(userId: UserId): Observable {\n return this.stateProvider.getUser(userId, USER_SERVER_CONFIG).state$;\n }\n}\n","import { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { OrgKey, UserPrivateKey } from \"../../../types/key\";\nimport { EncryptedOrganizationKeyData } from \"../data/encrypted-organization-key.data\";\n\nexport abstract class BaseEncryptedOrganizationKey {\n abstract get encryptedOrganizationKey(): EncString;\n\n static fromData(data: EncryptedOrganizationKeyData) {\n switch (data.type) {\n case \"organization\":\n return new EncryptedOrganizationKey(data.key);\n\n case \"provider\":\n return new ProviderEncryptedOrganizationKey(data.key, data.providerId);\n\n default:\n return null;\n }\n }\n\n static isProviderEncrypted(\n key: EncryptedOrganizationKey | ProviderEncryptedOrganizationKey,\n ): key is ProviderEncryptedOrganizationKey {\n return key.toData().type === \"provider\";\n }\n}\n\nexport class EncryptedOrganizationKey implements BaseEncryptedOrganizationKey {\n constructor(private key: string) {}\n\n async decrypt(encryptService: EncryptService, privateKey: UserPrivateKey) {\n const decValue = await encryptService.rsaDecrypt(this.encryptedOrganizationKey, privateKey);\n return new SymmetricCryptoKey(decValue) as OrgKey;\n }\n\n get encryptedOrganizationKey() {\n return new EncString(this.key);\n }\n\n toData(): EncryptedOrganizationKeyData {\n return {\n type: \"organization\",\n key: this.key,\n };\n }\n}\n\nexport class ProviderEncryptedOrganizationKey implements BaseEncryptedOrganizationKey {\n constructor(\n private key: string,\n private providerId: string,\n ) {}\n\n async decrypt(encryptService: EncryptService, providerKeys: Record) {\n const decValue = await encryptService.decryptToBytes(\n new EncString(this.key),\n providerKeys[this.providerId],\n );\n return new SymmetricCryptoKey(decValue) as OrgKey;\n }\n\n get encryptedOrganizationKey() {\n return new EncString(this.key);\n }\n\n toData(): EncryptedOrganizationKeyData {\n return {\n type: \"provider\",\n key: this.key,\n providerId: this.providerId,\n };\n }\n}\n","import { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserKeyDefinition, VAULT_TIMEOUT_SETTINGS_DISK_LOCAL } from \"../../platform/state\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\n\n/**\n * Settings use disk storage and local storage on web so settings can persist after logout\n * in order for us to know if the user's chose to never lock their vault or not.\n * When the user has never lock selected, we have to set the user key in memory\n * from the user auto unlock key stored on disk on client bootstrap.\n */\nexport const VAULT_TIMEOUT_ACTION = new UserKeyDefinition(\n VAULT_TIMEOUT_SETTINGS_DISK_LOCAL,\n \"vaultTimeoutAction\",\n {\n deserializer: (vaultTimeoutAction) => vaultTimeoutAction,\n clearOn: [], // persisted on logout\n },\n);\n\nexport const VAULT_TIMEOUT = new UserKeyDefinition(\n VAULT_TIMEOUT_SETTINGS_DISK_LOCAL,\n \"vaultTimeout\",\n {\n deserializer: (vaultTimeout) => vaultTimeout,\n clearOn: [], // persisted on logout\n },\n);\n","import { EncryptedOrganizationKeyData } from \"../../../admin-console/models/data/encrypted-organization-key.data\";\nimport { OrganizationId } from \"../../../types/guid\";\nimport { CRYPTO_DISK, UserKeyDefinition } from \"../../state\";\n\nexport const USER_ENCRYPTED_ORGANIZATION_KEYS = UserKeyDefinition.record<\n EncryptedOrganizationKeyData,\n OrganizationId\n>(CRYPTO_DISK, \"organizationKeys\", {\n deserializer: (obj) => obj,\n clearOn: [\"logout\"],\n});\n","import { ProviderId } from \"../../../types/guid\";\nimport { EncryptedString } from \"../../models/domain/enc-string\";\nimport { CRYPTO_DISK, UserKeyDefinition } from \"../../state\";\n\nexport const USER_ENCRYPTED_PROVIDER_KEYS = UserKeyDefinition.record(\n CRYPTO_DISK,\n \"providerKeys\",\n {\n deserializer: (obj) => obj,\n clearOn: [\"logout\"],\n },\n);\n","import { UserKey } from \"../../../types/key\";\nimport { EncryptedString } from \"../../models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\nimport { CRYPTO_DISK, CRYPTO_MEMORY, UserKeyDefinition } from \"../../state\";\n\nexport const USER_EVER_HAD_USER_KEY = new UserKeyDefinition(\n CRYPTO_DISK,\n \"everHadUserKey\",\n {\n deserializer: (obj) => obj,\n clearOn: [\"logout\"],\n },\n);\n\nexport const USER_ENCRYPTED_PRIVATE_KEY = new UserKeyDefinition(\n CRYPTO_DISK,\n \"privateKey\",\n {\n deserializer: (obj) => obj,\n clearOn: [\"logout\"],\n },\n);\n\nexport const USER_KEY = new UserKeyDefinition(CRYPTO_MEMORY, \"userKey\", {\n deserializer: (obj) => SymmetricCryptoKey.fromJSON(obj) as UserKey,\n clearOn: [\"logout\", \"lock\"],\n});\n","import { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\n\nexport class EncryptedObject {\n iv: Uint8Array;\n data: Uint8Array;\n mac: Uint8Array;\n key: SymmetricCryptoKey;\n}\n","import { Utils } from \"../../../platform/misc/utils\";\nimport { CryptoFunctionService } from \"../../abstractions/crypto-function.service\";\nimport { EncryptService } from \"../../abstractions/encrypt.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { EncryptionType } from \"../../enums\";\nimport { Decryptable } from \"../../interfaces/decryptable.interface\";\nimport { Encrypted } from \"../../interfaces/encrypted\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\nimport { EncryptedObject } from \"../../models/domain/encrypted-object\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\n\nexport class EncryptServiceImplementation implements EncryptService {\n constructor(\n protected cryptoFunctionService: CryptoFunctionService,\n protected logService: LogService,\n protected logMacFailures: boolean,\n ) {}\n\n async encrypt(plainValue: string | Uint8Array, key: SymmetricCryptoKey): Promise {\n if (key == null) {\n throw new Error(\"No encryption key provided.\");\n }\n\n if (plainValue == null) {\n return Promise.resolve(null);\n }\n\n let plainBuf: Uint8Array;\n if (typeof plainValue === \"string\") {\n plainBuf = Utils.fromUtf8ToArray(plainValue);\n } else {\n plainBuf = plainValue;\n }\n\n const encObj = await this.aesEncrypt(plainBuf, key);\n const iv = Utils.fromBufferToB64(encObj.iv);\n const data = Utils.fromBufferToB64(encObj.data);\n const mac = encObj.mac != null ? Utils.fromBufferToB64(encObj.mac) : null;\n return new EncString(encObj.key.encType, data, iv, mac);\n }\n\n async encryptToBytes(plainValue: Uint8Array, key: SymmetricCryptoKey): Promise {\n if (key == null) {\n throw new Error(\"No encryption key provided.\");\n }\n\n const encValue = await this.aesEncrypt(plainValue, key);\n let macLen = 0;\n if (encValue.mac != null) {\n macLen = encValue.mac.byteLength;\n }\n\n const encBytes = new Uint8Array(1 + encValue.iv.byteLength + macLen + encValue.data.byteLength);\n encBytes.set([encValue.key.encType]);\n encBytes.set(new Uint8Array(encValue.iv), 1);\n if (encValue.mac != null) {\n encBytes.set(new Uint8Array(encValue.mac), 1 + encValue.iv.byteLength);\n }\n\n encBytes.set(new Uint8Array(encValue.data), 1 + encValue.iv.byteLength + macLen);\n return new EncArrayBuffer(encBytes);\n }\n\n async decryptToUtf8(encString: EncString, key: SymmetricCryptoKey): Promise {\n if (key == null) {\n throw new Error(\"No key provided for decryption.\");\n }\n\n key = this.resolveLegacyKey(key, encString);\n\n if (key.macKey != null && encString?.mac == null) {\n this.logService.error(\"mac required.\");\n return null;\n }\n\n if (key.encType !== encString.encryptionType) {\n this.logService.error(\"encType unavailable.\");\n return null;\n }\n\n const fastParams = this.cryptoFunctionService.aesDecryptFastParameters(\n encString.data,\n encString.iv,\n encString.mac,\n key,\n );\n if (fastParams.macKey != null && fastParams.mac != null) {\n const computedMac = await this.cryptoFunctionService.hmacFast(\n fastParams.macData,\n fastParams.macKey,\n \"sha256\",\n );\n const macsEqual = await this.cryptoFunctionService.compareFast(fastParams.mac, computedMac);\n if (!macsEqual) {\n this.logMacFailed(\"mac failed.\");\n return null;\n }\n }\n\n return await this.cryptoFunctionService.aesDecryptFast(fastParams, \"cbc\");\n }\n\n async decryptToBytes(encThing: Encrypted, key: SymmetricCryptoKey): Promise {\n if (key == null) {\n throw new Error(\"No encryption key provided.\");\n }\n\n if (encThing == null) {\n throw new Error(\"Nothing provided for decryption.\");\n }\n\n key = this.resolveLegacyKey(key, encThing);\n\n if (key.macKey != null && encThing.macBytes == null) {\n return null;\n }\n\n if (key.encType !== encThing.encryptionType) {\n return null;\n }\n\n if (key.macKey != null && encThing.macBytes != null) {\n const macData = new Uint8Array(encThing.ivBytes.byteLength + encThing.dataBytes.byteLength);\n macData.set(new Uint8Array(encThing.ivBytes), 0);\n macData.set(new Uint8Array(encThing.dataBytes), encThing.ivBytes.byteLength);\n const computedMac = await this.cryptoFunctionService.hmac(macData, key.macKey, \"sha256\");\n if (computedMac === null) {\n return null;\n }\n\n const macsMatch = await this.cryptoFunctionService.compare(encThing.macBytes, computedMac);\n if (!macsMatch) {\n this.logMacFailed(\"mac failed.\");\n return null;\n }\n }\n\n const result = await this.cryptoFunctionService.aesDecrypt(\n encThing.dataBytes,\n encThing.ivBytes,\n key.encKey,\n \"cbc\",\n );\n\n return result ?? null;\n }\n\n async rsaEncrypt(data: Uint8Array, publicKey: Uint8Array): Promise {\n if (data == null) {\n throw new Error(\"No data provided for encryption.\");\n }\n\n if (publicKey == null) {\n throw new Error(\"No public key provided for encryption.\");\n }\n const encrypted = await this.cryptoFunctionService.rsaEncrypt(data, publicKey, \"sha1\");\n return new EncString(EncryptionType.Rsa2048_OaepSha1_B64, Utils.fromBufferToB64(encrypted));\n }\n\n async rsaDecrypt(data: EncString, privateKey: Uint8Array): Promise {\n if (data == null) {\n throw new Error(\"No data provided for decryption.\");\n }\n\n let algorithm: \"sha1\" | \"sha256\";\n switch (data.encryptionType) {\n case EncryptionType.Rsa2048_OaepSha1_B64:\n case EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:\n algorithm = \"sha1\";\n break;\n case EncryptionType.Rsa2048_OaepSha256_B64:\n case EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:\n algorithm = \"sha256\";\n break;\n default:\n throw new Error(\"Invalid encryption type.\");\n }\n\n if (privateKey == null) {\n throw new Error(\"No private key provided for decryption.\");\n }\n\n return this.cryptoFunctionService.rsaDecrypt(data.dataBytes, privateKey, algorithm);\n }\n\n async decryptItems(\n items: Decryptable[],\n key: SymmetricCryptoKey,\n ): Promise {\n if (items == null || items.length < 1) {\n return [];\n }\n\n // don't use promise.all because this task is not io bound\n const results = [];\n for (let i = 0; i < items.length; i++) {\n results.push(await items[i].decrypt(key));\n }\n return results;\n }\n\n async hash(value: string | Uint8Array, algorithm: \"sha1\" | \"sha256\" | \"sha512\"): Promise {\n const hashArray = await this.cryptoFunctionService.hash(value, algorithm);\n return Utils.fromBufferToB64(hashArray);\n }\n\n private async aesEncrypt(data: Uint8Array, key: SymmetricCryptoKey): Promise {\n const obj = new EncryptedObject();\n obj.key = key;\n obj.iv = await this.cryptoFunctionService.randomBytes(16);\n obj.data = await this.cryptoFunctionService.aesEncrypt(data, obj.iv, obj.key.encKey);\n\n if (obj.key.macKey != null) {\n const macData = new Uint8Array(obj.iv.byteLength + obj.data.byteLength);\n macData.set(new Uint8Array(obj.iv), 0);\n macData.set(new Uint8Array(obj.data), obj.iv.byteLength);\n obj.mac = await this.cryptoFunctionService.hmac(macData, obj.key.macKey, \"sha256\");\n }\n\n return obj;\n }\n\n private logMacFailed(msg: string) {\n if (this.logMacFailures) {\n this.logService.error(msg);\n }\n }\n\n /**\n * Transform into new key for the old encrypt-then-mac scheme if required, otherwise return the current key unchanged\n * @param encThing The encrypted object (e.g. encString or encArrayBuffer) that you want to decrypt\n */\n resolveLegacyKey(key: SymmetricCryptoKey, encThing: Encrypted): SymmetricCryptoKey {\n if (\n encThing.encryptionType === EncryptionType.AesCbc128_HmacSha256_B64 &&\n key.encType === EncryptionType.AesCbc256_B64\n ) {\n return new SymmetricCryptoKey(key.key, EncryptionType.AesCbc128_HmacSha256_B64);\n }\n\n return key;\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Cipher } from \"../../../vault/models/domain/cipher\";\nimport { CipherView } from \"../../../vault/models/view/cipher.view\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\n\nimport { InitializerKey } from \"./initializer-key\";\n\n/**\n * Internal reference of classes so we can reconstruct objects properly.\n * Each entry should be keyed using the Decryptable.initializerKey property\n */\nconst classInitializers: Record any> = {\n [InitializerKey.Cipher]: Cipher.fromJSON,\n [InitializerKey.CipherView]: CipherView.fromJSON,\n};\n\nexport function getClassInitializer(\n className: InitializerKey,\n): (obj: Jsonify) => T {\n return classInitializers[className];\n}\n","import { distinctUntilChanged, firstValueFrom, map, Observable, switchMap } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { UserId } from \"../../types/guid\";\nimport {\n EnvironmentService,\n Environment,\n Region,\n RegionConfig,\n Urls,\n CloudRegion,\n} from \"../abstractions/environment.service\";\nimport { Utils } from \"../misc/utils\";\nimport {\n ENVIRONMENT_DISK,\n ENVIRONMENT_MEMORY,\n GlobalState,\n KeyDefinition,\n StateProvider,\n UserKeyDefinition,\n} from \"../state\";\n\nexport class EnvironmentUrls {\n base: string = null;\n api: string = null;\n identity: string = null;\n icons: string = null;\n notifications: string = null;\n events: string = null;\n webVault: string = null;\n keyConnector: string = null;\n}\n\nclass EnvironmentState {\n region: Region;\n urls: EnvironmentUrls;\n\n static fromJSON(obj: Jsonify): EnvironmentState {\n return Object.assign(new EnvironmentState(), obj);\n }\n}\n\nexport const GLOBAL_ENVIRONMENT_KEY = new KeyDefinition(\n ENVIRONMENT_DISK,\n \"environment\",\n {\n deserializer: EnvironmentState.fromJSON,\n },\n);\n\nexport const USER_ENVIRONMENT_KEY = new UserKeyDefinition(\n ENVIRONMENT_DISK,\n \"environment\",\n {\n deserializer: EnvironmentState.fromJSON,\n clearOn: [\"logout\"],\n },\n);\n\nexport const GLOBAL_CLOUD_REGION_KEY = new KeyDefinition(\n ENVIRONMENT_MEMORY,\n \"cloudRegion\",\n {\n deserializer: (b) => b,\n },\n);\n\nexport const USER_CLOUD_REGION_KEY = new UserKeyDefinition(\n ENVIRONMENT_MEMORY,\n \"cloudRegion\",\n {\n deserializer: (b) => b,\n clearOn: [\"logout\"],\n },\n);\n\n/**\n * The production regions available for selection.\n *\n * In the future we desire to load these urls from the config endpoint.\n */\nexport const PRODUCTION_REGIONS: RegionConfig[] = [\n {\n key: Region.US,\n domain: \"bitwarden.com\",\n urls: {\n base: null,\n api: \"https://api.bitwarden.com\",\n identity: \"https://identity.bitwarden.com\",\n icons: \"https://icons.bitwarden.net\",\n webVault: \"https://vault.bitwarden.com\",\n notifications: \"https://notifications.bitwarden.com\",\n events: \"https://events.bitwarden.com\",\n scim: \"https://scim.bitwarden.com\",\n },\n },\n {\n key: Region.EU,\n domain: \"bitwarden.eu\",\n urls: {\n base: null,\n api: \"https://api.bitwarden.eu\",\n identity: \"https://identity.bitwarden.eu\",\n icons: \"https://icons.bitwarden.eu\",\n webVault: \"https://vault.bitwarden.eu\",\n notifications: \"https://notifications.bitwarden.eu\",\n events: \"https://events.bitwarden.eu\",\n scim: \"https://scim.bitwarden.eu\",\n },\n },\n];\n\n/**\n * The default region when starting the app.\n */\nconst DEFAULT_REGION = Region.US;\n\n/**\n * The default region configuration.\n */\nconst DEFAULT_REGION_CONFIG = PRODUCTION_REGIONS.find((r) => r.key === DEFAULT_REGION);\n\nexport class DefaultEnvironmentService implements EnvironmentService {\n private globalState: GlobalState;\n private globalCloudRegionState: GlobalState;\n\n // We intentionally don't want the helper on account service, we want the null back if there is no active user\n private activeAccountId$: Observable = this.accountService.activeAccount$.pipe(\n map((a) => a?.id),\n );\n\n environment$: Observable;\n cloudWebVaultUrl$: Observable;\n\n constructor(\n private stateProvider: StateProvider,\n private accountService: AccountService,\n ) {\n this.globalState = this.stateProvider.getGlobal(GLOBAL_ENVIRONMENT_KEY);\n this.globalCloudRegionState = this.stateProvider.getGlobal(GLOBAL_CLOUD_REGION_KEY);\n\n const account$ = this.activeAccountId$.pipe(\n // Use == here to not trigger on undefined -> null transition\n distinctUntilChanged((oldUserId: UserId, newUserId: UserId) => oldUserId == newUserId),\n );\n\n this.environment$ = account$.pipe(\n switchMap((userId) => {\n const t = userId\n ? this.stateProvider.getUser(userId, USER_ENVIRONMENT_KEY).state$\n : this.stateProvider.getGlobal(GLOBAL_ENVIRONMENT_KEY).state$;\n return t;\n }),\n map((state) => {\n return this.buildEnvironment(state?.region, state?.urls);\n }),\n );\n this.cloudWebVaultUrl$ = account$.pipe(\n switchMap((userId) => {\n const t = userId\n ? this.stateProvider.getUser(userId, USER_CLOUD_REGION_KEY).state$\n : this.stateProvider.getGlobal(GLOBAL_CLOUD_REGION_KEY).state$;\n return t;\n }),\n map((region) => {\n if (region != null) {\n const config = this.getRegionConfig(region);\n\n if (config != null) {\n return config.urls.webVault;\n }\n }\n return DEFAULT_REGION_CONFIG.urls.webVault;\n }),\n );\n }\n\n availableRegions(): RegionConfig[] {\n const additionalRegions = (process.env.ADDITIONAL_REGIONS as unknown as RegionConfig[]) ?? [];\n return PRODUCTION_REGIONS.concat(additionalRegions);\n }\n\n /**\n * Get the region configuration for the given region.\n */\n private getRegionConfig(region: Region): RegionConfig | undefined {\n return this.availableRegions().find((r) => r.key === region);\n }\n\n async setEnvironment(region: Region, urls?: Urls): Promise {\n // Unknown regions are treated as self-hosted\n if (this.getRegionConfig(region) == null) {\n region = Region.SelfHosted;\n }\n\n // If self-hosted ensure urls are valid else fallback to default region\n if (region == Region.SelfHosted && isEmpty(urls)) {\n region = DEFAULT_REGION;\n }\n\n if (region != Region.SelfHosted) {\n await this.globalState.update(() => ({\n region: region,\n urls: null,\n }));\n\n return null;\n } else {\n // Clean the urls\n urls.base = formatUrl(urls.base);\n urls.webVault = formatUrl(urls.webVault);\n urls.api = formatUrl(urls.api);\n urls.identity = formatUrl(urls.identity);\n urls.icons = formatUrl(urls.icons);\n urls.notifications = formatUrl(urls.notifications);\n urls.events = formatUrl(urls.events);\n urls.keyConnector = formatUrl(urls.keyConnector);\n urls.scim = null;\n\n await this.globalState.update(() => ({\n region: region,\n urls: {\n base: urls.base,\n api: urls.api,\n identity: urls.identity,\n webVault: urls.webVault,\n icons: urls.icons,\n notifications: urls.notifications,\n events: urls.events,\n keyConnector: urls.keyConnector,\n },\n }));\n\n return urls;\n }\n }\n\n /**\n * Helper for building the environment from state. Performs some general sanitization to avoid invalid regions and urls.\n */\n protected buildEnvironment(region: Region, urls: Urls) {\n // Unknown regions are treated as self-hosted\n if (this.getRegionConfig(region) == null) {\n region = Region.SelfHosted;\n }\n\n // If self-hosted ensure urls are valid else fallback to default region\n if (region == Region.SelfHosted && isEmpty(urls)) {\n region = DEFAULT_REGION;\n }\n\n // Load urls from region config\n if (region != Region.SelfHosted) {\n const regionConfig = this.getRegionConfig(region);\n if (regionConfig != null) {\n return new CloudEnvironment(regionConfig);\n }\n }\n\n return new SelfHostedEnvironment(urls);\n }\n\n async setCloudRegion(userId: UserId, region: CloudRegion) {\n if (userId == null) {\n await this.globalCloudRegionState.update(() => region);\n } else {\n await this.stateProvider.getUser(userId, USER_CLOUD_REGION_KEY).update(() => region);\n }\n }\n\n async getEnvironment(userId?: UserId) {\n if (userId == null) {\n return await firstValueFrom(this.environment$);\n }\n\n const state = await this.getEnvironmentState(userId);\n return this.buildEnvironment(state.region, state.urls);\n }\n\n private async getEnvironmentState(userId: UserId | null) {\n // Previous rules dictated that we only get from user scoped state if there is an active user.\n const activeUserId = await firstValueFrom(this.activeAccountId$);\n return activeUserId == null\n ? await firstValueFrom(this.globalState.state$)\n : await firstValueFrom(\n this.stateProvider.getUser(userId ?? activeUserId, USER_ENVIRONMENT_KEY).state$,\n );\n }\n\n async seedUserEnvironment(userId: UserId) {\n const global = await firstValueFrom(this.globalState.state$);\n await this.stateProvider.getUser(userId, USER_ENVIRONMENT_KEY).update(() => global);\n }\n}\n\nfunction formatUrl(url: string): string {\n if (url == null || url === \"\") {\n return null;\n }\n\n url = url.replace(/\\/+$/g, \"\");\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"https://\" + url;\n }\n\n return url.trim();\n}\n\nfunction isEmpty(u?: Urls): boolean {\n if (u == null) {\n return true;\n }\n\n return (\n u.base == null &&\n u.webVault == null &&\n u.api == null &&\n u.identity == null &&\n u.icons == null &&\n u.notifications == null &&\n u.events == null\n );\n}\n\nabstract class UrlEnvironment implements Environment {\n constructor(\n protected region: Region,\n protected urls: Urls,\n ) {\n // Scim is always null for self-hosted\n if (region == Region.SelfHosted) {\n this.urls.scim = null;\n }\n }\n\n abstract getHostname(): string;\n\n getRegion() {\n return this.region;\n }\n\n getUrls() {\n return {\n base: this.urls.base,\n webVault: this.urls.webVault,\n api: this.urls.api,\n identity: this.urls.identity,\n icons: this.urls.icons,\n notifications: this.urls.notifications,\n events: this.urls.events,\n keyConnector: this.urls.keyConnector,\n scim: this.urls.scim,\n };\n }\n\n hasBaseUrl() {\n return this.urls.base != null;\n }\n\n getWebVaultUrl() {\n return this.getUrl(\"webVault\", \"\");\n }\n\n getApiUrl() {\n return this.getUrl(\"api\", \"/api\");\n }\n\n getEventsUrl() {\n return this.getUrl(\"events\", \"/events\");\n }\n\n getIconsUrl() {\n return this.getUrl(\"icons\", \"/icons\");\n }\n\n getIdentityUrl() {\n return this.getUrl(\"identity\", \"/identity\");\n }\n\n getKeyConnectorUrl() {\n return this.urls.keyConnector;\n }\n\n getNotificationsUrl() {\n return this.getUrl(\"notifications\", \"/notifications\");\n }\n\n getScimUrl() {\n if (this.urls.scim != null) {\n return this.urls.scim + \"/v2\";\n }\n\n return this.getWebVaultUrl() === \"https://vault.bitwarden.com\"\n ? \"https://scim.bitwarden.com/v2\"\n : this.getWebVaultUrl() + \"/scim/v2\";\n }\n\n getSendUrl() {\n return this.getWebVaultUrl() === \"https://vault.bitwarden.com\"\n ? \"https://send.bitwarden.com/#\"\n : this.getWebVaultUrl() + \"/#/send/\";\n }\n\n /**\n * Presume that if the region is not self-hosted, it is cloud.\n */\n isCloud(): boolean {\n return this.region !== Region.SelfHosted;\n }\n\n /**\n * Helper for getting an URL.\n *\n * @param key Key of the URL to get from URLs\n * @param baseSuffix Suffix to append to the base URL if the url is not set\n * @returns\n */\n private getUrl(key: keyof Urls, baseSuffix: string) {\n if (this.urls[key] != null) {\n return this.urls[key];\n }\n\n if (this.urls.base) {\n return this.urls.base + baseSuffix;\n }\n\n return DEFAULT_REGION_CONFIG.urls[key];\n }\n}\n\n/**\n * Denote a cloud environment.\n */\nexport class CloudEnvironment extends UrlEnvironment {\n constructor(private config: RegionConfig) {\n super(config.key, config.urls);\n }\n\n /**\n * Cloud always returns nice urls, i.e. bitwarden.com instead of vault.bitwarden.com.\n */\n getHostname() {\n return this.config.domain;\n }\n}\n\nexport class SelfHostedEnvironment extends UrlEnvironment {\n constructor(urls: Urls) {\n super(Region.SelfHosted, urls);\n }\n\n getHostname() {\n return Utils.getHost(this.getWebVaultUrl());\n }\n}\n","import { LogService } from \"../../abstractions/log.service\";\nimport { Utils } from \"../../misc/utils\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\n\nconst MAX_SINGLE_BLOB_UPLOAD_SIZE = 256 * 1024 * 1024; // 256 MiB\nconst MAX_BLOCKS_PER_BLOB = 50000;\n\nexport class AzureFileUploadService {\n constructor(private logService: LogService) {}\n\n async upload(url: string, data: EncArrayBuffer, renewalCallback: () => Promise) {\n if (data.buffer.byteLength <= MAX_SINGLE_BLOB_UPLOAD_SIZE) {\n return await this.azureUploadBlob(url, data);\n } else {\n return await this.azureUploadBlocks(url, data, renewalCallback);\n }\n }\n private async azureUploadBlob(url: string, data: EncArrayBuffer) {\n const urlObject = Utils.getUrl(url);\n const headers = new Headers({\n \"x-ms-date\": new Date().toUTCString(),\n \"x-ms-version\": urlObject.searchParams.get(\"sv\"),\n \"Content-Length\": data.buffer.byteLength.toString(),\n \"x-ms-blob-type\": \"BlockBlob\",\n });\n\n const request = new Request(url, {\n body: data.buffer,\n cache: \"no-store\",\n method: \"PUT\",\n headers: headers,\n });\n\n const blobResponse = await fetch(request);\n\n if (blobResponse.status !== 201) {\n throw new Error(`Failed to create Azure blob: ${blobResponse.status}`);\n }\n }\n private async azureUploadBlocks(\n url: string,\n data: EncArrayBuffer,\n renewalCallback: () => Promise,\n ) {\n const baseUrl = Utils.getUrl(url);\n const blockSize = this.getMaxBlockSize(baseUrl.searchParams.get(\"sv\"));\n let blockIndex = 0;\n const numBlocks = Math.ceil(data.buffer.byteLength / blockSize);\n const blocksStaged: string[] = [];\n\n if (numBlocks > MAX_BLOCKS_PER_BLOB) {\n throw new Error(\n `Cannot upload file, exceeds maximum size of ${blockSize * MAX_BLOCKS_PER_BLOB}`,\n );\n }\n\n // eslint-disable-next-line\n try {\n while (blockIndex < numBlocks) {\n url = await this.renewUrlIfNecessary(url, renewalCallback);\n const blockUrl = Utils.getUrl(url);\n const blockId = this.encodedBlockId(blockIndex);\n blockUrl.searchParams.append(\"comp\", \"block\");\n blockUrl.searchParams.append(\"blockid\", blockId);\n const start = blockIndex * blockSize;\n const blockData = data.buffer.slice(start, start + blockSize);\n const blockHeaders = new Headers({\n \"x-ms-date\": new Date().toUTCString(),\n \"x-ms-version\": blockUrl.searchParams.get(\"sv\"),\n \"Content-Length\": blockData.byteLength.toString(),\n });\n\n const blockRequest = new Request(blockUrl.toString(), {\n body: blockData,\n cache: \"no-store\",\n method: \"PUT\",\n headers: blockHeaders,\n });\n\n const blockResponse = await fetch(blockRequest);\n\n if (blockResponse.status !== 201) {\n const message = `Unsuccessful block PUT. Received status ${blockResponse.status}`;\n this.logService.error(message + \"\\n\" + (await blockResponse.json()));\n throw new Error(message);\n }\n\n blocksStaged.push(blockId);\n blockIndex++;\n }\n\n url = await this.renewUrlIfNecessary(url, renewalCallback);\n const blockListUrl = Utils.getUrl(url);\n const blockListXml = this.blockListXml(blocksStaged);\n blockListUrl.searchParams.append(\"comp\", \"blocklist\");\n const headers = new Headers({\n \"x-ms-date\": new Date().toUTCString(),\n \"x-ms-version\": blockListUrl.searchParams.get(\"sv\"),\n \"Content-Length\": blockListXml.length.toString(),\n });\n\n const request = new Request(blockListUrl.toString(), {\n body: blockListXml,\n cache: \"no-store\",\n method: \"PUT\",\n headers: headers,\n });\n\n const response = await fetch(request);\n\n if (response.status !== 201) {\n const message = `Unsuccessful block list PUT. Received status ${response.status}`;\n this.logService.error(message + \"\\n\" + (await response.json()));\n throw new Error(message);\n }\n } catch (e) {\n throw e;\n }\n }\n\n private async renewUrlIfNecessary(\n url: string,\n renewalCallback: () => Promise,\n ): Promise {\n const urlObject = Utils.getUrl(url);\n const expiry = new Date(urlObject.searchParams.get(\"se\") ?? \"\");\n\n if (isNaN(expiry.getTime())) {\n expiry.setTime(Date.now() + 3600000);\n }\n\n if (expiry.getTime() < Date.now() + 1000) {\n return await renewalCallback();\n }\n return url;\n }\n\n private encodedBlockId(blockIndex: number) {\n // Encoded blockId max size is 64, so pre-encoding max size is 48\n const utfBlockId = (\n \"000000000000000000000000000000000000000000000000\" + blockIndex.toString()\n ).slice(-48);\n return Utils.fromUtf8ToB64(utfBlockId);\n }\n\n private blockListXml(blockIdList: string[]) {\n let xml = '';\n blockIdList.forEach((blockId) => {\n xml += `${blockId}`;\n });\n xml += \"\";\n return xml;\n }\n\n private getMaxBlockSize(version: string) {\n if (Version.compare(version, \"2019-12-12\") >= 0) {\n return 4000 * 1024 * 1024; // 4000 MiB\n } else if (Version.compare(version, \"2016-05-31\") >= 0) {\n return 100 * 1024 * 1024; // 100 MiB\n } else {\n return 4 * 1024 * 1024; // 4 MiB\n }\n }\n}\n\nclass Version {\n /**\n * Compares two Azure Versions against each other\n * @param a Version to compare\n * @param b Version to compare\n * @returns a number less than zero if b is newer than a, 0 if equal,\n * and greater than zero if a is newer than b\n */\n static compare(a: Required | string, b: Required | string) {\n if (typeof a === \"string\") {\n a = new Version(a);\n }\n\n if (typeof b === \"string\") {\n b = new Version(b);\n }\n\n return a.year !== b.year\n ? a.year - b.year\n : a.month !== b.month\n ? a.month - b.month\n : a.day !== b.day\n ? a.day - b.day\n : 0;\n }\n year = 0;\n month = 0;\n day = 0;\n\n constructor(version: string) {\n try {\n const parts = version.split(\"-\").map((v) => Number.parseInt(v, 10));\n this.year = parts[0];\n this.month = parts[1];\n this.day = parts[2];\n } catch {\n // Ignore error\n }\n }\n /**\n * Compares two Azure Versions against each other\n * @param compareTo Version to compare against\n * @returns a number less than zero if compareTo is newer, 0 if equal,\n * and greater than zero if this is greater than compareTo\n */\n compare(compareTo: Required | string) {\n return Version.compare(this, compareTo);\n }\n}\n","import { Utils } from \"../../misc/utils\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\n\nexport class BitwardenFileUploadService {\n async upload(\n encryptedFileName: string,\n encryptedFileData: EncArrayBuffer,\n apiCall: (fd: FormData) => Promise,\n ) {\n const fd = new FormData();\n try {\n const blob = new Blob([encryptedFileData.buffer], { type: \"application/octet-stream\" });\n fd.append(\"data\", blob, encryptedFileName);\n } catch (e) {\n if (Utils.isNode && !Utils.isBrowser) {\n fd.append(\n \"data\",\n Buffer.from(encryptedFileData.buffer) as any,\n {\n filepath: encryptedFileName,\n contentType: \"application/octet-stream\",\n } as any,\n );\n } else {\n throw e;\n }\n }\n\n await apiCall(fd);\n }\n}\n","import { MigrationHelper } from \"./migration-helper\";\nimport { Direction, Migrator, VersionFrom, VersionTo } from \"./migrator\";\n\nexport class MigrationBuilder {\n /** Create a new MigrationBuilder with an empty buffer of migrations to perform.\n *\n * Add migrations to the buffer with {@link with} and {@link rollback}.\n * @returns A new MigrationBuilder.\n */\n static create(): MigrationBuilder<0> {\n return new MigrationBuilder([]);\n }\n\n private constructor(\n private migrations: readonly { migrator: Migrator; direction: Direction }[],\n ) {}\n\n /** Add a migrator to the MigrationBuilder. Types are updated such that the chained MigrationBuilder must currently be\n * at state version equal to the from version of the migrator. Return as MigrationBuilder where TTo is the to\n * version of the migrator, so that the next migrator can be chained.\n *\n * @param migrate A migrator class or a tuple of a migrator class, the from version, and the to version. A tuple is\n * required to instantiate version numbers unless a default constructor is defined.\n * @returns A new MigrationBuilder with the to version of the migrator as the current version.\n */\n with<\n TMigrator extends Migrator,\n TFrom extends VersionFrom & TCurrent,\n TTo extends VersionTo,\n >(\n ...migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TFrom, TTo]\n ): MigrationBuilder {\n return this.addMigrator(migrate, \"up\");\n }\n\n /** Add a migrator to rollback on the MigrationBuilder's list of migrations. As with {@link with}, types of\n * MigrationBuilder and Migrator must align. However, this time the migration is reversed so TCurrent of the\n * MigrationBuilder must be equal to the to version of the migrator. Return as MigrationBuilder where TFrom\n * is the from version of the migrator, so that the next migrator can be chained.\n *\n * @param migrate A migrator class or a tuple of a migrator class, the from version, and the to version. A tuple is\n * required to instantiate version numbers unless a default constructor is defined.\n * @returns A new MigrationBuilder with the from version of the migrator as the current version.\n */\n rollback<\n TMigrator extends Migrator,\n TFrom extends VersionFrom,\n TTo extends VersionTo & TCurrent,\n >(\n ...migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TTo, TFrom]\n ): MigrationBuilder {\n if (migrate.length === 3) {\n migrate = [migrate[0], migrate[2], migrate[1]];\n }\n return this.addMigrator(migrate, \"down\");\n }\n\n /** Execute the migrations as defined in the MigrationBuilder's migrator buffer */\n migrate(helper: MigrationHelper): Promise {\n return this.migrations.reduce(\n (promise, migrator) =>\n promise.then(async () => {\n await this.runMigrator(migrator.migrator, helper, migrator.direction);\n }),\n Promise.resolve(),\n );\n }\n\n private addMigrator<\n TMigrator extends Migrator,\n TFrom extends VersionFrom & TCurrent,\n TTo extends VersionTo,\n >(\n migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TFrom, TTo],\n direction: Direction = \"up\",\n ) {\n const newMigration =\n migrate.length === 1\n ? { migrator: new migrate[0](), direction }\n : { migrator: new migrate[0](migrate[1], migrate[2]), direction };\n\n return new MigrationBuilder([...this.migrations, newMigration]);\n }\n\n private async runMigrator(\n migrator: Migrator,\n helper: MigrationHelper,\n direction: Direction,\n ): Promise {\n const shouldMigrate = await migrator.shouldMigrate(helper, direction);\n helper.info(\n `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) should migrate: ${shouldMigrate} - ${direction}`,\n );\n if (shouldMigrate) {\n const method = direction === \"up\" ? migrator.migrate : migrator.rollback;\n await method.bind(migrator)(helper);\n helper.info(\n `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) migrated - ${direction}`,\n );\n await migrator.updateVersion(helper, direction);\n helper.info(\n `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) updated version - ${direction}`,\n );\n }\n }\n}\n","import { NonNegativeInteger } from \"type-fest\";\n\nimport { MigrationHelper } from \"./migration-helper\";\n\nexport const IRREVERSIBLE = new Error(\"Irreversible migration\");\n\nexport type VersionFrom =\n T extends Migrator\n ? TFrom extends NonNegativeInteger\n ? TFrom\n : never\n : never;\nexport type VersionTo =\n T extends Migrator\n ? TTo extends NonNegativeInteger\n ? TTo\n : never\n : never;\nexport type Direction = \"up\" | \"down\";\n\nexport abstract class Migrator {\n constructor(\n public fromVersion: TFrom,\n public toVersion: TTo,\n ) {\n if (fromVersion == null || toVersion == null) {\n throw new Error(\"Invalid migration\");\n }\n if (fromVersion > toVersion) {\n throw new Error(\"Invalid migration\");\n }\n }\n\n shouldMigrate(helper: MigrationHelper, direction: Direction): Promise {\n const startVersion = direction === \"up\" ? this.fromVersion : this.toVersion;\n return Promise.resolve(helper.currentVersion === startVersion);\n }\n abstract migrate(helper: MigrationHelper): Promise;\n abstract rollback(helper: MigrationHelper): Promise;\n async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n await helper.set(\"stateVersion\", endVersion);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n profile?: {\n everHadUserKey?: boolean;\n };\n};\n\nconst USER_EVER_HAD_USER_KEY: KeyDefinitionLike = {\n key: \"everHadUserKey\",\n stateDefinition: {\n name: \"crypto\",\n },\n};\n\nexport class EverHadUserKeyMigrator extends Migrator<9, 10> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.profile?.everHadUserKey;\n await helper.setToUser(userId, USER_EVER_HAD_USER_KEY, value ?? false);\n if (value != null) {\n delete account.profile.everHadUserKey;\n }\n await helper.set(userId, account);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, USER_EVER_HAD_USER_KEY);\n if (account) {\n account.profile = Object.assign(account.profile ?? {}, {\n everHadUserKey: value,\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_EVER_HAD_USER_KEY, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype OrgKeyDataType = {\n type: \"organization\" | \"provider\";\n key: string;\n providerId?: string;\n};\n\ntype ExpectedAccountType = {\n keys?: {\n organizationKeys?: {\n encrypted?: Record;\n };\n };\n};\n\nconst USER_ENCRYPTED_ORGANIZATION_KEYS: KeyDefinitionLike = {\n key: \"organizationKeys\",\n stateDefinition: {\n name: \"crypto\",\n },\n};\n\nexport class OrganizationKeyMigrator extends Migrator<10, 11> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.keys?.organizationKeys?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS, value);\n delete account.keys.organizationKeys;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser>(\n userId,\n USER_ENCRYPTED_ORGANIZATION_KEYS,\n );\n if (account && value) {\n account.keys = Object.assign(account.keys ?? {}, {\n organizationKeys: {\n encrypted: value,\n },\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype EnvironmentUrls = Record;\n\ntype ExpectedAccountType = {\n settings?: { region?: string; environmentUrls?: EnvironmentUrls };\n};\n\ntype ExpectedGlobalType = { region?: string; environmentUrls?: EnvironmentUrls };\n\nconst ENVIRONMENT_STATE: StateDefinitionLike = { name: \"environment\" };\n\nconst REGION_KEY: KeyDefinitionLike = { key: \"region\", stateDefinition: ENVIRONMENT_STATE };\nconst URLS_KEY: KeyDefinitionLike = { key: \"urls\", stateDefinition: ENVIRONMENT_STATE };\n\nexport class MoveEnvironmentStateToProviders extends Migrator<11, 12> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobal = await helper.get(\"global\");\n\n // Move global data\n if (legacyGlobal?.region != null) {\n await helper.setToGlobal(REGION_KEY, legacyGlobal.region);\n }\n\n if (legacyGlobal?.environmentUrls != null) {\n await helper.setToGlobal(URLS_KEY, legacyGlobal.environmentUrls);\n }\n\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n // Move account data\n if (account?.settings?.region != null) {\n await helper.setToUser(userId, REGION_KEY, account.settings.region);\n }\n\n if (account?.settings?.environmentUrls != null) {\n await helper.setToUser(userId, URLS_KEY, account.settings.environmentUrls);\n }\n\n // Delete old account data\n delete account?.settings?.region;\n delete account?.settings?.environmentUrls;\n await helper.set(userId, account);\n }),\n );\n\n // Delete legacy global data\n delete legacyGlobal?.region;\n delete legacyGlobal?.environmentUrls;\n await helper.set(\"global\", legacyGlobal);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n let legacyGlobal = await helper.get(\"global\");\n\n let updatedLegacyGlobal = false;\n\n const globalRegion = await helper.getFromGlobal(REGION_KEY);\n\n if (globalRegion) {\n if (!legacyGlobal) {\n legacyGlobal = {};\n }\n\n updatedLegacyGlobal = true;\n legacyGlobal.region = globalRegion;\n await helper.setToGlobal(REGION_KEY, null);\n }\n\n const globalUrls = await helper.getFromGlobal(URLS_KEY);\n\n if (globalUrls) {\n if (!legacyGlobal) {\n legacyGlobal = {};\n }\n\n updatedLegacyGlobal = true;\n legacyGlobal.environmentUrls = globalUrls;\n await helper.setToGlobal(URLS_KEY, null);\n }\n\n if (updatedLegacyGlobal) {\n await helper.set(\"global\", legacyGlobal);\n }\n\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n let updatedAccount = false;\n const userRegion = await helper.getFromUser(userId, REGION_KEY);\n\n if (userRegion) {\n if (!account) {\n account = {};\n }\n\n if (!account.settings) {\n account.settings = {};\n }\n\n updatedAccount = true;\n account.settings.region = userRegion;\n await helper.setToUser(userId, REGION_KEY, null);\n }\n\n const userUrls = await helper.getFromUser(userId, URLS_KEY);\n\n if (userUrls) {\n if (!account) {\n account = {};\n }\n\n if (!account.settings) {\n account.settings = {};\n }\n\n updatedAccount = true;\n account.settings.environmentUrls = userUrls;\n await helper.setToUser(userId, URLS_KEY, null);\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n keys?: {\n providerKeys?: {\n encrypted?: Record; // Record where EncryptedString is the ProviderKey encrypted by the UserKey.\n };\n };\n};\n\nconst USER_ENCRYPTED_PROVIDER_KEYS: KeyDefinitionLike = {\n key: \"providerKeys\",\n stateDefinition: {\n name: \"crypto\",\n },\n};\n\nexport class ProviderKeyMigrator extends Migrator<12, 13> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.keys?.providerKeys?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, USER_ENCRYPTED_PROVIDER_KEYS, value);\n delete account.keys.providerKeys;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser>(\n userId,\n USER_ENCRYPTED_PROVIDER_KEYS,\n );\n if (account && value) {\n account.keys = Object.assign(account.keys ?? {}, {\n providerKeys: {\n encrypted: value,\n },\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ENCRYPTED_PROVIDER_KEYS, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n disableAutoBiometricsPrompt?: boolean;\n biometricUnlock?: boolean;\n dismissedBiometricRequirePasswordOnStartCallout?: boolean;\n };\n keys?: { biometricEncryptionClientKeyHalf?: string };\n};\n\n// Biometric text, no auto prompt text, fingerprint validated, and prompt cancelled are refreshed on every app start, so we don't need to migrate them\nexport const CLIENT_KEY_HALF: KeyDefinitionLike = {\n key: \"clientKeyHalf\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricClientKeyHalfToStateProviders extends Migrator<13, 14> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n // Move account data\n if (account?.keys?.biometricEncryptionClientKeyHalf != null) {\n await helper.setToUser(\n userId,\n CLIENT_KEY_HALF,\n account.keys.biometricEncryptionClientKeyHalf,\n );\n\n // Delete old account data\n delete account?.keys?.biometricEncryptionClientKeyHalf;\n await helper.set(userId, account);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n let updatedAccount = false;\n\n const userKeyHalf = await helper.getFromUser(userId, CLIENT_KEY_HALF);\n\n if (userKeyHalf) {\n account ??= {};\n account.keys ??= {};\n\n updatedAccount = true;\n account.keys.biometricEncryptionClientKeyHalf = userKeyHalf;\n await helper.setToUser(userId, CLIENT_KEY_HALF, null);\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype FolderDataType = {\n id: string;\n name: string;\n revisionDate: string;\n};\n\ntype ExpectedAccountType = {\n data?: {\n folders?: {\n encrypted?: Record;\n };\n };\n};\n\nconst USER_ENCRYPTED_FOLDERS: KeyDefinitionLike = {\n key: \"folders\",\n stateDefinition: {\n name: \"folder\",\n },\n};\n\nexport class FolderMigrator extends Migrator<14, 15> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.data?.folders?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, USER_ENCRYPTED_FOLDERS, value);\n delete account.data.folders;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, USER_ENCRYPTED_FOLDERS);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n folders: {\n encrypted: value,\n },\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ENCRYPTED_FOLDERS, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n profile?: {\n lastSync?: string;\n };\n};\n\nconst LAST_SYNC_KEY: KeyDefinitionLike = {\n key: \"lastSync\",\n stateDefinition: {\n name: \"sync\",\n },\n};\n\nexport class LastSyncMigrator extends Migrator<15, 16> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.profile?.lastSync;\n await helper.setToUser(userId, LAST_SYNC_KEY, value ?? null);\n if (value != null) {\n delete account.profile.lastSync;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, LAST_SYNC_KEY);\n if (account) {\n account.profile = Object.assign(account.profile ?? {}, {\n lastSync: value,\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, LAST_SYNC_KEY, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalType = {\n enablePasskeys?: boolean;\n};\n\nconst USER_ENABLE_PASSKEYS: KeyDefinitionLike = {\n key: \"enablePasskeys\",\n stateDefinition: {\n name: \"vaultSettings\",\n },\n};\n\nexport class EnablePasskeysMigrator extends Migrator<16, 17> {\n async migrate(helper: MigrationHelper): Promise {\n const global = await helper.get(\"global\");\n\n if (global?.enablePasskeys != null) {\n await helper.setToGlobal(USER_ENABLE_PASSKEYS, global.enablePasskeys);\n delete global?.enablePasskeys;\n await helper.set(\"global\", global);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n let global = await helper.get(\"global\");\n const globalEnablePasskeys = await helper.getFromGlobal(USER_ENABLE_PASSKEYS);\n\n if (globalEnablePasskeys != null) {\n global = Object.assign(global ?? {}, { enablePasskeys: globalEnablePasskeys });\n await helper.set(\"global\", global);\n await helper.setToGlobal(USER_ENABLE_PASSKEYS, undefined);\n }\n }\n}\n","import { StateDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst AutofillOverlayVisibility = {\n Off: 0,\n OnButtonClick: 1,\n OnFieldFocus: 2,\n} as const;\n\ntype InlineMenuVisibilitySetting =\n (typeof AutofillOverlayVisibility)[keyof typeof AutofillOverlayVisibility];\n\ntype ExpectedAccountState = {\n settings?: {\n autoFillOnPageLoadDefault?: boolean;\n enableAutoFillOnPageLoad?: boolean;\n dismissedAutoFillOnPageLoadCallout?: boolean;\n disableAutoTotpCopy?: boolean;\n activateAutoFillOnPageLoadFromPolicy?: InlineMenuVisibilitySetting;\n };\n};\n\ntype ExpectedGlobalState = { autoFillOverlayVisibility?: InlineMenuVisibilitySetting };\n\nconst autofillSettingsStateDefinition: {\n stateDefinition: StateDefinitionLike;\n} = {\n stateDefinition: {\n name: \"autofillSettings\",\n },\n};\n\nexport class AutofillSettingsKeyMigrator extends Migrator<17, 18> {\n async migrate(helper: MigrationHelper): Promise {\n // global state (e.g. \"autoFillOverlayVisibility -> inlineMenuVisibility\")\n const globalState = await helper.get(\"global\");\n\n if (globalState?.autoFillOverlayVisibility != null) {\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"inlineMenuVisibility\",\n },\n globalState.autoFillOverlayVisibility,\n );\n\n // delete `autoFillOverlayVisibility` from state global\n delete globalState.autoFillOverlayVisibility;\n\n await helper.set(\"global\", globalState);\n }\n\n // account state (e.g. account settings -> state provider framework keys)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n // migrate account state\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n let updateAccount = false;\n const accountSettings = account?.settings;\n\n if (accountSettings?.autoFillOnPageLoadDefault != null) {\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadDefault\" },\n accountSettings.autoFillOnPageLoadDefault,\n );\n delete account.settings.autoFillOnPageLoadDefault;\n updateAccount = true;\n }\n\n if (accountSettings?.enableAutoFillOnPageLoad != null) {\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoad\" },\n accountSettings?.enableAutoFillOnPageLoad,\n );\n delete account.settings.enableAutoFillOnPageLoad;\n updateAccount = true;\n }\n\n if (accountSettings?.dismissedAutoFillOnPageLoadCallout != null) {\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadCalloutIsDismissed\" },\n accountSettings?.dismissedAutoFillOnPageLoadCallout,\n );\n delete account.settings.dismissedAutoFillOnPageLoadCallout;\n updateAccount = true;\n }\n\n if (accountSettings?.disableAutoTotpCopy != null) {\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autoCopyTotp\" },\n // invert the value to match the new naming convention\n !accountSettings?.disableAutoTotpCopy,\n );\n delete account.settings.disableAutoTotpCopy;\n updateAccount = true;\n }\n\n if (accountSettings?.activateAutoFillOnPageLoadFromPolicy != null) {\n await helper.setToUser(\n userId,\n {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"activateAutofillOnPageLoadFromPolicy\",\n },\n accountSettings?.activateAutoFillOnPageLoadFromPolicy,\n );\n delete account.settings.activateAutoFillOnPageLoadFromPolicy;\n updateAccount = true;\n }\n\n if (updateAccount) {\n // update the state account settings with the migrated values deleted\n await helper.set(userId, account);\n }\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // global state (e.g. \"inlineMenuVisibility -> autoFillOverlayVisibility\")\n const globalState = (await helper.get(\"global\")) || {};\n const inlineMenuVisibility: InlineMenuVisibilitySetting = await helper.getFromGlobal({\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"inlineMenuVisibility\",\n });\n\n if (inlineMenuVisibility) {\n await helper.set(\"global\", {\n ...globalState,\n autoFillOverlayVisibility: inlineMenuVisibility,\n });\n\n // remove the global state provider framework key for `inlineMenuVisibility`\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"inlineMenuVisibility\",\n },\n null,\n );\n }\n\n // account state (e.g. state provider framework keys -> account settings)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n // rollback account state\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n let updateAccount = false;\n let settings = account?.settings || {};\n\n const autoFillOnPageLoadDefault: boolean = await helper.getFromUser(userId, {\n ...autofillSettingsStateDefinition,\n key: \"autofillOnPageLoadDefault\",\n });\n\n const enableAutoFillOnPageLoad: boolean = await helper.getFromUser(userId, {\n ...autofillSettingsStateDefinition,\n key: \"autofillOnPageLoad\",\n });\n\n const dismissedAutoFillOnPageLoadCallout: boolean = await helper.getFromUser(userId, {\n ...autofillSettingsStateDefinition,\n key: \"autofillOnPageLoadCalloutIsDismissed\",\n });\n\n const autoCopyTotp: boolean = await helper.getFromUser(userId, {\n ...autofillSettingsStateDefinition,\n key: \"autoCopyTotp\",\n });\n\n const activateAutoFillOnPageLoadFromPolicy: InlineMenuVisibilitySetting =\n await helper.getFromUser(userId, {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"activateAutofillOnPageLoadFromPolicy\",\n });\n\n // update new settings and remove the account state provider framework keys for the rolled back values\n if (autoFillOnPageLoadDefault != null) {\n settings = { ...settings, autoFillOnPageLoadDefault };\n\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadDefault\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (enableAutoFillOnPageLoad != null) {\n settings = { ...settings, enableAutoFillOnPageLoad };\n\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoad\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (dismissedAutoFillOnPageLoadCallout != null) {\n settings = { ...settings, dismissedAutoFillOnPageLoadCallout };\n\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadCalloutIsDismissed\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (autoCopyTotp != null) {\n // invert the value to match the new naming convention\n settings = { ...settings, disableAutoTotpCopy: !autoCopyTotp };\n\n await helper.setToUser(\n userId,\n { ...autofillSettingsStateDefinition, key: \"autoCopyTotp\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (activateAutoFillOnPageLoadFromPolicy != null) {\n settings = { ...settings, activateAutoFillOnPageLoadFromPolicy };\n\n await helper.setToUser(\n userId,\n {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n key: \"activateAutofillOnPageLoadFromPolicy\",\n },\n null,\n );\n\n updateAccount = true;\n }\n\n if (updateAccount) {\n // commit updated settings to state\n await helper.set(userId, {\n ...account,\n settings,\n });\n }\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n requirePasswordOnStart?: boolean;\n };\n};\n\n// Biometric text, no auto prompt text, fingerprint validated, and prompt cancelled are refreshed on every app start, so we don't need to migrate them\nexport const REQUIRE_PASSWORD_ON_START: KeyDefinitionLike = {\n key: \"requirePasswordOnStart\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class RequirePasswordOnStartMigrator extends Migrator<18, 19> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n // Move account data\n if (account?.settings?.requirePasswordOnStart != null) {\n await helper.setToUser(\n userId,\n REQUIRE_PASSWORD_ON_START,\n account.settings.requirePasswordOnStart,\n );\n\n // Delete old account data\n delete account.settings.requirePasswordOnStart;\n await helper.set(userId, account);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n const requirePassword = await helper.getFromUser(userId, REQUIRE_PASSWORD_ON_START);\n\n if (requirePassword) {\n account ??= {};\n account.settings ??= {};\n\n account.settings.requirePasswordOnStart = requirePassword;\n await helper.setToUser(userId, REQUIRE_PASSWORD_ON_START, null);\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n keys?: {\n privateKey?: {\n encrypted?: string; // EncryptedString\n };\n };\n};\n\nconst USER_ENCRYPTED_PRIVATE_KEY: KeyDefinitionLike = {\n key: \"privateKey\",\n stateDefinition: {\n name: \"crypto\",\n },\n};\n\nexport class PrivateKeyMigrator extends Migrator<19, 20> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.keys?.privateKey?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, USER_ENCRYPTED_PRIVATE_KEY, value);\n delete account.keys.privateKey;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser>(\n userId,\n USER_ENCRYPTED_PRIVATE_KEY,\n );\n if (account && value) {\n account.keys = Object.assign(account.keys ?? {}, {\n privateKey: {\n encrypted: value,\n },\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ENCRYPTED_PRIVATE_KEY, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype CollectionDataType = {\n id: string;\n organizationId: string;\n name: string;\n externalId: string;\n readOnly: boolean;\n manage: boolean;\n hidePasswords: boolean;\n};\n\ntype ExpectedAccountType = {\n data?: {\n collections?: {\n encrypted?: Record;\n };\n };\n};\n\nconst USER_ENCRYPTED_COLLECTIONS: KeyDefinitionLike = {\n key: \"collections\",\n stateDefinition: {\n name: \"collection\",\n },\n};\n\nexport class CollectionMigrator extends Migrator<20, 21> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.data?.collections?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, USER_ENCRYPTED_COLLECTIONS, value);\n delete account.data.collections;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, USER_ENCRYPTED_COLLECTIONS);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n collections: {\n encrypted: value,\n },\n });\n\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ENCRYPTED_COLLECTIONS, null);\n }\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n collapsedGroupings?: string[];\n };\n};\n\nconst COLLAPSED_GROUPINGS: KeyDefinitionLike = {\n key: \"collapsedGroupings\",\n stateDefinition: {\n name: \"vaultFilter\",\n },\n};\n\nexport class CollapsedGroupingsMigrator extends Migrator<21, 22> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.settings?.collapsedGroupings;\n if (value != null) {\n await helper.setToUser(userId, COLLAPSED_GROUPINGS, value);\n delete account.settings.collapsedGroupings;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, COLLAPSED_GROUPINGS);\n if (account) {\n account.settings = Object.assign(account.settings ?? {}, {\n collapsedGroupings: value,\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, COLLAPSED_GROUPINGS, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n disableAutoBiometricsPrompt?: boolean;\n dismissedBiometricRequirePasswordOnStartCallout?: boolean;\n };\n};\n\n// prompt cancelled is refreshed on every app start/quit/unlock, so we don't need to migrate it\n\nexport const DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT: KeyDefinitionLike = {\n key: \"dismissedBiometricRequirePasswordOnStartCallout\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport const PROMPT_AUTOMATICALLY: KeyDefinitionLike = {\n key: \"promptAutomatically\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricPromptsToStateProviders extends Migrator<22, 23> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n if (account == null) {\n return;\n }\n // Move account data\n\n if (account?.settings?.dismissedBiometricRequirePasswordOnStartCallout != null) {\n await helper.setToUser(\n userId,\n DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT,\n account.settings.dismissedBiometricRequirePasswordOnStartCallout,\n );\n }\n\n if (account?.settings?.disableAutoBiometricsPrompt != null) {\n await helper.setToUser(\n userId,\n PROMPT_AUTOMATICALLY,\n !account.settings.disableAutoBiometricsPrompt,\n );\n }\n\n // Delete old account data\n delete account?.settings?.dismissedBiometricRequirePasswordOnStartCallout;\n delete account?.settings?.disableAutoBiometricsPrompt;\n await helper.set(userId, account);\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n let updatedAccount = false;\n\n const userDismissed = await helper.getFromUser(\n userId,\n DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT,\n );\n\n if (userDismissed) {\n account ??= {};\n account.settings ??= {};\n\n updatedAccount = true;\n account.settings.dismissedBiometricRequirePasswordOnStartCallout = userDismissed;\n await helper.setToUser(userId, DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT, null);\n }\n\n const userPromptAutomatically = await helper.getFromUser(\n userId,\n PROMPT_AUTOMATICALLY,\n );\n\n if (userPromptAutomatically != null) {\n account ??= {};\n account.settings ??= {};\n\n updatedAccount = true;\n account.settings.disableAutoBiometricsPrompt = !userPromptAutomatically;\n await helper.setToUser(userId, PROMPT_AUTOMATICALLY, null);\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n smOnboardingTasks?: Record>;\n };\n};\n\nexport const SM_ONBOARDING_TASKS: KeyDefinitionLike = {\n key: \"tasks\",\n stateDefinition: { name: \"smOnboarding\" },\n};\n\nexport class SmOnboardingTasksMigrator extends Migrator<23, 24> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n // Move account data\n if (account?.settings?.smOnboardingTasks != null) {\n await helper.setToUser(userId, SM_ONBOARDING_TASKS, account.settings.smOnboardingTasks);\n\n // Delete old account data\n delete account.settings.smOnboardingTasks;\n await helper.set(userId, account);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n const smOnboardingTasks = await helper.getFromUser>>(\n userId,\n SM_ONBOARDING_TASKS,\n );\n if (smOnboardingTasks) {\n account ??= {};\n account.settings ??= {};\n\n account.settings.smOnboardingTasks = smOnboardingTasks;\n await helper.setToUser(userId, SM_ONBOARDING_TASKS, null);\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { StateDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst ClearClipboardDelay = {\n Never: null as null,\n TenSeconds: 10,\n TwentySeconds: 20,\n ThirtySeconds: 30,\n OneMinute: 60,\n TwoMinutes: 120,\n FiveMinutes: 300,\n} as const;\n\ntype ClearClipboardDelaySetting = (typeof ClearClipboardDelay)[keyof typeof ClearClipboardDelay];\n\ntype ExpectedAccountState = {\n settings?: {\n clearClipboard?: ClearClipboardDelaySetting;\n };\n};\n\nconst autofillSettingsLocalStateDefinition: {\n stateDefinition: StateDefinitionLike;\n} = {\n stateDefinition: {\n name: \"autofillSettingsLocal\",\n },\n};\n\nexport class ClearClipboardDelayMigrator extends Migrator<24, 25> {\n async migrate(helper: MigrationHelper): Promise {\n // account state (e.g. account settings -> state provider framework keys)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n // migrate account state\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n const accountSettings = account?.settings;\n\n if (accountSettings?.clearClipboard !== undefined) {\n await helper.setToUser(\n userId,\n { ...autofillSettingsLocalStateDefinition, key: \"clearClipboardDelay\" },\n accountSettings.clearClipboard,\n );\n delete account.settings.clearClipboard;\n\n // update the state account settings with the migrated values deleted\n await helper.set(userId, account);\n }\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // account state (e.g. state provider framework keys -> account settings)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n // rollback account state\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n let settings = account?.settings || {};\n\n const clearClipboardDelay: ClearClipboardDelaySetting = await helper.getFromUser(userId, {\n ...autofillSettingsLocalStateDefinition,\n key: \"clearClipboardDelay\",\n });\n\n // update new settings and remove the account state provider framework keys for the rolled back values\n if (clearClipboardDelay !== undefined) {\n settings = { ...settings, clearClipboard: clearClipboardDelay };\n\n await helper.setToUser(\n userId,\n { ...autofillSettingsLocalStateDefinition, key: \"clearClipboardDelay\" },\n null,\n );\n\n // commit updated settings to state\n await helper.set(userId, {\n ...account,\n settings,\n });\n }\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n profile?: {\n lastSync?: string;\n };\n};\n\nconst LAST_SYNC_KEY: KeyDefinitionLike = {\n key: \"lastSync\",\n stateDefinition: {\n name: \"sync\",\n },\n};\n\nexport class RevertLastSyncMigrator extends Migrator<25, 26> {\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.profile?.lastSync;\n await helper.setToUser(userId, LAST_SYNC_KEY, value ?? null);\n if (value != null) {\n delete account.profile.lastSync;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, LAST_SYNC_KEY);\n if (account) {\n account.profile = Object.assign(account.profile ?? {}, {\n lastSync: value,\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, LAST_SYNC_KEY, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n settings?: {\n disableBadgeCounter?: boolean;\n };\n};\n\nconst enableBadgeCounterKeyDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"badgeSettings\",\n },\n key: \"enableBadgeCounter\",\n};\n\nexport class BadgeSettingsMigrator extends Migrator<26, 27> {\n async migrate(helper: MigrationHelper): Promise {\n // account state (e.g. account settings -> state provider framework keys)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n // migrate account state\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n const accountSettings = account?.settings;\n\n if (accountSettings?.disableBadgeCounter != undefined) {\n await helper.setToUser(\n userId,\n enableBadgeCounterKeyDefinition,\n !accountSettings.disableBadgeCounter,\n );\n delete account.settings.disableBadgeCounter;\n\n // update the state account settings with the migrated values deleted\n await helper.set(userId, account);\n }\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // account state (e.g. state provider framework keys -> account settings)\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n // rollback account state\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n let settings = account?.settings || {};\n\n const enableBadgeCounter: boolean = await helper.getFromUser(\n userId,\n enableBadgeCounterKeyDefinition,\n );\n\n // update new settings and remove the account state provider framework keys for the rolled back values\n if (enableBadgeCounter != undefined) {\n settings = { ...settings, disableBadgeCounter: !enableBadgeCounter };\n\n await helper.setToUser(userId, enableBadgeCounterKeyDefinition, null);\n\n // commit updated settings to state\n await helper.set(userId, {\n ...account,\n settings,\n });\n }\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n settings?: {\n biometricUnlock?: boolean;\n };\n};\n\nexport const BIOMETRIC_UNLOCK_ENABLED: KeyDefinitionLike = {\n key: \"biometricUnlockEnabled\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricUnlockToStateProviders extends Migrator<27, 28> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n if (account == null) {\n return;\n }\n // Move account data\n if (account?.settings?.biometricUnlock != null) {\n await helper.setToUser(\n userId,\n BIOMETRIC_UNLOCK_ENABLED,\n account.settings.biometricUnlock,\n );\n }\n\n // Delete old account data\n delete account?.settings?.biometricUnlock;\n await helper.set(userId, account);\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountType) {\n const biometricUnlock = await helper.getFromUser(userId, BIOMETRIC_UNLOCK_ENABLED);\n\n if (biometricUnlock != null) {\n account ??= {};\n account.settings ??= {};\n\n account.settings.biometricUnlock = biometricUnlock;\n await helper.setToUser(userId, BIOMETRIC_UNLOCK_ENABLED, null);\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n disableAddLoginNotification?: boolean;\n disableChangedPasswordNotification?: boolean;\n};\n\nexport class UserNotificationSettingsKeyMigrator extends Migrator<28, 29> {\n async migrate(helper: MigrationHelper): Promise {\n const globalState = await helper.get(\"global\");\n\n // disableAddLoginNotification -> enableAddedLoginPrompt\n if (globalState?.disableAddLoginNotification != null) {\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableAddedLoginPrompt\",\n },\n !globalState.disableAddLoginNotification,\n );\n\n // delete `disableAddLoginNotification` from state global\n delete globalState.disableAddLoginNotification;\n\n await helper.set(\"global\", globalState);\n }\n\n // disableChangedPasswordNotification -> enableChangedPasswordPrompt\n if (globalState?.disableChangedPasswordNotification != null) {\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableChangedPasswordPrompt\",\n },\n !globalState.disableChangedPasswordNotification,\n );\n\n // delete `disableChangedPasswordNotification` from state global\n delete globalState.disableChangedPasswordNotification;\n\n await helper.set(\"global\", globalState);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const globalState = (await helper.get(\"global\")) || {};\n\n const enableAddedLoginPrompt: boolean = await helper.getFromGlobal({\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableAddedLoginPrompt\",\n });\n\n const enableChangedPasswordPrompt: boolean = await helper.getFromGlobal({\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableChangedPasswordPrompt\",\n });\n\n // enableAddedLoginPrompt -> disableAddLoginNotification\n if (enableAddedLoginPrompt) {\n await helper.set(\"global\", {\n ...globalState,\n disableAddLoginNotification: !enableAddedLoginPrompt,\n });\n\n // remove the global state provider framework key for `enableAddedLoginPrompt`\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableAddedLoginPrompt\",\n },\n null,\n );\n }\n\n // enableChangedPasswordPrompt -> disableChangedPasswordNotification\n if (enableChangedPasswordPrompt) {\n await helper.set(\"global\", {\n ...globalState,\n disableChangedPasswordNotification: !enableChangedPasswordPrompt,\n });\n\n // remove the global state provider framework key for `enableChangedPasswordPrompt`\n await helper.setToGlobal(\n {\n stateDefinition: {\n name: \"userNotificationSettings\",\n },\n key: \"enableChangedPasswordPrompt\",\n },\n null,\n );\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nenum PolicyType {\n TwoFactorAuthentication = 0, // Requires users to have 2fa enabled\n MasterPassword = 1, // Sets minimum requirements for master password complexity\n PasswordGenerator = 2, // Sets minimum requirements/default type for generated passwords/passphrases\n SingleOrg = 3, // Allows users to only be apart of one organization\n RequireSso = 4, // Requires users to authenticate with SSO\n PersonalOwnership = 5, // Disables personal vault ownership for adding/cloning items\n DisableSend = 6, // Disables the ability to create and edit Bitwarden Sends\n SendOptions = 7, // Sets restrictions or defaults for Bitwarden Sends\n ResetPassword = 8, // Allows orgs to use reset password : also can enable auto-enrollment during invite flow\n MaximumVaultTimeout = 9, // Sets the maximum allowed vault timeout\n DisablePersonalVaultExport = 10, // Disable personal vault export\n ActivateAutofill = 11, // Activates autofill with page load on the browser extension\n}\n\ntype PolicyDataType = {\n id: string;\n organizationId: string;\n type: PolicyType;\n data: Record;\n enabled: boolean;\n};\n\ntype ExpectedAccountType = {\n data?: {\n policies?: {\n encrypted?: Record;\n };\n };\n};\n\nconst POLICIES_KEY: KeyDefinitionLike = {\n key: \"policies\",\n stateDefinition: {\n name: \"policies\",\n },\n};\n\nexport class PolicyMigrator extends Migrator<29, 30> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.data?.policies?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, POLICIES_KEY, value);\n delete account.data.policies;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, POLICIES_KEY);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n policies: {\n encrypted: value,\n },\n });\n\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, POLICIES_KEY, null);\n }\n await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n disableContextMenuItem?: boolean;\n};\n\nconst enableContextMenuKeyDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"autofillSettings\",\n },\n key: \"enableContextMenu\",\n};\n\nexport class EnableContextMenuMigrator extends Migrator<30, 31> {\n async migrate(helper: MigrationHelper): Promise {\n const globalState = await helper.get(\"global\");\n\n // disableContextMenuItem -> enableContextMenu\n if (globalState?.disableContextMenuItem != null) {\n await helper.setToGlobal(enableContextMenuKeyDefinition, !globalState.disableContextMenuItem);\n\n // delete `disableContextMenuItem` from state global\n delete globalState.disableContextMenuItem;\n\n await helper.set(\"global\", globalState);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const globalState = (await helper.get(\"global\")) || {};\n\n const enableContextMenu: boolean = await helper.getFromGlobal(enableContextMenuKeyDefinition);\n\n // enableContextMenu -> disableContextMenuItem\n if (enableContextMenu != null) {\n await helper.set(\"global\", {\n ...globalState,\n disableContextMenuItem: !enableContextMenu,\n });\n\n // remove the global state provider framework key for `enableContextMenu`\n await helper.setToGlobal(enableContextMenuKeyDefinition, null);\n }\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n locale?: string;\n};\n\nexport const LOCALE_KEY = {\n key: \"locale\",\n stateDefinition: {\n name: \"translation\",\n },\n};\n\nexport class PreferredLanguageMigrator extends Migrator<31, 32> {\n async migrate(helper: MigrationHelper): Promise {\n // global state\n const global = await helper.get(\"global\");\n if (!global?.locale) {\n return;\n }\n\n await helper.setToGlobal(LOCALE_KEY, global.locale);\n delete global.locale;\n await helper.set(\"global\", global);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const locale = await helper.getFromGlobal(LOCALE_KEY);\n\n if (!locale) {\n return;\n }\n const global = (await helper.get(\"global\")) ?? {};\n global.locale = locale;\n await helper.set(\"global\", global);\n await helper.setToGlobal(LOCALE_KEY, null);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport const APP_ID_STORAGE_KEY = \"appId\";\nexport const ANONYMOUS_APP_ID_STORAGE_KEY = \"anonymousAppId\";\n\nexport const APP_ID_KEY: KeyDefinitionLike = {\n key: APP_ID_STORAGE_KEY,\n stateDefinition: { name: \"applicationId\" },\n};\n\nexport const ANONYMOUS_APP_ID_KEY: KeyDefinitionLike = {\n key: ANONYMOUS_APP_ID_STORAGE_KEY,\n stateDefinition: { name: \"applicationId\" },\n};\n\nexport class AppIdMigrator extends Migrator<32, 33> {\n async migrate(helper: MigrationHelper): Promise {\n const appId = await helper.get(APP_ID_STORAGE_KEY);\n const anonymousAppId = await helper.get(ANONYMOUS_APP_ID_STORAGE_KEY);\n\n if (appId != null) {\n await helper.setToGlobal(APP_ID_KEY, appId);\n await helper.set(APP_ID_STORAGE_KEY, null);\n }\n\n if (anonymousAppId != null) {\n await helper.setToGlobal(ANONYMOUS_APP_ID_KEY, anonymousAppId);\n await helper.set(ANONYMOUS_APP_ID_STORAGE_KEY, null);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const appId = await helper.getFromGlobal(APP_ID_KEY);\n const anonymousAppId = await helper.getFromGlobal(ANONYMOUS_APP_ID_KEY);\n\n if (appId != null) {\n await helper.set(APP_ID_STORAGE_KEY, appId);\n await helper.setToGlobal(APP_ID_KEY, null);\n }\n if (anonymousAppId != null) {\n await helper.set(ANONYMOUS_APP_ID_STORAGE_KEY, anonymousAppId);\n await helper.setToGlobal(ANONYMOUS_APP_ID_KEY, null);\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst UriMatchStrategy = {\n Domain: 0,\n Host: 1,\n StartsWith: 2,\n Exact: 3,\n RegularExpression: 4,\n Never: 5,\n} as const;\n\ntype UriMatchStrategySetting = (typeof UriMatchStrategy)[keyof typeof UriMatchStrategy];\n\ntype ExpectedAccountState = {\n settings?: {\n defaultUriMatch?: UriMatchStrategySetting;\n settings?: {\n equivalentDomains?: string[][];\n };\n };\n};\n\ntype ExpectedGlobalState = {\n neverDomains?: { [key: string]: null };\n};\n\nconst defaultUriMatchStrategyDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"domainSettings\",\n },\n key: \"defaultUriMatchStrategy\",\n};\n\nconst equivalentDomainsDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"domainSettings\",\n },\n key: \"equivalentDomains\",\n};\n\nconst neverDomainsDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"domainSettings\",\n },\n key: \"neverDomains\",\n};\n\nexport class DomainSettingsMigrator extends Migrator<33, 34> {\n async migrate(helper: MigrationHelper): Promise {\n let updateAccount = false;\n\n // global state (\"neverDomains\")\n const globalState = await helper.get(\"global\");\n\n if (globalState?.neverDomains != null) {\n await helper.setToGlobal(neverDomainsDefinition, globalState.neverDomains);\n\n // delete `neverDomains` from state global\n delete globalState.neverDomains;\n\n await helper.set(\"global\", globalState);\n }\n\n // account state (\"defaultUriMatch\" and \"settings.equivalentDomains\")\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n // migrate account state\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n const accountSettings = account?.settings;\n\n if (accountSettings?.defaultUriMatch != undefined) {\n await helper.setToUser(\n userId,\n defaultUriMatchStrategyDefinition,\n accountSettings.defaultUriMatch,\n );\n delete account.settings.defaultUriMatch;\n\n updateAccount = true;\n }\n\n if (accountSettings?.settings?.equivalentDomains != undefined) {\n await helper.setToUser(\n userId,\n equivalentDomainsDefinition,\n accountSettings.settings.equivalentDomains,\n );\n delete account.settings.settings.equivalentDomains;\n delete account.settings.settings;\n\n updateAccount = true;\n }\n\n if (updateAccount) {\n // update the state account settings with the migrated values deleted\n await helper.set(userId, account);\n }\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n let updateAccount = false;\n\n // global state (\"neverDomains\")\n const globalState = (await helper.get(\"global\")) || {};\n const neverDomains: { [key: string]: null } =\n await helper.getFromGlobal(neverDomainsDefinition);\n\n if (neverDomains != null) {\n await helper.set(\"global\", {\n ...globalState,\n neverDomains: neverDomains,\n });\n\n // remove the global state provider framework key for `neverDomains`\n await helper.setToGlobal(neverDomainsDefinition, null);\n }\n\n // account state (\"defaultUriMatchStrategy\" and \"equivalentDomains\")\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n // rollback account state\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n let settings = account?.settings || {};\n\n const defaultUriMatchStrategy: UriMatchStrategySetting = await helper.getFromUser(\n userId,\n defaultUriMatchStrategyDefinition,\n );\n\n const equivalentDomains: string[][] = await helper.getFromUser(\n userId,\n equivalentDomainsDefinition,\n );\n\n // update new settings and remove the account state provider framework keys for the rolled back values\n if (defaultUriMatchStrategy != null) {\n settings = { ...settings, defaultUriMatch: defaultUriMatchStrategy };\n\n await helper.setToUser(userId, defaultUriMatchStrategyDefinition, null);\n\n updateAccount = true;\n }\n\n if (equivalentDomains != null) {\n settings = { ...settings, settings: { equivalentDomains } };\n\n await helper.setToUser(userId, equivalentDomainsDefinition, null);\n\n updateAccount = true;\n }\n\n // commit updated settings to state\n if (updateAccount) {\n await helper.set(userId, {\n ...account,\n settings,\n });\n }\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = { theme?: string };\n\nconst THEME_SELECTION: KeyDefinitionLike = {\n key: \"selection\",\n stateDefinition: { name: \"theming\" },\n};\n\nexport class MoveThemeToStateProviderMigrator extends Migrator<34, 35> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobalState = await helper.get(\"global\");\n const theme = legacyGlobalState?.theme;\n if (theme != null) {\n await helper.setToGlobal(THEME_SELECTION, theme);\n delete legacyGlobalState.theme;\n await helper.set(\"global\", legacyGlobalState);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const theme = await helper.getFromGlobal(THEME_SELECTION);\n if (theme != null) {\n const legacyGlobal = (await helper.get(\"global\")) ?? {};\n legacyGlobal.theme = theme;\n await helper.set(\"global\", legacyGlobal);\n await helper.removeFromGlobal(THEME_SELECTION);\n }\n }\n}\n","import { MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n settings?: {\n dontShowCardsCurrentTab?: boolean;\n dontShowIdentitiesCurrentTab?: boolean;\n };\n};\n\nconst vaultSettingsStateDefinition: {\n stateDefinition: StateDefinitionLike;\n} = {\n stateDefinition: {\n name: \"vaultSettings\",\n },\n};\n\nexport class VaultSettingsKeyMigrator extends Migrator<35, 36> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n let updateAccount = false;\n const accountSettings = account?.settings;\n\n if (accountSettings?.dontShowCardsCurrentTab != null) {\n await helper.setToUser(\n userId,\n { ...vaultSettingsStateDefinition, key: \"showCardsCurrentTab\" },\n !accountSettings.dontShowCardsCurrentTab,\n );\n delete account.settings.dontShowCardsCurrentTab;\n updateAccount = true;\n }\n\n if (accountSettings?.dontShowIdentitiesCurrentTab != null) {\n await helper.setToUser(\n userId,\n { ...vaultSettingsStateDefinition, key: \"showIdentitiesCurrentTab\" },\n !accountSettings.dontShowIdentitiesCurrentTab,\n );\n delete account.settings.dontShowIdentitiesCurrentTab;\n updateAccount = true;\n }\n\n if (updateAccount) {\n await helper.set(userId, account);\n }\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n let updateAccount = false;\n let settings = account?.settings ?? {};\n\n const showCardsCurrentTab = await helper.getFromUser(userId, {\n ...vaultSettingsStateDefinition,\n key: \"showCardsCurrentTab\",\n });\n\n const showIdentitiesCurrentTab = await helper.getFromUser(userId, {\n ...vaultSettingsStateDefinition,\n key: \"showIdentitiesCurrentTab\",\n });\n\n if (showCardsCurrentTab != null) {\n // invert the value to match the new naming convention\n settings = { ...settings, dontShowCardsCurrentTab: !showCardsCurrentTab };\n\n await helper.setToUser(\n userId,\n { ...vaultSettingsStateDefinition, key: \"showCardsCurrentTab\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (showIdentitiesCurrentTab != null) {\n // invert the value to match the new naming convention\n settings = { ...settings, dontShowIdentitiesCurrentTab: !showIdentitiesCurrentTab };\n\n await helper.setToUser(\n userId,\n { ...vaultSettingsStateDefinition, key: \"showIdentitiesCurrentTab\" },\n null,\n );\n\n updateAccount = true;\n }\n\n if (updateAccount) {\n await helper.set(userId, { ...account, settings });\n }\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n settings?: { avatarColor?: string };\n};\n\nconst AVATAR_COLOR_STATE: StateDefinitionLike = { name: \"avatar\" };\n\nconst AVATAR_COLOR_KEY: KeyDefinitionLike = {\n key: \"avatarColor\",\n stateDefinition: AVATAR_COLOR_STATE,\n};\n\nexport class AvatarColorMigrator extends Migrator<36, 37> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n // Move account avatarColor\n if (account?.settings?.avatarColor != null) {\n await helper.setToUser(userId, AVATAR_COLOR_KEY, account.settings.avatarColor);\n\n // Delete old account avatarColor property\n delete account?.settings?.avatarColor;\n await helper.set(userId, account);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountState) {\n let updatedAccount = false;\n const userAvatarColor = await helper.getFromUser(userId, AVATAR_COLOR_KEY);\n\n if (userAvatarColor) {\n if (!account) {\n account = {};\n }\n\n updatedAccount = true;\n account.settings.avatarColor = userAvatarColor;\n await helper.setToUser(userId, AVATAR_COLOR_KEY, null);\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype ExpectedAccountType = {\n tokens?: {\n accessToken?: string;\n refreshToken?: string;\n };\n profile?: {\n apiKeyClientId?: string;\n email?: string;\n };\n keys?: {\n apiKeyClientSecret?: string;\n };\n};\n\ntype ExpectedGlobalType = {\n twoFactorToken?: string;\n};\n\nexport const EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL: KeyDefinitionLike = {\n key: \"emailTwoFactorTokenRecord\",\n stateDefinition: {\n name: \"tokenDiskLocal\",\n },\n};\n\nconst TOKEN_STATE_DEF_LIKE: StateDefinitionLike = {\n name: \"token\",\n};\n\nexport const ACCESS_TOKEN_DISK: KeyDefinitionLike = {\n key: \"accessToken\", // matches KeyDefinition.key\n stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const REFRESH_TOKEN_DISK: KeyDefinitionLike = {\n key: \"refreshToken\",\n stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const API_KEY_CLIENT_ID_DISK: KeyDefinitionLike = {\n key: \"apiKeyClientId\",\n stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const API_KEY_CLIENT_SECRET_DISK: KeyDefinitionLike = {\n key: \"apiKeyClientSecret\",\n stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport class TokenServiceStateProviderMigrator extends Migrator<37, 38> {\n async migrate(helper: MigrationHelper): Promise {\n // Move global data\n const globalData = await helper.get(\"global\");\n\n // Create new global record for 2FA token that we can accumulate data in\n const emailTwoFactorTokenRecord = {};\n\n const accounts = await helper.getAccounts();\n async function migrateAccount(\n userId: string,\n account: ExpectedAccountType | undefined,\n globalTwoFactorToken: string | undefined,\n emailTwoFactorTokenRecord: Record,\n ): Promise {\n let updatedAccount = false;\n\n // migrate 2FA token from global to user state\n // Due to the existing implmentation, n users on the same device share the same global state value for 2FA token.\n // So, we will just migrate it to all users to keep it valid for whichever was the user that set it previously.\n // Note: don't bother migrating 2FA Token if user account or email is undefined\n const email = account?.profile?.email;\n if (globalTwoFactorToken != undefined && account != undefined && email != undefined) {\n emailTwoFactorTokenRecord[email] = globalTwoFactorToken;\n // Note: don't set updatedAccount to true here as we aren't updating\n // the legacy user state, just migrating a global state to a new user state\n }\n\n // Migrate access token\n const existingAccessToken = account?.tokens?.accessToken;\n\n if (existingAccessToken != null) {\n // Only migrate data that exists\n if (helper.type !== \"web-disk-local\") {\n // only migrate access token to session storage - never local.\n await helper.setToUser(userId, ACCESS_TOKEN_DISK, existingAccessToken);\n }\n delete account.tokens.accessToken;\n updatedAccount = true;\n }\n\n // Migrate refresh token\n const existingRefreshToken = account?.tokens?.refreshToken;\n\n if (existingRefreshToken != null) {\n if (helper.type !== \"web-disk-local\") {\n // only migrate refresh token to session storage - never local.\n await helper.setToUser(userId, REFRESH_TOKEN_DISK, existingRefreshToken);\n }\n delete account.tokens.refreshToken;\n updatedAccount = true;\n }\n\n // Migrate API key client id\n const existingApiKeyClientId = account?.profile?.apiKeyClientId;\n\n if (existingApiKeyClientId != null) {\n if (helper.type !== \"web-disk-local\") {\n // only migrate client id to session storage - never local.\n await helper.setToUser(userId, API_KEY_CLIENT_ID_DISK, existingApiKeyClientId);\n }\n delete account.profile.apiKeyClientId;\n updatedAccount = true;\n }\n\n // Migrate API key client secret\n const existingApiKeyClientSecret = account?.keys?.apiKeyClientSecret;\n if (existingApiKeyClientSecret != null) {\n if (helper.type !== \"web-disk-local\") {\n // only migrate client secret to session storage - never local.\n await helper.setToUser(userId, API_KEY_CLIENT_SECRET_DISK, existingApiKeyClientSecret);\n }\n delete account.keys.apiKeyClientSecret;\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n // Save the migrated account only if it was updated\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([\n ...accounts.map(({ userId, account }) =>\n migrateAccount(userId, account, globalData?.twoFactorToken, emailTwoFactorTokenRecord),\n ),\n ]);\n\n // Save the global 2FA token record\n await helper.setToGlobal(EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL, emailTwoFactorTokenRecord);\n\n // Delete global data\n delete globalData?.twoFactorToken;\n await helper.set(\"global\", globalData);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n // Since we migrated the global 2FA token to all users, we need to rollback the 2FA token for all users\n // but we only need to set it to the global state once\n\n // Go through accounts and find the first user that has a non-null email and 2FA token\n let migratedTwoFactorToken: string | null = null;\n for (const { account } of accounts) {\n const email = account?.profile?.email;\n if (email == null) {\n continue;\n }\n const emailTwoFactorTokenRecord: Record = await helper.getFromGlobal(\n EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n );\n\n migratedTwoFactorToken = emailTwoFactorTokenRecord[email];\n\n if (migratedTwoFactorToken != null) {\n break;\n }\n }\n\n if (migratedTwoFactorToken != null) {\n let legacyGlobal = await helper.get(\"global\");\n if (!legacyGlobal) {\n legacyGlobal = {};\n }\n legacyGlobal.twoFactorToken = migratedTwoFactorToken;\n await helper.set(\"global\", legacyGlobal);\n }\n\n // delete global 2FA token record\n await helper.setToGlobal(EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL, null);\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedLegacyAccount = false;\n\n // Rollback access token\n const migratedAccessToken = await helper.getFromUser(userId, ACCESS_TOKEN_DISK);\n\n if (account?.tokens && migratedAccessToken != null) {\n account.tokens.accessToken = migratedAccessToken;\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, ACCESS_TOKEN_DISK, null);\n\n // Rollback refresh token\n const migratedRefreshToken = await helper.getFromUser(userId, REFRESH_TOKEN_DISK);\n\n if (account?.tokens && migratedRefreshToken != null) {\n account.tokens.refreshToken = migratedRefreshToken;\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, REFRESH_TOKEN_DISK, null);\n\n // Rollback API key client id\n\n const migratedApiKeyClientId = await helper.getFromUser(\n userId,\n API_KEY_CLIENT_ID_DISK,\n );\n\n if (account?.profile && migratedApiKeyClientId != null) {\n account.profile.apiKeyClientId = migratedApiKeyClientId;\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, API_KEY_CLIENT_ID_DISK, null);\n\n // Rollback API key client secret\n const migratedApiKeyClientSecret = await helper.getFromUser(\n userId,\n API_KEY_CLIENT_SECRET_DISK,\n );\n\n if (account?.keys && migratedApiKeyClientSecret != null) {\n account.keys.apiKeyClientSecret = migratedApiKeyClientSecret;\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, API_KEY_CLIENT_SECRET_DISK, null);\n\n if (updatedLegacyAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n profile?: {\n hasPremiumPersonally?: boolean;\n hasPremiumFromOrganization?: boolean;\n };\n};\n\ntype ExpectedBillingAccountProfileType = {\n hasPremiumPersonally: boolean;\n hasPremiumFromOrganization: boolean;\n};\n\nexport const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION: KeyDefinitionLike = {\n key: \"accountProfile\",\n stateDefinition: {\n name: \"billing\",\n },\n};\n\nexport class MoveBillingAccountProfileMigrator extends Migrator<38, 39> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n const migrateAccount = async (userId: string, account: ExpectedAccountType): Promise => {\n const hasPremiumPersonally = account?.profile?.hasPremiumPersonally;\n const hasPremiumFromOrganization = account?.profile?.hasPremiumFromOrganization;\n\n if (hasPremiumPersonally != null || hasPremiumFromOrganization != null) {\n await helper.setToUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION, {\n hasPremiumPersonally: hasPremiumPersonally,\n hasPremiumFromOrganization: hasPremiumFromOrganization,\n });\n\n delete account?.profile?.hasPremiumPersonally;\n delete account?.profile?.hasPremiumFromOrganization;\n await helper.set(userId, account);\n }\n };\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n const rollbackAccount = async (userId: string, account: ExpectedAccountType): Promise => {\n const value = await helper.getFromUser(\n userId,\n BILLING_ACCOUNT_PROFILE_KEY_DEFINITION,\n );\n\n if (account && value) {\n account.profile = Object.assign(account.profile ?? {}, {\n hasPremiumPersonally: value?.hasPremiumPersonally,\n hasPremiumFromOrganization: value?.hasPremiumFromOrganization,\n });\n await helper.set(userId, account);\n }\n\n await helper.setToUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION, null);\n };\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { profile?: { everBeenUnlocked?: boolean } };\n\nexport class RemoveEverBeenUnlockedMigrator extends Migrator<3, 4> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function removeEverBeenUnlocked(userId: string, account: ExpectedAccountType) {\n if (account?.profile?.everBeenUnlocked != null) {\n delete account.profile.everBeenUnlocked;\n return helper.set(userId, account);\n }\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.all(accounts.map(({ userId, account }) => removeEverBeenUnlocked(userId, account)));\n }\n\n rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n\n // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n // it is nested inside a global object.\n override async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n await helper.set(\"global\", { ...global, stateVersion: endVersion });\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Local declarations of `OrganizationData` and the types of it's properties.\n// Duplicated to remain frozen in time when migration occurs.\nenum OrganizationUserStatusType {\n Invited = 0,\n Accepted = 1,\n Confirmed = 2,\n Revoked = -1,\n}\n\nenum OrganizationUserType {\n Owner = 0,\n Admin = 1,\n User = 2,\n Manager = 3,\n Custom = 4,\n}\n\ntype PermissionsApi = {\n accessEventLogs: boolean;\n accessImportExport: boolean;\n accessReports: boolean;\n createNewCollections: boolean;\n editAnyCollection: boolean;\n deleteAnyCollection: boolean;\n editAssignedCollections: boolean;\n deleteAssignedCollections: boolean;\n manageCiphers: boolean;\n manageGroups: boolean;\n manageSso: boolean;\n managePolicies: boolean;\n manageUsers: boolean;\n manageResetPassword: boolean;\n manageScim: boolean;\n};\n\nenum ProviderType {\n Msp = 0,\n Reseller = 1,\n}\n\nenum ProductType {\n Free = 0,\n Families = 1,\n Teams = 2,\n Enterprise = 3,\n TeamsStarter = 4,\n}\n\ntype OrganizationData = {\n id: string;\n name: string;\n status: OrganizationUserStatusType;\n type: OrganizationUserType;\n enabled: boolean;\n usePolicies: boolean;\n useGroups: boolean;\n useDirectory: boolean;\n useEvents: boolean;\n useTotp: boolean;\n use2fa: boolean;\n useApi: boolean;\n useSso: boolean;\n useKeyConnector: boolean;\n useScim: boolean;\n useCustomPermissions: boolean;\n useResetPassword: boolean;\n useSecretsManager: boolean;\n usePasswordManager: boolean;\n useActivateAutofillPolicy: boolean;\n selfHost: boolean;\n usersGetPremium: boolean;\n seats: number;\n maxCollections: number;\n maxStorageGb?: number;\n ssoBound: boolean;\n identifier: string;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n userId: string;\n hasPublicAndPrivateKeys: boolean;\n providerId: string;\n providerName: string;\n providerType?: ProviderType;\n isProviderUser: boolean;\n isMember: boolean;\n familySponsorshipFriendlyName: string;\n familySponsorshipAvailable: boolean;\n planProductType: ProductType;\n keyConnectorEnabled: boolean;\n keyConnectorUrl: string;\n familySponsorshipLastSyncDate?: Date;\n familySponsorshipValidUntil?: Date;\n familySponsorshipToDelete?: boolean;\n accessSecretsManager: boolean;\n limitCollectionCreationDeletion: boolean;\n allowAdminAccessToAllCollectionItems: boolean;\n flexibleCollections: boolean;\n};\n\ntype ExpectedAccountType = {\n data?: {\n organizations?: Record>;\n };\n};\n\nconst USER_ORGANIZATIONS: KeyDefinitionLike = {\n key: \"organizations\",\n stateDefinition: {\n name: \"organizations\",\n },\n};\n\nexport class OrganizationMigrator extends Migrator<39, 40> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.data?.organizations;\n if (value != null) {\n await helper.setToUser(userId, USER_ORGANIZATIONS, value);\n delete account.data.organizations;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = await helper.getFromUser(userId, USER_ORGANIZATIONS);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n organizations: value,\n });\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_ORGANIZATIONS, null);\n }\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n data?: {\n eventCollection?: [];\n };\n};\n\nconst EVENT_COLLECTION: KeyDefinitionLike = {\n stateDefinition: {\n name: \"eventCollection\",\n },\n key: \"eventCollection\",\n};\n\nexport class EventCollectionMigrator extends Migrator<40, 41> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountState): Promise {\n const value = account?.data?.eventCollection;\n if (value != null) {\n await helper.setToUser(userId, EVENT_COLLECTION, value);\n delete account.data.eventCollection;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise {\n const value = await helper.getFromUser(userId, EVENT_COLLECTION);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n eventCollection: value,\n });\n\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, EVENT_COLLECTION, null);\n }\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n disableFavicon?: boolean;\n};\n\nconst ShowFaviconDefinition: KeyDefinitionLike = {\n stateDefinition: {\n name: \"domainSettings\",\n },\n key: \"showFavicons\",\n};\n\nexport class EnableFaviconMigrator extends Migrator<41, 42> {\n async migrate(helper: MigrationHelper): Promise {\n // global state (\"disableFavicon\" -> \"showFavicons\")\n const globalState = await helper.get(\"global\");\n\n if (globalState?.disableFavicon != null) {\n await helper.setToGlobal(ShowFaviconDefinition, !globalState.disableFavicon);\n\n // delete `disableFavicon` from state global\n delete globalState.disableFavicon;\n\n await helper.set(\"global\", globalState);\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // global state (\"showFavicons\" -> \"disableFavicon\")\n const globalState = (await helper.get(\"global\")) || {};\n const showFavicons: boolean = await helper.getFromGlobal(ShowFaviconDefinition);\n\n if (showFavicons != null) {\n await helper.set(\"global\", {\n ...globalState,\n disableFavicon: !showFavicons,\n });\n\n // remove the global state provider framework key for `showFavicons`\n await helper.setToGlobal(ShowFaviconDefinition, null);\n }\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n settings?: { autoConfirmFingerPrints?: boolean };\n};\n\nconst ORGANIZATION_MANAGEMENT_PREFERENCES: StateDefinitionLike = {\n name: \"organizationManagementPreferences\",\n};\n\nconst AUTO_CONFIRM_FINGERPRINTS: KeyDefinitionLike = {\n key: \"autoConfirmFingerPrints\",\n stateDefinition: ORGANIZATION_MANAGEMENT_PREFERENCES,\n};\n\nexport class AutoConfirmFingerPrintsMigrator extends Migrator<42, 43> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n\n await Promise.all(\n legacyAccounts.map(async ({ userId, account }) => {\n if (account?.settings?.autoConfirmFingerPrints != null) {\n await helper.setToUser(\n userId,\n AUTO_CONFIRM_FINGERPRINTS,\n account.settings.autoConfirmFingerPrints,\n );\n delete account?.settings?.autoConfirmFingerPrints;\n await helper.set(userId, account);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n async function rollbackUser(userId: string, account: ExpectedAccountState) {\n let updatedAccount = false;\n const autoConfirmFingerPrints = await helper.getFromUser(\n userId,\n AUTO_CONFIRM_FINGERPRINTS,\n );\n\n if (autoConfirmFingerPrints) {\n if (!account) {\n account = {};\n }\n\n updatedAccount = true;\n account.settings.autoConfirmFingerPrints = autoConfirmFingerPrints;\n await helper.setToUser(userId, AUTO_CONFIRM_FINGERPRINTS, null);\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype DecryptionOptionsType = {\n hasMasterPassword: boolean;\n trustedDeviceOption?: {\n hasAdminApproval: boolean;\n hasLoginApprovingDevice: boolean;\n hasManageResetPasswordPermission: boolean;\n };\n keyConnectorOption?: {\n keyConnectorUrl: string;\n };\n};\n\ntype ExpectedAccountType = {\n decryptionOptions?: DecryptionOptionsType;\n};\n\nconst USER_DECRYPTION_OPTIONS: KeyDefinitionLike = {\n key: \"decryptionOptions\",\n stateDefinition: {\n name: \"userDecryptionOptions\",\n },\n};\n\nexport class UserDecryptionOptionsMigrator extends Migrator<43, 44> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const value = account?.decryptionOptions;\n if (value != null) {\n await helper.setToUser(userId, USER_DECRYPTION_OPTIONS, value);\n delete account.decryptionOptions;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const value: DecryptionOptionsType = await helper.getFromUser(\n userId,\n USER_DECRYPTION_OPTIONS,\n );\n if (account) {\n account.decryptionOptions = Object.assign(account.decryptionOptions, value);\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, USER_DECRYPTION_OPTIONS, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst ENVIRONMENT_STATE: StateDefinitionLike = { name: \"environment\" };\n\nconst ENVIRONMENT_REGION: KeyDefinitionLike = {\n key: \"region\",\n stateDefinition: ENVIRONMENT_STATE,\n};\n\nconst ENVIRONMENT_URLS: KeyDefinitionLike = {\n key: \"urls\",\n stateDefinition: ENVIRONMENT_STATE,\n};\n\nconst ENVIRONMENT_ENVIRONMENT: KeyDefinitionLike = {\n key: \"environment\",\n stateDefinition: ENVIRONMENT_STATE,\n};\n\nexport class MergeEnvironmentState extends Migrator<44, 45> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: unknown): Promise {\n const region = await helper.getFromUser(userId, ENVIRONMENT_REGION);\n const urls = await helper.getFromUser(userId, ENVIRONMENT_URLS);\n\n if (region == null && urls == null) {\n return;\n }\n\n await helper.setToUser(userId, ENVIRONMENT_ENVIRONMENT, {\n region,\n urls,\n });\n await helper.removeFromUser(userId, ENVIRONMENT_REGION);\n await helper.removeFromUser(userId, ENVIRONMENT_URLS);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n const region = await helper.getFromGlobal(ENVIRONMENT_REGION);\n const urls = await helper.getFromGlobal(ENVIRONMENT_URLS);\n\n if (region == null && urls == null) {\n return;\n }\n\n await helper.setToGlobal(ENVIRONMENT_ENVIRONMENT, {\n region,\n urls,\n });\n await helper.removeFromGlobal(ENVIRONMENT_REGION);\n await helper.removeFromGlobal(ENVIRONMENT_URLS);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: unknown): Promise {\n const state = (await helper.getFromUser(userId, ENVIRONMENT_ENVIRONMENT)) as {\n region: string;\n urls: string;\n } | null;\n\n await helper.setToUser(userId, ENVIRONMENT_REGION, state?.region);\n await helper.setToUser(userId, ENVIRONMENT_URLS, state?.urls);\n await helper.removeFromUser(userId, ENVIRONMENT_ENVIRONMENT);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n const state = (await helper.getFromGlobal(ENVIRONMENT_ENVIRONMENT)) as {\n region: string;\n urls: string;\n } | null;\n\n await helper.setToGlobal(ENVIRONMENT_REGION, state?.region);\n await helper.setToGlobal(ENVIRONMENT_URLS, state?.urls);\n await helper.removeFromGlobal(ENVIRONMENT_ENVIRONMENT);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\nexport const PROMPT_CANCELLED: KeyDefinitionLike = {\n key: \"promptCancelled\",\n stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class DeleteBiometricPromptCancelledData extends Migrator<45, 46> {\n async migrate(helper: MigrationHelper): Promise {\n await Promise.all(\n (await helper.getAccounts()).map(async ({ userId }) => {\n if (helper.getFromUser(userId, PROMPT_CANCELLED) != null) {\n await helper.removeFromUser(userId, PROMPT_CANCELLED);\n }\n }),\n );\n }\n\n async rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedGlobalType = {\n window?: object;\n enableTray?: boolean;\n enableMinimizeToTray?: boolean;\n enableCloseToTray?: boolean;\n enableStartToTray?: boolean;\n openAtLogin?: boolean;\n alwaysShowDock?: boolean;\n enableAlwaysOnTop?: boolean;\n};\n\ntype ExpectedAccountType = {\n settings?: {\n enableAlwaysOnTop?: boolean;\n };\n};\n\nconst DESKTOP_SETTINGS_STATE: StateDefinitionLike = { name: \"desktopSettings\" };\n\nconst WINDOW_KEY: KeyDefinitionLike = { key: \"window\", stateDefinition: DESKTOP_SETTINGS_STATE };\n\nconst CLOSE_TO_TRAY_KEY: KeyDefinitionLike = {\n key: \"closeToTray\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst MINIMIZE_TO_TRAY_KEY: KeyDefinitionLike = {\n key: \"minimizeToTray\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst START_TO_TRAY_KEY: KeyDefinitionLike = {\n key: \"startToTray\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst TRAY_ENABLED_KEY: KeyDefinitionLike = {\n key: \"trayEnabled\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst OPEN_AT_LOGIN_KEY: KeyDefinitionLike = {\n key: \"openAtLogin\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst ALWAYS_SHOW_DOCK_KEY: KeyDefinitionLike = {\n key: \"alwaysShowDock\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\n\nconst ALWAYS_ON_TOP_KEY: KeyDefinitionLike = {\n key: \"alwaysOnTop\",\n stateDefinition: DESKTOP_SETTINGS_STATE,\n};\n\nexport class MoveDesktopSettingsMigrator extends Migrator<46, 47> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobal = await helper.get(\"global\");\n\n let updatedGlobal = false;\n if (legacyGlobal?.window !== undefined) {\n await helper.setToGlobal(WINDOW_KEY, legacyGlobal.window);\n updatedGlobal = true;\n delete legacyGlobal.window;\n }\n\n if (legacyGlobal?.enableCloseToTray != null) {\n await helper.setToGlobal(CLOSE_TO_TRAY_KEY, legacyGlobal.enableCloseToTray);\n updatedGlobal = true;\n delete legacyGlobal.enableCloseToTray;\n }\n\n if (legacyGlobal?.enableMinimizeToTray != null) {\n await helper.setToGlobal(MINIMIZE_TO_TRAY_KEY, legacyGlobal.enableMinimizeToTray);\n updatedGlobal = true;\n delete legacyGlobal.enableMinimizeToTray;\n }\n\n if (legacyGlobal?.enableStartToTray != null) {\n await helper.setToGlobal(START_TO_TRAY_KEY, legacyGlobal.enableStartToTray);\n updatedGlobal = true;\n delete legacyGlobal.enableStartToTray;\n }\n\n if (legacyGlobal?.enableTray != null) {\n await helper.setToGlobal(TRAY_ENABLED_KEY, legacyGlobal.enableTray);\n updatedGlobal = true;\n delete legacyGlobal.enableTray;\n }\n\n if (legacyGlobal?.openAtLogin != null) {\n await helper.setToGlobal(OPEN_AT_LOGIN_KEY, legacyGlobal.openAtLogin);\n updatedGlobal = true;\n delete legacyGlobal.openAtLogin;\n }\n\n if (legacyGlobal?.alwaysShowDock != null) {\n await helper.setToGlobal(ALWAYS_SHOW_DOCK_KEY, legacyGlobal.alwaysShowDock);\n updatedGlobal = true;\n delete legacyGlobal.alwaysShowDock;\n }\n\n if (legacyGlobal?.enableAlwaysOnTop != null) {\n await helper.setToGlobal(ALWAYS_ON_TOP_KEY, legacyGlobal.enableAlwaysOnTop);\n updatedGlobal = true;\n delete legacyGlobal.enableAlwaysOnTop;\n }\n\n if (updatedGlobal) {\n await helper.set(\"global\", legacyGlobal);\n }\n\n async function migrateAccount(userId: string, account: ExpectedAccountType) {\n // We only migrate the global setting for this, if we find it on the account object\n // just delete it.\n if (account?.settings?.enableAlwaysOnTop != null) {\n delete account.settings.enableAlwaysOnTop;\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n }\n\n rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n enableDuckDuckGoBrowserIntegration?: boolean;\n};\n\nexport const DDG_KEY: KeyDefinitionLike = {\n key: \"enableDuckDuckGoBrowserIntegration\",\n stateDefinition: {\n name: \"autofillSettings\",\n },\n};\n\nexport class MoveDdgToStateProviderMigrator extends Migrator<47, 48> {\n async migrate(helper: MigrationHelper): Promise {\n // global state\n const global = await helper.get(\"global\");\n if (global?.enableDuckDuckGoBrowserIntegration == null) {\n return;\n }\n\n await helper.setToGlobal(DDG_KEY, global.enableDuckDuckGoBrowserIntegration);\n delete global.enableDuckDuckGoBrowserIntegration;\n await helper.set(\"global\", global);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const enableDdg = await helper.getFromGlobal(DDG_KEY);\n\n if (!enableDdg) {\n return;\n }\n\n const global = (await helper.get(\"global\")) ?? {};\n global.enableDuckDuckGoBrowserIntegration = enableDdg;\n await helper.set(\"global\", global);\n await helper.removeFromGlobal(DDG_KEY);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst CONFIG_DISK: StateDefinitionLike = { name: \"config\" };\nexport const USER_SERVER_CONFIG: KeyDefinitionLike = {\n stateDefinition: CONFIG_DISK,\n key: \"serverConfig\",\n};\n\n// Note: no need to migrate global configs, they don't currently exist\n\ntype ExpectedAccountType = {\n settings?: {\n serverConfig?: unknown;\n };\n};\n\nexport class AccountServerConfigMigrator extends Migrator<48, 49> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n if (account?.settings?.serverConfig != null) {\n await helper.setToUser(userId, USER_SERVER_CONFIG, account.settings.serverConfig);\n delete account.settings.serverConfig;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const serverConfig = await helper.getFromUser(userId, USER_SERVER_CONFIG);\n\n if (serverConfig) {\n account ??= {};\n account.settings ??= {};\n\n account.settings.serverConfig = serverConfig;\n await helper.setToUser(userId, USER_SERVER_CONFIG, null);\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { keys?: { organizationKeys?: { encrypted: Record } } };\ntype NewAccountType = {\n keys?: {\n organizationKeys?: { encrypted: Record };\n };\n};\n\nexport class AddKeyTypeToOrgKeysMigrator extends Migrator<4, 5> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function updateOrgKey(userId: string, account: ExpectedAccountType) {\n const encryptedOrgKeys = account?.keys?.organizationKeys?.encrypted;\n if (encryptedOrgKeys == null) {\n return;\n }\n\n const newOrgKeys: Record = {};\n\n Object.entries(encryptedOrgKeys).forEach(([orgId, encKey]) => {\n newOrgKeys[orgId] = {\n type: \"organization\",\n key: encKey,\n };\n });\n (account as any).keys.organizationKeys.encrypted = newOrgKeys;\n\n await helper.set(userId, account);\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.all(accounts.map(({ userId, account }) => updateOrgKey(userId, account)));\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function updateOrgKey(userId: string, account: NewAccountType) {\n const encryptedOrgKeys = account?.keys?.organizationKeys?.encrypted;\n if (encryptedOrgKeys == null) {\n return;\n }\n\n const newOrgKeys: Record = {};\n\n Object.entries(encryptedOrgKeys).forEach(([orgId, encKey]) => {\n newOrgKeys[orgId] = encKey.key;\n });\n (account as any).keys.organizationKeys.encrypted = newOrgKeys;\n\n await helper.set(userId, account);\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.all(accounts.map(async ({ userId, account }) => updateOrgKey(userId, account)));\n }\n\n // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n // it is nested inside a global object.\n override async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n await helper.set(\"global\", { ...global, stateVersion: endVersion });\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n profile?: {\n usesKeyConnector?: boolean;\n convertAccountToKeyConnector?: boolean;\n };\n};\n\nconst usesKeyConnectorKeyDefinition: KeyDefinitionLike = {\n key: \"usesKeyConnector\",\n stateDefinition: {\n name: \"keyConnector\",\n },\n};\n\nconst convertAccountToKeyConnectorKeyDefinition: KeyDefinitionLike = {\n key: \"convertAccountToKeyConnector\",\n stateDefinition: {\n name: \"keyConnector\",\n },\n};\n\nexport class KeyConnectorMigrator extends Migrator<49, 50> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const usesKeyConnector = account?.profile?.usesKeyConnector;\n const convertAccountToKeyConnector = account?.profile?.convertAccountToKeyConnector;\n if (usesKeyConnector == null && convertAccountToKeyConnector == null) {\n return;\n }\n if (usesKeyConnector != null) {\n await helper.setToUser(userId, usesKeyConnectorKeyDefinition, usesKeyConnector);\n delete account.profile.usesKeyConnector;\n }\n if (convertAccountToKeyConnector != null) {\n await helper.setToUser(\n userId,\n convertAccountToKeyConnectorKeyDefinition,\n convertAccountToKeyConnector,\n );\n delete account.profile.convertAccountToKeyConnector;\n }\n await helper.set(userId, account);\n }\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const usesKeyConnector: boolean = await helper.getFromUser(\n userId,\n usesKeyConnectorKeyDefinition,\n );\n const convertAccountToKeyConnector: boolean = await helper.getFromUser(\n userId,\n convertAccountToKeyConnectorKeyDefinition,\n );\n if (usesKeyConnector == null && convertAccountToKeyConnector == null) {\n return;\n }\n if (usesKeyConnector != null) {\n account.profile.usesKeyConnector = usesKeyConnector;\n await helper.setToUser(userId, usesKeyConnectorKeyDefinition, null);\n }\n if (convertAccountToKeyConnector != null) {\n account.profile.convertAccountToKeyConnector = convertAccountToKeyConnector;\n await helper.setToUser(userId, convertAccountToKeyConnectorKeyDefinition, null);\n }\n await helper.set(userId, account);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = { rememberedEmail?: string };\n\nconst LOGIN_EMAIL_STATE: StateDefinitionLike = { name: \"loginEmail\" };\n\nconst STORED_EMAIL: KeyDefinitionLike = {\n key: \"storedEmail\",\n stateDefinition: LOGIN_EMAIL_STATE,\n};\n\nexport class RememberedEmailMigrator extends Migrator<50, 51> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobal = await helper.get(\"global\");\n\n // Move global data\n if (legacyGlobal?.rememberedEmail != null) {\n await helper.setToGlobal(STORED_EMAIL, legacyGlobal.rememberedEmail);\n }\n\n // Delete legacy global data\n delete legacyGlobal?.rememberedEmail;\n await helper.set(\"global\", legacyGlobal);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n let legacyGlobal = await helper.get(\"global\");\n let updatedLegacyGlobal = false;\n const globalStoredEmail = await helper.getFromGlobal(STORED_EMAIL);\n\n if (globalStoredEmail) {\n if (!legacyGlobal) {\n legacyGlobal = {};\n }\n\n updatedLegacyGlobal = true;\n legacyGlobal.rememberedEmail = globalStoredEmail;\n await helper.setToGlobal(STORED_EMAIL, null);\n }\n\n if (updatedLegacyGlobal) {\n await helper.set(\"global\", legacyGlobal);\n }\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n installedVersion?: string;\n};\n\nexport class DeleteInstalledVersion extends Migrator<51, 52> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobal = await helper.get(\"global\");\n if (legacyGlobal?.installedVersion != null) {\n delete legacyGlobal.installedVersion;\n await helper.set(\"global\", legacyGlobal);\n }\n }\n rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype DeviceKeyJsonType = {\n keyB64: string;\n};\n\ntype ExpectedAccountType = {\n keys?: {\n deviceKey?: DeviceKeyJsonType;\n };\n settings?: {\n trustDeviceChoiceForDecryption?: boolean;\n };\n};\n\nexport const DEVICE_KEY: KeyDefinitionLike = {\n key: \"deviceKey\", // matches KeyDefinition.key in DeviceTrustService\n stateDefinition: {\n name: \"deviceTrust\", // matches StateDefinition.name in StateDefinitions\n },\n};\n\nexport const SHOULD_TRUST_DEVICE: KeyDefinitionLike = {\n key: \"shouldTrustDevice\",\n stateDefinition: {\n name: \"deviceTrust\",\n },\n};\n\nexport class DeviceTrustServiceStateProviderMigrator extends Migrator<52, 53> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedAccount = false;\n\n // Migrate deviceKey\n const existingDeviceKey = account?.keys?.deviceKey;\n\n if (existingDeviceKey != null) {\n // Only migrate data that exists\n await helper.setToUser(userId, DEVICE_KEY, existingDeviceKey);\n delete account.keys.deviceKey;\n updatedAccount = true;\n }\n\n // Migrate shouldTrustDevice\n const existingShouldTrustDevice = account?.settings?.trustDeviceChoiceForDecryption;\n\n if (existingShouldTrustDevice != null) {\n await helper.setToUser(userId, SHOULD_TRUST_DEVICE, existingShouldTrustDevice);\n delete account.settings.trustDeviceChoiceForDecryption;\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n // Save the migrated account\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n // Rollback deviceKey\n const migratedDeviceKey: DeviceKeyJsonType = await helper.getFromUser(userId, DEVICE_KEY);\n\n if (account?.keys && migratedDeviceKey != null) {\n account.keys.deviceKey = migratedDeviceKey;\n await helper.set(userId, account);\n }\n\n await helper.setToUser(userId, DEVICE_KEY, null);\n\n // Rollback shouldTrustDevice\n const migratedShouldTrustDevice = await helper.getFromUser(\n userId,\n SHOULD_TRUST_DEVICE,\n );\n\n if (account?.settings && migratedShouldTrustDevice != null) {\n account.settings.trustDeviceChoiceForDecryption = migratedShouldTrustDevice;\n await helper.set(userId, account);\n }\n\n await helper.setToUser(userId, SHOULD_TRUST_DEVICE, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport enum SendType {\n Text = 0,\n File = 1,\n}\n\ntype SendData = {\n id: string;\n accessId: string;\n};\n\ntype ExpectedSendState = {\n data?: {\n sends?: {\n encrypted?: Record;\n };\n };\n};\n\nconst ENCRYPTED_SENDS: KeyDefinitionLike = {\n stateDefinition: {\n name: \"send\",\n },\n key: \"sends\",\n};\n\n/**\n * Only encrypted sends are stored on disk. Only the encrypted items need to be\n * migrated from the previous sends state data.\n */\nexport class SendMigrator extends Migrator<53, 54> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedSendState): Promise {\n const value = account?.data?.sends?.encrypted;\n if (value != null) {\n await helper.setToUser(userId, ENCRYPTED_SENDS, value);\n delete account.data.sends;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedSendState): Promise {\n const value = await helper.getFromUser(userId, ENCRYPTED_SENDS);\n if (account) {\n account.data = Object.assign(account.data ?? {}, {\n sends: {\n encrypted: value,\n },\n });\n\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, ENCRYPTED_SENDS, null);\n }\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n keys?: {\n masterKeyEncryptedUserKey?: string;\n };\n profile?: {\n forceSetPasswordReason?: number;\n keyHash?: string;\n };\n};\n\nexport const FORCE_SET_PASSWORD_REASON_DEFINITION: KeyDefinitionLike = {\n key: \"forceSetPasswordReason\",\n stateDefinition: {\n name: \"masterPassword\",\n },\n};\n\nexport const MASTER_KEY_HASH_DEFINITION: KeyDefinitionLike = {\n key: \"masterKeyHash\",\n stateDefinition: {\n name: \"masterPassword\",\n },\n};\n\nexport const MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION: KeyDefinitionLike = {\n key: \"masterKeyEncryptedUserKey\",\n stateDefinition: {\n name: \"masterPassword\",\n },\n};\n\nexport class MoveMasterKeyStateToProviderMigrator extends Migrator<54, 55> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const forceSetPasswordReason = account?.profile?.forceSetPasswordReason;\n if (forceSetPasswordReason != null) {\n await helper.setToUser(\n userId,\n FORCE_SET_PASSWORD_REASON_DEFINITION,\n forceSetPasswordReason,\n );\n\n delete account.profile.forceSetPasswordReason;\n await helper.set(userId, account);\n }\n\n const masterKeyHash = account?.profile?.keyHash;\n if (masterKeyHash != null) {\n await helper.setToUser(userId, MASTER_KEY_HASH_DEFINITION, masterKeyHash);\n\n delete account.profile.keyHash;\n await helper.set(userId, account);\n }\n\n const masterKeyEncryptedUserKey = account?.keys?.masterKeyEncryptedUserKey;\n if (masterKeyEncryptedUserKey != null) {\n await helper.setToUser(\n userId,\n MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION,\n masterKeyEncryptedUserKey,\n );\n\n delete account.keys.masterKeyEncryptedUserKey;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const forceSetPasswordReason = await helper.getFromUser(\n userId,\n FORCE_SET_PASSWORD_REASON_DEFINITION,\n );\n const masterKeyHash = await helper.getFromUser(userId, MASTER_KEY_HASH_DEFINITION);\n const masterKeyEncryptedUserKey = await helper.getFromUser(\n userId,\n MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION,\n );\n if (account != null) {\n if (forceSetPasswordReason != null) {\n account.profile = Object.assign(account.profile ?? {}, {\n forceSetPasswordReason,\n });\n }\n if (masterKeyHash != null) {\n account.profile = Object.assign(account.profile ?? {}, {\n keyHash: masterKeyHash,\n });\n }\n if (masterKeyEncryptedUserKey != null) {\n account.keys = Object.assign(account.keys ?? {}, {\n masterKeyEncryptedUserKey,\n });\n }\n await helper.set(userId, account);\n }\n\n await helper.setToUser(userId, FORCE_SET_PASSWORD_REASON_DEFINITION, null);\n await helper.setToUser(userId, MASTER_KEY_HASH_DEFINITION, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype AdminAuthRequestStorable = {\n id: string;\n privateKey: string;\n};\n\ntype ExpectedAccountType = {\n adminAuthRequest?: AdminAuthRequestStorable;\n settings?: {\n approveLoginRequests?: boolean;\n };\n};\n\nconst ADMIN_AUTH_REQUEST_KEY: KeyDefinitionLike = {\n stateDefinition: {\n name: \"authRequestLocal\",\n },\n key: \"adminAuthRequest\",\n};\n\nconst ACCEPT_AUTH_REQUESTS_KEY: KeyDefinitionLike = {\n stateDefinition: {\n name: \"authRequestLocal\",\n },\n key: \"acceptAuthRequests\",\n};\n\nexport class AuthRequestMigrator extends Migrator<55, 56> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedAccount = false;\n\n // Migrate admin auth request\n const existingAdminAuthRequest = account?.adminAuthRequest;\n\n if (existingAdminAuthRequest != null) {\n await helper.setToUser(userId, ADMIN_AUTH_REQUEST_KEY, existingAdminAuthRequest);\n delete account.adminAuthRequest;\n updatedAccount = true;\n }\n\n // Migrate approve login requests\n const existingApproveLoginRequests = account?.settings?.approveLoginRequests;\n\n if (existingApproveLoginRequests != null) {\n await helper.setToUser(userId, ACCEPT_AUTH_REQUESTS_KEY, existingApproveLoginRequests);\n delete account.settings.approveLoginRequests;\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n // Save the migrated account\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedAccount = false;\n // Rollback admin auth request\n const migratedAdminAuthRequest: AdminAuthRequestStorable = await helper.getFromUser(\n userId,\n ADMIN_AUTH_REQUEST_KEY,\n );\n\n if (migratedAdminAuthRequest != null) {\n account.adminAuthRequest = migratedAdminAuthRequest;\n updatedAccount = true;\n }\n\n await helper.setToUser(userId, ADMIN_AUTH_REQUEST_KEY, null);\n\n // Rollback approve login requests\n const migratedAcceptAuthRequest: boolean = await helper.getFromUser(\n userId,\n ACCEPT_AUTH_REQUESTS_KEY,\n );\n\n if (migratedAcceptAuthRequest != null) {\n account.settings = Object.assign(account.settings ?? {}, {\n approveLoginRequests: migratedAcceptAuthRequest,\n });\n updatedAccount = true;\n }\n\n await helper.setToUser(userId, ACCEPT_AUTH_REQUESTS_KEY, null);\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n data: {\n localData?: unknown;\n ciphers?: {\n encrypted: unknown;\n };\n };\n};\n\nexport const CIPHERS_DISK_LOCAL: KeyDefinitionLike = {\n key: \"localData\",\n stateDefinition: {\n name: \"ciphersLocal\",\n },\n};\n\nexport const CIPHERS_DISK: KeyDefinitionLike = {\n key: \"ciphers\",\n stateDefinition: {\n name: \"ciphers\",\n },\n};\n\nexport class CipherServiceMigrator extends Migrator<56, 57> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedAccount = false;\n\n //Migrate localData\n const localData = account?.data?.localData;\n if (localData != null) {\n await helper.setToUser(userId, CIPHERS_DISK_LOCAL, localData);\n delete account.data.localData;\n updatedAccount = true;\n }\n\n //Migrate ciphers\n const ciphers = account?.data?.ciphers?.encrypted;\n if (ciphers != null) {\n await helper.setToUser(userId, CIPHERS_DISK, ciphers);\n delete account.data.ciphers;\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n //rollback localData\n const localData = await helper.getFromUser(userId, CIPHERS_DISK_LOCAL);\n\n if (account.data && localData != null) {\n account.data.localData = localData;\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, CIPHERS_DISK_LOCAL, null);\n\n //rollback ciphers\n const ciphers = await helper.getFromUser(userId, CIPHERS_DISK);\n\n if (account.data && ciphers != null) {\n account.data.ciphers ||= { encrypted: null };\n account.data.ciphers.encrypted = ciphers;\n await helper.set(userId, account);\n }\n await helper.setToUser(userId, CIPHERS_DISK, null);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = NonNullable;\n\nexport const REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE: KeyDefinitionLike = {\n key: \"refreshTokenMigratedToSecureStorage\", // matches KeyDefinition.key\n stateDefinition: {\n name: \"token\", // matches StateDefinition.name in StateDefinitions\n },\n};\n\nexport class RemoveRefreshTokenMigratedFlagMigrator extends Migrator<57, 58> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const refreshTokenMigratedFlag = await helper.getFromUser(\n userId,\n REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE,\n );\n\n if (refreshTokenMigratedFlag != null) {\n // Only delete the flag if it exists\n await helper.removeFromUser(userId, REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nenum KdfType {\n PBKDF2_SHA256 = 0,\n Argon2id = 1,\n}\n\nclass KdfConfig {\n iterations: number;\n kdfType: KdfType;\n memory?: number;\n parallelism?: number;\n}\n\ntype ExpectedAccountType = {\n profile?: {\n kdfIterations: number;\n kdfType: KdfType;\n kdfMemory?: number;\n kdfParallelism?: number;\n };\n};\n\nconst kdfConfigKeyDefinition: KeyDefinitionLike = {\n key: \"kdfConfig\",\n stateDefinition: {\n name: \"kdfConfig\",\n },\n};\n\nexport class KdfConfigMigrator extends Migrator<58, 59> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function migrateAccount(userId: string, account: ExpectedAccountType): Promise {\n const iterations = account?.profile?.kdfIterations;\n const kdfType = account?.profile?.kdfType;\n const memory = account?.profile?.kdfMemory;\n const parallelism = account?.profile?.kdfParallelism;\n\n const kdfConfig: KdfConfig = {\n iterations: iterations,\n kdfType: kdfType,\n memory: memory,\n parallelism: parallelism,\n };\n\n if (kdfConfig != null) {\n await helper.setToUser(userId, kdfConfigKeyDefinition, kdfConfig);\n delete account?.profile?.kdfIterations;\n delete account?.profile?.kdfType;\n delete account?.profile?.kdfMemory;\n delete account?.profile?.kdfParallelism;\n }\n\n await helper.set(userId, account);\n }\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n const kdfConfig: KdfConfig = await helper.getFromUser(userId, kdfConfigKeyDefinition);\n\n if (kdfConfig != null) {\n account.profile.kdfIterations = kdfConfig.iterations;\n account.profile.kdfType = kdfConfig.kdfType;\n account.profile.kdfMemory = kdfConfig.memory;\n account.profile.kdfParallelism = kdfConfig.parallelism;\n await helper.setToUser(userId, kdfConfigKeyDefinition, null);\n }\n await helper.set(userId, account);\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { keys?: { legacyEtmKey?: string } };\n\nexport class RemoveLegacyEtmKeyMigrator extends Migrator<5, 6> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function updateAccount(userId: string, account: ExpectedAccountType) {\n if (account?.keys?.legacyEtmKey) {\n delete account.keys.legacyEtmKey;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all(accounts.map(({ userId, account }) => updateAccount(userId, account)));\n }\n\n async rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n\n // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n // it is nested inside a global object.\n override async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n await helper.set(\"global\", { ...global, stateVersion: endVersion });\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport const ACCOUNT_ACCOUNTS: KeyDefinitionLike = {\n stateDefinition: {\n name: \"account\",\n },\n key: \"accounts\",\n};\n\nexport const ACCOUNT_ACTIVE_ACCOUNT_ID: KeyDefinitionLike = {\n stateDefinition: {\n name: \"account\",\n },\n key: \"activeAccountId\",\n};\n\nexport const ACCOUNT_ACTIVITY: KeyDefinitionLike = {\n stateDefinition: {\n name: \"account\",\n },\n key: \"activity\",\n};\n\ntype ExpectedAccountType = {\n profile?: {\n email?: string;\n name?: string;\n emailVerified?: boolean;\n };\n};\n\nexport class KnownAccountsMigrator extends Migrator<59, 60> {\n async migrate(helper: MigrationHelper): Promise {\n await this.migrateAuthenticatedAccounts(helper);\n await this.migrateActiveAccountId(helper);\n await this.migrateAccountActivity(helper);\n }\n async rollback(helper: MigrationHelper): Promise {\n // authenticated account are removed, but the accounts record also contains logged out accounts. Best we can do is to add them all back\n const userIds = (await helper.getKnownUserIds()) ?? [];\n await helper.set(\"authenticatedAccounts\", userIds);\n await helper.removeFromGlobal(ACCOUNT_ACCOUNTS);\n\n // Active Account Id\n const activeAccountId = await helper.getFromGlobal(ACCOUNT_ACTIVE_ACCOUNT_ID);\n if (activeAccountId) {\n await helper.set(\"activeUserId\", activeAccountId);\n }\n await helper.removeFromGlobal(ACCOUNT_ACTIVE_ACCOUNT_ID);\n\n // Account Activity\n const accountActivity = await helper.getFromGlobal>(ACCOUNT_ACTIVITY);\n if (accountActivity) {\n const toStore = Object.entries(accountActivity).reduce(\n (agg, [userId, dateString]) => {\n agg[userId] = new Date(dateString).getTime();\n return agg;\n },\n {} as Record,\n );\n await helper.set(\"accountActivity\", toStore);\n }\n await helper.removeFromGlobal(ACCOUNT_ACTIVITY);\n }\n\n private async migrateAuthenticatedAccounts(helper: MigrationHelper) {\n const authenticatedAccounts = (await helper.get(\"authenticatedAccounts\")) ?? [];\n const accounts = await Promise.all(\n authenticatedAccounts.map(async (userId) => {\n const account = await helper.get(userId);\n return { userId, account };\n }),\n );\n const accountsToStore = accounts.reduce(\n (agg, { userId, account }) => {\n if (account?.profile) {\n agg[userId] = {\n email: account.profile.email ?? \"\",\n emailVerified: account.profile.emailVerified ?? false,\n name: account.profile.name,\n };\n }\n return agg;\n },\n {} as Record,\n );\n\n await helper.setToGlobal(ACCOUNT_ACCOUNTS, accountsToStore);\n await helper.remove(\"authenticatedAccounts\");\n }\n\n private async migrateAccountActivity(helper: MigrationHelper) {\n const stored = await helper.get>(\"accountActivity\");\n const accountActivity = Object.entries(stored ?? {}).reduce(\n (agg, [userId, dateMs]) => {\n agg[userId] = JSON.stringify(new Date(dateMs));\n return agg;\n },\n {} as Record,\n );\n await helper.setToGlobal(ACCOUNT_ACTIVITY, accountActivity);\n await helper.remove(\"accountActivity\");\n }\n\n private async migrateActiveAccountId(helper: MigrationHelper) {\n const activeAccountId = await helper.get(\"activeUserId\");\n await helper.setToGlobal(ACCOUNT_ACTIVE_ACCOUNT_ID, activeAccountId);\n await helper.remove(\"activeUserId\");\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n settings?: {\n pinKeyEncryptedUserKey?: string; // EncryptedString\n protectedPin?: string; // EncryptedString\n pinProtected?: {\n encrypted?: string;\n };\n };\n};\n\nexport const PIN_STATE: StateDefinitionLike = { name: \"pinUnlock\" };\n\nexport const PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT: KeyDefinitionLike = {\n stateDefinition: PIN_STATE,\n key: \"pinKeyEncryptedUserKeyPersistent\",\n};\n\nexport const USER_KEY_ENCRYPTED_PIN: KeyDefinitionLike = {\n stateDefinition: PIN_STATE,\n key: \"userKeyEncryptedPin\",\n};\n\nexport const OLD_PIN_KEY_ENCRYPTED_MASTER_KEY: KeyDefinitionLike = {\n stateDefinition: PIN_STATE,\n key: \"oldPinKeyEncryptedMasterKey\",\n};\n\nexport class PinStateMigrator extends Migrator<60, 61> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyAccounts = await helper.getAccounts();\n let updatedAccount = false;\n\n async function migrateAccount(userId: string, account: ExpectedAccountState) {\n // Migrate pinKeyEncryptedUserKey (to `pinKeyEncryptedUserKeyPersistent`)\n if (account?.settings?.pinKeyEncryptedUserKey != null) {\n await helper.setToUser(\n userId,\n PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n account.settings.pinKeyEncryptedUserKey,\n );\n delete account.settings.pinKeyEncryptedUserKey;\n updatedAccount = true;\n }\n\n // Migrate protectedPin (to `userKeyEncryptedPin`)\n if (account?.settings?.protectedPin != null) {\n await helper.setToUser(userId, USER_KEY_ENCRYPTED_PIN, account.settings.protectedPin);\n delete account.settings.protectedPin;\n updatedAccount = true;\n }\n\n // Migrate pinProtected (to `oldPinKeyEncryptedMasterKey`)\n if (account?.settings?.pinProtected?.encrypted != null) {\n await helper.setToUser(\n userId,\n OLD_PIN_KEY_ENCRYPTED_MASTER_KEY,\n account.settings.pinProtected.encrypted,\n );\n delete account.settings.pinProtected;\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([\n ...legacyAccounts.map(({ userId, account }) => migrateAccount(userId, account)),\n ]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountState) {\n let updatedAccount = false;\n\n const accountPinKeyEncryptedUserKeyPersistent = await helper.getFromUser(\n userId,\n PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n );\n const accountUserKeyEncryptedPin = await helper.getFromUser(\n userId,\n USER_KEY_ENCRYPTED_PIN,\n );\n const accountOldPinKeyEncryptedMasterKey = await helper.getFromUser(\n userId,\n OLD_PIN_KEY_ENCRYPTED_MASTER_KEY,\n );\n\n if (!account) {\n account = {};\n }\n\n if (accountPinKeyEncryptedUserKeyPersistent != null) {\n account.settings.pinKeyEncryptedUserKey = accountPinKeyEncryptedUserKeyPersistent;\n await helper.setToUser(userId, PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, null);\n updatedAccount = true;\n }\n\n if (accountUserKeyEncryptedPin != null) {\n account.settings.protectedPin = accountUserKeyEncryptedPin;\n await helper.setToUser(userId, USER_KEY_ENCRYPTED_PIN, null);\n updatedAccount = true;\n }\n\n if (accountOldPinKeyEncryptedMasterKey != null) {\n account.settings = Object.assign(account.settings ?? {}, {\n pinProtected: {\n encrypted: accountOldPinKeyEncryptedMasterKey,\n },\n });\n\n await helper.setToUser(userId, OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, null);\n updatedAccount = true;\n }\n\n if (updatedAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype ExpectedAccountType = {\n settings?: {\n vaultTimeout?: number;\n vaultTimeoutAction?: string;\n };\n};\n\ntype ExpectedGlobalType = {\n vaultTimeout?: number;\n vaultTimeoutAction?: string;\n};\n\nconst VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE: StateDefinitionLike = {\n name: \"vaultTimeoutSettings\",\n};\n\nexport const VAULT_TIMEOUT: KeyDefinitionLike = {\n key: \"vaultTimeout\", // matches KeyDefinition.key\n stateDefinition: VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE,\n};\n\nexport const VAULT_TIMEOUT_ACTION: KeyDefinitionLike = {\n key: \"vaultTimeoutAction\", // matches KeyDefinition.key\n stateDefinition: VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE,\n};\n\n// Migrations are supposed to be frozen so we have to copy the type here.\nexport type VaultTimeout =\n | number // 0 for immediately; otherwise positive numbers\n | \"never\" // null\n | \"onRestart\" // -1\n | \"onLocked\" // -2\n | \"onSleep\" // -3\n | \"onIdle\"; // -4\n\n// Define mapping of old values to new values for migration purposes\nconst vaultTimeoutTypeMigrateRecord: Record = {\n null: \"never\",\n \"-1\": \"onRestart\",\n \"-2\": \"onLocked\",\n \"-3\": \"onSleep\",\n \"-4\": \"onIdle\",\n};\n\n// define mapping of new values to old values for rollback purposes\nconst vaultTimeoutTypeRollbackRecord: Record = {\n never: null,\n onRestart: -1,\n onLocked: -2,\n onSleep: -3,\n onIdle: -4,\n};\n\nexport enum ClientType {\n Web = \"web\",\n Browser = \"browser\",\n Desktop = \"desktop\",\n Cli = \"cli\",\n}\n\nexport class VaultTimeoutSettingsServiceStateProviderMigrator extends Migrator<61, 62> {\n async migrate(helper: MigrationHelper): Promise {\n const globalData = await helper.get(\"global\");\n\n const accounts = await helper.getAccounts();\n async function migrateAccount(\n userId: string,\n account: ExpectedAccountType | undefined,\n ): Promise {\n let updatedAccount = false;\n\n // Migrate vault timeout\n let existingVaultTimeout = account?.settings?.vaultTimeout;\n\n if (helper.clientType === ClientType.Cli && existingVaultTimeout === undefined) {\n // The CLI does not set a vault timeout by default so we need to set it to null\n // so that the migration can migrate null to \"never\" as the CLI does not have a vault timeout.\n existingVaultTimeout = null;\n }\n\n if (existingVaultTimeout !== undefined) {\n // check undefined so that we allow null values (previously meant never timeout)\n // Only migrate data that exists\n\n if (existingVaultTimeout === null || existingVaultTimeout < 0) {\n // Map null or negative values to new string values\n const newVaultTimeout = vaultTimeoutTypeMigrateRecord[existingVaultTimeout];\n await helper.setToUser(userId, VAULT_TIMEOUT, newVaultTimeout);\n } else {\n // Persist positive numbers as is\n await helper.setToUser(userId, VAULT_TIMEOUT, existingVaultTimeout);\n }\n\n delete account?.settings?.vaultTimeout;\n updatedAccount = true;\n }\n\n // Migrate vault timeout action\n const existingVaultTimeoutAction = account?.settings?.vaultTimeoutAction;\n\n if (existingVaultTimeoutAction != null) {\n // Only migrate data that exists\n await helper.setToUser(userId, VAULT_TIMEOUT_ACTION, existingVaultTimeoutAction);\n\n delete account?.settings?.vaultTimeoutAction;\n updatedAccount = true;\n }\n\n // Note: we are explicitly not worrying about mapping over the global fallback vault timeout / action\n // into the new state provider framework. It was originally a fallback but hasn't been used for years\n // so this migration will clean up the global properties fully.\n\n if (updatedAccount) {\n // Save the migrated account only if it was updated\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n // Delete global data (works for browser extension and web; CLI doesn't have these as global settings).\n delete globalData?.vaultTimeout;\n delete globalData?.vaultTimeoutAction;\n await helper.set(\"global\", globalData);\n\n // Remove desktop only settings. These aren't found by the above global key removal b/c of\n // the different storage key format. This removal does not cause any issues on migrating for other clients.\n await helper.remove(\"global\\\\.vaultTimeout\");\n await helper.remove(\"global\\\\.vaultTimeoutAction\");\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise {\n let updatedLegacyAccount = false;\n\n // Rollback vault timeout\n const migratedVaultTimeout = await helper.getFromUser(userId, VAULT_TIMEOUT);\n\n if (account?.settings && migratedVaultTimeout != null) {\n if (typeof migratedVaultTimeout === \"string\") {\n // Map new string values back to old values\n account.settings.vaultTimeout = vaultTimeoutTypeRollbackRecord[migratedVaultTimeout];\n } else {\n // persist numbers as is\n account.settings.vaultTimeout = migratedVaultTimeout;\n }\n\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, VAULT_TIMEOUT, null);\n\n // Rollback vault timeout action\n const migratedVaultTimeoutAction = await helper.getFromUser(\n userId,\n VAULT_TIMEOUT_ACTION,\n );\n\n if (account?.settings && migratedVaultTimeoutAction != null) {\n account.settings.vaultTimeoutAction = migratedVaultTimeoutAction;\n updatedLegacyAccount = true;\n }\n\n await helper.setToUser(userId, VAULT_TIMEOUT_ACTION, null);\n\n if (updatedLegacyAccount) {\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n settings?: {\n passwordGenerationOptions?: ExpectedOptions;\n };\n};\n\nexport type GeneratorType = \"password\" | \"passphrase\" | \"username\";\n\n/** username generation options prior to refactoring */\nexport type ExpectedOptions = {\n type?: GeneratorType;\n length?: number;\n minLength?: number;\n ambiguous?: boolean;\n uppercase?: boolean;\n minUppercase?: number;\n lowercase?: boolean;\n minLowercase?: number;\n number?: boolean;\n minNumber?: number;\n special?: boolean;\n minSpecial?: number;\n numWords?: number;\n wordSeparator?: string;\n capitalize?: boolean;\n includeNumber?: boolean;\n};\n\n/** username generation options after refactoring */\ntype ConvertedOptions = {\n generator: GeneratorNavigation;\n password: PasswordGenerationOptions;\n passphrase: PassphraseGenerationOptions;\n};\n\nexport const NAVIGATION: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"generatorSettings\",\n};\n\nexport const PASSWORD: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"passwordGeneratorSettings\",\n};\n\nexport const PASSPHRASE: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"passphraseGeneratorSettings\",\n};\n\nexport type GeneratorNavigation = {\n type?: string;\n};\n\nexport type PassphraseGenerationOptions = {\n numWords?: number;\n wordSeparator?: string;\n capitalize?: boolean;\n includeNumber?: boolean;\n};\n\nexport type PasswordGenerationOptions = {\n length?: number;\n minLength?: number;\n ambiguous?: boolean;\n uppercase?: boolean;\n minUppercase?: number;\n lowercase?: boolean;\n minLowercase?: number;\n number?: boolean;\n minNumber?: number;\n special?: boolean;\n minSpecial?: number;\n};\n\nexport class PasswordOptionsMigrator extends Migrator<62, 63> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: AccountType) {\n const legacyOptions = account?.settings?.passwordGenerationOptions;\n\n if (legacyOptions) {\n const converted = convertSettings(legacyOptions);\n await storeSettings(helper, userId, converted);\n await deleteSettings(helper, userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // not supported\n }\n}\n\nfunction convertSettings(options: ExpectedOptions): ConvertedOptions {\n const password = {\n length: options.length,\n ambiguous: options.ambiguous,\n uppercase: options.uppercase,\n minUppercase: options.minUppercase,\n lowercase: options.lowercase,\n minLowercase: options.minLowercase,\n number: options.number,\n minNumber: options.minNumber,\n special: options.special,\n minSpecial: options.minSpecial,\n };\n\n const generator = {\n type: options.type,\n };\n\n const passphrase = {\n numWords: options.numWords,\n wordSeparator: options.wordSeparator,\n capitalize: options.capitalize,\n includeNumber: options.includeNumber,\n };\n\n return { generator, password, passphrase };\n}\n\nasync function storeSettings(helper: MigrationHelper, userId: string, converted: ConvertedOptions) {\n const existing = (await helper.getFromUser(userId, NAVIGATION)) ?? {};\n const updated = Object.assign(existing, converted.generator);\n\n await Promise.all([\n helper.setToUser(userId, NAVIGATION, updated),\n helper.setToUser(userId, PASSPHRASE, converted.passphrase),\n helper.setToUser(userId, PASSWORD, converted.password),\n ]);\n}\n\nasync function deleteSettings(helper: MigrationHelper, userId: string, account: AccountType) {\n delete account?.settings?.passwordGenerationOptions;\n await helper.set(userId, account);\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n data?: {\n passwordGenerationHistory?: {\n encrypted: EncryptedHistory;\n };\n };\n};\n\n/** the actual data stored in the history is opaque to the migrator */\nexport type EncryptedHistory = Array;\n\nexport const HISTORY: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"localGeneratorHistoryBuffer\",\n};\n\nexport class GeneratorHistoryMigrator extends Migrator<63, 64> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: AccountType) {\n const data = account?.data?.passwordGenerationHistory;\n if (data && data.encrypted) {\n await helper.setToUser(userId, HISTORY, data.encrypted);\n delete account.data.passwordGenerationHistory;\n await helper.set(userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // not supported\n }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n settings?: {\n usernameGenerationOptions?: ExpectedOptions;\n };\n};\n\n/** username generation options prior to refactoring */\nexport type ExpectedOptions = {\n type?: \"word\" | \"subaddress\" | \"catchall\" | \"forwarded\";\n wordCapitalize?: boolean;\n wordIncludeNumber?: boolean;\n subaddressType?: \"random\" | \"website-name\";\n subaddressEmail?: string;\n catchallType?: \"random\" | \"website-name\";\n catchallDomain?: string;\n forwardedService?: string;\n forwardedAnonAddyApiToken?: string;\n forwardedAnonAddyDomain?: string;\n forwardedAnonAddyBaseUrl?: string;\n forwardedDuckDuckGoToken?: string;\n forwardedFirefoxApiToken?: string;\n forwardedFastmailApiToken?: string;\n forwardedForwardEmailApiToken?: string;\n forwardedForwardEmailDomain?: string;\n forwardedSimpleLoginApiKey?: string;\n forwardedSimpleLoginBaseUrl?: string;\n};\n\n/** username generation options after refactoring */\ntype ConvertedOptions = {\n generator: GeneratorNavigation;\n algorithms: {\n catchall: CatchallGenerationOptions;\n effUsername: EffUsernameGenerationOptions;\n subaddress: SubaddressGenerationOptions;\n };\n forwarders: {\n addyIo: SelfHostedApiOptions & EmailDomainOptions;\n duckDuckGo: ApiOptions;\n fastmail: ApiOptions;\n firefoxRelay: ApiOptions;\n forwardEmail: ApiOptions & EmailDomainOptions;\n simpleLogin: SelfHostedApiOptions;\n };\n};\n\nexport const NAVIGATION: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"generatorSettings\",\n};\n\nexport const CATCHALL: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"catchallGeneratorSettings\",\n};\n\nexport const EFF_USERNAME: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"effUsernameGeneratorSettings\",\n};\n\nexport const SUBADDRESS: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"subaddressGeneratorSettings\",\n};\n\nexport const ADDY_IO: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"addyIoBuffer\",\n};\n\nexport const DUCK_DUCK_GO: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"duckDuckGoBuffer\",\n};\n\nexport const FASTMAIL: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"fastmailBuffer\",\n};\n\nexport const FIREFOX_RELAY: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"firefoxRelayBuffer\",\n};\n\nexport const FORWARD_EMAIL: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"forwardEmailBuffer\",\n};\n\nexport const SIMPLE_LOGIN: KeyDefinitionLike = {\n stateDefinition: {\n name: \"generator\",\n },\n key: \"simpleLoginBuffer\",\n};\n\nexport type GeneratorNavigation = {\n type?: string;\n username?: string;\n forwarder?: string;\n};\n\ntype UsernameGenerationMode = \"random\" | \"website-name\";\n\ntype CatchallGenerationOptions = {\n catchallType?: UsernameGenerationMode;\n catchallDomain?: string;\n};\n\ntype EffUsernameGenerationOptions = {\n wordCapitalize?: boolean;\n wordIncludeNumber?: boolean;\n};\n\ntype SubaddressGenerationOptions = {\n subaddressType?: UsernameGenerationMode;\n subaddressEmail?: string;\n};\n\ntype ApiOptions = {\n token?: string;\n};\n\ntype SelfHostedApiOptions = ApiOptions & {\n baseUrl: string;\n};\n\ntype EmailDomainOptions = {\n domain: string;\n};\n\nexport class ForwarderOptionsMigrator extends Migrator<64, 65> {\n async migrate(helper: MigrationHelper): Promise {\n const accounts = await helper.getAccounts();\n\n async function migrateAccount(userId: string, account: AccountType) {\n const legacyOptions = account?.settings?.usernameGenerationOptions;\n\n if (legacyOptions) {\n const converted = convertSettings(legacyOptions);\n await storeSettings(helper, userId, converted);\n await deleteSettings(helper, userId, account);\n }\n }\n\n await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n // not supported\n }\n}\n\nfunction convertSettings(options: ExpectedOptions): ConvertedOptions {\n const forwarders = {\n addyIo: {\n baseUrl: options.forwardedAnonAddyBaseUrl,\n token: options.forwardedAnonAddyApiToken,\n domain: options.forwardedAnonAddyDomain,\n },\n duckDuckGo: {\n token: options.forwardedDuckDuckGoToken,\n },\n fastmail: {\n token: options.forwardedFastmailApiToken,\n },\n firefoxRelay: {\n token: options.forwardedFirefoxApiToken,\n },\n forwardEmail: {\n token: options.forwardedForwardEmailApiToken,\n domain: options.forwardedForwardEmailDomain,\n },\n simpleLogin: {\n token: options.forwardedSimpleLoginApiKey,\n baseUrl: options.forwardedSimpleLoginBaseUrl,\n },\n };\n\n const generator = {\n username: options.type,\n forwarder: options.forwardedService,\n };\n\n const algorithms = {\n effUsername: {\n wordCapitalize: options.wordCapitalize,\n wordIncludeNumber: options.wordIncludeNumber,\n },\n subaddress: {\n subaddressType: options.subaddressType,\n subaddressEmail: options.subaddressEmail,\n },\n catchall: {\n catchallType: options.catchallType,\n catchallDomain: options.catchallDomain,\n },\n };\n\n return { generator, algorithms, forwarders };\n}\n\nasync function storeSettings(helper: MigrationHelper, userId: string, converted: ConvertedOptions) {\n await Promise.all([\n helper.setToUser(userId, NAVIGATION, converted.generator),\n helper.setToUser(userId, CATCHALL, converted.algorithms.catchall),\n helper.setToUser(userId, EFF_USERNAME, converted.algorithms.effUsername),\n helper.setToUser(userId, SUBADDRESS, converted.algorithms.subaddress),\n helper.setToUser(userId, ADDY_IO, converted.forwarders.addyIo),\n helper.setToUser(userId, DUCK_DUCK_GO, converted.forwarders.duckDuckGo),\n helper.setToUser(userId, FASTMAIL, converted.forwarders.fastmail),\n helper.setToUser(userId, FIREFOX_RELAY, converted.forwarders.firefoxRelay),\n helper.setToUser(userId, FORWARD_EMAIL, converted.forwarders.forwardEmail),\n helper.setToUser(userId, SIMPLE_LOGIN, converted.forwarders.simpleLogin),\n ]);\n}\n\nasync function deleteSettings(helper: MigrationHelper, userId: string, account: AccountType) {\n delete account?.settings?.usernameGenerationOptions;\n await helper.set(userId, account);\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n enableBrowserIntegration?: boolean;\n enableBrowserIntegrationFingerprint?: boolean;\n};\n\ntype ExpectedAccount = {\n settings?: {\n minimizeOnCopyToClipboard?: boolean;\n };\n};\n\nconst DESKTOP_SETTINGS_DISK: StateDefinitionLike = {\n name: \"desktopSettings\",\n};\n\nconst BROWSER_INTEGRATION_ENABLED: KeyDefinitionLike = {\n key: \"browserIntegrationEnabled\",\n stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nconst BROWSER_INTEGRATION_FINGERPRINT_ENABLED: KeyDefinitionLike = {\n key: \"browserIntegrationFingerprintEnabled\",\n stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nconst MINIMIZE_ON_COPY: KeyDefinitionLike = {\n key: \"minimizeOnCopy\",\n stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nexport class MoveFinalDesktopSettingsMigrator extends Migrator<65, 66> {\n async migrate(helper: MigrationHelper): Promise {\n const legacyGlobal = await helper.get(\"global\");\n const enableBrowserIntegrationValue = legacyGlobal?.enableBrowserIntegration;\n const enableBrowserIntegrationFingerprintValue =\n legacyGlobal?.enableBrowserIntegrationFingerprint;\n\n let updatedGlobal = false;\n\n if (enableBrowserIntegrationValue != null) {\n await helper.setToGlobal(BROWSER_INTEGRATION_ENABLED, enableBrowserIntegrationValue);\n delete legacyGlobal.enableBrowserIntegration;\n updatedGlobal = true;\n }\n\n if (enableBrowserIntegrationFingerprintValue != null) {\n await helper.setToGlobal(\n BROWSER_INTEGRATION_FINGERPRINT_ENABLED,\n enableBrowserIntegrationFingerprintValue,\n );\n delete legacyGlobal.enableBrowserIntegrationFingerprint;\n updatedGlobal = true;\n }\n\n if (updatedGlobal) {\n await helper.set(\"global\", legacyGlobal);\n }\n\n async function migrateAccount(userId: string, account: ExpectedAccount) {\n const minimizeOnCopyToClipboardValue = account?.settings?.minimizeOnCopyToClipboard;\n\n if (minimizeOnCopyToClipboardValue != null) {\n await helper.setToUser(userId, MINIMIZE_ON_COPY, minimizeOnCopyToClipboardValue);\n delete account.settings.minimizeOnCopyToClipboard;\n await helper.set(userId, account);\n }\n }\n\n const accounts = await helper.getAccounts();\n\n await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const browserIntegrationEnabledValue = await helper.getFromGlobal(\n BROWSER_INTEGRATION_ENABLED,\n );\n\n const browserIntegrationFingerprintEnabled = await helper.getFromGlobal(\n BROWSER_INTEGRATION_FINGERPRINT_ENABLED,\n );\n\n if (browserIntegrationEnabledValue != null) {\n let legacyGlobal = await helper.get(\"global\");\n legacyGlobal ??= {};\n legacyGlobal.enableBrowserIntegration = browserIntegrationEnabledValue;\n await helper.set(\"global\", legacyGlobal);\n await helper.removeFromGlobal(BROWSER_INTEGRATION_ENABLED);\n }\n\n if (browserIntegrationFingerprintEnabled != null) {\n let legacyGlobal = await helper.get(\"global\");\n legacyGlobal ??= {};\n legacyGlobal.enableBrowserIntegrationFingerprint = browserIntegrationFingerprintEnabled;\n await helper.set(\"global\", legacyGlobal);\n await helper.removeFromGlobal(BROWSER_INTEGRATION_FINGERPRINT_ENABLED);\n }\n\n async function rollbackAccount(userId: string, account: ExpectedAccount) {\n const minimizeOnCopyToClipboardValue = await helper.getFromUser(\n userId,\n MINIMIZE_ON_COPY,\n );\n\n if (minimizeOnCopyToClipboardValue != null) {\n account ??= { settings: {} };\n account.settings.minimizeOnCopyToClipboard = minimizeOnCopyToClipboardValue;\n await helper.set(userId, account);\n await helper.removeFromUser(userId, MINIMIZE_ON_COPY);\n }\n }\n\n const accounts = await helper.getAccounts();\n await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { settings?: { disableAutoBiometricsPrompt?: boolean } };\n\nexport class MoveBiometricAutoPromptToAccount extends Migrator<6, 7> {\n async migrate(helper: MigrationHelper): Promise {\n const global = await helper.get<{ noAutoPromptBiometrics?: boolean }>(\"global\");\n const noAutoPromptBiometrics = global?.noAutoPromptBiometrics ?? false;\n\n const accounts = await helper.getAccounts();\n async function updateAccount(userId: string, account: ExpectedAccountType) {\n if (account == null) {\n return;\n }\n\n if (noAutoPromptBiometrics) {\n account.settings = Object.assign(account?.settings ?? {}, {\n disableAutoBiometricsPrompt: true,\n });\n await helper.set(userId, account);\n }\n }\n\n delete global.noAutoPromptBiometrics;\n\n await Promise.all([\n ...accounts.map(({ userId, account }) => updateAccount(userId, account)),\n helper.set(\"global\", global),\n ]);\n }\n\n async rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n\n // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n // it is nested inside a global object.\n override async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n await helper.set(\"global\", { ...global, stateVersion: endVersion });\n }\n}\n","import { JsonObject } from \"type-fest\";\n\nimport { MigrationHelper } from \"../migration-helper\";\nimport { Direction, Migrator } from \"../migrator\";\n\nexport class MoveStateVersionMigrator extends Migrator<7, 8> {\n async migrate(helper: MigrationHelper): Promise {\n const global = await helper.get<{ stateVersion: number }>(\"global\");\n if (global.stateVersion) {\n await helper.set(\"stateVersion\", global.stateVersion);\n delete global.stateVersion;\n await helper.set(\"global\", global);\n } else {\n throw new Error(\"Migration failed, state version not found\");\n }\n }\n\n async rollback(helper: MigrationHelper): Promise {\n const version = await helper.get(\"stateVersion\");\n const global = await helper.get(\"global\");\n await helper.set(\"global\", { ...global, stateVersion: version });\n await helper.set(\"stateVersion\", undefined);\n }\n\n // Override is necessary because default implementation assumes `stateVersion` at the root, but this migration moves\n // it from a `global` object to root.This makes for unique rollback versioning.\n override async updateVersion(helper: MigrationHelper, direction: Direction): Promise {\n const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n helper.currentVersion = endVersion;\n if (direction === \"up\") {\n await helper.set(\"stateVersion\", endVersion);\n } else {\n const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n await helper.set(\"global\", { ...global, stateVersion: endVersion });\n }\n }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype NeverDomains = { [id: string]: unknown };\n\ntype ExpectedAccountType = {\n settings?: {\n neverDomains?: NeverDomains;\n disableAddLoginNotification?: boolean;\n disableChangedPasswordNotification?: boolean;\n disableContextMenuItem?: boolean;\n };\n};\n\ntype TargetGlobalState = {\n neverDomains?: NeverDomains;\n disableAddLoginNotification?: boolean;\n disableChangedPasswordNotification?: boolean;\n disableContextMenuItem?: boolean;\n};\n\nexport class MoveBrowserSettingsToGlobal extends Migrator<8, 9> {\n // Will first check if any of the accounts have a value from the given accountSelector\n // if they do have a value it will set that value into global state but if multiple\n // users have differing values it will prefer the false setting,\n // if all users have true then it will take true.\n tryAddSetting(\n accounts: { userId: string; account: ExpectedAccountType }[],\n accountSelector: (account: ExpectedAccountType) => boolean | undefined,\n globalSetter: (value: boolean | undefined) => void,\n ): void {\n const hasValue = accounts.some(({ account }) => {\n return accountSelector(account) !== undefined;\n });\n\n if (hasValue) {\n const value = !accounts.some(({ account }) => {\n return (accountSelector(account) ?? false) === false;\n });\n\n globalSetter(value);\n }\n }\n\n async migrate(helper: MigrationHelper): Promise {\n const global = await helper.get(\"global\");\n\n const accounts = await helper.getAccounts();\n\n const globalNeverDomainsValue = accounts.reduce((accumulator, { account }) => {\n const normalizedNeverDomains = account.settings?.neverDomains ?? {};\n for (const [id, value] of Object.entries(normalizedNeverDomains)) {\n accumulator ??= {};\n accumulator[id] = value;\n }\n return accumulator;\n }, undefined as NeverDomains);\n\n const targetGlobalState: TargetGlobalState = {};\n\n if (globalNeverDomainsValue != null) {\n targetGlobalState.neverDomains = globalNeverDomainsValue;\n }\n\n this.tryAddSetting(\n accounts,\n (a) => a.settings?.disableAddLoginNotification,\n (v) => (targetGlobalState.disableAddLoginNotification = v),\n );\n\n this.tryAddSetting(\n accounts,\n (a) => a.settings?.disableChangedPasswordNotification,\n (v) => (targetGlobalState.disableChangedPasswordNotification = v),\n );\n\n this.tryAddSetting(\n accounts,\n (a) => a.settings?.disableContextMenuItem,\n (v) => (targetGlobalState.disableContextMenuItem = v),\n );\n\n await helper.set(\"global\", {\n ...global,\n ...targetGlobalState,\n });\n\n await Promise.all(\n accounts.map(async ({ userId, account }) => {\n delete account.settings?.disableAddLoginNotification;\n delete account.settings?.disableChangedPasswordNotification;\n delete account.settings?.disableContextMenuItem;\n delete account.settings?.neverDomains;\n await helper.set(userId, account);\n }),\n );\n }\n\n rollback(helper: MigrationHelper): Promise {\n throw new Error(\"Method not implemented.\");\n }\n}\n","import { MinVersion, MIN_VERSION } from \"../migrate\";\nimport { MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\nexport function minVersionError(current: number) {\n return `Your local data is too old to be migrated. Your current state version is ${current}, but minimum version is ${MIN_VERSION}.`;\n}\n\nexport class MinVersionMigrator extends Migrator<0, MinVersion> {\n constructor() {\n super(0, MIN_VERSION);\n }\n\n // Overrides the default implementation to catch any version that may be passed in.\n override shouldMigrate(helper: MigrationHelper): Promise {\n return Promise.resolve(helper.currentVersion < MIN_VERSION);\n }\n async migrate(helper: MigrationHelper): Promise {\n if (helper.currentVersion < MIN_VERSION) {\n throw new Error(minVersionError(helper.currentVersion));\n }\n }\n async rollback(helper: MigrationHelper): Promise {\n throw IRREVERSIBLE;\n }\n}\n","// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages\nimport { LogService } from \"../platform/abstractions/log.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to interface with storage locations\nimport { AbstractStorageService } from \"../platform/abstractions/storage.service\";\n\nimport { MigrationBuilder } from \"./migration-builder\";\nimport { EverHadUserKeyMigrator } from \"./migrations/10-move-ever-had-user-key-to-state-providers\";\nimport { OrganizationKeyMigrator } from \"./migrations/11-move-org-keys-to-state-providers\";\nimport { MoveEnvironmentStateToProviders } from \"./migrations/12-move-environment-state-to-providers\";\nimport { ProviderKeyMigrator } from \"./migrations/13-move-provider-keys-to-state-providers\";\nimport { MoveBiometricClientKeyHalfToStateProviders } from \"./migrations/14-move-biometric-client-key-half-state-to-providers\";\nimport { FolderMigrator } from \"./migrations/15-move-folder-state-to-state-provider\";\nimport { LastSyncMigrator } from \"./migrations/16-move-last-sync-to-state-provider\";\nimport { EnablePasskeysMigrator } from \"./migrations/17-move-enable-passkeys-to-state-providers\";\nimport { AutofillSettingsKeyMigrator } from \"./migrations/18-move-autofill-settings-to-state-providers\";\nimport { RequirePasswordOnStartMigrator } from \"./migrations/19-migrate-require-password-on-start\";\nimport { PrivateKeyMigrator } from \"./migrations/20-move-private-key-to-state-providers\";\nimport { CollectionMigrator } from \"./migrations/21-move-collections-state-to-state-provider\";\nimport { CollapsedGroupingsMigrator } from \"./migrations/22-move-collapsed-groupings-to-state-provider\";\nimport { MoveBiometricPromptsToStateProviders } from \"./migrations/23-move-biometric-prompts-to-state-providers\";\nimport { SmOnboardingTasksMigrator } from \"./migrations/24-move-sm-onboarding-key-to-state-providers\";\nimport { ClearClipboardDelayMigrator } from \"./migrations/25-move-clear-clipboard-to-autofill-settings-state-provider\";\nimport { RevertLastSyncMigrator } from \"./migrations/26-revert-move-last-sync-to-state-provider\";\nimport { BadgeSettingsMigrator } from \"./migrations/27-move-badge-settings-to-state-providers\";\nimport { MoveBiometricUnlockToStateProviders } from \"./migrations/28-move-biometric-unlock-to-state-providers\";\nimport { UserNotificationSettingsKeyMigrator } from \"./migrations/29-move-user-notification-settings-to-state-provider\";\nimport { PolicyMigrator } from \"./migrations/30-move-policy-state-to-state-provider\";\nimport { EnableContextMenuMigrator } from \"./migrations/31-move-enable-context-menu-to-autofill-settings-state-provider\";\nimport { PreferredLanguageMigrator } from \"./migrations/32-move-preferred-language\";\nimport { AppIdMigrator } from \"./migrations/33-move-app-id-to-state-providers\";\nimport { DomainSettingsMigrator } from \"./migrations/34-move-domain-settings-to-state-providers\";\nimport { MoveThemeToStateProviderMigrator } from \"./migrations/35-move-theme-to-state-providers\";\nimport { VaultSettingsKeyMigrator } from \"./migrations/36-move-show-card-and-identity-to-state-provider\";\nimport { AvatarColorMigrator } from \"./migrations/37-move-avatar-color-to-state-providers\";\nimport { TokenServiceStateProviderMigrator } from \"./migrations/38-migrate-token-svc-to-state-provider\";\nimport { MoveBillingAccountProfileMigrator } from \"./migrations/39-move-billing-account-profile-to-state-providers\";\nimport { RemoveEverBeenUnlockedMigrator } from \"./migrations/4-remove-ever-been-unlocked\";\nimport { OrganizationMigrator } from \"./migrations/40-move-organization-state-to-state-provider\";\nimport { EventCollectionMigrator } from \"./migrations/41-move-event-collection-to-state-provider\";\nimport { EnableFaviconMigrator } from \"./migrations/42-move-enable-favicon-to-domain-settings-state-provider\";\nimport { AutoConfirmFingerPrintsMigrator } from \"./migrations/43-move-auto-confirm-finger-prints-to-state-provider\";\nimport { UserDecryptionOptionsMigrator } from \"./migrations/44-move-user-decryption-options-to-state-provider\";\nimport { MergeEnvironmentState } from \"./migrations/45-merge-environment-state\";\nimport { DeleteBiometricPromptCancelledData } from \"./migrations/46-delete-orphaned-biometric-prompt-data\";\nimport { MoveDesktopSettingsMigrator } from \"./migrations/47-move-desktop-settings\";\nimport { MoveDdgToStateProviderMigrator } from \"./migrations/48-move-ddg-to-state-provider\";\nimport { AccountServerConfigMigrator } from \"./migrations/49-move-account-server-configs\";\nimport { AddKeyTypeToOrgKeysMigrator } from \"./migrations/5-add-key-type-to-org-keys\";\nimport { KeyConnectorMigrator } from \"./migrations/50-move-key-connector-to-state-provider\";\nimport { RememberedEmailMigrator } from \"./migrations/51-move-remembered-email-to-state-providers\";\nimport { DeleteInstalledVersion } from \"./migrations/52-delete-installed-version\";\nimport { DeviceTrustServiceStateProviderMigrator } from \"./migrations/53-migrate-device-trust-svc-to-state-providers\";\nimport { SendMigrator } from \"./migrations/54-move-encrypted-sends\";\nimport { MoveMasterKeyStateToProviderMigrator } from \"./migrations/55-move-master-key-state-to-provider\";\nimport { AuthRequestMigrator } from \"./migrations/56-move-auth-requests\";\nimport { CipherServiceMigrator } from \"./migrations/57-move-cipher-service-to-state-provider\";\nimport { RemoveRefreshTokenMigratedFlagMigrator } from \"./migrations/58-remove-refresh-token-migrated-state-provider-flag\";\nimport { KdfConfigMigrator } from \"./migrations/59-move-kdf-config-to-state-provider\";\nimport { RemoveLegacyEtmKeyMigrator } from \"./migrations/6-remove-legacy-etm-key\";\nimport { KnownAccountsMigrator } from \"./migrations/60-known-accounts\";\nimport { PinStateMigrator } from \"./migrations/61-move-pin-state-to-providers\";\nimport { VaultTimeoutSettingsServiceStateProviderMigrator } from \"./migrations/62-migrate-vault-timeout-settings-svc-to-state-provider\";\nimport { PasswordOptionsMigrator } from \"./migrations/63-migrate-password-settings\";\nimport { GeneratorHistoryMigrator } from \"./migrations/64-migrate-generator-history\";\nimport { ForwarderOptionsMigrator } from \"./migrations/65-migrate-forwarder-settings\";\nimport { MoveFinalDesktopSettingsMigrator } from \"./migrations/66-move-final-desktop-settings\";\nimport { MoveBiometricAutoPromptToAccount } from \"./migrations/7-move-biometric-auto-prompt-to-account\";\nimport { MoveStateVersionMigrator } from \"./migrations/8-move-state-version\";\nimport { MoveBrowserSettingsToGlobal } from \"./migrations/9-move-browser-settings-to-global\";\nimport { MinVersionMigrator } from \"./migrations/min-version\";\n\nexport const MIN_VERSION = 3;\nexport const CURRENT_VERSION = 66;\nexport type MinVersion = typeof MIN_VERSION;\n\nexport function createMigrationBuilder() {\n return MigrationBuilder.create()\n .with(MinVersionMigrator)\n .with(RemoveEverBeenUnlockedMigrator, 3, 4)\n .with(AddKeyTypeToOrgKeysMigrator, 4, 5)\n .with(RemoveLegacyEtmKeyMigrator, 5, 6)\n .with(MoveBiometricAutoPromptToAccount, 6, 7)\n .with(MoveStateVersionMigrator, 7, 8)\n .with(MoveBrowserSettingsToGlobal, 8, 9)\n .with(EverHadUserKeyMigrator, 9, 10)\n .with(OrganizationKeyMigrator, 10, 11)\n .with(MoveEnvironmentStateToProviders, 11, 12)\n .with(ProviderKeyMigrator, 12, 13)\n .with(MoveBiometricClientKeyHalfToStateProviders, 13, 14)\n .with(FolderMigrator, 14, 15)\n .with(LastSyncMigrator, 15, 16)\n .with(EnablePasskeysMigrator, 16, 17)\n .with(AutofillSettingsKeyMigrator, 17, 18)\n .with(RequirePasswordOnStartMigrator, 18, 19)\n .with(PrivateKeyMigrator, 19, 20)\n .with(CollectionMigrator, 20, 21)\n .with(CollapsedGroupingsMigrator, 21, 22)\n .with(MoveBiometricPromptsToStateProviders, 22, 23)\n .with(SmOnboardingTasksMigrator, 23, 24)\n .with(ClearClipboardDelayMigrator, 24, 25)\n .with(RevertLastSyncMigrator, 25, 26)\n .with(BadgeSettingsMigrator, 26, 27)\n .with(MoveBiometricUnlockToStateProviders, 27, 28)\n .with(UserNotificationSettingsKeyMigrator, 28, 29)\n .with(PolicyMigrator, 29, 30)\n .with(EnableContextMenuMigrator, 30, 31)\n .with(PreferredLanguageMigrator, 31, 32)\n .with(AppIdMigrator, 32, 33)\n .with(DomainSettingsMigrator, 33, 34)\n .with(MoveThemeToStateProviderMigrator, 34, 35)\n .with(VaultSettingsKeyMigrator, 35, 36)\n .with(AvatarColorMigrator, 36, 37)\n .with(TokenServiceStateProviderMigrator, 37, 38)\n .with(MoveBillingAccountProfileMigrator, 38, 39)\n .with(OrganizationMigrator, 39, 40)\n .with(EventCollectionMigrator, 40, 41)\n .with(EnableFaviconMigrator, 41, 42)\n .with(AutoConfirmFingerPrintsMigrator, 42, 43)\n .with(UserDecryptionOptionsMigrator, 43, 44)\n .with(MergeEnvironmentState, 44, 45)\n .with(DeleteBiometricPromptCancelledData, 45, 46)\n .with(MoveDesktopSettingsMigrator, 46, 47)\n .with(MoveDdgToStateProviderMigrator, 47, 48)\n .with(AccountServerConfigMigrator, 48, 49)\n .with(KeyConnectorMigrator, 49, 50)\n .with(RememberedEmailMigrator, 50, 51)\n .with(DeleteInstalledVersion, 51, 52)\n .with(DeviceTrustServiceStateProviderMigrator, 52, 53)\n .with(SendMigrator, 53, 54)\n .with(MoveMasterKeyStateToProviderMigrator, 54, 55)\n .with(AuthRequestMigrator, 55, 56)\n .with(CipherServiceMigrator, 56, 57)\n .with(RemoveRefreshTokenMigratedFlagMigrator, 57, 58)\n .with(KdfConfigMigrator, 58, 59)\n .with(KnownAccountsMigrator, 59, 60)\n .with(PinStateMigrator, 60, 61)\n .with(VaultTimeoutSettingsServiceStateProviderMigrator, 61, 62)\n .with(PasswordOptionsMigrator, 62, 63)\n .with(GeneratorHistoryMigrator, 63, 64)\n .with(ForwarderOptionsMigrator, 64, 65)\n .with(MoveFinalDesktopSettingsMigrator, 65, CURRENT_VERSION);\n}\n\nexport async function currentVersion(\n storageService: AbstractStorageService,\n logService: LogService,\n) {\n let state = await storageService.get(\"stateVersion\");\n if (state == null) {\n // Pre v8\n state = (await storageService.get<{ stateVersion: number }>(\"global\"))?.stateVersion;\n }\n if (state == null) {\n logService.info(\"No state version found, assuming empty state.\");\n return -1;\n }\n logService.info(`State version: ${state}`);\n return state;\n}\n\n/**\n * Waits for migrations to have a chance to run and will resolve the promise once they are.\n *\n * @param storageService Disk storage where the `stateVersion` will or is already saved in.\n * @param logService Log service\n */\nexport async function waitForMigrations(\n storageService: AbstractStorageService,\n logService: LogService,\n) {\n const isReady = async () => {\n const version = await currentVersion(storageService, logService);\n // The saved version is what we consider the latest\n // migrations should be complete, the state version\n // shouldn't become larger than `CURRENT_VERSION` in\n // any normal usage of the application but it is common\n // enough in dev scenarios where we want to consider that\n // ready as well and return true in that scenario.\n return version >= CURRENT_VERSION;\n };\n\n const wait = async (time: number) => {\n // Wait exponentially\n const nextTime = time * 2;\n if (nextTime > 8192) {\n // Don't wait longer than ~8 seconds in a single wait,\n // if the migrations still haven't happened. They aren't\n // likely to.\n return;\n }\n return new Promise((resolve) => {\n setTimeout(async () => {\n if (!(await isReady())) {\n logService.info(`Waiting for migrations to finish, waiting for ${nextTime}ms`);\n await wait(nextTime);\n }\n resolve();\n }, time);\n });\n };\n\n if (!(await isReady())) {\n // Wait for 2ms to start with\n await wait(2);\n }\n}\n","import { createMigrationBuilder } from \"../../state-migrations\";\nimport { MigrationBuilder } from \"../../state-migrations/migration-builder\";\n\nexport class MigrationBuilderService {\n private migrationBuilderCache: MigrationBuilder;\n\n build() {\n return (this.migrationBuilderCache ??= createMigrationBuilder());\n }\n}\n","// eslint-disable-next-line import/no-restricted-paths -- Needed to provide client type to migrations\nimport { ClientType } from \"../enums\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages\nimport { LogService } from \"../platform/abstractions/log.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to interface with storage locations\nimport { AbstractStorageService } from \"../platform/abstractions/storage.service\";\n\nexport type StateDefinitionLike = { name: string };\nexport type KeyDefinitionLike = {\n stateDefinition: StateDefinitionLike;\n key: string;\n};\n\nexport type MigrationHelperType = \"general\" | \"web-disk-local\";\n\nexport class MigrationHelper {\n constructor(\n public currentVersion: number,\n private storageService: AbstractStorageService,\n public logService: LogService,\n type: MigrationHelperType,\n public clientType: ClientType,\n ) {\n this.type = type;\n }\n\n /**\n * On some clients, migrations are ran multiple times without direct action from the migration writer.\n *\n * All clients will run through migrations at least once, this run is referred to as `\"general\"`. If a migration is\n * ran more than that single time, they will get a unique name if that the write can make conditional logic based on which\n * migration run this is.\n *\n * @remarks The preferrable way of writing migrations is ALWAYS to be defensive and reflect on the data you are given back. This\n * should really only be used when reflecting on the data given isn't enough.\n */\n type: MigrationHelperType;\n\n /**\n * Gets a value from the storage service at the given key.\n *\n * This is a brute force method to just get a value from the storage service. If you can use {@link getFromGlobal} or {@link getFromUser}, you should.\n * @param key location\n * @returns the value at the location\n */\n get(key: string): Promise {\n return this.storageService.get(key);\n }\n\n /**\n * Sets a value in the storage service at the given key.\n *\n * This is a brute force method to just set a value in the storage service. If you can use {@link setToGlobal} or {@link setToUser}, you should.\n * @param key location\n * @param value the value to set\n * @returns\n */\n set(key: string, value: T): Promise {\n this.logService.info(`Setting ${key}`);\n return this.storageService.save(key, value);\n }\n\n /**\n * Remove a value in the storage service at the given key.\n *\n * This is a brute force method to just remove a value in the storage service. If you can use {@link removeFromGlobal} or {@link removeFromUser}, you should.\n * @param key location\n * @returns void\n */\n remove(key: string): Promise {\n this.logService.info(`Removing ${key}`);\n return this.storageService.remove(key);\n }\n\n /**\n * Gets a globally scoped value from a location derived through the key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link get} for those.\n * @param keyDefinition unique key definition\n * @returns value from store\n */\n getFromGlobal(keyDefinition: KeyDefinitionLike): Promise {\n return this.get(this.getGlobalKey(keyDefinition));\n }\n\n /**\n * Sets a globally scoped value to a location derived through the key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link set} for those.\n * @param keyDefinition unique key definition\n * @param value value to store\n * @returns void\n */\n setToGlobal(keyDefinition: KeyDefinitionLike, value: T): Promise {\n return this.set(this.getGlobalKey(keyDefinition), value);\n }\n\n /**\n * Remove a globally scoped location derived through the key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link remove} for those.\n * @param keyDefinition unique key definition\n * @returns void\n */\n removeFromGlobal(keyDefinition: KeyDefinitionLike): Promise {\n return this.remove(this.getGlobalKey(keyDefinition));\n }\n\n /**\n * Gets a user scoped value from a location derived through the user id and key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link get} for those.\n * @param userId userId to use in the key\n * @param keyDefinition unique key definition\n * @returns value from store\n */\n getFromUser(userId: string, keyDefinition: KeyDefinitionLike): Promise {\n return this.get(this.getUserKey(userId, keyDefinition));\n }\n\n /**\n * Sets a user scoped value to a location derived through the user id and key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link set} for those.\n * @param userId userId to use in the key\n * @param keyDefinition unique key definition\n * @param value value to store\n * @returns void\n */\n setToUser(userId: string, keyDefinition: KeyDefinitionLike, value: T): Promise {\n return this.set(this.getUserKey(userId, keyDefinition), value);\n }\n\n /**\n * Remove a user scoped location derived through the key definition\n *\n * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n * use {@link remove} for those.\n * @param keyDefinition unique key definition\n * @returns void\n */\n removeFromUser(userId: string, keyDefinition: KeyDefinitionLike): Promise {\n return this.remove(this.getUserKey(userId, keyDefinition));\n }\n\n info(message: string): void {\n this.logService.info(message);\n }\n\n /**\n * Helper method to read all Account objects stored by the State Service.\n *\n * This is useful from creating migrations off of this paradigm, but should not be used once a value is migrated to a state provider.\n *\n * @returns a list of all accounts that have been authenticated with state service, cast the expected type.\n */\n async getAccounts(): Promise<\n { userId: string; account: ExpectedAccountType }[]\n > {\n const userIds = await this.getKnownUserIds();\n return Promise.all(\n userIds.map(async (userId) => ({\n userId,\n account: await this.get(userId),\n })),\n );\n }\n\n /**\n * Helper method to read known users ids.\n */\n async getKnownUserIds(): Promise {\n if (this.currentVersion < 60) {\n return knownAccountUserIdsBuilderPre60(this.storageService);\n } else {\n return knownAccountUserIdsBuilder(this.storageService);\n }\n }\n\n /**\n * Builds a user storage key appropriate for the current version.\n *\n * @param userId userId to use in the key\n * @param keyDefinition state and key to use in the key\n * @returns\n */\n private getUserKey(userId: string, keyDefinition: KeyDefinitionLike): string {\n if (this.currentVersion < 9) {\n return userKeyBuilderPre9();\n } else {\n return userKeyBuilder(userId, keyDefinition);\n }\n }\n\n /**\n * Builds a global storage key appropriate for the current version.\n *\n * @param keyDefinition state and key to use in the key\n * @returns\n */\n private getGlobalKey(keyDefinition: KeyDefinitionLike): string {\n if (this.currentVersion < 9) {\n return globalKeyBuilderPre9();\n } else {\n return globalKeyBuilder(keyDefinition);\n }\n }\n}\n\n/**\n * When this is updated, rename this function to `userKeyBuilderXToY` where `X` is the version number it\n * became relevant, and `Y` prior to the version it was updated.\n *\n * Be sure to update the map in `MigrationHelper` to point to the appropriate function for the current version.\n * @param userId The userId of the user you want the key to be for.\n * @param keyDefinition the key definition of which data the key should point to.\n * @returns\n */\nfunction userKeyBuilder(userId: string, keyDefinition: KeyDefinitionLike): string {\n return `user_${userId}_${keyDefinition.stateDefinition.name}_${keyDefinition.key}`;\n}\n\nfunction userKeyBuilderPre9(): string {\n throw Error(\"No key builder should be used for versions prior to 9.\");\n}\n\n/**\n * When this is updated, rename this function to `globalKeyBuilderXToY` where `X` is the version number\n * it became relevant, and `Y` prior to the version it was updated.\n *\n * Be sure to update the map in `MigrationHelper` to point to the appropriate function for the current version.\n * @param keyDefinition the key definition of which data the key should point to.\n * @returns\n */\nfunction globalKeyBuilder(keyDefinition: KeyDefinitionLike): string {\n return `global_${keyDefinition.stateDefinition.name}_${keyDefinition.key}`;\n}\n\nfunction globalKeyBuilderPre9(): string {\n throw Error(\"No key builder should be used for versions prior to 9.\");\n}\n\nasync function knownAccountUserIdsBuilderPre60(\n storageService: AbstractStorageService,\n): Promise {\n return (await storageService.get(\"authenticatedAccounts\")) ?? [];\n}\n\nasync function knownAccountUserIdsBuilder(\n storageService: AbstractStorageService,\n): Promise {\n const accounts = await storageService.get>(\n globalKeyBuilder({ stateDefinition: { name: \"account\" }, key: \"accounts\" }),\n );\n return Object.keys(accounts ?? {});\n}\n","import { ClientType } from \"../../enums\";\nimport { waitForMigrations } from \"../../state-migrations\";\nimport { CURRENT_VERSION, currentVersion } from \"../../state-migrations/migrate\";\nimport { MigrationHelper } from \"../../state-migrations/migration-helper\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { AbstractStorageService } from \"../abstractions/storage.service\";\n\nimport { MigrationBuilderService } from \"./migration-builder.service\";\n\nexport class MigrationRunner {\n constructor(\n protected diskStorage: AbstractStorageService,\n protected logService: LogService,\n protected migrationBuilderService: MigrationBuilderService,\n private clientType: ClientType,\n ) {}\n\n async run(): Promise {\n const migrationHelper = new MigrationHelper(\n await currentVersion(this.diskStorage, this.logService),\n this.diskStorage,\n this.logService,\n \"general\",\n this.clientType,\n );\n\n if (migrationHelper.currentVersion < 0) {\n // Cannot determine state, assuming empty so we don't repeatedly apply a migration.\n await this.diskStorage.save(\"stateVersion\", CURRENT_VERSION);\n return;\n }\n\n const migrationBuilder = this.migrationBuilderService.build();\n\n await migrationBuilder.migrate(migrationHelper);\n }\n\n async waitForCompletion(): Promise {\n await waitForMigrations(this.diskStorage, this.logService);\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Account } from \"./account\";\nimport { GlobalState } from \"./global-state\";\n\nexport class State<\n TGlobalState extends GlobalState = GlobalState,\n TAccount extends Account = Account,\n> {\n accounts: { [userId: string]: TAccount } = {};\n globals: TGlobalState;\n\n constructor(globals: TGlobalState) {\n this.globals = globals;\n }\n\n // TODO, make Jsonify work. It currently doesn't because Globals doesn't implement Jsonify.\n static fromJSON(\n obj: any,\n accountDeserializer: (json: Jsonify) => TAccount,\n ): State {\n if (obj == null) {\n return null;\n }\n\n return Object.assign(new State(null), obj, {\n accounts: State.buildAccountMapFromJSON(obj?.accounts, accountDeserializer),\n });\n }\n\n private static buildAccountMapFromJSON(\n jsonAccounts: { [userId: string]: Jsonify },\n accountDeserializer: (json: Jsonify) => TAccount,\n ) {\n if (!jsonAccounts) {\n return {};\n }\n const accounts: { [userId: string]: TAccount } = {};\n for (const userId in jsonAccounts) {\n accounts[userId] = accountDeserializer(jsonAccounts[userId]);\n }\n return accounts;\n }\n}\n","import { firstValueFrom, map } from \"rxjs\";\nimport { Jsonify, JsonValue } from \"type-fest\";\n\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { BiometricKey } from \"../../auth/types/biometric-key\";\nimport { UserId } from \"../../types/guid\";\nimport { EnvironmentService } from \"../abstractions/environment.service\";\nimport { LogService } from \"../abstractions/log.service\";\nimport {\n InitOptions,\n StateService as StateServiceAbstraction,\n} from \"../abstractions/state.service\";\nimport { AbstractStorageService } from \"../abstractions/storage.service\";\nimport { HtmlStorageLocation, StorageLocation } from \"../enums\";\nimport { StateFactory } from \"../factories/state-factory\";\nimport { Account } from \"../models/domain/account\";\nimport { GlobalState } from \"../models/domain/global-state\";\nimport { State } from \"../models/domain/state\";\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\nimport { MigrationRunner } from \"./migration-runner\";\n\nconst keys = {\n state: \"state\",\n stateVersion: \"stateVersion\",\n global: \"global\",\n tempAccountSettings: \"tempAccountSettings\", // used to hold account specific settings (i.e clear clipboard) between initial migration and first account authentication\n};\n\nconst partialKeys = {\n userAutoKey: \"_user_auto\",\n userBiometricKey: \"_user_biometric\",\n\n autoKey: \"_masterkey_auto\",\n biometricKey: \"_masterkey_biometric\",\n masterKey: \"_masterkey\",\n};\n\nconst DDG_SHARED_KEY = \"DuckDuckGoSharedKey\";\n\nexport class StateService<\n TGlobalState extends GlobalState = GlobalState,\n TAccount extends Account = Account,\n> implements StateServiceAbstraction\n{\n private hasBeenInited = false;\n protected isRecoveredSession = false;\n\n // default account serializer, must be overridden by child class\n protected accountDeserializer = Account.fromJSON as (json: Jsonify) => TAccount;\n\n constructor(\n protected storageService: AbstractStorageService,\n protected secureStorageService: AbstractStorageService,\n protected memoryStorageService: AbstractStorageService,\n protected logService: LogService,\n protected stateFactory: StateFactory,\n protected accountService: AccountService,\n protected environmentService: EnvironmentService,\n protected tokenService: TokenService,\n private migrationRunner: MigrationRunner,\n ) {}\n\n async init(initOptions: InitOptions = {}): Promise {\n // Deconstruct and apply defaults\n const { runMigrations = true } = initOptions;\n if (this.hasBeenInited) {\n return;\n }\n\n if (runMigrations) {\n await this.migrationRunner.run();\n } else {\n // It may have been requested to not run the migrations but we should defensively not\n // continue this method until migrations have a chance to be completed elsewhere.\n await this.migrationRunner.waitForCompletion();\n }\n\n await this.state().then(async (state) => {\n if (state == null) {\n await this.setState(new State(this.createGlobals()));\n } else {\n this.isRecoveredSession = true;\n }\n });\n await this.initAccountState();\n\n this.hasBeenInited = true;\n }\n\n async initAccountState() {\n if (this.isRecoveredSession) {\n return;\n }\n\n // Get all likely authenticated accounts\n const authenticatedAccounts = await firstValueFrom(\n this.accountService.accounts$.pipe(map((accounts) => Object.keys(accounts))),\n );\n\n await this.updateState(async (state) => {\n for (const i in authenticatedAccounts) {\n state = await this.syncAccountFromDisk(authenticatedAccounts[i]);\n }\n\n return state;\n });\n }\n\n async syncAccountFromDisk(userId: string): Promise> {\n if (userId == null) {\n return;\n }\n const diskAccount = await this.getAccountFromDisk({ userId: userId });\n const state = await this.updateState(async (state) => {\n if (state.accounts == null) {\n state.accounts = {};\n }\n state.accounts[userId] = this.createAccount();\n state.accounts[userId].profile = diskAccount.profile;\n return state;\n });\n\n return state;\n }\n\n async addAccount(account: TAccount) {\n await this.environmentService.seedUserEnvironment(account.profile.userId as UserId);\n await this.updateState(async (state) => {\n state.accounts[account.profile.userId] = account;\n return state;\n });\n await this.scaffoldNewAccountStorage(account);\n }\n\n async clean(options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultInMemoryOptions());\n await this.deAuthenticateAccount(options.userId);\n\n await this.removeAccountFromDisk(options?.userId);\n await this.removeAccountFromMemory(options?.userId);\n }\n\n /**\n * user key when using the \"never\" option of vault timeout\n */\n async getUserKeyAutoUnlock(options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"auto\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return null;\n }\n return await this.secureStorageService.get(\n `${options.userId}${partialKeys.userAutoKey}`,\n options,\n );\n }\n\n /**\n * user key when using the \"never\" option of vault timeout\n */\n async setUserKeyAutoUnlock(value: string, options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"auto\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return;\n }\n await this.saveSecureStorageKey(partialKeys.userAutoKey, value, options);\n }\n\n /**\n * User's encrypted symmetric key when using biometrics\n */\n async getUserKeyBiometric(options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return null;\n }\n return await this.secureStorageService.get(\n `${options.userId}${partialKeys.userBiometricKey}`,\n options,\n );\n }\n\n async hasUserKeyBiometric(options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return false;\n }\n return await this.secureStorageService.has(\n `${options.userId}${partialKeys.userBiometricKey}`,\n options,\n );\n }\n\n async setUserKeyBiometric(value: BiometricKey, options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return;\n }\n await this.saveSecureStorageKey(partialKeys.userBiometricKey, value, options);\n }\n\n /**\n * @deprecated Use UserKeyAuto instead\n */\n async setCryptoMasterKeyAuto(value: string, options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"auto\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return;\n }\n await this.saveSecureStorageKey(partialKeys.autoKey, value, options);\n }\n\n /**\n * @deprecated I don't see where this is even used\n */\n async getCryptoMasterKeyB64(options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n if (options?.userId == null) {\n return null;\n }\n return await this.secureStorageService.get(\n `${options?.userId}${partialKeys.masterKey}`,\n options,\n );\n }\n\n /**\n * @deprecated I don't see where this is even used\n */\n async setCryptoMasterKeyB64(value: string, options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n if (options?.userId == null) {\n return;\n }\n await this.saveSecureStorageKey(partialKeys.masterKey, value, options);\n }\n\n /**\n * @deprecated Use UserKeyBiometric instead\n */\n async getCryptoMasterKeyBiometric(options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return null;\n }\n return await this.secureStorageService.get(\n `${options.userId}${partialKeys.biometricKey}`,\n options,\n );\n }\n\n /**\n * @deprecated Use UserKeyBiometric instead\n */\n async hasCryptoMasterKeyBiometric(options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return false;\n }\n return await this.secureStorageService.has(\n `${options.userId}${partialKeys.biometricKey}`,\n options,\n );\n }\n\n /**\n * @deprecated Use UserKeyBiometric instead\n */\n async setCryptoMasterKeyBiometric(value: BiometricKey, options?: StorageOptions): Promise {\n options = this.reconcileOptions(\n this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n await this.defaultSecureStorageOptions(),\n );\n if (options?.userId == null) {\n return;\n }\n await this.saveSecureStorageKey(partialKeys.biometricKey, value, options);\n }\n\n async getDuckDuckGoSharedKey(options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n if (options?.userId == null) {\n return null;\n }\n return await this.secureStorageService.get(DDG_SHARED_KEY, options);\n }\n\n async setDuckDuckGoSharedKey(value: string, options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n if (options?.userId == null) {\n return;\n }\n value == null\n ? await this.secureStorageService.remove(DDG_SHARED_KEY, options)\n : await this.secureStorageService.save(DDG_SHARED_KEY, value, options);\n }\n\n async setEnableDuckDuckGoBrowserIntegration(\n value: boolean,\n options?: StorageOptions,\n ): Promise {\n const globals = await this.getGlobals(\n this.reconcileOptions(options, await this.defaultOnDiskOptions()),\n );\n globals.enableDuckDuckGoBrowserIntegration = value;\n await this.saveGlobals(\n globals,\n this.reconcileOptions(options, await this.defaultOnDiskOptions()),\n );\n }\n\n /**\n * @deprecated Use UserKey instead\n */\n async getEncryptedCryptoSymmetricKey(options?: StorageOptions): Promise {\n return (\n await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))\n )?.keys.cryptoSymmetricKey.encrypted;\n }\n\n async getIsAuthenticated(options?: StorageOptions): Promise {\n return (\n (await this.tokenService.getAccessToken(options?.userId as UserId)) != null &&\n (await this.getUserId(options)) != null\n );\n }\n\n async getLastSync(options?: StorageOptions): Promise {\n return (\n await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskMemoryOptions()))\n )?.profile?.lastSync;\n }\n\n async setLastSync(value: string, options?: StorageOptions): Promise {\n const account = await this.getAccount(\n this.reconcileOptions(options, await this.defaultOnDiskMemoryOptions()),\n );\n account.profile.lastSync = value;\n await this.saveAccount(\n account,\n this.reconcileOptions(options, await this.defaultOnDiskMemoryOptions()),\n );\n }\n\n async getUserId(options?: StorageOptions): Promise {\n return (\n await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))\n )?.profile?.userId;\n }\n\n protected async getGlobals(options: StorageOptions): Promise {\n let globals: TGlobalState;\n if (this.useMemory(options.storageLocation)) {\n globals = await this.getGlobalsFromMemory();\n }\n\n if (this.useDisk && globals == null) {\n globals = await this.getGlobalsFromDisk(options);\n }\n\n if (globals == null) {\n globals = this.createGlobals();\n }\n\n return globals;\n }\n\n protected async saveGlobals(globals: TGlobalState, options: StorageOptions) {\n return this.useMemory(options.storageLocation)\n ? this.saveGlobalsToMemory(globals)\n : await this.saveGlobalsToDisk(globals, options);\n }\n\n protected async getGlobalsFromMemory(): Promise {\n return (await this.state()).globals;\n }\n\n protected async getGlobalsFromDisk(options: StorageOptions): Promise {\n return await this.storageService.get(keys.global, options);\n }\n\n protected async saveGlobalsToMemory(globals: TGlobalState): Promise {\n await this.updateState(async (state) => {\n state.globals = globals;\n return state;\n });\n }\n\n protected async saveGlobalsToDisk(globals: TGlobalState, options: StorageOptions): Promise {\n if (options.useSecureStorage) {\n await this.secureStorageService.save(keys.global, globals, options);\n } else {\n await this.storageService.save(keys.global, globals, options);\n }\n }\n\n protected async getAccount(options: StorageOptions): Promise {\n try {\n let account: TAccount;\n if (this.useMemory(options.storageLocation)) {\n account = await this.getAccountFromMemory(options);\n }\n\n if (this.useDisk(options.storageLocation) && account == null) {\n account = await this.getAccountFromDisk(options);\n }\n\n return account;\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n protected async getAccountFromMemory(options: StorageOptions): Promise {\n const userId =\n options.userId ??\n (await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n ));\n\n return await this.state().then(async (state) => {\n if (state.accounts == null) {\n return null;\n }\n return state.accounts[userId];\n });\n }\n\n protected async getAccountFromDisk(options: StorageOptions): Promise {\n const userId =\n options.userId ??\n (await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n ));\n\n if (userId == null) {\n return null;\n }\n\n const account = options?.useSecureStorage\n ? (await this.secureStorageService.get(options.userId, options)) ??\n (await this.storageService.get(\n options.userId,\n this.reconcileOptions(options, { htmlStorageLocation: HtmlStorageLocation.Local }),\n ))\n : await this.storageService.get(options.userId, options);\n return account;\n }\n\n protected useMemory(storageLocation: StorageLocation) {\n return storageLocation === StorageLocation.Memory || storageLocation === StorageLocation.Both;\n }\n\n protected useDisk(storageLocation: StorageLocation) {\n return storageLocation === StorageLocation.Disk || storageLocation === StorageLocation.Both;\n }\n\n protected async saveAccount(\n account: TAccount,\n options: StorageOptions = {\n storageLocation: StorageLocation.Both,\n useSecureStorage: false,\n },\n ) {\n return this.useMemory(options.storageLocation)\n ? await this.saveAccountToMemory(account)\n : await this.saveAccountToDisk(account, options);\n }\n\n protected async saveAccountToDisk(account: TAccount, options: StorageOptions): Promise {\n const storageLocation = options.useSecureStorage\n ? this.secureStorageService\n : this.storageService;\n\n await storageLocation.save(`${options.userId}`, account, options);\n }\n\n protected async saveAccountToMemory(account: TAccount): Promise {\n if ((await this.getAccountFromMemory({ userId: account.profile.userId })) !== null) {\n await this.updateState((state) => {\n return new Promise((resolve) => {\n state.accounts[account.profile.userId] = account;\n resolve(state);\n });\n });\n }\n }\n\n protected async scaffoldNewAccountStorage(account: TAccount): Promise {\n // We don't want to manipulate the referenced in memory account\n const deepClone = JSON.parse(JSON.stringify(account));\n await this.scaffoldNewAccountLocalStorage(deepClone);\n await this.scaffoldNewAccountSessionStorage(deepClone);\n await this.scaffoldNewAccountMemoryStorage(deepClone);\n }\n\n // TODO: There is a tech debt item for splitting up these methods - only Web uses multiple storage locations in its storageService.\n // For now these methods exist with some redundancy to facilitate this special web requirement.\n protected async scaffoldNewAccountLocalStorage(account: TAccount): Promise {\n await this.saveAccount(\n account,\n this.reconcileOptions(\n { userId: account.profile.userId },\n await this.defaultOnDiskLocalOptions(),\n ),\n );\n }\n\n protected async scaffoldNewAccountMemoryStorage(account: TAccount): Promise {\n await this.storageService.save(\n account.profile.userId,\n account,\n await this.defaultOnDiskMemoryOptions(),\n );\n await this.saveAccount(\n account,\n this.reconcileOptions(\n { userId: account.profile.userId },\n await this.defaultOnDiskMemoryOptions(),\n ),\n );\n }\n\n protected async scaffoldNewAccountSessionStorage(account: TAccount): Promise {\n await this.storageService.save(\n account.profile.userId,\n account,\n await this.defaultOnDiskMemoryOptions(),\n );\n await this.saveAccount(\n account,\n this.reconcileOptions({ userId: account.profile.userId }, await this.defaultOnDiskOptions()),\n );\n }\n\n protected reconcileOptions(\n requestedOptions: StorageOptions,\n defaultOptions: StorageOptions,\n ): StorageOptions {\n if (requestedOptions == null) {\n return defaultOptions;\n }\n requestedOptions.userId = requestedOptions?.userId ?? defaultOptions.userId;\n requestedOptions.storageLocation =\n requestedOptions?.storageLocation ?? defaultOptions.storageLocation;\n requestedOptions.useSecureStorage =\n requestedOptions?.useSecureStorage ?? defaultOptions.useSecureStorage;\n requestedOptions.htmlStorageLocation =\n requestedOptions?.htmlStorageLocation ?? defaultOptions.htmlStorageLocation;\n requestedOptions.keySuffix = requestedOptions?.keySuffix ?? defaultOptions.keySuffix;\n return requestedOptions;\n }\n\n protected async defaultInMemoryOptions(): Promise {\n const userId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n return {\n storageLocation: StorageLocation.Memory,\n userId,\n };\n }\n\n protected async defaultOnDiskOptions(): Promise {\n const userId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n return {\n storageLocation: StorageLocation.Disk,\n htmlStorageLocation: HtmlStorageLocation.Session,\n userId,\n useSecureStorage: false,\n };\n }\n\n protected async defaultOnDiskLocalOptions(): Promise {\n const userId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n return {\n storageLocation: StorageLocation.Disk,\n htmlStorageLocation: HtmlStorageLocation.Local,\n userId,\n useSecureStorage: false,\n };\n }\n\n protected async defaultOnDiskMemoryOptions(): Promise {\n const userId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n return {\n storageLocation: StorageLocation.Disk,\n htmlStorageLocation: HtmlStorageLocation.Memory,\n userId,\n useSecureStorage: false,\n };\n }\n\n protected async defaultSecureStorageOptions(): Promise {\n const userId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n return {\n storageLocation: StorageLocation.Disk,\n useSecureStorage: true,\n userId,\n };\n }\n\n protected async getActiveUserIdFromStorage(): Promise {\n return await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n }\n\n protected async removeAccountFromLocalStorage(userId: string = null): Promise {\n userId ??= await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n const storedAccount = await this.getAccount(\n this.reconcileOptions({ userId: userId }, await this.defaultOnDiskLocalOptions()),\n );\n await this.saveAccount(\n this.resetAccount(storedAccount),\n this.reconcileOptions({ userId: userId }, await this.defaultOnDiskLocalOptions()),\n );\n }\n\n protected async removeAccountFromSessionStorage(userId: string = null): Promise {\n userId ??= await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n const storedAccount = await this.getAccount(\n this.reconcileOptions({ userId: userId }, await this.defaultOnDiskOptions()),\n );\n await this.saveAccount(\n this.resetAccount(storedAccount),\n this.reconcileOptions({ userId: userId }, await this.defaultOnDiskOptions()),\n );\n }\n\n protected async removeAccountFromSecureStorage(userId: string = null): Promise {\n userId ??= await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n await this.setUserKeyAutoUnlock(null, { userId: userId });\n await this.setUserKeyBiometric(null, { userId: userId });\n await this.setCryptoMasterKeyAuto(null, { userId: userId });\n await this.setCryptoMasterKeyBiometric(null, { userId: userId });\n await this.setCryptoMasterKeyB64(null, { userId: userId });\n }\n\n protected async removeAccountFromMemory(userId: string = null): Promise {\n userId ??= await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n );\n\n await this.updateState(async (state) => {\n delete state.accounts[userId];\n return state;\n });\n }\n\n // settings persist even on reset, and are not affected by this method\n protected resetAccount(account: TAccount) {\n // All settings have been moved to StateProviders\n return this.createAccount();\n }\n\n protected createAccount(init: Partial = null): TAccount {\n return this.stateFactory.createAccount(init);\n }\n\n protected createGlobals(init: Partial = null): TGlobalState {\n return this.stateFactory.createGlobal(init);\n }\n\n protected async deAuthenticateAccount(userId: string): Promise {\n // We must have a manual call to clear tokens as we can't leverage state provider to clean\n // up our data as we have secure storage in the mix.\n await this.tokenService.clearTokens(userId as UserId);\n }\n\n protected async removeAccountFromDisk(userId: string) {\n await this.removeAccountFromSessionStorage(userId);\n await this.removeAccountFromLocalStorage(userId);\n await this.removeAccountFromSecureStorage(userId);\n }\n\n protected async saveSecureStorageKey(\n key: string,\n value: T,\n options?: StorageOptions,\n ) {\n return value == null\n ? await this.secureStorageService.remove(`${options.userId}${key}`, options)\n : await this.secureStorageService.save(`${options.userId}${key}`, value, options);\n }\n\n protected async state(): Promise> {\n let state = await this.memoryStorageService.get>(keys.state);\n if (this.memoryStorageService.valuesRequireDeserialization) {\n state = State.fromJSON(state, this.accountDeserializer);\n }\n return state;\n }\n\n private async setState(\n state: State,\n ): Promise> {\n await this.memoryStorageService.save(keys.state, state);\n return state;\n }\n\n protected async updateState(\n stateUpdater: (state: State) => Promise>,\n ): Promise> {\n return await this.state().then(async (state) => {\n const updatedState = await stateUpdater(state);\n if (updatedState == null) {\n throw new Error(\"Attempted to update state to null value\");\n }\n\n return await this.setState(updatedState);\n });\n }\n}\n","import { AbstractStorageService, ObservableStorageService } from \"../abstractions/storage.service\";\n// eslint-disable-next-line import/no-restricted-paths\nimport { ClientLocations, StorageLocation } from \"../state/state-definition\";\n\nexport type PossibleLocation = StorageLocation | ClientLocations[keyof ClientLocations];\n\n/**\n * A provider for getting client specific computed storage locations and services.\n */\nexport class StorageServiceProvider {\n constructor(\n protected readonly diskStorageService: AbstractStorageService & ObservableStorageService,\n protected readonly memoryStorageService: AbstractStorageService & ObservableStorageService,\n ) {}\n\n /**\n * Computes the location and corresponding service for a given client.\n *\n * **NOTE** The default implementation does not respect client overrides and if clients\n * have special overrides they are responsible for implementing this service.\n * @param defaultLocation The default location to use if no client specific override is preferred.\n * @param overrides Client specific overrides\n * @returns The computed storage location and corresponding storage service to use to get/store state.\n * @throws If there is no configured storage service for the given inputs.\n */\n get(\n defaultLocation: PossibleLocation,\n overrides: Partial,\n ): [location: PossibleLocation, service: AbstractStorageService & ObservableStorageService] {\n switch (defaultLocation) {\n case \"disk\":\n return [defaultLocation, this.diskStorageService];\n case \"memory\":\n return [defaultLocation, this.memoryStorageService];\n default:\n throw new Error(`Unexpected location: ${defaultLocation}`);\n }\n }\n}\n","import { UserId } from \"../../types/guid\";\nimport { CryptoService } from \"../abstractions/crypto.service\";\nimport { KeySuffixOptions } from \"../enums\";\n\n// TODO: this is a half measure improvement which allows us to reduce some side effects today (cryptoService.getUserKey setting user key in memory if auto key exists)\n// but ideally, in the future, we would be able to put this logic into the cryptoService\n// after the vault timeout settings service is transitioned to state provider so that\n// the getUserKey logic can simply go to the correct location based on the vault timeout settings\n// similar to the TokenService (it would either go to secure storage for the auto user key or memory for the user key)\n\nexport class UserAutoUnlockKeyService {\n constructor(private cryptoService: CryptoService) {}\n\n /**\n * The presence of the user key in memory dictates whether the user's vault is locked or unlocked.\n * However, for users that have the auto unlock user key set, we need to set the user key in memory\n * on application bootstrap and on active account changes so that the user's vault loads unlocked.\n * @param userId - The user id to check for an auto user key.\n */\n async setUserKeyInMemoryIfAutoUserKeySet(userId: UserId): Promise {\n if (userId == null) {\n return;\n }\n\n const autoUserKey = await this.cryptoService.getUserKeyFromStorage(\n KeySuffixOptions.Auto,\n userId,\n );\n\n if (autoUserKey == null) {\n return;\n }\n\n await this.cryptoService.setUserKey(autoUserKey, userId);\n }\n}\n","export class DecryptParameters {\n encKey: T;\n data: T;\n iv: T;\n macKey: T;\n mac: T;\n macData: T;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nimport { StateUpdateOptions } from \"./state-update-options\";\n\nexport type CombinedState = readonly [userId: UserId, state: T];\n\n/** A helper object for interacting with state that is scoped to a specific user. */\nexport interface UserState {\n /** Emits a stream of data. Emits null if the user does not have specified state. */\n readonly state$: Observable;\n\n /** Emits a stream of tuples, with the first element being a user id and the second element being the data for that user. */\n readonly combinedState$: Observable>;\n}\n\nexport const activeMarker: unique symbol = Symbol(\"active\");\nexport interface ActiveUserState extends UserState {\n readonly [activeMarker]: true;\n\n /**\n * Emits a stream of data. Emits null if the user does not have specified state.\n * Note: Will not emit if there is no active user.\n */\n readonly state$: Observable;\n\n /**\n * Updates backing stores for the active user.\n * @param configureState function that takes the current state and returns the new state\n * @param options Defaults to @see {module:state-update-options#DEFAULT_OPTIONS}\n * @param options.shouldUpdate A callback for determining if you want to update state. Defaults to () => true\n * @param options.combineLatestWith An observable that you want to combine with the current state for callbacks. Defaults to null\n * @param options.msTimeout A timeout for how long you are willing to wait for a `combineLatestWith` option to complete. Defaults to 1000ms. Only applies if `combineLatestWith` is set.\n\n * @returns A promise that must be awaited before your next action to ensure the update has been written to state.\n * Resolves to the new state. If `shouldUpdate` returns false, the promise will resolve to the current state.\n */\n readonly update: (\n configureState: (state: T, dependencies: TCombine) => T,\n options?: StateUpdateOptions,\n ) => Promise<[UserId, T]>;\n}\nexport interface SingleUserState extends UserState {\n readonly userId: UserId;\n\n /**\n * Updates backing stores for the active user.\n * @param configureState function that takes the current state and returns the new state\n * @param options Defaults to @see {module:state-update-options#DEFAULT_OPTIONS}\n * @param options.shouldUpdate A callback for determining if you want to update state. Defaults to () => true\n * @param options.combineLatestWith An observable that you want to combine with the current state for callbacks. Defaults to null\n * @param options.msTimeout A timeout for how long you are willing to wait for a `combineLatestWith` option to complete. Defaults to 1000ms. Only applies if `combineLatestWith` is set.\n\n * @returns A promise that must be awaited before your next action to ensure the update has been written to state.\n * Resolves to the new state. If `shouldUpdate` returns false, the promise will resolve to the current state.\n */\n readonly update: (\n configureState: (state: T, dependencies: TCombine) => T,\n options?: StateUpdateOptions,\n ) => Promise;\n}\n","import { Observable, map, switchMap, firstValueFrom, timeout, throwError, NEVER } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { StateUpdateOptions } from \"../state-update-options\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserState, CombinedState, activeMarker } from \"../user-state\";\nimport { SingleUserStateProvider } from \"../user-state.provider\";\n\nexport class DefaultActiveUserState implements ActiveUserState {\n [activeMarker]: true;\n combinedState$: Observable>;\n state$: Observable;\n\n constructor(\n protected keyDefinition: UserKeyDefinition,\n private activeUserId$: Observable,\n private singleUserStateProvider: SingleUserStateProvider,\n ) {\n this.combinedState$ = this.activeUserId$.pipe(\n switchMap((userId) =>\n userId != null\n ? this.singleUserStateProvider.get(userId, this.keyDefinition).combinedState$\n : NEVER,\n ),\n );\n\n // State should just be combined state without the user id\n this.state$ = this.combinedState$.pipe(map(([_userId, state]) => state));\n }\n\n async update(\n configureState: (state: T, dependency: TCombine) => T,\n options: StateUpdateOptions = {},\n ): Promise<[UserId, T]> {\n const userId = await firstValueFrom(\n this.activeUserId$.pipe(\n timeout({\n first: 1000,\n with: () =>\n throwError(\n () =>\n new Error(\n `Timeout while retrieving active user for key ${this.keyDefinition.fullName}.`,\n ),\n ),\n }),\n ),\n );\n if (userId == null) {\n throw new Error(\n `Error storing ${this.keyDefinition.fullName} for the active user: No active user at this time.`,\n );\n }\n\n return [\n userId,\n await this.singleUserStateProvider\n .get(userId, this.keyDefinition)\n .update(configureState, options),\n ];\n }\n}\n","import { Observable, ReplaySubject, Subject, concatMap, merge, share, timer } from \"rxjs\";\n\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\n\n/**\n * Default derived state\n */\nexport class DefaultDerivedState\n implements DerivedState\n{\n private readonly storageKey: string;\n private forcedValueSubject = new Subject();\n\n state$: Observable;\n\n constructor(\n private parentState$: Observable,\n protected deriveDefinition: DeriveDefinition,\n private dependencies: TDeps,\n ) {\n this.storageKey = deriveDefinition.storageKey;\n\n const derivedState$ = this.parentState$.pipe(\n concatMap(async (state) => {\n let derivedStateOrPromise = this.deriveDefinition.derive(state, this.dependencies);\n if (derivedStateOrPromise instanceof Promise) {\n derivedStateOrPromise = await derivedStateOrPromise;\n }\n const derivedState = derivedStateOrPromise;\n return derivedState;\n }),\n );\n\n this.state$ = merge(this.forcedValueSubject, derivedState$).pipe(\n share({\n connector: () => {\n return new ReplaySubject(1);\n },\n resetOnRefCountZero: () => timer(this.deriveDefinition.cleanupDelayMs),\n }),\n );\n }\n\n async forceValue(value: TTo) {\n this.forcedValueSubject.next(value);\n return value;\n }\n}\n","import { Observable } from \"rxjs\";\n\nexport const DEFAULT_OPTIONS = {\n shouldUpdate: () => true,\n combineLatestWith: null as Observable,\n msTimeout: 1000,\n};\n\ntype DefinitelyTypedDefault = Omit<\n typeof DEFAULT_OPTIONS,\n \"shouldUpdate\" | \"combineLatestWith\"\n> & {\n shouldUpdate: (state: T, dependency: TCombine) => boolean;\n combineLatestWith?: Observable;\n};\n\nexport type StateUpdateOptions = Partial>;\n\nexport function populateOptionsWithDefault(\n options: StateUpdateOptions,\n): StateUpdateOptions {\n return {\n ...(DEFAULT_OPTIONS as StateUpdateOptions),\n ...options,\n };\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { AbstractStorageService } from \"../../abstractions/storage.service\";\n\nexport async function getStoredValue(\n key: string,\n storage: AbstractStorageService,\n deserializer: (jsonValue: Jsonify) => T,\n) {\n if (storage.valuesRequireDeserialization) {\n const jsonValue = await storage.get>(key);\n const value = deserializer(jsonValue);\n return value;\n } else {\n const value = await storage.get(key);\n return value ?? null;\n }\n}\n","import {\n Observable,\n ReplaySubject,\n defer,\n filter,\n firstValueFrom,\n merge,\n share,\n switchMap,\n timeout,\n timer,\n} from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { StorageKey } from \"../../../types/state\";\nimport {\n AbstractStorageService,\n ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { StateUpdateOptions, populateOptionsWithDefault } from \"../state-update-options\";\n\nimport { getStoredValue } from \"./util\";\n\n// The parts of a KeyDefinition this class cares about to make it work\ntype KeyDefinitionRequirements = {\n deserializer: (jsonState: Jsonify) => T;\n cleanupDelayMs: number;\n};\n\nexport abstract class StateBase> {\n private updatePromise: Promise;\n\n readonly state$: Observable;\n\n constructor(\n protected readonly key: StorageKey,\n protected readonly storageService: AbstractStorageService & ObservableStorageService,\n protected readonly keyDefinition: KeyDef,\n ) {\n const storageUpdate$ = storageService.updates$.pipe(\n filter((storageUpdate) => storageUpdate.key === key),\n switchMap(async (storageUpdate) => {\n if (storageUpdate.updateType === \"remove\") {\n return null;\n }\n\n return await getStoredValue(key, storageService, keyDefinition.deserializer);\n }),\n );\n\n this.state$ = merge(\n defer(() => getStoredValue(key, storageService, keyDefinition.deserializer)),\n storageUpdate$,\n ).pipe(\n share({\n connector: () => new ReplaySubject(1),\n resetOnRefCountZero: () => timer(keyDefinition.cleanupDelayMs),\n }),\n );\n }\n\n async update(\n configureState: (state: T, dependency: TCombine) => T,\n options: StateUpdateOptions = {},\n ): Promise {\n options = populateOptionsWithDefault(options);\n if (this.updatePromise != null) {\n await this.updatePromise;\n }\n\n try {\n this.updatePromise = this.internalUpdate(configureState, options);\n const newState = await this.updatePromise;\n return newState;\n } finally {\n this.updatePromise = null;\n }\n }\n\n private async internalUpdate(\n configureState: (state: T, dependency: TCombine) => T,\n options: StateUpdateOptions,\n ): Promise {\n const currentState = await this.getStateForUpdate();\n const combinedDependencies =\n options.combineLatestWith != null\n ? await firstValueFrom(options.combineLatestWith.pipe(timeout(options.msTimeout)))\n : null;\n\n if (!options.shouldUpdate(currentState, combinedDependencies)) {\n return currentState;\n }\n\n const newState = configureState(currentState, combinedDependencies);\n await this.doStorageSave(newState, currentState);\n return newState;\n }\n\n protected async doStorageSave(newState: T, oldState: T) {\n await this.storageService.save(this.key, newState);\n }\n\n /** For use in update methods, does not wait for update to complete before yielding state.\n * The expectation is that that await is already done\n */\n private async getStateForUpdate() {\n return await getStoredValue(this.key, this.storageService, this.keyDefinition.deserializer);\n }\n}\n","import {\n AbstractStorageService,\n ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { GlobalState } from \"../global-state\";\nimport { KeyDefinition, globalKeyBuilder } from \"../key-definition\";\n\nimport { StateBase } from \"./state-base\";\n\nexport class DefaultGlobalState\n extends StateBase>\n implements GlobalState\n{\n constructor(\n keyDefinition: KeyDefinition,\n chosenLocation: AbstractStorageService & ObservableStorageService,\n ) {\n super(globalKeyBuilder(keyDefinition), chosenLocation, keyDefinition);\n }\n}\n","import { Observable, combineLatest, of } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport {\n AbstractStorageService,\n ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { StateEventRegistrarService } from \"../state-event-registrar.service\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { CombinedState, SingleUserState } from \"../user-state\";\n\nimport { StateBase } from \"./state-base\";\n\nexport class DefaultSingleUserState\n extends StateBase>\n implements SingleUserState\n{\n readonly combinedState$: Observable>;\n\n constructor(\n readonly userId: UserId,\n keyDefinition: UserKeyDefinition,\n chosenLocation: AbstractStorageService & ObservableStorageService,\n private stateEventRegistrarService: StateEventRegistrarService,\n ) {\n super(keyDefinition.buildKey(userId), chosenLocation, keyDefinition);\n this.combinedState$ = combineLatest([of(userId), this.state$]);\n }\n\n protected override async doStorageSave(newState: T, oldState: T): Promise {\n await super.doStorageSave(newState, oldState);\n if (newState != null && oldState == null) {\n await this.stateEventRegistrarService.registerEvents(this.keyDefinition);\n }\n }\n}\n","import { ProviderStatusType, ProviderUserStatusType, ProviderUserType } from \"../../enums\";\nimport { ProfileProviderResponse } from \"../response/profile-provider.response\";\n\nexport class ProviderData {\n id: string;\n name: string;\n status: ProviderUserStatusType;\n type: ProviderUserType;\n enabled: boolean;\n userId: string;\n useEvents: boolean;\n providerStatus: ProviderStatusType;\n\n constructor(response: ProfileProviderResponse) {\n this.id = response.id;\n this.name = response.name;\n this.status = response.status;\n this.type = response.type;\n this.enabled = response.enabled;\n this.userId = response.userId;\n this.useEvents = response.useEvents;\n this.providerStatus = response.providerStatus;\n }\n}\n","import { SendFileApi } from \"../api/send-file.api\";\n\nexport class SendFileData {\n id: string;\n fileName: string;\n size: string;\n sizeName: string;\n\n constructor(data?: SendFileApi) {\n if (data == null) {\n return;\n }\n\n this.id = data.id;\n this.fileName = data.fileName;\n this.size = data.size;\n this.sizeName = data.sizeName;\n }\n}\n","import { SendTextApi } from \"../api/send-text.api\";\n\nexport class SendTextData {\n text: string;\n hidden: boolean;\n\n constructor(data?: SendTextApi) {\n if (data == null) {\n return;\n }\n\n this.text = data.text;\n this.hidden = data.hidden;\n }\n}\n","import { SendType } from \"../../enums/send-type\";\nimport { SendResponse } from \"../response/send.response\";\n\nimport { SendFileData } from \"./send-file.data\";\nimport { SendTextData } from \"./send-text.data\";\n\nexport class SendData {\n id: string;\n accessId: string;\n type: SendType;\n name: string;\n notes: string;\n file: SendFileData;\n text: SendTextData;\n key: string;\n maxAccessCount?: number;\n accessCount: number;\n revisionDate: string;\n expirationDate: string;\n deletionDate: string;\n password: string;\n disabled: boolean;\n hideEmail: boolean;\n\n constructor(response?: SendResponse) {\n if (response == null) {\n return;\n }\n\n this.id = response.id;\n this.accessId = response.accessId;\n this.type = response.type;\n this.name = response.name;\n this.notes = response.notes;\n this.key = response.key;\n this.maxAccessCount = response.maxAccessCount;\n this.accessCount = response.accessCount;\n this.revisionDate = response.revisionDate;\n this.expirationDate = response.expirationDate;\n this.deletionDate = response.deletionDate;\n this.password = response.password;\n this.disabled = response.disable;\n this.hideEmail = response.hideEmail;\n\n switch (this.type) {\n case SendType.Text:\n this.text = new SendTextData(response.text);\n break;\n case SendType.File:\n this.file = new SendFileData(response.file);\n break;\n default:\n break;\n }\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { FolderResponse } from \"../response/folder.response\";\n\nexport class FolderData {\n id: string;\n name: string;\n revisionDate: string;\n\n constructor(response: Partial) {\n this.name = response?.name;\n this.id = response?.id;\n this.revisionDate = response?.revisionDate;\n }\n\n static fromJSON(obj: Jsonify) {\n return Object.assign(new FolderData({}), obj);\n }\n}\n","const caches = new Map>>();\n\nconst getCache = (obj: any) => {\n let cache = caches.get(obj);\n if (cache != null) {\n return cache;\n }\n cache = new Map>();\n caches.set(obj, cache);\n return cache;\n};\n\nexport function clearCaches() {\n caches.clear();\n}\n\n/**\n * Use as a Decorator on async functions, it will prevent multiple 'active' calls as the same time\n *\n * If a promise was returned from a previous call to this function, that hasn't yet resolved it will\n * be returned, instead of calling the original function again\n *\n * Results are not cached, once the promise has returned, the next call will result in a fresh call\n *\n * Read more at https://github.com/bitwarden/jslib/pull/7\n */\nexport function sequentialize(cacheKey: (args: any[]) => string) {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const originalMethod: () => Promise = descriptor.value;\n\n return {\n value: function (...args: any[]) {\n const cache = getCache(this);\n const argsCacheKey = cacheKey(args);\n let response = cache.get(argsCacheKey);\n if (response != null) {\n return response;\n }\n\n const onFinally = () => {\n cache.delete(argsCacheKey);\n if (cache.size === 0) {\n caches.delete(this);\n }\n };\n response = originalMethod\n .apply(this, args)\n .then((val: any) => {\n onFinally();\n return val;\n })\n .catch((err: any) => {\n onFinally();\n throw err;\n });\n\n cache.set(argsCacheKey, response);\n return response;\n },\n };\n };\n}\n","import { firstValueFrom, map, of, switchMap } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport {\n SyncCipherNotification,\n SyncFolderNotification,\n SyncSendNotification,\n} from \"../../models/response/notification.response\";\nimport { SendData } from \"../../tools/send/models/data/send.data\";\nimport { SendApiService } from \"../../tools/send/services/send-api.service.abstraction\";\nimport { InternalSendService } from \"../../tools/send/services/send.service.abstraction\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { CollectionService } from \"../../vault/abstractions/collection.service\";\nimport { FolderApiServiceAbstraction } from \"../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\nimport { SyncService } from \"../../vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherData } from \"../../vault/models/data/cipher.data\";\nimport { FolderData } from \"../../vault/models/data/folder.data\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { StateService } from \"../abstractions/state.service\";\nimport { MessageSender } from \"../messaging\";\n\n/**\n * Core SyncService Logic EXCEPT for fullSync so that implementations can differ.\n */\nexport abstract class CoreSyncService implements SyncService {\n syncInProgress = false;\n\n constructor(\n protected readonly stateService: StateService,\n protected readonly folderService: InternalFolderService,\n protected readonly folderApiService: FolderApiServiceAbstraction,\n protected readonly messageSender: MessageSender,\n protected readonly logService: LogService,\n protected readonly cipherService: CipherService,\n protected readonly collectionService: CollectionService,\n protected readonly apiService: ApiService,\n protected readonly accountService: AccountService,\n protected readonly authService: AuthService,\n protected readonly sendService: InternalSendService,\n protected readonly sendApiService: SendApiService,\n ) {}\n\n abstract fullSync(forceSync: boolean, allowThrowOnError?: boolean): Promise;\n\n async getLastSync(): Promise {\n if ((await this.stateService.getUserId()) == null) {\n return null;\n }\n\n const lastSync = await this.stateService.getLastSync();\n if (lastSync) {\n return new Date(lastSync);\n }\n\n return null;\n }\n\n async setLastSync(date: Date, userId?: string): Promise {\n await this.stateService.setLastSync(date.toJSON(), { userId: userId });\n }\n\n async syncUpsertFolder(notification: SyncFolderNotification, isEdit: boolean): Promise {\n this.syncStarted();\n if (await this.stateService.getIsAuthenticated()) {\n try {\n const localFolder = await this.folderService.get(notification.id);\n if (\n (!isEdit && localFolder == null) ||\n (isEdit && localFolder != null && localFolder.revisionDate < notification.revisionDate)\n ) {\n const remoteFolder = await this.folderApiService.get(notification.id);\n if (remoteFolder != null) {\n await this.folderService.upsert(new FolderData(remoteFolder));\n this.messageSender.send(\"syncedUpsertedFolder\", { folderId: notification.id });\n return this.syncCompleted(true);\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n return this.syncCompleted(false);\n }\n\n async syncDeleteFolder(notification: SyncFolderNotification): Promise {\n this.syncStarted();\n if (await this.stateService.getIsAuthenticated()) {\n await this.folderService.delete(notification.id);\n this.messageSender.send(\"syncedDeletedFolder\", { folderId: notification.id });\n this.syncCompleted(true);\n return true;\n }\n return this.syncCompleted(false);\n }\n\n async syncUpsertCipher(notification: SyncCipherNotification, isEdit: boolean): Promise {\n this.syncStarted();\n if (await this.stateService.getIsAuthenticated()) {\n try {\n let shouldUpdate = true;\n const localCipher = await this.cipherService.get(notification.id);\n if (localCipher != null && localCipher.revisionDate >= notification.revisionDate) {\n shouldUpdate = false;\n }\n\n let checkCollections = false;\n if (shouldUpdate) {\n if (isEdit) {\n shouldUpdate = localCipher != null;\n checkCollections = true;\n } else {\n if (notification.collectionIds == null || notification.organizationId == null) {\n shouldUpdate = localCipher == null;\n } else {\n shouldUpdate = false;\n checkCollections = true;\n }\n }\n }\n\n if (\n !shouldUpdate &&\n checkCollections &&\n notification.organizationId != null &&\n notification.collectionIds != null &&\n notification.collectionIds.length > 0\n ) {\n const collections = await this.collectionService.getAll();\n if (collections != null) {\n for (let i = 0; i < collections.length; i++) {\n if (notification.collectionIds.indexOf(collections[i].id) > -1) {\n shouldUpdate = true;\n break;\n }\n }\n }\n }\n\n if (shouldUpdate) {\n const remoteCipher = await this.apiService.getFullCipherDetails(notification.id);\n if (remoteCipher != null) {\n await this.cipherService.upsert(new CipherData(remoteCipher));\n this.messageSender.send(\"syncedUpsertedCipher\", { cipherId: notification.id });\n return this.syncCompleted(true);\n }\n }\n } catch (e) {\n if (e != null && e.statusCode === 404 && isEdit) {\n await this.cipherService.delete(notification.id);\n this.messageSender.send(\"syncedDeletedCipher\", { cipherId: notification.id });\n return this.syncCompleted(true);\n }\n }\n }\n return this.syncCompleted(false);\n }\n\n async syncDeleteCipher(notification: SyncCipherNotification): Promise {\n this.syncStarted();\n if (await this.stateService.getIsAuthenticated()) {\n await this.cipherService.delete(notification.id);\n this.messageSender.send(\"syncedDeletedCipher\", { cipherId: notification.id });\n return this.syncCompleted(true);\n }\n return this.syncCompleted(false);\n }\n\n async syncUpsertSend(notification: SyncSendNotification, isEdit: boolean): Promise {\n this.syncStarted();\n const [activeUserId, status] = await firstValueFrom(\n this.accountService.activeAccount$.pipe(\n switchMap((a) => {\n if (a == null) {\n of([null, AuthenticationStatus.LoggedOut]);\n }\n return this.authService.authStatusFor$(a.id).pipe(map((s) => [a.id, s]));\n }),\n ),\n );\n // Process only notifications for currently active user when user is not logged out\n // TODO: once send service allows data manipulation of non-active users, this should process any received notification\n if (activeUserId === notification.userId && status !== AuthenticationStatus.LoggedOut) {\n try {\n const localSend = await firstValueFrom(this.sendService.get$(notification.id));\n if (\n (!isEdit && localSend == null) ||\n (isEdit && localSend != null && localSend.revisionDate < notification.revisionDate)\n ) {\n const remoteSend = await this.sendApiService.getSend(notification.id);\n if (remoteSend != null) {\n await this.sendService.upsert(new SendData(remoteSend));\n this.messageSender.send(\"syncedUpsertedSend\", { sendId: notification.id });\n return this.syncCompleted(true);\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n return this.syncCompleted(false);\n }\n\n async syncDeleteSend(notification: SyncSendNotification): Promise {\n this.syncStarted();\n if (await this.stateService.getIsAuthenticated()) {\n await this.sendService.delete(notification.id);\n this.messageSender.send(\"syncedDeletedSend\", { sendId: notification.id });\n this.syncCompleted(true);\n return true;\n }\n return this.syncCompleted(false);\n }\n\n // Helpers\n\n protected syncStarted() {\n this.syncInProgress = true;\n this.messageSender.send(\"syncStarted\");\n }\n\n protected syncCompleted(successfully: boolean): boolean {\n this.syncInProgress = false;\n this.messageSender.send(\"syncCompleted\", { successfully: successfully });\n return successfully;\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"../../../../auth/src/common/abstractions\";\nimport { LogoutReason } from \"../../../../auth/src/common/types\";\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { InternalOrganizationServiceAbstraction } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderService } from \"../../admin-console/abstractions/provider.service\";\nimport { OrganizationUserType } from \"../../admin-console/enums\";\nimport { OrganizationData } from \"../../admin-console/models/data/organization.data\";\nimport { PolicyData } from \"../../admin-console/models/data/policy.data\";\nimport { ProviderData } from \"../../admin-console/models/data/provider.data\";\nimport { PolicyResponse } from \"../../admin-console/models/response/policy.response\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AvatarService } from \"../../auth/abstractions/avatar.service\";\nimport { KeyConnectorService } from \"../../auth/abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { ForceSetPasswordReason } from \"../../auth/models/domain/force-set-password-reason\";\nimport { DomainSettingsService } from \"../../autofill/services/domain-settings.service\";\nimport { BillingAccountProfileStateService } from \"../../billing/abstractions\";\nimport { DomainsResponse } from \"../../models/response/domains.response\";\nimport { ProfileResponse } from \"../../models/response/profile.response\";\nimport { SendData } from \"../../tools/send/models/data/send.data\";\nimport { SendResponse } from \"../../tools/send/models/response/send.response\";\nimport { SendApiService } from \"../../tools/send/services/send-api.service.abstraction\";\nimport { InternalSendService } from \"../../tools/send/services/send.service.abstraction\";\nimport { UserId } from \"../../types/guid\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { CollectionService } from \"../../vault/abstractions/collection.service\";\nimport { FolderApiServiceAbstraction } from \"../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherData } from \"../../vault/models/data/cipher.data\";\nimport { CollectionData } from \"../../vault/models/data/collection.data\";\nimport { FolderData } from \"../../vault/models/data/folder.data\";\nimport { CipherResponse } from \"../../vault/models/response/cipher.response\";\nimport { CollectionDetailsResponse } from \"../../vault/models/response/collection.response\";\nimport { FolderResponse } from \"../../vault/models/response/folder.response\";\nimport { CryptoService } from \"../abstractions/crypto.service\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { StateService } from \"../abstractions/state.service\";\nimport { MessageSender } from \"../messaging\";\nimport { sequentialize } from \"../misc/sequentialize\";\n\nimport { CoreSyncService } from \"./core-sync.service\";\n\nexport class DefaultSyncService extends CoreSyncService {\n syncInProgress = false;\n\n constructor(\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n apiService: ApiService,\n private domainSettingsService: DomainSettingsService,\n folderService: InternalFolderService,\n cipherService: CipherService,\n private cryptoService: CryptoService,\n collectionService: CollectionService,\n messageSender: MessageSender,\n private policyService: InternalPolicyService,\n sendService: InternalSendService,\n logService: LogService,\n private keyConnectorService: KeyConnectorService,\n stateService: StateService,\n private providerService: ProviderService,\n folderApiService: FolderApiServiceAbstraction,\n private organizationService: InternalOrganizationServiceAbstraction,\n sendApiService: SendApiService,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n private avatarService: AvatarService,\n private logoutCallback: (logoutReason: LogoutReason, userId?: UserId) => Promise,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n private tokenService: TokenService,\n authService: AuthService,\n ) {\n super(\n stateService,\n folderService,\n folderApiService,\n messageSender,\n logService,\n cipherService,\n collectionService,\n apiService,\n accountService,\n authService,\n sendService,\n sendApiService,\n );\n }\n\n @sequentialize(() => \"fullSync\")\n override async fullSync(forceSync: boolean, allowThrowOnError = false): Promise {\n this.syncStarted();\n const isAuthenticated = await this.stateService.getIsAuthenticated();\n if (!isAuthenticated) {\n return this.syncCompleted(false);\n }\n\n const now = new Date();\n let needsSync = false;\n try {\n needsSync = await this.needsSyncing(forceSync);\n } catch (e) {\n if (allowThrowOnError) {\n this.syncCompleted(false);\n throw e;\n }\n }\n\n if (!needsSync) {\n await this.setLastSync(now);\n return this.syncCompleted(false);\n }\n\n try {\n await this.apiService.refreshIdentityToken();\n const response = await this.apiService.getSync();\n\n await this.syncProfile(response.profile);\n await this.syncFolders(response.folders);\n await this.syncCollections(response.collections);\n await this.syncCiphers(response.ciphers);\n await this.syncSends(response.sends);\n await this.syncSettings(response.domains);\n await this.syncPolicies(response.policies);\n\n await this.setLastSync(now);\n return this.syncCompleted(true);\n } catch (e) {\n if (allowThrowOnError) {\n this.syncCompleted(false);\n throw e;\n } else {\n return this.syncCompleted(false);\n }\n }\n }\n\n private async needsSyncing(forceSync: boolean) {\n if (forceSync) {\n return true;\n }\n\n const lastSync = await this.getLastSync();\n if (lastSync == null || lastSync.getTime() === 0) {\n return true;\n }\n\n const response = await this.apiService.getAccountRevisionDate();\n if (response < 0 && this.logoutCallback) {\n // Account was deleted, log out now\n await this.logoutCallback(\"accountDeleted\");\n }\n\n if (new Date(response) <= lastSync) {\n return false;\n }\n return true;\n }\n\n private async syncProfile(response: ProfileResponse) {\n const stamp = await this.tokenService.getSecurityStamp(response.id);\n if (stamp != null && stamp !== response.securityStamp) {\n if (this.logoutCallback != null) {\n await this.logoutCallback(\"invalidSecurityStamp\");\n }\n\n throw new Error(\"Stamp has changed\");\n }\n\n await this.cryptoService.setMasterKeyEncryptedUserKey(response.key);\n await this.cryptoService.setPrivateKey(response.privateKey, response.id);\n await this.cryptoService.setProviderKeys(response.providers, response.id);\n await this.cryptoService.setOrgKeys(\n response.organizations,\n response.providerOrganizations,\n response.id,\n );\n await this.avatarService.setSyncAvatarColor(response.id, response.avatarColor);\n await this.tokenService.setSecurityStamp(response.securityStamp, response.id);\n await this.accountService.setAccountEmailVerified(response.id, response.emailVerified);\n\n await this.billingAccountProfileStateService.setHasPremium(\n response.premiumPersonally,\n response.premiumFromOrganization,\n );\n await this.keyConnectorService.setUsesKeyConnector(response.usesKeyConnector);\n\n await this.setForceSetPasswordReasonIfNeeded(response);\n\n const providers: { [id: string]: ProviderData } = {};\n response.providers.forEach((p) => {\n providers[p.id] = new ProviderData(p);\n });\n\n await this.providerService.save(providers);\n\n await this.syncProfileOrganizations(response);\n\n if (await this.keyConnectorService.userNeedsMigration()) {\n await this.keyConnectorService.setConvertAccountRequired(true);\n this.messageSender.send(\"convertAccountToKeyConnector\");\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.keyConnectorService.removeConvertAccountRequired();\n }\n }\n\n private async setForceSetPasswordReasonIfNeeded(profileResponse: ProfileResponse) {\n // The `forcePasswordReset` flag indicates an admin has reset the user's password and must be updated\n if (profileResponse.forcePasswordReset) {\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.AdminForcePasswordReset,\n profileResponse.id,\n );\n }\n\n const userDecryptionOptions = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptionsById$(profileResponse.id),\n );\n\n if (userDecryptionOptions === null || userDecryptionOptions === undefined) {\n this.logService.error(\"Sync: Account decryption options are null or undefined.\");\n }\n\n // Even though TDE users should only be in a single org (per single org policy), check\n // through all orgs for the manageResetPassword permission. If they have it in any org,\n // they should be forced to set a password.\n let hasManageResetPasswordPermission = false;\n for (const org of profileResponse.organizations) {\n const isAdmin = org.type === OrganizationUserType.Admin;\n const isOwner = org.type === OrganizationUserType.Owner;\n\n // Note: apparently permissions only come down populated for custom roles.\n if (isAdmin || isOwner || (org.permissions && org.permissions.manageResetPassword)) {\n hasManageResetPasswordPermission = true;\n break;\n }\n }\n\n if (\n userDecryptionOptions.trustedDeviceOption !== undefined &&\n !userDecryptionOptions.hasMasterPassword &&\n hasManageResetPasswordPermission\n ) {\n // TDE user w/out MP went from having no password reset permission to having it.\n // Must set the force password reset reason so the auth guard will redirect to the set password page.\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n userId,\n );\n }\n }\n\n private async syncProfileOrganizations(response: ProfileResponse) {\n const organizations: { [id: string]: OrganizationData } = {};\n response.organizations.forEach((o) => {\n organizations[o.id] = new OrganizationData(o, {\n isMember: true,\n isProviderUser: false,\n });\n });\n\n response.providerOrganizations.forEach((o) => {\n if (organizations[o.id] == null) {\n organizations[o.id] = new OrganizationData(o, {\n isMember: false,\n isProviderUser: true,\n });\n } else {\n organizations[o.id].isProviderUser = true;\n }\n });\n\n await this.organizationService.replace(organizations);\n }\n\n private async syncFolders(response: FolderResponse[]) {\n const folders: { [id: string]: FolderData } = {};\n response.forEach((f) => {\n folders[f.id] = new FolderData(f);\n });\n return await this.folderService.replace(folders);\n }\n\n private async syncCollections(response: CollectionDetailsResponse[]) {\n const collections: { [id: string]: CollectionData } = {};\n response.forEach((c) => {\n collections[c.id] = new CollectionData(c);\n });\n return await this.collectionService.replace(collections);\n }\n\n private async syncCiphers(response: CipherResponse[]) {\n const ciphers: { [id: string]: CipherData } = {};\n response.forEach((c) => {\n ciphers[c.id] = new CipherData(c);\n });\n return await this.cipherService.replace(ciphers);\n }\n\n private async syncSends(response: SendResponse[]) {\n const sends: { [id: string]: SendData } = {};\n response.forEach((s) => {\n sends[s.id] = new SendData(s);\n });\n return await this.sendService.replace(sends);\n }\n\n private async syncSettings(response: DomainsResponse) {\n let eqDomains: string[][] = [];\n if (response != null && response.equivalentDomains != null) {\n eqDomains = eqDomains.concat(response.equivalentDomains);\n }\n\n if (response != null && response.globalEquivalentDomains != null) {\n response.globalEquivalentDomains.forEach((global) => {\n if (global.domains.length > 0) {\n eqDomains.push(global.domains);\n }\n });\n }\n\n return this.domainSettingsService.setEquivalentDomains(eqDomains);\n }\n\n private async syncPolicies(response: PolicyResponse[]) {\n const policies: { [id: string]: PolicyData } = {};\n if (response != null) {\n response.forEach((p) => {\n policies[p.id] = new PolicyData(p);\n });\n }\n return await this.policyService.replace(policies);\n }\n}\n","import { BillingSyncConfigApi } from \"../../../billing/models/api/billing-sync-config.api\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationConnectionType } from \"../../enums\";\nimport { ScimConfigApi } from \"../api/scim-config.api\";\n\n/**API response config types for OrganizationConnectionResponse */\nexport type OrganizationConnectionConfigApis = BillingSyncConfigApi | ScimConfigApi;\n\nexport class OrganizationConnectionResponse<\n TConfig extends OrganizationConnectionConfigApis,\n> extends BaseResponse {\n id: string;\n type: OrganizationConnectionType;\n organizationId: string;\n enabled: boolean;\n config: TConfig;\n\n constructor(response: any, configType: { new (response: any): TConfig }) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.type = this.getResponseProperty(\"Type\");\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.enabled = this.getResponseProperty(\"Enabled\");\n const rawConfig = this.getResponseProperty(\"Config\");\n this.config = rawConfig == null ? null : new configType(rawConfig);\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { CipherResponse } from \"../../../vault/models/response/cipher.response\";\nimport { CollectionResponse } from \"../../../vault/models/response/collection.response\";\n\nexport class OrganizationExportResponse extends BaseResponse {\n collections: CollectionResponse[];\n ciphers: CipherResponse[];\n\n constructor(response: any) {\n super(response);\n const collections = this.getResponseProperty(\"Collections\");\n if (collections != null) {\n this.collections = collections.map((c: any) => new CollectionResponse(c));\n }\n const ciphers = this.getResponseProperty(\"Ciphers\");\n if (ciphers != null) {\n this.ciphers = ciphers.map((c: any) => new CipherResponse(c));\n }\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationSponsorshipSyncStatusResponse extends BaseResponse {\n lastSyncDate?: Date;\n\n constructor(response: any) {\n super(response);\n const lastSyncDate = this.getResponseProperty(\"LastSyncDate\");\n if (lastSyncDate) {\n this.lastSyncDate = new Date(lastSyncDate);\n }\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class ProviderOrganizationResponse extends BaseResponse {\n id: string;\n providerId: string;\n organizationId: string;\n key: string;\n settings: string;\n creationDate: string;\n revisionDate: string;\n userCount: number;\n seats?: number;\n occupiedSeats?: number;\n remainingSeats?: number;\n plan?: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.providerId = this.getResponseProperty(\"ProviderId\");\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.key = this.getResponseProperty(\"Key\");\n this.settings = this.getResponseProperty(\"Settings\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n this.userCount = this.getResponseProperty(\"UserCount\");\n this.seats = this.getResponseProperty(\"Seats\");\n this.occupiedSeats = this.getResponseProperty(\"OccupiedSeats\");\n this.remainingSeats = this.getResponseProperty(\"RemainingSeats\");\n this.plan = this.getResponseProperty(\"Plan\");\n }\n}\n\nexport class ProviderOrganizationOrganizationDetailsResponse extends ProviderOrganizationResponse {\n organizationName: string;\n\n constructor(response: any) {\n super(response);\n this.organizationName = this.getResponseProperty(\"OrganizationName\");\n }\n}\n","import { OrganizationUserBulkPublicKeyResponse } from \"../../../abstractions/organization-user/responses\";\n\nexport class ProviderUserBulkPublicKeyResponse extends OrganizationUserBulkPublicKeyResponse {}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class ProviderUserBulkResponse extends BaseResponse {\n id: string;\n error: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.error = this.getResponseProperty(\"Error\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { ProviderUserStatusType, ProviderUserType } from \"../../../enums\";\nimport { PermissionsApi } from \"../../api/permissions.api\";\n\nexport class ProviderUserResponse extends BaseResponse {\n id: string;\n userId: string;\n type: ProviderUserType;\n status: ProviderUserStatusType;\n permissions: PermissionsApi;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.type = this.getResponseProperty(\"Type\");\n this.status = this.getResponseProperty(\"Status\");\n this.permissions = new PermissionsApi(this.getResponseProperty(\"Permissions\"));\n }\n}\n\nexport class ProviderUserUserDetailsResponse extends ProviderUserResponse {\n name: string;\n email: string;\n\n constructor(response: any) {\n super(response);\n this.name = this.getResponseProperty(\"Name\");\n this.email = this.getResponseProperty(\"Email\");\n }\n}\n","import { DeviceType } from \"../../../enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nconst RequestTimeOut = 60000 * 15; //15 Minutes\n\nexport class AuthRequestResponse extends BaseResponse {\n id: string;\n publicKey: string;\n requestDeviceType: DeviceType;\n requestIpAddress: string;\n key: string;\n masterPasswordHash: string;\n creationDate: string;\n requestApproved?: boolean;\n responseDate?: string;\n isAnswered: boolean;\n isExpired: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.publicKey = this.getResponseProperty(\"PublicKey\");\n this.requestDeviceType = this.getResponseProperty(\"RequestDeviceType\");\n this.requestIpAddress = this.getResponseProperty(\"RequestIpAddress\");\n this.key = this.getResponseProperty(\"Key\");\n this.masterPasswordHash = this.getResponseProperty(\"MasterPasswordHash\");\n this.creationDate = this.getResponseProperty(\"CreationDate\");\n this.requestApproved = this.getResponseProperty(\"RequestApproved\");\n this.responseDate = this.getResponseProperty(\"ResponseDate\");\n\n const requestDate = new Date(this.creationDate);\n const requestDateUTC = Date.UTC(\n requestDate.getUTCFullYear(),\n requestDate.getUTCMonth(),\n requestDate.getDate(),\n requestDate.getUTCHours(),\n requestDate.getUTCMinutes(),\n requestDate.getUTCSeconds(),\n requestDate.getUTCMilliseconds(),\n );\n\n const dateNow = new Date(Date.now());\n const dateNowUTC = Date.UTC(\n dateNow.getUTCFullYear(),\n dateNow.getUTCMonth(),\n dateNow.getDate(),\n dateNow.getUTCHours(),\n dateNow.getUTCMinutes(),\n dateNow.getUTCSeconds(),\n dateNow.getUTCMilliseconds(),\n );\n\n this.isExpired = dateNowUTC - requestDateUTC >= RequestTimeOut;\n this.isAnswered = this.requestApproved != null && this.responseDate != null;\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class DeviceVerificationResponse extends BaseResponse {\n isDeviceVerificationSectionEnabled: boolean;\n unknownDeviceVerificationEnabled: boolean;\n\n constructor(response: any) {\n super(response);\n this.isDeviceVerificationSectionEnabled = this.getResponseProperty(\n \"IsDeviceVerificationSectionEnabled\",\n );\n this.unknownDeviceVerificationEnabled = this.getResponseProperty(\n \"UnknownDeviceVerificationEnabled\",\n );\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class KeyConnectorUserKeyResponse extends BaseResponse {\n key: string;\n\n constructor(response: any) {\n super(response);\n this.key = this.getResponseProperty(\"Key\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { KdfType } from \"../../../platform/enums\";\n\nexport class PreloginResponse extends BaseResponse {\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n\n constructor(response: any) {\n super(response);\n this.kdf = this.getResponseProperty(\"Kdf\");\n this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { ICaptchaProtectedResponse } from \"./captcha-protected.response\";\n\nexport class RegisterResponse extends BaseResponse implements ICaptchaProtectedResponse {\n captchaBypassToken: string;\n\n constructor(response: any) {\n super(response);\n this.captchaBypassToken = this.getResponseProperty(\"CaptchaBypassToken\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SsoPreValidateResponse extends BaseResponse {\n token: string;\n\n constructor(response: any) {\n super(response);\n this.token = this.getResponseProperty(\"Token\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorAuthenticatorResponse extends BaseResponse {\n enabled: boolean;\n key: string;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.key = this.getResponseProperty(\"Key\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorDuoResponse extends BaseResponse {\n enabled: boolean;\n host: string;\n clientSecret: string;\n clientId: string;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.host = this.getResponseProperty(\"Host\");\n this.clientSecret = this.getResponseProperty(\"ClientSecret\");\n this.clientId = this.getResponseProperty(\"ClientId\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorEmailResponse extends BaseResponse {\n enabled: boolean;\n email: string;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.email = this.getResponseProperty(\"Email\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nexport class TwoFactorProviderResponse extends BaseResponse {\n enabled: boolean;\n type: TwoFactorProviderType;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.type = this.getResponseProperty(\"Type\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorRecoverResponse extends BaseResponse {\n code: string;\n\n constructor(response: any) {\n super(response);\n this.code = this.getResponseProperty(\"Code\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorYubiKeyResponse extends BaseResponse {\n enabled: boolean;\n key1: string;\n key2: string;\n key3: string;\n key4: string;\n key5: string;\n nfc: boolean;\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.key1 = this.getResponseProperty(\"Key1\");\n this.key2 = this.getResponseProperty(\"Key2\");\n this.key3 = this.getResponseProperty(\"Key3\");\n this.key4 = this.getResponseProperty(\"Key4\");\n this.key5 = this.getResponseProperty(\"Key5\");\n this.nfc = this.getResponseProperty(\"Nfc\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { BillingSourceResponse } from \"./billing.response\";\n\nexport class BillingPaymentResponse extends BaseResponse {\n balance: number;\n paymentSource: BillingSourceResponse;\n\n constructor(response: any) {\n super(response);\n this.balance = this.getResponseProperty(\"Balance\");\n const paymentSource = this.getResponseProperty(\"PaymentSource\");\n this.paymentSource = paymentSource == null ? null : new BillingSourceResponse(paymentSource);\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TaxRateResponse extends BaseResponse {\n id: string;\n country: string;\n state: string;\n postalCode: string;\n rate: number;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.country = this.getResponseProperty(\"Country\");\n this.state = this.getResponseProperty(\"State\");\n this.postalCode = this.getResponseProperty(\"PostalCode\");\n this.rate = this.getResponseProperty(\"Rate\");\n }\n}\n","export class CollectionBulkDeleteRequest {\n ids: string[];\n\n constructor(ids: string[]) {\n this.ids = ids == null ? [] : ids;\n }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class BreachAccountResponse extends BaseResponse {\n addedDate: string;\n breachDate: string;\n dataClasses: string[];\n description: string;\n domain: string;\n isActive: boolean;\n isVerified: boolean;\n logoPath: string;\n modifiedDate: string;\n name: string;\n pwnCount: number;\n title: string;\n\n constructor(response: any) {\n super(response);\n this.addedDate = this.getResponseProperty(\"AddedDate\");\n this.breachDate = this.getResponseProperty(\"BreachDate\");\n this.dataClasses = this.getResponseProperty(\"DataClasses\");\n this.description = this.getResponseProperty(\"Description\");\n this.domain = this.getResponseProperty(\"Domain\");\n this.isActive = this.getResponseProperty(\"IsActive\");\n this.isVerified = this.getResponseProperty(\"IsVerified\");\n this.logoPath = this.getResponseProperty(\"LogoPath\");\n this.modifiedDate = this.getResponseProperty(\"ModifiedDate\");\n this.name = this.getResponseProperty(\"Name\");\n this.pwnCount = this.getResponseProperty(\"PwnCount\");\n this.title = this.getResponseProperty(\"Title\");\n }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class UserKeyResponse extends BaseResponse {\n userId: string;\n publicKey: string;\n\n constructor(response: any) {\n super(response);\n this.userId = this.getResponseProperty(\"UserId\");\n this.publicKey = this.getResponseProperty(\"PublicKey\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { FileUploadType } from \"../../../platform/enums\";\n\nimport { CipherResponse } from \"./cipher.response\";\n\nexport class AttachmentUploadDataResponse extends BaseResponse {\n attachmentId: string;\n fileUploadType: FileUploadType;\n cipherResponse: CipherResponse;\n cipherMiniResponse: CipherResponse;\n url: string = null;\n constructor(response: any) {\n super(response);\n this.attachmentId = this.getResponseProperty(\"AttachmentId\");\n this.fileUploadType = this.getResponseProperty(\"FileUploadType\");\n const cipherResponse = this.getResponseProperty(\"CipherResponse\");\n const cipherMiniResponse = this.getResponseProperty(\"CipherMiniResponse\");\n this.cipherResponse = cipherResponse == null ? null : new CipherResponse(cipherResponse);\n this.cipherMiniResponse =\n cipherMiniResponse == null ? null : new CipherResponse(cipherMiniResponse);\n this.url = this.getResponseProperty(\"Url\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { CipherResponse } from \"./cipher.response\";\n\nexport class OptionalCipherResponse extends BaseResponse {\n unavailable: boolean;\n cipher?: CipherResponse;\n\n constructor(response: any) {\n super(response);\n this.unavailable = this.getResponseProperty(\"Unavailable\");\n this.cipher = new CipherResponse(this.getResponseProperty(\"Cipher\"));\n }\n}\n","import { ApiService } from \"../abstractions/api.service\";\nimport { AuditService as AuditServiceAbstraction } from \"../abstractions/audit.service\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { ErrorResponse } from \"../models/response/error.response\";\nimport { CryptoFunctionService } from \"../platform/abstractions/crypto-function.service\";\nimport { throttle } from \"../platform/misc/throttle\";\nimport { Utils } from \"../platform/misc/utils\";\n\nconst PwnedPasswordsApi = \"https://api.pwnedpasswords.com/range/\";\n\nexport class AuditService implements AuditServiceAbstraction {\n constructor(\n private cryptoFunctionService: CryptoFunctionService,\n private apiService: ApiService,\n ) {}\n\n @throttle(100, () => \"passwordLeaked\")\n async passwordLeaked(password: string): Promise {\n const hashBytes = await this.cryptoFunctionService.hash(password, \"sha1\");\n const hash = Utils.fromBufferToHex(hashBytes).toUpperCase();\n const hashStart = hash.substr(0, 5);\n const hashEnding = hash.substr(5);\n\n const response = await this.apiService.nativeFetch(new Request(PwnedPasswordsApi + hashStart));\n const leakedHashes = await response.text();\n const match = leakedHashes.split(/\\r?\\n/).find((v) => {\n return v.split(\":\")[0] === hashEnding;\n });\n\n return match != null ? parseInt(match.split(\":\")[1], 10) : 0;\n }\n\n async breachedAccounts(username: string): Promise {\n try {\n return await this.apiService.getHibpBreach(username);\n } catch (e) {\n const error = e as ErrorResponse;\n if (error.statusCode === 404) {\n return [];\n }\n throw new Error();\n }\n }\n}\n","/**\n * Use as a Decorator on async functions, it will limit how many times the function can be\n * in-flight at a time.\n *\n * Calls beyond the limit will be queued, and run when one of the active calls finishes\n */\nexport function throttle(limit: number, throttleKey: (args: any[]) => string) {\n return (\n target: any,\n propertyKey: string | symbol,\n descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise>,\n ) => {\n const originalMethod: () => Promise = descriptor.value;\n const allThrottles = new Map void)[]>>();\n\n const getThrottles = (obj: any) => {\n let throttles = allThrottles.get(obj);\n if (throttles != null) {\n return throttles;\n }\n throttles = new Map void)[]>();\n allThrottles.set(obj, throttles);\n return throttles;\n };\n\n return {\n value: function (...args: any[]) {\n const throttles = getThrottles(this);\n const argsThrottleKey = throttleKey(args);\n let queue = throttles.get(argsThrottleKey);\n if (queue == null) {\n queue = [];\n throttles.set(argsThrottleKey, queue);\n }\n\n return new Promise((resolve, reject) => {\n const exec = () => {\n const onFinally = () => {\n queue.splice(queue.indexOf(exec), 1);\n if (queue.length >= limit) {\n queue[limit - 1]();\n } else if (queue.length === 0) {\n throttles.delete(argsThrottleKey);\n if (throttles.size === 0) {\n allThrottles.delete(this);\n }\n }\n };\n originalMethod\n .apply(this, args)\n .then((val: any) => {\n onFinally();\n return val;\n })\n .catch((err: any) => {\n onFinally();\n throw err;\n })\n .then(resolve, reject);\n };\n queue.push(exec);\n if (queue.length <= limit) {\n exec();\n }\n });\n },\n };\n };\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { EventType } from \"../../enums\";\n\nexport class EventData {\n type: EventType;\n cipherId: string;\n date: string;\n organizationId: string;\n\n static fromJSON(obj: Jsonify): EventData {\n return Object.assign(new EventData(), obj);\n }\n}\n","import { EventData } from \"../../models/data/event.data\";\nimport { EVENT_COLLECTION_DISK, UserKeyDefinition } from \"../../platform/state\";\n\nexport const EVENT_COLLECTION = UserKeyDefinition.array(\n EVENT_COLLECTION_DISK,\n \"events\",\n {\n deserializer: (s) => EventData.fromJSON(s),\n clearOn: [\"logout\"],\n },\n);\n","import { EventType } from \"../../enums\";\n\nexport class EventRequest {\n type: EventType;\n cipherId: string;\n date: string;\n organizationId: string;\n}\n","import * as lunr from \"lunr\";\nimport { Observable, firstValueFrom, map } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { SearchService as SearchServiceAbstraction } from \"../abstractions/search.service\";\nimport { UriMatchStrategy } from \"../models/domain/domain-service\";\nimport { I18nService } from \"../platform/abstractions/i18n.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport {\n ActiveUserState,\n StateProvider,\n UserKeyDefinition,\n VAULT_SEARCH_MEMORY,\n} from \"../platform/state\";\nimport { SendView } from \"../tools/send/models/view/send.view\";\nimport { IndexedEntityId } from \"../types/guid\";\nimport { FieldType } from \"../vault/enums\";\nimport { CipherType } from \"../vault/enums/cipher-type\";\nimport { CipherView } from \"../vault/models/view/cipher.view\";\n\nexport type SerializedLunrIndex = {\n version: string;\n fields: string[];\n fieldVectors: [string, number[]];\n invertedIndex: any[];\n pipeline: string[];\n};\n\n/**\n * The `KeyDefinition` for accessing the search index in application state.\n * The key definition is configured to clear the index when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEX = new UserKeyDefinition(\n VAULT_SEARCH_MEMORY,\n \"searchIndex\",\n {\n deserializer: (obj: Jsonify) => obj,\n clearOn: [\"lock\", \"logout\"],\n },\n);\n\n/**\n * The `KeyDefinition` for accessing the ID of the entity currently indexed by Lunr search.\n * The key definition is configured to clear the indexed entity ID when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEXED_ENTITY_ID = new UserKeyDefinition(\n VAULT_SEARCH_MEMORY,\n \"searchIndexedEntityId\",\n {\n deserializer: (obj: Jsonify) => obj,\n clearOn: [\"lock\", \"logout\"],\n },\n);\n\n/**\n * The `KeyDefinition` for accessing the state of Lunr search indexing, indicating whether the Lunr search index is currently being built or updating.\n * The key definition is configured to clear the indexing state when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEXING = new UserKeyDefinition(\n VAULT_SEARCH_MEMORY,\n \"isIndexing\",\n {\n deserializer: (obj: Jsonify) => obj,\n clearOn: [\"lock\", \"logout\"],\n },\n);\n\nexport class SearchService implements SearchServiceAbstraction {\n private static registeredPipeline = false;\n\n private searchIndexState: ActiveUserState =\n this.stateProvider.getActive(LUNR_SEARCH_INDEX);\n private readonly index$: Observable = this.searchIndexState.state$.pipe(\n map((searchIndex) => (searchIndex ? lunr.Index.load(searchIndex) : null)),\n );\n\n private searchIndexEntityIdState: ActiveUserState = this.stateProvider.getActive(\n LUNR_SEARCH_INDEXED_ENTITY_ID,\n );\n readonly indexedEntityId$: Observable =\n this.searchIndexEntityIdState.state$.pipe(map((id) => id));\n\n private searchIsIndexingState: ActiveUserState =\n this.stateProvider.getActive(LUNR_SEARCH_INDEXING);\n private readonly searchIsIndexing$: Observable = this.searchIsIndexingState.state$.pipe(\n map((indexing) => indexing ?? false),\n );\n\n private readonly immediateSearchLocales: string[] = [\"zh-CN\", \"zh-TW\", \"ja\", \"ko\", \"vi\"];\n private readonly defaultSearchableMinLength: number = 2;\n private searchableMinLength: number = this.defaultSearchableMinLength;\n\n constructor(\n private logService: LogService,\n private i18nService: I18nService,\n private stateProvider: StateProvider,\n ) {\n this.i18nService.locale$.subscribe((locale) => {\n if (this.immediateSearchLocales.indexOf(locale) !== -1) {\n this.searchableMinLength = 1;\n } else {\n this.searchableMinLength = this.defaultSearchableMinLength;\n }\n });\n\n // Currently have to ensure this is only done a single time. Lunr allows you to register a function\n // multiple times but they will add a warning message to the console. The way they do that breaks when ran on a service worker.\n if (!SearchService.registeredPipeline) {\n SearchService.registeredPipeline = true;\n //register lunr pipeline function\n lunr.Pipeline.registerFunction(this.normalizeAccentsPipelineFunction, \"normalizeAccents\");\n }\n }\n\n async clearIndex(): Promise {\n await this.searchIndexEntityIdState.update(() => null);\n await this.searchIndexState.update(() => null);\n await this.searchIsIndexingState.update(() => null);\n }\n\n async isSearchable(query: string): Promise {\n query = SearchService.normalizeSearchQuery(query);\n const index = await this.getIndexForSearch();\n const notSearchable =\n query == null ||\n (index == null && query.length < this.searchableMinLength) ||\n (index != null && query.length < this.searchableMinLength && query.indexOf(\">\") !== 0);\n return !notSearchable;\n }\n\n async indexCiphers(ciphers: CipherView[], indexedEntityId?: string): Promise {\n if (await this.getIsIndexing()) {\n return;\n }\n\n await this.setIsIndexing(true);\n await this.setIndexedEntityIdForSearch(indexedEntityId as IndexedEntityId);\n const builder = new lunr.Builder();\n builder.pipeline.add(this.normalizeAccentsPipelineFunction);\n builder.ref(\"id\");\n builder.field(\"shortid\", { boost: 100, extractor: (c: CipherView) => c.id.substr(0, 8) });\n builder.field(\"name\", {\n boost: 10,\n });\n builder.field(\"subtitle\", {\n boost: 5,\n extractor: (c: CipherView) => {\n if (c.subTitle != null && c.type === CipherType.Card) {\n return c.subTitle.replace(/\\*/g, \"\");\n }\n return c.subTitle;\n },\n });\n builder.field(\"notes\");\n builder.field(\"login.username\", {\n extractor: (c: CipherView) =>\n c.type === CipherType.Login && c.login != null ? c.login.username : null,\n });\n builder.field(\"login.uris\", { boost: 2, extractor: (c: CipherView) => this.uriExtractor(c) });\n builder.field(\"fields\", { extractor: (c: CipherView) => this.fieldExtractor(c, false) });\n builder.field(\"fields_joined\", { extractor: (c: CipherView) => this.fieldExtractor(c, true) });\n builder.field(\"attachments\", {\n extractor: (c: CipherView) => this.attachmentExtractor(c, false),\n });\n builder.field(\"attachments_joined\", {\n extractor: (c: CipherView) => this.attachmentExtractor(c, true),\n });\n builder.field(\"organizationid\", { extractor: (c: CipherView) => c.organizationId });\n ciphers = ciphers || [];\n ciphers.forEach((c) => builder.add(c));\n const index = builder.build();\n\n await this.setIndexForSearch(index.toJSON() as SerializedLunrIndex);\n\n await this.setIsIndexing(false);\n\n this.logService.info(\"Finished search indexing\");\n }\n\n async searchCiphers(\n query: string,\n filter: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[] = null,\n ciphers: CipherView[],\n ): Promise {\n const results: CipherView[] = [];\n if (query != null) {\n query = SearchService.normalizeSearchQuery(query.trim().toLowerCase());\n }\n if (query === \"\") {\n query = null;\n }\n\n if (ciphers == null) {\n ciphers = [];\n }\n\n if (filter != null && Array.isArray(filter) && filter.length > 0) {\n ciphers = ciphers.filter((c) => filter.every((f) => f == null || f(c)));\n } else if (filter != null) {\n ciphers = ciphers.filter(filter as (cipher: CipherView) => boolean);\n }\n\n if (!(await this.isSearchable(query))) {\n return ciphers;\n }\n\n if (await this.getIsIndexing()) {\n await new Promise((r) => setTimeout(r, 250));\n if (await this.getIsIndexing()) {\n await new Promise((r) => setTimeout(r, 500));\n }\n }\n\n const index = await this.getIndexForSearch();\n if (index == null) {\n // Fall back to basic search if index is not available\n return this.searchCiphersBasic(ciphers, query);\n }\n\n const ciphersMap = new Map();\n ciphers.forEach((c) => ciphersMap.set(c.id, c));\n\n let searchResults: lunr.Index.Result[] = null;\n const isQueryString = query != null && query.length > 1 && query.indexOf(\">\") === 0;\n if (isQueryString) {\n try {\n searchResults = index.search(query.substr(1).trim());\n } catch (e) {\n this.logService.error(e);\n }\n } else {\n const soWild = lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING;\n searchResults = index.query((q) => {\n lunr.tokenizer(query).forEach((token) => {\n const t = token.toString();\n q.term(t, { fields: [\"name\"], wildcard: soWild });\n q.term(t, { fields: [\"subtitle\"], wildcard: soWild });\n q.term(t, { fields: [\"login.uris\"], wildcard: soWild });\n q.term(t, {});\n });\n });\n }\n\n if (searchResults != null) {\n searchResults.forEach((r) => {\n if (ciphersMap.has(r.ref)) {\n results.push(ciphersMap.get(r.ref));\n }\n });\n }\n return results;\n }\n\n searchCiphersBasic(ciphers: CipherView[], query: string, deleted = false) {\n query = SearchService.normalizeSearchQuery(query.trim().toLowerCase());\n return ciphers.filter((c) => {\n if (deleted !== c.isDeleted) {\n return false;\n }\n if (c.name != null && c.name.toLowerCase().indexOf(query) > -1) {\n return true;\n }\n if (query.length >= 8 && c.id.startsWith(query)) {\n return true;\n }\n if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(query) > -1) {\n return true;\n }\n if (\n c.login &&\n c.login.hasUris &&\n c.login.uris.some((loginUri) => loginUri?.uri?.toLowerCase().indexOf(query) > -1)\n ) {\n return true;\n }\n return false;\n });\n }\n\n searchSends(sends: SendView[], query: string) {\n query = SearchService.normalizeSearchQuery(query.trim().toLocaleLowerCase());\n if (query === null) {\n return sends;\n }\n const sendsMatched: SendView[] = [];\n const lowPriorityMatched: SendView[] = [];\n sends.forEach((s) => {\n if (s.name != null && s.name.toLowerCase().indexOf(query) > -1) {\n sendsMatched.push(s);\n } else if (\n query.length >= 8 &&\n (s.id.startsWith(query) ||\n s.accessId.toLocaleLowerCase().startsWith(query) ||\n (s.file?.id != null && s.file.id.startsWith(query)))\n ) {\n lowPriorityMatched.push(s);\n } else if (s.notes != null && s.notes.toLowerCase().indexOf(query) > -1) {\n lowPriorityMatched.push(s);\n } else if (s.text?.text != null && s.text.text.toLowerCase().indexOf(query) > -1) {\n lowPriorityMatched.push(s);\n } else if (s.file?.fileName != null && s.file.fileName.toLowerCase().indexOf(query) > -1) {\n lowPriorityMatched.push(s);\n }\n });\n return sendsMatched.concat(lowPriorityMatched);\n }\n\n async getIndexForSearch(): Promise {\n return await firstValueFrom(this.index$);\n }\n\n private async setIndexForSearch(index: SerializedLunrIndex): Promise {\n await this.searchIndexState.update(() => index);\n }\n\n private async setIndexedEntityIdForSearch(indexedEntityId: IndexedEntityId): Promise {\n await this.searchIndexEntityIdState.update(() => indexedEntityId);\n }\n\n private async setIsIndexing(indexing: boolean): Promise {\n await this.searchIsIndexingState.update(() => indexing);\n }\n\n private async getIsIndexing(): Promise {\n return await firstValueFrom(this.searchIsIndexing$);\n }\n\n private fieldExtractor(c: CipherView, joined: boolean) {\n if (!c.hasFields) {\n return null;\n }\n let fields: string[] = [];\n c.fields.forEach((f) => {\n if (f.name != null) {\n fields.push(f.name);\n }\n if (f.type === FieldType.Text && f.value != null) {\n fields.push(f.value);\n }\n });\n fields = fields.filter((f) => f.trim() !== \"\");\n if (fields.length === 0) {\n return null;\n }\n return joined ? fields.join(\" \") : fields;\n }\n\n private attachmentExtractor(c: CipherView, joined: boolean) {\n if (!c.hasAttachments) {\n return null;\n }\n let attachments: string[] = [];\n c.attachments.forEach((a) => {\n if (a != null && a.fileName != null) {\n if (joined && a.fileName.indexOf(\".\") > -1) {\n attachments.push(a.fileName.substr(0, a.fileName.lastIndexOf(\".\")));\n } else {\n attachments.push(a.fileName);\n }\n }\n });\n attachments = attachments.filter((f) => f.trim() !== \"\");\n if (attachments.length === 0) {\n return null;\n }\n return joined ? attachments.join(\" \") : attachments;\n }\n\n private uriExtractor(c: CipherView) {\n if (c.type !== CipherType.Login || c.login == null || !c.login.hasUris) {\n return null;\n }\n const uris: string[] = [];\n c.login.uris.forEach((u) => {\n if (u.uri == null || u.uri === \"\") {\n return;\n }\n if (u.hostname != null) {\n uris.push(u.hostname);\n return;\n }\n let uri = u.uri;\n if (u.match !== UriMatchStrategy.RegularExpression) {\n const protocolIndex = uri.indexOf(\"://\");\n if (protocolIndex > -1) {\n uri = uri.substr(protocolIndex + 3);\n }\n const queryIndex = uri.search(/\\?|&|#/);\n if (queryIndex > -1) {\n uri = uri.substring(0, queryIndex);\n }\n }\n uris.push(uri);\n });\n return uris.length > 0 ? uris : null;\n }\n\n private normalizeAccentsPipelineFunction(token: lunr.Token): any {\n const searchableFields = [\"name\", \"login.username\", \"subtitle\", \"notes\"];\n const fields = (token as any).metadata[\"fields\"];\n const checkFields = fields.every((i: any) => searchableFields.includes(i));\n\n if (checkFields) {\n return SearchService.normalizeSearchQuery(token.toString());\n }\n\n return token;\n }\n\n // Remove accents/diacritics characters from text. This regex is equivalent to the Diacritic unicode property escape, i.e. it will match all diacritic characters.\n static normalizeSearchQuery(query: string): string {\n return query?.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n }\n}\n","import { combineLatest, filter, firstValueFrom, map, switchMap, timeout } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { TaskSchedulerService, ScheduledTaskNames } from \"@bitwarden/common/platform/scheduling\";\n\nimport { SearchService } from \"../../abstractions/search.service\";\nimport { VaultTimeoutSettingsService } from \"../../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService as VaultTimeoutServiceAbstraction } from \"../../abstractions/vault-timeout/vault-timeout.service\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../auth/abstractions/master-password.service.abstraction\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { MessagingService } from \"../../platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { StateEventRunnerService } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { CollectionService } from \"../../vault/abstractions/collection.service\";\nimport { FolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\n\nexport class VaultTimeoutService implements VaultTimeoutServiceAbstraction {\n private inited = false;\n\n constructor(\n private accountService: AccountService,\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n private cipherService: CipherService,\n private folderService: FolderService,\n private collectionService: CollectionService,\n protected platformUtilsService: PlatformUtilsService,\n private messagingService: MessagingService,\n private searchService: SearchService,\n private stateService: StateService,\n private authService: AuthService,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n private stateEventRunnerService: StateEventRunnerService,\n private taskSchedulerService: TaskSchedulerService,\n protected logService: LogService,\n private lockedCallback: (userId?: string) => Promise = null,\n private loggedOutCallback: (\n logoutReason: LogoutReason,\n userId?: string,\n ) => Promise = null,\n ) {\n this.taskSchedulerService.registerTaskHandler(\n ScheduledTaskNames.vaultTimeoutCheckInterval,\n () => this.checkVaultTimeout(),\n );\n }\n\n async init(checkOnInterval: boolean) {\n if (this.inited) {\n return;\n }\n\n this.inited = true;\n if (checkOnInterval) {\n this.startCheck();\n }\n }\n\n startCheck() {\n this.checkVaultTimeout().catch((error) => this.logService.error(error));\n this.taskSchedulerService.setInterval(\n ScheduledTaskNames.vaultTimeoutCheckInterval,\n 10 * 1000, // check every 10 seconds\n );\n }\n\n async checkVaultTimeout(): Promise {\n // Get whether or not the view is open a single time so it can be compared for each user\n const isViewOpen = await this.platformUtilsService.isViewOpen();\n\n await firstValueFrom(\n combineLatest([\n this.accountService.activeAccount$,\n this.accountService.accountActivity$,\n ]).pipe(\n switchMap(async ([activeAccount, accountActivity]) => {\n const activeUserId = activeAccount?.id;\n for (const userIdString in accountActivity) {\n const userId = userIdString as UserId;\n if (\n userId != null &&\n (await this.shouldLock(userId, accountActivity[userId], activeUserId, isViewOpen))\n ) {\n await this.executeTimeoutAction(userId);\n }\n }\n }),\n ),\n );\n }\n\n async lock(userId?: UserId): Promise {\n const authed = await this.stateService.getIsAuthenticated({ userId: userId });\n if (!authed) {\n return;\n }\n\n const availableActions = await firstValueFrom(\n this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(userId),\n );\n const supportsLock = availableActions.includes(VaultTimeoutAction.Lock);\n if (!supportsLock) {\n await this.logOut(userId);\n }\n\n const currentUserId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n );\n\n const lockingUserId = userId ?? currentUserId;\n\n // HACK: Start listening for the transition of the locking user from something to the locked state.\n // This is very much a hack to ensure that the authentication status to retrievable right after\n // it does its work. Particularly the `lockedCallback` and `\"locked\"` message. Instead\n // lockedCallback should be deprecated and people should subscribe and react to `authStatusFor$` themselves.\n const lockPromise = firstValueFrom(\n this.authService.authStatusFor$(lockingUserId).pipe(\n filter((authStatus) => authStatus === AuthenticationStatus.Locked),\n timeout({\n first: 5_000,\n with: () => {\n throw new Error(\"The lock process did not complete in a reasonable amount of time.\");\n },\n }),\n ),\n );\n\n if (userId == null || userId === currentUserId) {\n await this.searchService.clearIndex();\n await this.folderService.clearCache();\n await this.collectionService.clearActiveUserCache();\n }\n\n await this.masterPasswordService.clearMasterKey(lockingUserId);\n\n await this.stateService.setUserKeyAutoUnlock(null, { userId: lockingUserId });\n await this.stateService.setCryptoMasterKeyAuto(null, { userId: lockingUserId });\n\n await this.cipherService.clearCache(lockingUserId);\n\n await this.stateEventRunnerService.handleEvent(\"lock\", lockingUserId);\n\n // HACK: Sit here and wait for the the auth status to transition to `Locked`\n // to ensure the message and lockedCallback will get the correct status\n // if/when they call it.\n await lockPromise;\n\n this.messagingService.send(\"locked\", { userId: lockingUserId });\n\n if (this.lockedCallback != null) {\n await this.lockedCallback(userId);\n }\n }\n\n async logOut(userId?: string): Promise {\n if (this.loggedOutCallback != null) {\n await this.loggedOutCallback(\"vaultTimeout\", userId);\n }\n }\n\n private async shouldLock(\n userId: string,\n lastActive: Date,\n activeUserId: string,\n isViewOpen: boolean,\n ): Promise {\n if (isViewOpen && userId === activeUserId) {\n // We know a view is open and this is the currently active user\n // which means they are likely looking at their vault\n // and they should not lock.\n return false;\n }\n\n const authStatus = await this.authService.getAuthStatus(userId);\n if (\n authStatus === AuthenticationStatus.Locked ||\n authStatus === AuthenticationStatus.LoggedOut\n ) {\n return false;\n }\n\n const vaultTimeout = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n );\n\n if (typeof vaultTimeout === \"string\") {\n return false;\n }\n\n if (lastActive == null) {\n return false;\n }\n\n const vaultTimeoutSeconds = vaultTimeout * 60;\n const diffSeconds = (new Date().getTime() - lastActive.getTime()) / 1000;\n return diffSeconds >= vaultTimeoutSeconds;\n }\n\n private async executeTimeoutAction(userId: UserId): Promise {\n const timeoutAction = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n );\n timeoutAction === VaultTimeoutAction.LogOut\n ? await this.logOut(userId)\n : await this.lock(userId);\n }\n}\n","import { SendType } from \"../../enums/send-type\";\nimport { SendFileApi } from \"../api/send-file.api\";\nimport { SendTextApi } from \"../api/send-text.api\";\nimport { Send } from \"../domain/send\";\n\nexport class SendRequest {\n type: SendType;\n fileLength?: number;\n name: string;\n notes: string;\n key: string;\n maxAccessCount?: number;\n expirationDate: string;\n deletionDate: string;\n text: SendTextApi;\n file: SendFileApi;\n password: string;\n disabled: boolean;\n hideEmail: boolean;\n\n constructor(send: Send, fileLength?: number) {\n this.type = send.type;\n this.fileLength = fileLength;\n this.name = send.name ? send.name.encryptedString : null;\n this.notes = send.notes ? send.notes.encryptedString : null;\n this.maxAccessCount = send.maxAccessCount;\n this.expirationDate = send.expirationDate != null ? send.expirationDate.toISOString() : null;\n this.deletionDate = send.deletionDate != null ? send.deletionDate.toISOString() : null;\n this.key = send.key != null ? send.key.encryptedString : null;\n this.password = send.password;\n this.disabled = send.disabled;\n this.hideEmail = send.hideEmail;\n\n switch (this.type) {\n case SendType.Text:\n this.text = new SendTextApi();\n this.text.text = send.text.text != null ? send.text.text.encryptedString : null;\n this.text.hidden = send.text.hidden;\n break;\n case SendType.File:\n this.file = new SendFileApi();\n this.file.fileName = send.file.fileName != null ? send.file.fileName.encryptedString : null;\n break;\n default:\n break;\n }\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendFileApi } from \"../api/send-file.api\";\nimport { SendTextApi } from \"../api/send-text.api\";\n\nexport class SendAccessResponse extends BaseResponse {\n id: string;\n type: SendType;\n name: string;\n file: SendFileApi;\n text: SendTextApi;\n expirationDate: Date;\n creatorIdentifier: string;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.type = this.getResponseProperty(\"Type\");\n this.name = this.getResponseProperty(\"Name\");\n\n const text = this.getResponseProperty(\"Text\");\n if (text != null) {\n this.text = new SendTextApi(text);\n }\n\n const file = this.getResponseProperty(\"File\");\n if (file != null) {\n this.file = new SendFileApi(file);\n }\n\n this.expirationDate = this.getResponseProperty(\"ExpirationDate\");\n this.creatorIdentifier = this.getResponseProperty(\"CreatorIdentifier\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class SendFileDownloadDataResponse extends BaseResponse {\n id: string = null;\n url: string = null;\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.url = this.getResponseProperty(\"Url\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { FileUploadType } from \"../../../../platform/enums\";\n\nimport { SendResponse } from \"./send.response\";\n\nexport class SendFileUploadDataResponse extends BaseResponse {\n fileUploadType: FileUploadType;\n sendResponse: SendResponse;\n url: string = null;\n constructor(response: any) {\n super(response);\n this.fileUploadType = this.getResponseProperty(\"FileUploadType\");\n const sendResponse = this.getResponseProperty(\"SendResponse\");\n this.sendResponse = sendResponse == null ? null : new SendResponse(sendResponse);\n this.url = this.getResponseProperty(\"Url\");\n }\n}\n","import { SEND_DISK, SEND_MEMORY, UserKeyDefinition } from \"../../../platform/state\";\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\n/** Encrypted send state stored on disk */\nexport const SEND_USER_ENCRYPTED = UserKeyDefinition.record(\n SEND_DISK,\n \"sendUserEncrypted\",\n {\n deserializer: (obj: SendData) => obj,\n clearOn: [\"logout\"],\n },\n);\n\n/** Decrypted send state stored in memory */\nexport const SEND_USER_DECRYPTED = new UserKeyDefinition(\n SEND_MEMORY,\n \"sendUserDecrypted\",\n {\n deserializer: (obj) => obj,\n clearOn: [\"lock\"],\n },\n);\n","import { Observable } from \"rxjs\";\n\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\nexport abstract class SendStateProvider {\n encryptedState$: Observable>;\n decryptedState$: Observable;\n\n getEncryptedSends: () => Promise<{ [id: string]: SendData }>;\n\n setEncryptedSends: (value: { [id: string]: SendData }) => Promise;\n\n getDecryptedSends: () => Promise;\n\n setDecryptedSends: (value: SendView[]) => Promise;\n}\n","import { Send } from \"../domain/send\";\n\nimport { SendRequest } from \"./send.request\";\n\nexport class SendWithIdRequest extends SendRequest {\n id: string;\n\n constructor(send: Send) {\n super(send);\n this.id = send.id;\n }\n}\n","import { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { CipherResponse } from \"../../models/response/cipher.response\";\n\nexport abstract class CipherFileUploadService {\n upload: (\n cipher: Cipher,\n encFileName: EncString,\n encData: EncArrayBuffer,\n admin: boolean,\n dataEncKey: [SymmetricCryptoKey, EncString],\n ) => Promise;\n}\n","import { CipherView } from \"../view/cipher.view\";\n\nconst CacheTTL = 3000;\n\nexport class SortedCiphersCache {\n private readonly sortedCiphersByUrl: Map = new Map();\n private readonly timeouts: Map = new Map();\n\n constructor(private readonly comparator: (a: CipherView, b: CipherView) => number) {}\n\n isCached(url: string) {\n return this.sortedCiphersByUrl.has(url);\n }\n\n addCiphers(url: string, ciphers: CipherView[]) {\n ciphers.sort(this.comparator);\n this.sortedCiphersByUrl.set(url, new Ciphers(ciphers));\n this.resetTimer(url);\n }\n\n getLastUsed(url: string) {\n this.resetTimer(url);\n return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getLastUsed() : null;\n }\n\n getLastLaunched(url: string) {\n return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getLastLaunched() : null;\n }\n\n getNext(url: string) {\n this.resetTimer(url);\n return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getNext() : null;\n }\n\n updateLastUsedIndex(url: string) {\n if (this.isCached(url)) {\n this.sortedCiphersByUrl.get(url).updateLastUsedIndex();\n }\n }\n\n clear() {\n this.sortedCiphersByUrl.clear();\n this.timeouts.clear();\n }\n\n private resetTimer(url: string) {\n clearTimeout(this.timeouts.get(url));\n this.timeouts.set(\n url,\n setTimeout(() => {\n this.sortedCiphersByUrl.delete(url);\n this.timeouts.delete(url);\n }, CacheTTL),\n );\n }\n}\n\nclass Ciphers {\n lastUsedIndex = -1;\n\n constructor(private readonly ciphers: CipherView[]) {}\n\n getLastUsed() {\n this.lastUsedIndex = Math.max(this.lastUsedIndex, 0);\n return this.ciphers[this.lastUsedIndex];\n }\n\n getLastLaunched() {\n const usedCiphers = this.ciphers.filter((cipher) => cipher.localData?.lastLaunched);\n const sortedCiphers = usedCiphers.sort(\n (x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf(),\n );\n return sortedCiphers[0];\n }\n\n getNextIndex() {\n return (this.lastUsedIndex + 1) % this.ciphers.length;\n }\n\n getNext() {\n return this.ciphers[this.getNextIndex()];\n }\n\n updateLastUsedIndex() {\n this.lastUsedIndex = this.getNextIndex();\n }\n}\n","export class CipherBulkMoveRequest {\n ids: string[];\n folderId: string;\n\n constructor(ids: string[], folderId: string) {\n this.ids = ids == null ? [] : ids;\n this.folderId = folderId;\n }\n}\n","export class CipherBulkRestoreRequest {\n ids: string[];\n organizationId: string;\n\n constructor(ids: string[], organizationId?: string) {\n this.ids = ids == null ? [] : ids;\n this.organizationId = organizationId;\n }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherWithIdRequest extends CipherRequest {\n id: string;\n\n constructor(cipher: Cipher) {\n super(cipher);\n this.id = cipher.id;\n }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherWithIdRequest } from \"./cipher-with-id.request\";\n\nexport class CipherBulkShareRequest {\n ciphers: CipherWithIdRequest[];\n collectionIds: string[];\n\n constructor(ciphers: Cipher[], collectionIds: string[]) {\n if (ciphers != null) {\n this.ciphers = [];\n ciphers.forEach((c) => {\n this.ciphers.push(new CipherWithIdRequest(c));\n });\n }\n this.collectionIds = collectionIds;\n }\n}\n","import { CipherId, CollectionId, OrganizationId } from \"../../../types/guid\";\n\nexport class CipherBulkUpdateCollectionsRequest {\n organizationId: OrganizationId;\n cipherIds: CipherId[];\n collectionIds: CollectionId[];\n removeCollections: boolean;\n constructor(\n organizationId: OrganizationId,\n cipherIds: CipherId[],\n collectionIds: CollectionId[],\n removeCollections: boolean = false,\n ) {\n this.organizationId = organizationId;\n this.cipherIds = cipherIds;\n this.collectionIds = collectionIds;\n this.removeCollections = removeCollections;\n }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherCreateRequest {\n cipher: CipherRequest;\n collectionIds: string[];\n\n constructor(cipher: Cipher) {\n this.cipher = new CipherRequest(cipher);\n this.collectionIds = cipher.collectionIds;\n }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nexport class CipherPartialRequest {\n folderId: string;\n favorite: boolean;\n\n constructor(cipher: Cipher) {\n this.folderId = cipher.folderId;\n this.favorite = cipher.favorite;\n }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherShareRequest {\n cipher: CipherRequest;\n collectionIds: string[];\n\n constructor(cipher: Cipher) {\n this.cipher = new CipherRequest(cipher);\n this.collectionIds = cipher.collectionIds;\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport {\n CIPHERS_DISK,\n CIPHERS_DISK_LOCAL,\n CIPHERS_MEMORY,\n UserKeyDefinition,\n} from \"../../../platform/state\";\nimport { CipherId } from \"../../../types/guid\";\nimport { CipherData } from \"../../models/data/cipher.data\";\nimport { LocalData } from \"../../models/data/local.data\";\nimport { CipherView } from \"../../models/view/cipher.view\";\nimport { AddEditCipherInfo } from \"../../types/add-edit-cipher-info\";\n\nexport const ENCRYPTED_CIPHERS = UserKeyDefinition.record(CIPHERS_DISK, \"ciphers\", {\n deserializer: (obj: Jsonify) => CipherData.fromJSON(obj),\n clearOn: [\"logout\"],\n});\n\nexport const DECRYPTED_CIPHERS = UserKeyDefinition.record(\n CIPHERS_MEMORY,\n \"decryptedCiphers\",\n {\n deserializer: (cipher: Jsonify) => CipherView.fromJSON(cipher),\n clearOn: [\"logout\", \"lock\"],\n },\n);\n\nexport const LOCAL_DATA_KEY = new UserKeyDefinition>(\n CIPHERS_DISK_LOCAL,\n \"localData\",\n {\n deserializer: (localData) => localData,\n clearOn: [\"logout\"],\n },\n);\n\nexport const ADD_EDIT_CIPHER_INFO_KEY = new UserKeyDefinition(\n CIPHERS_MEMORY,\n \"addEditCipherInfo\",\n {\n deserializer: (addEditCipherInfo: AddEditCipherInfo) => {\n if (addEditCipherInfo == null) {\n return null;\n }\n\n const cipher =\n addEditCipherInfo?.cipher.toJSON != null\n ? addEditCipherInfo.cipher\n : CipherView.fromJSON(addEditCipherInfo?.cipher as Jsonify);\n\n return { cipher, collectionIds: addEditCipherInfo.collectionIds };\n },\n clearOn: [\"logout\", \"lock\"],\n },\n);\n","import { firstValueFrom, map, Observable, skipWhile, switchMap } from \"rxjs\";\nimport { SemVer } from \"semver\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { SearchService } from \"../../abstractions/search.service\";\nimport { AutofillSettingsServiceAbstraction } from \"../../autofill/services/autofill-settings.service\";\nimport { DomainSettingsService } from \"../../autofill/services/domain-settings.service\";\nimport { UriMatchStrategySetting } from \"../../models/domain/domain-service\";\nimport { ErrorResponse } from \"../../models/response/error.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { View } from \"../../models/view/view\";\nimport { ConfigService } from \"../../platform/abstractions/config/config.service\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { flagEnabled } from \"../../platform/misc/flags\";\nimport { sequentialize } from \"../../platform/misc/sequentialize\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport Domain from \"../../platform/models/domain/domain-base\";\nimport { EncArrayBuffer } from \"../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport {\n ActiveUserState,\n CIPHERS_MEMORY,\n DeriveDefinition,\n DerivedState,\n StateProvider,\n} from \"../../platform/state\";\nimport { CipherId, CollectionId, OrganizationId, UserId } from \"../../types/guid\";\nimport { OrgKey, UserKey } from \"../../types/key\";\nimport { CipherService as CipherServiceAbstraction } from \"../abstractions/cipher.service\";\nimport { CipherFileUploadService } from \"../abstractions/file-upload/cipher-file-upload.service\";\nimport { FieldType } from \"../enums\";\nimport { CipherType } from \"../enums/cipher-type\";\nimport { CipherData } from \"../models/data/cipher.data\";\nimport { LocalData } from \"../models/data/local.data\";\nimport { Attachment } from \"../models/domain/attachment\";\nimport { Card } from \"../models/domain/card\";\nimport { Cipher } from \"../models/domain/cipher\";\nimport { Fido2Credential } from \"../models/domain/fido2-credential\";\nimport { Field } from \"../models/domain/field\";\nimport { Identity } from \"../models/domain/identity\";\nimport { Login } from \"../models/domain/login\";\nimport { LoginUri } from \"../models/domain/login-uri\";\nimport { Password } from \"../models/domain/password\";\nimport { SecureNote } from \"../models/domain/secure-note\";\nimport { SortedCiphersCache } from \"../models/domain/sorted-ciphers-cache\";\nimport { CipherBulkDeleteRequest } from \"../models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../models/request/cipher-bulk-share.request\";\nimport { CipherBulkUpdateCollectionsRequest } from \"../models/request/cipher-bulk-update-collections.request\";\nimport { CipherCollectionsRequest } from \"../models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../models/request/cipher-share.request\";\nimport { CipherWithIdRequest } from \"../models/request/cipher-with-id.request\";\nimport { CipherRequest } from \"../models/request/cipher.request\";\nimport { CipherResponse } from \"../models/response/cipher.response\";\nimport { AttachmentView } from \"../models/view/attachment.view\";\nimport { CipherView } from \"../models/view/cipher.view\";\nimport { FieldView } from \"../models/view/field.view\";\nimport { PasswordHistoryView } from \"../models/view/password-history.view\";\nimport { AddEditCipherInfo } from \"../types/add-edit-cipher-info\";\n\nimport {\n ADD_EDIT_CIPHER_INFO_KEY,\n DECRYPTED_CIPHERS,\n ENCRYPTED_CIPHERS,\n LOCAL_DATA_KEY,\n} from \"./key-state/ciphers.state\";\n\nconst CIPHER_KEY_ENC_MIN_SERVER_VER = new SemVer(\"2024.2.0\");\n\nexport class CipherService implements CipherServiceAbstraction {\n private sortedCiphersCache: SortedCiphersCache = new SortedCiphersCache(\n this.sortCiphersByLastUsed,\n );\n private ciphersExpectingUpdate: DerivedState;\n\n localData$: Observable>;\n ciphers$: Observable>;\n cipherViews$: Observable>;\n viewFor$(id: CipherId) {\n return this.cipherViews$.pipe(map((views) => views[id]));\n }\n addEditCipherInfo$: Observable;\n\n private localDataState: ActiveUserState>;\n private encryptedCiphersState: ActiveUserState>;\n private decryptedCiphersState: ActiveUserState>;\n private addEditCipherInfoState: ActiveUserState;\n\n constructor(\n private cryptoService: CryptoService,\n private domainSettingsService: DomainSettingsService,\n private apiService: ApiService,\n private i18nService: I18nService,\n private searchService: SearchService,\n private stateService: StateService,\n private autofillSettingsService: AutofillSettingsServiceAbstraction,\n private encryptService: EncryptService,\n private cipherFileUploadService: CipherFileUploadService,\n private configService: ConfigService,\n private stateProvider: StateProvider,\n ) {\n this.localDataState = this.stateProvider.getActive(LOCAL_DATA_KEY);\n this.encryptedCiphersState = this.stateProvider.getActive(ENCRYPTED_CIPHERS);\n this.decryptedCiphersState = this.stateProvider.getActive(DECRYPTED_CIPHERS);\n this.addEditCipherInfoState = this.stateProvider.getActive(ADD_EDIT_CIPHER_INFO_KEY);\n this.ciphersExpectingUpdate = this.stateProvider.getDerived(\n this.encryptedCiphersState.state$,\n new DeriveDefinition(CIPHERS_MEMORY, \"ciphersExpectingUpdate\", {\n derive: (_: Record) => false,\n deserializer: (value) => value,\n }),\n {},\n );\n\n this.localData$ = this.localDataState.state$.pipe(map((data) => data ?? {}));\n // First wait for ciphersExpectingUpdate to be false before emitting ciphers\n this.ciphers$ = this.ciphersExpectingUpdate.state$.pipe(\n skipWhile((expectingUpdate) => expectingUpdate),\n switchMap(() => this.encryptedCiphersState.state$),\n map((ciphers) => ciphers ?? {}),\n );\n this.cipherViews$ = this.decryptedCiphersState.state$.pipe(map((views) => views ?? {}));\n this.addEditCipherInfo$ = this.addEditCipherInfoState.state$;\n }\n\n async setDecryptedCipherCache(value: CipherView[], userId: UserId) {\n // Sometimes we might prematurely decrypt the vault and that will result in no ciphers\n // if we cache it then we may accidentally return it when it's not right, we'd rather try decryption again.\n // We still want to set null though, that is the indicator that the cache isn't valid and we should do decryption.\n if (value == null || value.length !== 0) {\n await this.setDecryptedCiphers(value, userId);\n }\n if (this.searchService != null) {\n if (value == null) {\n await this.searchService.clearIndex();\n } else {\n await this.searchService.indexCiphers(value);\n }\n }\n }\n\n private async setDecryptedCiphers(value: CipherView[], userId: UserId) {\n const cipherViews: { [id: string]: CipherView } = {};\n value?.forEach((c) => {\n cipherViews[c.id] = c;\n });\n await this.stateProvider.setUserState(DECRYPTED_CIPHERS, cipherViews, userId);\n }\n\n async clearCache(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n await this.clearDecryptedCiphersState(userId);\n }\n\n async encrypt(\n model: CipherView,\n keyForEncryption?: SymmetricCryptoKey,\n keyForCipherKeyDecryption?: SymmetricCryptoKey,\n originalCipher: Cipher = null,\n ): Promise {\n if (model.id != null) {\n if (originalCipher == null) {\n originalCipher = await this.get(model.id);\n }\n if (originalCipher != null) {\n await this.updateModelfromExistingCipher(model, originalCipher);\n }\n this.adjustPasswordHistoryLength(model);\n }\n\n const cipher = new Cipher();\n cipher.id = model.id;\n cipher.folderId = model.folderId;\n cipher.favorite = model.favorite;\n cipher.organizationId = model.organizationId;\n cipher.type = model.type;\n cipher.collectionIds = model.collectionIds;\n cipher.revisionDate = model.revisionDate;\n cipher.reprompt = model.reprompt;\n cipher.edit = model.edit;\n\n if (await this.getCipherKeyEncryptionEnabled()) {\n cipher.key = originalCipher?.key ?? null;\n const userOrOrgKey = await this.getKeyForCipherKeyDecryption(cipher);\n // The keyForEncryption is only used for encrypting the cipher key, not the cipher itself, since cipher key encryption is enabled.\n // If the caller has provided a key for cipher key encryption, use it. Otherwise, use the user or org key.\n keyForEncryption ||= userOrOrgKey;\n // If the caller has provided a key for cipher key decryption, use it. Otherwise, use the user or org key.\n keyForCipherKeyDecryption ||= userOrOrgKey;\n return this.encryptCipherWithCipherKey(\n model,\n cipher,\n keyForEncryption,\n keyForCipherKeyDecryption,\n );\n } else {\n if (keyForEncryption == null && cipher.organizationId != null) {\n keyForEncryption = await this.cryptoService.getOrgKey(cipher.organizationId);\n if (keyForEncryption == null) {\n throw new Error(\"Cannot encrypt cipher for organization. No key.\");\n }\n }\n // We want to ensure that the cipher key is null if cipher key encryption is disabled\n // so that decryption uses the proper key.\n cipher.key = null;\n return this.encryptCipher(model, cipher, keyForEncryption);\n }\n }\n\n async encryptAttachments(\n attachmentsModel: AttachmentView[],\n key: SymmetricCryptoKey,\n ): Promise {\n if (attachmentsModel == null || attachmentsModel.length === 0) {\n return null;\n }\n\n const promises: Promise[] = [];\n const encAttachments: Attachment[] = [];\n attachmentsModel.forEach(async (model) => {\n const attachment = new Attachment();\n attachment.id = model.id;\n attachment.size = model.size;\n attachment.sizeName = model.sizeName;\n attachment.url = model.url;\n const promise = this.encryptObjProperty(\n model,\n attachment,\n {\n fileName: null,\n },\n key,\n ).then(async () => {\n if (model.key != null) {\n attachment.key = await this.cryptoService.encrypt(model.key.key, key);\n }\n encAttachments.push(attachment);\n });\n promises.push(promise);\n });\n\n await Promise.all(promises);\n return encAttachments;\n }\n\n async encryptFields(fieldsModel: FieldView[], key: SymmetricCryptoKey): Promise {\n if (!fieldsModel || !fieldsModel.length) {\n return null;\n }\n\n const self = this;\n const encFields: Field[] = [];\n await fieldsModel.reduce(async (promise, field) => {\n await promise;\n const encField = await self.encryptField(field, key);\n encFields.push(encField);\n }, Promise.resolve());\n\n return encFields;\n }\n\n async encryptField(fieldModel: FieldView, key: SymmetricCryptoKey): Promise {\n const field = new Field();\n field.type = fieldModel.type;\n field.linkedId = fieldModel.linkedId;\n // normalize boolean type field values\n if (fieldModel.type === FieldType.Boolean && fieldModel.value !== \"true\") {\n fieldModel.value = \"false\";\n }\n\n await this.encryptObjProperty(\n fieldModel,\n field,\n {\n name: null,\n value: null,\n },\n key,\n );\n\n return field;\n }\n\n async encryptPasswordHistories(\n phModels: PasswordHistoryView[],\n key: SymmetricCryptoKey,\n ): Promise {\n if (!phModels || !phModels.length) {\n return null;\n }\n\n const self = this;\n const encPhs: Password[] = [];\n await phModels.reduce(async (promise, ph) => {\n await promise;\n const encPh = await self.encryptPasswordHistory(ph, key);\n encPhs.push(encPh);\n }, Promise.resolve());\n\n return encPhs;\n }\n\n async encryptPasswordHistory(\n phModel: PasswordHistoryView,\n key: SymmetricCryptoKey,\n ): Promise {\n const ph = new Password();\n ph.lastUsedDate = phModel.lastUsedDate;\n\n await this.encryptObjProperty(\n phModel,\n ph,\n {\n password: null,\n },\n key,\n );\n\n return ph;\n }\n\n async get(id: string): Promise {\n const ciphers = await firstValueFrom(this.ciphers$);\n // eslint-disable-next-line\n if (ciphers == null || !ciphers.hasOwnProperty(id)) {\n return null;\n }\n\n const localData = await firstValueFrom(this.localData$);\n const cipherId = id as CipherId;\n\n return new Cipher(ciphers[cipherId], localData ? localData[cipherId] : null);\n }\n\n async getAll(): Promise {\n const localData = await firstValueFrom(this.localData$);\n const ciphers = await firstValueFrom(this.ciphers$);\n const response: Cipher[] = [];\n for (const id in ciphers) {\n // eslint-disable-next-line\n if (ciphers.hasOwnProperty(id)) {\n const cipherId = id as CipherId;\n response.push(new Cipher(ciphers[cipherId], localData ? localData[cipherId] : null));\n }\n }\n return response;\n }\n\n @sequentialize(() => \"getAllDecrypted\")\n async getAllDecrypted(): Promise {\n let decCiphers = await this.getDecryptedCiphers();\n if (decCiphers != null && decCiphers.length !== 0) {\n await this.reindexCiphers();\n return await this.getDecryptedCiphers();\n }\n\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (activeUserId == null) {\n return [];\n }\n\n decCiphers = await this.decryptCiphers(await this.getAll(), activeUserId);\n\n await this.setDecryptedCipherCache(decCiphers, activeUserId);\n return decCiphers;\n }\n\n private async getDecryptedCiphers() {\n return Object.values(await firstValueFrom(this.cipherViews$));\n }\n\n private async decryptCiphers(ciphers: Cipher[], userId: UserId) {\n const keys = await firstValueFrom(this.cryptoService.cipherDecryptionKeys$(userId, true));\n\n if (keys == null || (keys.userKey == null && Object.keys(keys.orgKeys).length === 0)) {\n // return early if there are no keys to decrypt with\n return;\n }\n\n // Group ciphers by orgId or under 'null' for the user's ciphers\n const grouped = ciphers.reduce(\n (agg, c) => {\n agg[c.organizationId] ??= [];\n agg[c.organizationId].push(c);\n return agg;\n },\n {} as Record,\n );\n\n const decCiphers = (\n await Promise.all(\n Object.entries(grouped).map(([orgId, groupedCiphers]) =>\n this.encryptService.decryptItems(\n groupedCiphers,\n keys.orgKeys[orgId as OrganizationId] ?? keys.userKey,\n ),\n ),\n )\n )\n .flat()\n .sort(this.getLocaleSortingFunction());\n\n return decCiphers;\n }\n\n private async reindexCiphers() {\n const userId = await this.stateService.getUserId();\n const reindexRequired =\n this.searchService != null &&\n ((await firstValueFrom(this.searchService.indexedEntityId$)) ?? userId) !== userId;\n if (reindexRequired) {\n await this.searchService.indexCiphers(await this.getDecryptedCiphers(), userId);\n }\n }\n\n async getAllDecryptedForGrouping(groupingId: string, folder = true): Promise {\n const ciphers = await this.getAllDecrypted();\n\n return ciphers.filter((cipher) => {\n if (cipher.isDeleted) {\n return false;\n }\n if (folder && cipher.folderId === groupingId) {\n return true;\n } else if (\n !folder &&\n cipher.collectionIds != null &&\n cipher.collectionIds.indexOf(groupingId) > -1\n ) {\n return true;\n }\n\n return false;\n });\n }\n\n async getAllDecryptedForUrl(\n url: string,\n includeOtherTypes?: CipherType[],\n defaultMatch: UriMatchStrategySetting = null,\n ): Promise {\n const ciphers = await this.getAllDecrypted();\n return await this.filterCiphersForUrl(ciphers, url, includeOtherTypes, defaultMatch);\n }\n\n async filterCiphersForUrl(\n ciphers: CipherView[],\n url: string,\n includeOtherTypes?: CipherType[],\n defaultMatch: UriMatchStrategySetting = null,\n ): Promise {\n if (url == null && includeOtherTypes == null) {\n return [];\n }\n\n const equivalentDomains = await firstValueFrom(\n this.domainSettingsService.getUrlEquivalentDomains(url),\n );\n defaultMatch ??= await firstValueFrom(this.domainSettingsService.defaultUriMatchStrategy$);\n\n return ciphers.filter((cipher) => {\n const cipherIsLogin = cipher.type === CipherType.Login && cipher.login !== null;\n\n if (cipher.deletedDate !== null) {\n return false;\n }\n\n if (\n Array.isArray(includeOtherTypes) &&\n includeOtherTypes.includes(cipher.type) &&\n !cipherIsLogin\n ) {\n return true;\n }\n\n if (cipherIsLogin) {\n return cipher.login.matchesUri(url, equivalentDomains, defaultMatch);\n }\n\n return false;\n });\n }\n\n async getAllFromApiForOrganization(organizationId: string): Promise {\n const response = await this.apiService.getCiphersOrganization(organizationId);\n return await this.decryptOrganizationCiphersResponse(response, organizationId);\n }\n\n async getManyFromApiForOrganization(organizationId: string): Promise {\n const response = await this.apiService.send(\n \"GET\",\n \"/ciphers/organization-details/assigned?organizationId=\" + organizationId,\n null,\n true,\n true,\n );\n return this.decryptOrganizationCiphersResponse(response, organizationId);\n }\n\n private async decryptOrganizationCiphersResponse(\n response: ListResponse,\n organizationId: string,\n ): Promise {\n if (response?.data == null || response.data.length < 1) {\n return [];\n }\n\n const ciphers = response.data.map((cr) => new Cipher(new CipherData(cr)));\n const key = await this.cryptoService.getOrgKey(organizationId);\n const decCiphers = await this.encryptService.decryptItems(ciphers, key);\n\n decCiphers.sort(this.getLocaleSortingFunction());\n return decCiphers;\n }\n\n async getLastUsedForUrl(url: string, autofillOnPageLoad = false): Promise {\n return this.getCipherForUrl(url, true, false, autofillOnPageLoad);\n }\n\n async getLastLaunchedForUrl(url: string, autofillOnPageLoad = false): Promise {\n return this.getCipherForUrl(url, false, true, autofillOnPageLoad);\n }\n\n async getNextCipherForUrl(url: string): Promise {\n return this.getCipherForUrl(url, false, false, false);\n }\n\n updateLastUsedIndexForUrl(url: string) {\n this.sortedCiphersCache.updateLastUsedIndex(url);\n }\n\n async updateLastUsedDate(id: string): Promise {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n let ciphersLocalData = await firstValueFrom(this.localData$);\n\n if (!ciphersLocalData) {\n ciphersLocalData = {};\n }\n\n const cipherId = id as CipherId;\n if (ciphersLocalData[cipherId]) {\n ciphersLocalData[cipherId].lastUsedDate = new Date().getTime();\n } else {\n ciphersLocalData[cipherId] = {\n lastUsedDate: new Date().getTime(),\n };\n }\n\n await this.localDataState.update(() => ciphersLocalData);\n\n const decryptedCipherCache = await this.getDecryptedCiphers();\n if (!decryptedCipherCache) {\n return;\n }\n\n for (let i = 0; i < decryptedCipherCache.length; i++) {\n const cached = decryptedCipherCache[i];\n if (cached.id === id) {\n cached.localData = ciphersLocalData[id as CipherId];\n break;\n }\n }\n await this.setDecryptedCiphers(decryptedCipherCache, userId);\n }\n\n async updateLastLaunchedDate(id: string): Promise {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n let ciphersLocalData = await firstValueFrom(this.localData$);\n\n if (!ciphersLocalData) {\n ciphersLocalData = {};\n }\n\n const cipherId = id as CipherId;\n if (ciphersLocalData[cipherId]) {\n ciphersLocalData[cipherId].lastLaunched = new Date().getTime();\n } else {\n ciphersLocalData[cipherId] = {\n lastUsedDate: new Date().getTime(),\n };\n }\n\n await this.localDataState.update(() => ciphersLocalData);\n\n const decryptedCipherCache = await this.getDecryptedCiphers();\n if (!decryptedCipherCache) {\n return;\n }\n\n for (let i = 0; i < decryptedCipherCache.length; i++) {\n const cached = decryptedCipherCache[i];\n if (cached.id === id) {\n cached.localData = ciphersLocalData[id as CipherId];\n break;\n }\n }\n await this.setDecryptedCiphers(decryptedCipherCache, userId);\n }\n\n async saveNeverDomain(domain: string): Promise {\n if (domain == null) {\n return;\n }\n\n let domains = await firstValueFrom(this.domainSettingsService.neverDomains$);\n if (!domains) {\n domains = {};\n }\n domains[domain] = null;\n await this.domainSettingsService.setNeverDomains(domains);\n }\n\n async createWithServer(cipher: Cipher, orgAdmin?: boolean): Promise {\n let response: CipherResponse;\n if (orgAdmin && cipher.organizationId != null) {\n const request = new CipherCreateRequest(cipher);\n response = await this.apiService.postCipherAdmin(request);\n } else if (cipher.collectionIds != null) {\n const request = new CipherCreateRequest(cipher);\n response = await this.apiService.postCipherCreate(request);\n } else {\n const request = new CipherRequest(cipher);\n response = await this.apiService.postCipher(request);\n }\n cipher.id = response.id;\n\n const data = new CipherData(response, cipher.collectionIds);\n const updated = await this.upsert(data);\n // No local data for new ciphers\n return new Cipher(updated[cipher.id as CipherId]);\n }\n\n async updateWithServer(\n cipher: Cipher,\n orgAdmin?: boolean,\n isNotClone?: boolean,\n ): Promise {\n let response: CipherResponse;\n if (orgAdmin && isNotClone) {\n const request = new CipherRequest(cipher);\n response = await this.apiService.putCipherAdmin(cipher.id, request);\n } else if (cipher.edit) {\n const request = new CipherRequest(cipher);\n response = await this.apiService.putCipher(cipher.id, request);\n } else {\n const request = new CipherPartialRequest(cipher);\n response = await this.apiService.putPartialCipher(cipher.id, request);\n }\n\n const data = new CipherData(response, cipher.collectionIds);\n const updated = await this.upsert(data);\n // updating with server does not change local data\n return new Cipher(updated[cipher.id as CipherId], cipher.localData);\n }\n\n async shareWithServer(\n cipher: CipherView,\n organizationId: string,\n collectionIds: string[],\n ): Promise {\n const attachmentPromises: Promise[] = [];\n if (cipher.attachments != null) {\n cipher.attachments.forEach((attachment) => {\n if (attachment.key == null) {\n attachmentPromises.push(\n this.shareAttachmentWithServer(attachment, cipher.id, organizationId),\n );\n }\n });\n }\n await Promise.all(attachmentPromises);\n\n cipher.organizationId = organizationId;\n cipher.collectionIds = collectionIds;\n const encCipher = await this.encryptSharedCipher(cipher);\n const request = new CipherShareRequest(encCipher);\n const response = await this.apiService.putShareCipher(cipher.id, request);\n const data = new CipherData(response, collectionIds);\n await this.upsert(data);\n }\n\n async shareManyWithServer(\n ciphers: CipherView[],\n organizationId: string,\n collectionIds: string[],\n ): Promise {\n const promises: Promise[] = [];\n const encCiphers: Cipher[] = [];\n for (const cipher of ciphers) {\n cipher.organizationId = organizationId;\n cipher.collectionIds = collectionIds;\n promises.push(\n this.encryptSharedCipher(cipher).then((c) => {\n encCiphers.push(c);\n }),\n );\n }\n await Promise.all(promises);\n const request = new CipherBulkShareRequest(encCiphers, collectionIds);\n try {\n await this.apiService.putShareCiphers(request);\n } catch (e) {\n for (const cipher of ciphers) {\n cipher.organizationId = null;\n cipher.collectionIds = null;\n }\n throw e;\n }\n await this.upsert(encCiphers.map((c) => c.toCipherData()));\n }\n\n saveAttachmentWithServer(cipher: Cipher, unencryptedFile: any, admin = false): Promise {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(unencryptedFile);\n reader.onload = async (evt: any) => {\n try {\n const cData = await this.saveAttachmentRawWithServer(\n cipher,\n unencryptedFile.name,\n evt.target.result,\n admin,\n );\n resolve(cData);\n } catch (e) {\n reject(e);\n }\n };\n reader.onerror = () => {\n reject(\"Error reading file.\");\n };\n });\n }\n\n async saveAttachmentRawWithServer(\n cipher: Cipher,\n filename: string,\n data: Uint8Array,\n admin = false,\n ): Promise {\n const encKey = await this.getKeyForCipherKeyDecryption(cipher);\n const cipherKeyEncryptionEnabled = await this.getCipherKeyEncryptionEnabled();\n\n const cipherEncKey =\n cipherKeyEncryptionEnabled && cipher.key != null\n ? (new SymmetricCryptoKey(\n await this.encryptService.decryptToBytes(cipher.key, encKey),\n ) as UserKey)\n : encKey;\n\n //if cipher key encryption is disabled but the item has an individual key,\n //then we rollback to using the user key as the main key of encryption of the item\n //in order to keep item and it's attachments with the same encryption level\n if (cipher.key != null && !cipherKeyEncryptionEnabled) {\n const model = await cipher.decrypt(await this.getKeyForCipherKeyDecryption(cipher));\n cipher = await this.encrypt(model);\n await this.updateWithServer(cipher);\n }\n\n const encFileName = await this.encryptService.encrypt(filename, cipherEncKey);\n\n const dataEncKey = await this.cryptoService.makeDataEncKey(cipherEncKey);\n const encData = await this.encryptService.encryptToBytes(new Uint8Array(data), dataEncKey[0]);\n\n const response = await this.cipherFileUploadService.upload(\n cipher,\n encFileName,\n encData,\n admin,\n dataEncKey,\n );\n\n const cData = new CipherData(response, cipher.collectionIds);\n if (!admin) {\n await this.upsert(cData);\n }\n return new Cipher(cData);\n }\n\n async saveCollectionsWithServer(cipher: Cipher): Promise {\n const request = new CipherCollectionsRequest(cipher.collectionIds);\n const response = await this.apiService.putCipherCollections(cipher.id, request);\n // The response will now check for an unavailable value. This value determines whether\n // the user still has Can Manage access to the item after updating.\n if (response.unavailable) {\n await this.delete(cipher.id);\n return;\n }\n const data = new CipherData(response.cipher);\n const updated = await this.upsert(data);\n return new Cipher(updated[cipher.id as CipherId], cipher.localData);\n }\n\n /**\n * Bulk update collections for many ciphers with the server\n * @param orgId\n * @param cipherIds\n * @param collectionIds\n * @param removeCollections - If true, the collectionIds will be removed from the ciphers, otherwise they will be added\n */\n async bulkUpdateCollectionsWithServer(\n orgId: OrganizationId,\n cipherIds: CipherId[],\n collectionIds: CollectionId[],\n removeCollections: boolean = false,\n ): Promise {\n const request = new CipherBulkUpdateCollectionsRequest(\n orgId,\n cipherIds,\n collectionIds,\n removeCollections,\n );\n\n await this.apiService.send(\"POST\", \"/ciphers/bulk-collections\", request, true, false);\n\n // Update the local state\n const ciphers = await firstValueFrom(this.ciphers$);\n\n for (const id of cipherIds) {\n const cipher = ciphers[id];\n if (cipher) {\n if (removeCollections) {\n cipher.collectionIds = cipher.collectionIds?.filter(\n (cid) => !collectionIds.includes(cid as CollectionId),\n );\n } else {\n // Append to the collectionIds if it's not already there\n cipher.collectionIds = [...new Set([...(cipher.collectionIds ?? []), ...collectionIds])];\n }\n }\n }\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => ciphers);\n }\n\n async upsert(cipher: CipherData | CipherData[]): Promise> {\n const ciphers = cipher instanceof CipherData ? [cipher] : cipher;\n return await this.updateEncryptedCipherState((current) => {\n ciphers.forEach((c) => (current[c.id as CipherId] = c));\n return current;\n });\n }\n\n async replace(ciphers: { [id: string]: CipherData }): Promise {\n await this.updateEncryptedCipherState(() => ciphers);\n }\n\n /**\n * Updates ciphers for the currently active user. Inactive users can only clear all ciphers, for now.\n * @param update update callback for encrypted cipher data\n * @returns\n */\n private async updateEncryptedCipherState(\n update: (current: Record) => Record,\n ): Promise> {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n // Store that we should wait for an update to return any ciphers\n await this.ciphersExpectingUpdate.forceValue(true);\n await this.clearDecryptedCiphersState(userId);\n const [, updatedCiphers] = await this.encryptedCiphersState.update((current) => {\n const result = update(current ?? {});\n return result;\n });\n return updatedCiphers;\n }\n\n async clear(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n await this.clearEncryptedCiphersState(userId);\n await this.clearCache(userId);\n }\n\n async moveManyWithServer(ids: string[], folderId: string): Promise {\n await this.apiService.putMoveCiphers(new CipherBulkMoveRequest(ids, folderId));\n\n let ciphers = await firstValueFrom(this.ciphers$);\n if (ciphers == null) {\n ciphers = {};\n }\n\n ids.forEach((id) => {\n // eslint-disable-next-line\n if (ciphers.hasOwnProperty(id)) {\n ciphers[id as CipherId].folderId = folderId;\n }\n });\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => ciphers);\n }\n\n async delete(id: string | string[]): Promise {\n const ciphers = await firstValueFrom(this.ciphers$);\n if (ciphers == null) {\n return;\n }\n\n if (typeof id === \"string\") {\n const cipherId = id as CipherId;\n if (ciphers[cipherId] == null) {\n return;\n }\n delete ciphers[cipherId];\n } else {\n (id as CipherId[]).forEach((i) => {\n delete ciphers[i];\n });\n }\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => ciphers);\n }\n\n async deleteWithServer(id: string, asAdmin = false): Promise {\n if (asAdmin) {\n await this.apiService.deleteCipherAdmin(id);\n } else {\n await this.apiService.deleteCipher(id);\n }\n\n await this.delete(id);\n }\n\n async deleteManyWithServer(ids: string[], asAdmin = false): Promise {\n const request = new CipherBulkDeleteRequest(ids);\n if (asAdmin) {\n await this.apiService.deleteManyCiphersAdmin(request);\n } else {\n await this.apiService.deleteManyCiphers(request);\n }\n await this.delete(ids);\n }\n\n async deleteAttachment(id: string, attachmentId: string): Promise {\n let ciphers = await firstValueFrom(this.ciphers$);\n const cipherId = id as CipherId;\n // eslint-disable-next-line\n if (ciphers == null || !ciphers.hasOwnProperty(id) || ciphers[cipherId].attachments == null) {\n return;\n }\n\n for (let i = 0; i < ciphers[cipherId].attachments.length; i++) {\n if (ciphers[cipherId].attachments[i].id === attachmentId) {\n ciphers[cipherId].attachments.splice(i, 1);\n }\n }\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => {\n if (ciphers == null) {\n ciphers = {};\n }\n return ciphers;\n });\n }\n\n async deleteAttachmentWithServer(id: string, attachmentId: string): Promise {\n try {\n await this.apiService.deleteCipherAttachment(id, attachmentId);\n } catch (e) {\n return Promise.reject((e as ErrorResponse).getSingleMessage());\n }\n await this.deleteAttachment(id, attachmentId);\n }\n\n sortCiphersByLastUsed(a: CipherView, b: CipherView): number {\n const aLastUsed =\n a.localData && a.localData.lastUsedDate ? (a.localData.lastUsedDate as number) : null;\n const bLastUsed =\n b.localData && b.localData.lastUsedDate ? (b.localData.lastUsedDate as number) : null;\n\n const bothNotNull = aLastUsed != null && bLastUsed != null;\n if (bothNotNull && aLastUsed < bLastUsed) {\n return 1;\n }\n if (aLastUsed != null && bLastUsed == null) {\n return -1;\n }\n\n if (bothNotNull && aLastUsed > bLastUsed) {\n return -1;\n }\n if (bLastUsed != null && aLastUsed == null) {\n return 1;\n }\n\n return 0;\n }\n\n sortCiphersByLastUsedThenName(a: CipherView, b: CipherView): number {\n const result = this.sortCiphersByLastUsed(a, b);\n if (result !== 0) {\n return result;\n }\n\n return this.getLocaleSortingFunction()(a, b);\n }\n\n getLocaleSortingFunction(): (a: CipherView, b: CipherView) => number {\n return (a, b) => {\n let aName = a.name;\n let bName = b.name;\n\n if (aName == null && bName != null) {\n return -1;\n }\n if (aName != null && bName == null) {\n return 1;\n }\n if (aName == null && bName == null) {\n return 0;\n }\n\n const result = this.i18nService.collator\n ? this.i18nService.collator.compare(aName, bName)\n : aName.localeCompare(bName);\n\n if (result !== 0 || a.type !== CipherType.Login || b.type !== CipherType.Login) {\n return result;\n }\n\n if (a.login.username != null) {\n aName += a.login.username;\n }\n\n if (b.login.username != null) {\n bName += b.login.username;\n }\n\n return this.i18nService.collator\n ? this.i18nService.collator.compare(aName, bName)\n : aName.localeCompare(bName);\n };\n }\n\n async softDelete(id: string | string[]): Promise {\n let ciphers = await firstValueFrom(this.ciphers$);\n if (ciphers == null) {\n return;\n }\n\n const setDeletedDate = (cipherId: CipherId) => {\n if (ciphers[cipherId] == null) {\n return;\n }\n ciphers[cipherId].deletedDate = new Date().toISOString();\n };\n\n if (typeof id === \"string\") {\n setDeletedDate(id as CipherId);\n } else {\n (id as string[]).forEach(setDeletedDate);\n }\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => {\n if (ciphers == null) {\n ciphers = {};\n }\n return ciphers;\n });\n }\n\n async softDeleteWithServer(id: string, asAdmin = false): Promise {\n if (asAdmin) {\n await this.apiService.putDeleteCipherAdmin(id);\n } else {\n await this.apiService.putDeleteCipher(id);\n }\n\n await this.softDelete(id);\n }\n\n async softDeleteManyWithServer(ids: string[], asAdmin = false): Promise {\n const request = new CipherBulkDeleteRequest(ids);\n if (asAdmin) {\n await this.apiService.putDeleteManyCiphersAdmin(request);\n } else {\n await this.apiService.putDeleteManyCiphers(request);\n }\n\n await this.softDelete(ids);\n }\n\n async restore(\n cipher: { id: string; revisionDate: string } | { id: string; revisionDate: string }[],\n ) {\n let ciphers = await firstValueFrom(this.ciphers$);\n if (ciphers == null) {\n return;\n }\n\n const clearDeletedDate = (c: { id: string; revisionDate: string }) => {\n const cipherId = c.id as CipherId;\n if (ciphers[cipherId] == null) {\n return;\n }\n ciphers[cipherId].deletedDate = null;\n ciphers[cipherId].revisionDate = c.revisionDate;\n };\n\n if (cipher.constructor.name === Array.name) {\n (cipher as { id: string; revisionDate: string }[]).forEach(clearDeletedDate);\n } else {\n clearDeletedDate(cipher as { id: string; revisionDate: string });\n }\n\n await this.clearCache();\n await this.encryptedCiphersState.update(() => {\n if (ciphers == null) {\n ciphers = {};\n }\n return ciphers;\n });\n }\n\n async restoreWithServer(id: string, asAdmin = false): Promise {\n let response;\n if (asAdmin) {\n response = await this.apiService.putRestoreCipherAdmin(id);\n } else {\n response = await this.apiService.putRestoreCipher(id);\n }\n\n await this.restore({ id: id, revisionDate: response.revisionDate });\n }\n\n /**\n * No longer using an asAdmin Param. Org Vault bulkRestore will assess if an item is unassigned or editable\n * The Org Vault will pass those ids an array as well as the orgId when calling bulkRestore\n */\n async restoreManyWithServer(ids: string[], orgId: string = null): Promise {\n let response;\n\n if (orgId) {\n const request = new CipherBulkRestoreRequest(ids, orgId);\n response = await this.apiService.putRestoreManyCiphersAdmin(request);\n } else {\n const request = new CipherBulkRestoreRequest(ids);\n response = await this.apiService.putRestoreManyCiphers(request);\n }\n\n const restores: { id: string; revisionDate: string }[] = [];\n for (const cipher of response.data) {\n restores.push({ id: cipher.id, revisionDate: cipher.revisionDate });\n }\n await this.restore(restores);\n }\n\n async getKeyForCipherKeyDecryption(cipher: Cipher): Promise {\n return (\n (await this.cryptoService.getOrgKey(cipher.organizationId)) ||\n ((await this.cryptoService.getUserKeyWithLegacySupport()) as UserKey)\n );\n }\n\n async setAddEditCipherInfo(value: AddEditCipherInfo) {\n await this.addEditCipherInfoState.update(() => value, {\n shouldUpdate: (current) => !(current == null && value == null),\n });\n }\n\n async getRotatedData(\n originalUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (originalUserKey == null) {\n throw new Error(\"Original user key is required to rotate ciphers\");\n }\n if (newUserKey == null) {\n throw new Error(\"New user key is required to rotate ciphers\");\n }\n\n let encryptedCiphers: CipherWithIdRequest[] = [];\n\n const ciphers = await this.getAllDecrypted();\n if (!ciphers) {\n return encryptedCiphers;\n }\n\n const userCiphers = ciphers.filter((c) => c.organizationId == null);\n if (userCiphers.length === 0) {\n return encryptedCiphers;\n }\n encryptedCiphers = await Promise.all(\n userCiphers.map(async (cipher) => {\n const encryptedCipher = await this.encrypt(cipher, newUserKey, originalUserKey);\n return new CipherWithIdRequest(encryptedCipher);\n }),\n );\n\n return encryptedCiphers;\n }\n\n // Helpers\n\n // In the case of a cipher that is being shared with an organization, we want to decrypt the\n // cipher key with the user's key and then re-encrypt it with the organization's key.\n private async encryptSharedCipher(model: CipherView): Promise {\n const keyForCipherKeyDecryption = await this.cryptoService.getUserKeyWithLegacySupport();\n return await this.encrypt(model, null, keyForCipherKeyDecryption);\n }\n\n private async updateModelfromExistingCipher(\n model: CipherView,\n originalCipher: Cipher,\n ): Promise {\n const existingCipher = await originalCipher.decrypt(\n await this.getKeyForCipherKeyDecryption(originalCipher),\n );\n model.passwordHistory = existingCipher.passwordHistory || [];\n if (model.type === CipherType.Login && existingCipher.type === CipherType.Login) {\n if (\n existingCipher.login.password != null &&\n existingCipher.login.password !== \"\" &&\n existingCipher.login.password !== model.login.password\n ) {\n const ph = new PasswordHistoryView();\n ph.password = existingCipher.login.password;\n ph.lastUsedDate = model.login.passwordRevisionDate = new Date();\n model.passwordHistory.splice(0, 0, ph);\n } else {\n model.login.passwordRevisionDate = existingCipher.login.passwordRevisionDate;\n }\n }\n if (existingCipher.hasFields) {\n const existingHiddenFields = existingCipher.fields.filter(\n (f) =>\n f.type === FieldType.Hidden &&\n f.name != null &&\n f.name !== \"\" &&\n f.value != null &&\n f.value !== \"\",\n );\n const hiddenFields =\n model.fields == null\n ? []\n : model.fields.filter(\n (f) => f.type === FieldType.Hidden && f.name != null && f.name !== \"\",\n );\n existingHiddenFields.forEach((ef) => {\n const matchedField = hiddenFields.find((f) => f.name === ef.name);\n if (matchedField == null || matchedField.value !== ef.value) {\n const ph = new PasswordHistoryView();\n ph.password = ef.name + \": \" + ef.value;\n ph.lastUsedDate = new Date();\n model.passwordHistory.splice(0, 0, ph);\n }\n });\n }\n }\n\n private adjustPasswordHistoryLength(model: CipherView) {\n if (model.passwordHistory != null && model.passwordHistory.length === 0) {\n model.passwordHistory = null;\n } else if (model.passwordHistory != null && model.passwordHistory.length > 5) {\n // only save last 5 history\n model.passwordHistory = model.passwordHistory.slice(0, 5);\n }\n }\n\n private async shareAttachmentWithServer(\n attachmentView: AttachmentView,\n cipherId: string,\n organizationId: string,\n ): Promise {\n const attachmentResponse = await this.apiService.nativeFetch(\n new Request(attachmentView.url, { cache: \"no-store\" }),\n );\n if (attachmentResponse.status !== 200) {\n throw Error(\"Failed to download attachment: \" + attachmentResponse.status.toString());\n }\n\n const encBuf = await EncArrayBuffer.fromResponse(attachmentResponse);\n const decBuf = await this.cryptoService.decryptFromBytes(encBuf, null);\n\n let encKey: UserKey | OrgKey;\n encKey = await this.cryptoService.getOrgKey(organizationId);\n encKey ||= (await this.cryptoService.getUserKeyWithLegacySupport()) as UserKey;\n\n const dataEncKey = await this.cryptoService.makeDataEncKey(encKey);\n\n const encFileName = await this.encryptService.encrypt(attachmentView.fileName, encKey);\n const encData = await this.encryptService.encryptToBytes(new Uint8Array(decBuf), dataEncKey[0]);\n\n const fd = new FormData();\n try {\n const blob = new Blob([encData.buffer], { type: \"application/octet-stream\" });\n fd.append(\"key\", dataEncKey[1].encryptedString);\n fd.append(\"data\", blob, encFileName.encryptedString);\n } catch (e) {\n if (Utils.isNode && !Utils.isBrowser) {\n fd.append(\"key\", dataEncKey[1].encryptedString);\n fd.append(\n \"data\",\n Buffer.from(encData.buffer) as any,\n {\n filepath: encFileName.encryptedString,\n contentType: \"application/octet-stream\",\n } as any,\n );\n } else {\n throw e;\n }\n }\n\n try {\n await this.apiService.postShareCipherAttachment(\n cipherId,\n attachmentView.id,\n fd,\n organizationId,\n );\n } catch (e) {\n throw new Error((e as ErrorResponse).getSingleMessage());\n }\n }\n\n private async encryptObjProperty(\n model: V,\n obj: D,\n map: any,\n key: SymmetricCryptoKey,\n ): Promise {\n const promises = [];\n const self = this;\n\n for (const prop in map) {\n // eslint-disable-next-line\n if (!map.hasOwnProperty(prop)) {\n continue;\n }\n\n (function (theProp, theObj) {\n const p = Promise.resolve()\n .then(() => {\n const modelProp = (model as any)[map[theProp] || theProp];\n if (modelProp && modelProp !== \"\") {\n return self.cryptoService.encrypt(modelProp, key);\n }\n return null;\n })\n .then((val: EncString) => {\n (theObj as any)[theProp] = val;\n });\n promises.push(p);\n })(prop, obj);\n }\n\n await Promise.all(promises);\n }\n\n private async encryptCipherData(cipher: Cipher, model: CipherView, key: SymmetricCryptoKey) {\n switch (cipher.type) {\n case CipherType.Login:\n cipher.login = new Login();\n cipher.login.passwordRevisionDate = model.login.passwordRevisionDate;\n cipher.login.autofillOnPageLoad = model.login.autofillOnPageLoad;\n await this.encryptObjProperty(\n model.login,\n cipher.login,\n {\n username: null,\n password: null,\n totp: null,\n },\n key,\n );\n\n if (model.login.uris != null) {\n cipher.login.uris = [];\n model.login.uris = model.login.uris.filter((u) => u.uri != null && u.uri !== \"\");\n for (let i = 0; i < model.login.uris.length; i++) {\n const loginUri = new LoginUri();\n loginUri.match = model.login.uris[i].match;\n await this.encryptObjProperty(\n model.login.uris[i],\n loginUri,\n {\n uri: null,\n },\n key,\n );\n const uriHash = await this.encryptService.hash(model.login.uris[i].uri, \"sha256\");\n loginUri.uriChecksum = await this.cryptoService.encrypt(uriHash, key);\n cipher.login.uris.push(loginUri);\n }\n }\n\n if (model.login.fido2Credentials != null) {\n cipher.login.fido2Credentials = await Promise.all(\n model.login.fido2Credentials.map(async (viewKey) => {\n const domainKey = new Fido2Credential();\n await this.encryptObjProperty(\n viewKey,\n domainKey,\n {\n credentialId: null,\n keyType: null,\n keyAlgorithm: null,\n keyCurve: null,\n keyValue: null,\n rpId: null,\n rpName: null,\n userHandle: null,\n userName: null,\n userDisplayName: null,\n origin: null,\n },\n key,\n );\n domainKey.counter = await this.cryptoService.encrypt(String(viewKey.counter), key);\n domainKey.discoverable = await this.cryptoService.encrypt(\n String(viewKey.discoverable),\n key,\n );\n domainKey.creationDate = viewKey.creationDate;\n return domainKey;\n }),\n );\n }\n return;\n case CipherType.SecureNote:\n cipher.secureNote = new SecureNote();\n cipher.secureNote.type = model.secureNote.type;\n return;\n case CipherType.Card:\n cipher.card = new Card();\n await this.encryptObjProperty(\n model.card,\n cipher.card,\n {\n cardholderName: null,\n brand: null,\n number: null,\n expMonth: null,\n expYear: null,\n code: null,\n },\n key,\n );\n return;\n case CipherType.Identity:\n cipher.identity = new Identity();\n await this.encryptObjProperty(\n model.identity,\n cipher.identity,\n {\n title: null,\n firstName: null,\n middleName: null,\n lastName: null,\n address1: null,\n address2: null,\n address3: null,\n city: null,\n state: null,\n postalCode: null,\n country: null,\n company: null,\n email: null,\n phone: null,\n ssn: null,\n username: null,\n passportNumber: null,\n licenseNumber: null,\n },\n key,\n );\n return;\n default:\n throw new Error(\"Unknown cipher type.\");\n }\n }\n\n private async getAutofillOnPageLoadDefault() {\n return await firstValueFrom(this.autofillSettingsService.autofillOnPageLoadDefault$);\n }\n\n private async getCipherForUrl(\n url: string,\n lastUsed: boolean,\n lastLaunched: boolean,\n autofillOnPageLoad: boolean,\n ): Promise {\n const cacheKey = autofillOnPageLoad ? \"autofillOnPageLoad-\" + url : url;\n\n if (!this.sortedCiphersCache.isCached(cacheKey)) {\n let ciphers = await this.getAllDecryptedForUrl(url);\n if (!ciphers) {\n return null;\n }\n\n if (autofillOnPageLoad) {\n const autofillOnPageLoadDefault = await this.getAutofillOnPageLoadDefault();\n\n ciphers = ciphers.filter(\n (cipher) =>\n cipher.login.autofillOnPageLoad ||\n (cipher.login.autofillOnPageLoad == null && autofillOnPageLoadDefault !== false),\n );\n if (ciphers.length === 0) {\n return null;\n }\n }\n\n this.sortedCiphersCache.addCiphers(cacheKey, ciphers);\n }\n\n if (lastLaunched) {\n return this.sortedCiphersCache.getLastLaunched(cacheKey);\n } else if (lastUsed) {\n return this.sortedCiphersCache.getLastUsed(cacheKey);\n } else {\n return this.sortedCiphersCache.getNext(cacheKey);\n }\n }\n\n private async clearEncryptedCiphersState(userId: UserId) {\n await this.stateProvider.setUserState(ENCRYPTED_CIPHERS, {}, userId);\n }\n\n private async clearDecryptedCiphersState(userId: UserId) {\n await this.setDecryptedCiphers(null, userId);\n this.clearSortedCiphers();\n }\n\n private clearSortedCiphers() {\n this.sortedCiphersCache.clear();\n }\n\n private async encryptCipher(\n model: CipherView,\n cipher: Cipher,\n key: SymmetricCryptoKey,\n ): Promise {\n await Promise.all([\n this.encryptObjProperty(\n model,\n cipher,\n {\n name: null,\n notes: null,\n },\n key,\n ),\n this.encryptCipherData(cipher, model, key),\n this.encryptFields(model.fields, key).then((fields) => {\n cipher.fields = fields;\n }),\n this.encryptPasswordHistories(model.passwordHistory, key).then((ph) => {\n cipher.passwordHistory = ph;\n }),\n this.encryptAttachments(model.attachments, key).then((attachments) => {\n cipher.attachments = attachments;\n }),\n ]);\n return cipher;\n }\n\n private async encryptCipherWithCipherKey(\n model: CipherView,\n cipher: Cipher,\n keyForCipherKeyEncryption: SymmetricCryptoKey,\n keyForCipherKeyDecryption: SymmetricCryptoKey,\n ): Promise {\n // First, we get the key for cipher key encryption, in its decrypted form\n let decryptedCipherKey: SymmetricCryptoKey;\n if (cipher.key == null) {\n decryptedCipherKey = await this.cryptoService.makeCipherKey();\n } else {\n decryptedCipherKey = new SymmetricCryptoKey(\n await this.encryptService.decryptToBytes(cipher.key, keyForCipherKeyDecryption),\n );\n }\n\n // Then, we have to encrypt the cipher key with the proper key.\n cipher.key = await this.encryptService.encrypt(\n decryptedCipherKey.key,\n keyForCipherKeyEncryption,\n );\n\n // Finally, we can encrypt the cipher with the decrypted cipher key.\n return this.encryptCipher(model, cipher, decryptedCipherKey);\n }\n\n private async getCipherKeyEncryptionEnabled(): Promise {\n return (\n flagEnabled(\"enableCipherKeyEncryption\") &&\n (await firstValueFrom(\n this.configService.checkServerMeetsVersionRequirement$(CIPHER_KEY_ENC_MIN_SERVER_VER),\n ))\n );\n }\n}\n","import { firstValueFrom, map, Observable } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport {\n ActiveUserState,\n StateProvider,\n COLLECTION_DATA,\n DeriveDefinition,\n DerivedState,\n UserKeyDefinition,\n} from \"../../platform/state\";\nimport { CollectionId, OrganizationId, UserId } from \"../../types/guid\";\nimport { CollectionService as CollectionServiceAbstraction } from \"../../vault/abstractions/collection.service\";\nimport { CollectionData } from \"../models/data/collection.data\";\nimport { Collection } from \"../models/domain/collection\";\nimport { TreeNode } from \"../models/domain/tree-node\";\nimport { CollectionView } from \"../models/view/collection.view\";\nimport { ServiceUtils } from \"../service-utils\";\n\nconst ENCRYPTED_COLLECTION_DATA_KEY = UserKeyDefinition.record(\n COLLECTION_DATA,\n \"collections\",\n {\n deserializer: (jsonData: Jsonify) => CollectionData.fromJSON(jsonData),\n clearOn: [\"logout\"],\n },\n);\n\nconst DECRYPTED_COLLECTION_DATA_KEY = DeriveDefinition.from<\n Record,\n CollectionView[],\n { collectionService: CollectionService }\n>(ENCRYPTED_COLLECTION_DATA_KEY, {\n deserializer: (obj) => obj.map((collection) => CollectionView.fromJSON(collection)),\n derive: async (collections: Record, { collectionService }) => {\n const data: Collection[] = [];\n for (const id in collections ?? {}) {\n const collectionId = id as CollectionId;\n data.push(new Collection(collections[collectionId]));\n }\n return await collectionService.decryptMany(data);\n },\n});\n\nconst NestingDelimiter = \"/\";\n\nexport class CollectionService implements CollectionServiceAbstraction {\n private encryptedCollectionDataState: ActiveUserState>;\n encryptedCollections$: Observable;\n private decryptedCollectionDataState: DerivedState;\n decryptedCollections$: Observable;\n\n decryptedCollectionViews$(ids: CollectionId[]): Observable {\n return this.decryptedCollections$.pipe(\n map((collections) => collections.filter((c) => ids.includes(c.id as CollectionId))),\n );\n }\n\n constructor(\n private cryptoService: CryptoService,\n private i18nService: I18nService,\n protected stateProvider: StateProvider,\n ) {\n this.encryptedCollectionDataState = this.stateProvider.getActive(ENCRYPTED_COLLECTION_DATA_KEY);\n this.encryptedCollections$ = this.encryptedCollectionDataState.state$.pipe(\n map((collections) => {\n const response: Collection[] = [];\n for (const id in collections ?? {}) {\n response.push(new Collection(collections[id as CollectionId]));\n }\n return response;\n }),\n );\n\n this.decryptedCollectionDataState = this.stateProvider.getDerived(\n this.encryptedCollectionDataState.state$,\n DECRYPTED_COLLECTION_DATA_KEY,\n { collectionService: this },\n );\n\n this.decryptedCollections$ = this.decryptedCollectionDataState.state$;\n }\n\n async clearActiveUserCache(): Promise {\n await this.decryptedCollectionDataState.forceValue(null);\n }\n\n async encrypt(model: CollectionView): Promise {\n if (model.organizationId == null) {\n throw new Error(\"Collection has no organization id.\");\n }\n const key = await this.cryptoService.getOrgKey(model.organizationId);\n if (key == null) {\n throw new Error(\"No key for this collection's organization.\");\n }\n const collection = new Collection();\n collection.id = model.id;\n collection.organizationId = model.organizationId;\n collection.readOnly = model.readOnly;\n collection.name = await this.cryptoService.encrypt(model.name, key);\n return collection;\n }\n\n async decryptMany(collections: Collection[]): Promise {\n if (collections == null) {\n return [];\n }\n const decCollections: CollectionView[] = [];\n\n const organizationKeys = await firstValueFrom(this.cryptoService.activeUserOrgKeys$);\n\n const promises: Promise[] = [];\n collections.forEach((collection) => {\n promises.push(\n collection\n .decrypt(organizationKeys[collection.organizationId as OrganizationId])\n .then((c) => decCollections.push(c)),\n );\n });\n await Promise.all(promises);\n return decCollections.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n }\n\n async get(id: string): Promise {\n return (\n (await firstValueFrom(\n this.encryptedCollections$.pipe(map((cs) => cs.find((c) => c.id === id))),\n )) ?? null\n );\n }\n\n async getAll(): Promise {\n return await firstValueFrom(this.encryptedCollections$);\n }\n\n async getAllDecrypted(): Promise {\n return await firstValueFrom(this.decryptedCollections$);\n }\n\n async getAllNested(collections: CollectionView[] = null): Promise[]> {\n if (collections == null) {\n collections = await this.getAllDecrypted();\n }\n const nodes: TreeNode[] = [];\n collections.forEach((c) => {\n const collectionCopy = new CollectionView();\n collectionCopy.id = c.id;\n collectionCopy.organizationId = c.organizationId;\n const parts = c.name != null ? c.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n ServiceUtils.nestedTraverse(nodes, 0, parts, collectionCopy, null, NestingDelimiter);\n });\n return nodes;\n }\n\n /**\n * @deprecated August 30 2022: Moved to new Vault Filter Service\n * Remove when Desktop and Browser are updated\n */\n async getNested(id: string): Promise> {\n const collections = await this.getAllNested();\n return ServiceUtils.getTreeNodeObjectFromList(collections, id) as TreeNode;\n }\n\n async upsert(toUpdate: CollectionData | CollectionData[]): Promise {\n if (toUpdate == null) {\n return;\n }\n await this.encryptedCollectionDataState.update((collections) => {\n if (collections == null) {\n collections = {};\n }\n if (Array.isArray(toUpdate)) {\n toUpdate.forEach((c) => {\n collections[c.id] = c;\n });\n } else {\n collections[toUpdate.id] = toUpdate;\n }\n return collections;\n });\n }\n\n async replace(collections: Record): Promise {\n await this.encryptedCollectionDataState.update(() => collections);\n }\n\n async clear(userId?: UserId): Promise {\n if (userId == null) {\n await this.encryptedCollectionDataState.update(() => null);\n await this.decryptedCollectionDataState.forceValue(null);\n } else {\n await this.stateProvider.getUser(userId, ENCRYPTED_COLLECTION_DATA_KEY).update(() => null);\n }\n }\n\n async delete(id: CollectionId | CollectionId[]): Promise {\n await this.encryptedCollectionDataState.update((collections) => {\n if (collections == null) {\n collections = {};\n }\n if (typeof id === \"string\") {\n delete collections[id];\n } else {\n (id as CollectionId[]).forEach((i) => {\n delete collections[i];\n });\n }\n return collections;\n });\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { CryptoService } from \"../../../platform/abstractions/crypto.service\";\nimport { DeriveDefinition, FOLDER_DISK, UserKeyDefinition } from \"../../../platform/state\";\nimport { FolderService } from \"../../abstractions/folder/folder.service.abstraction\";\nimport { FolderData } from \"../../models/data/folder.data\";\nimport { Folder } from \"../../models/domain/folder\";\nimport { FolderView } from \"../../models/view/folder.view\";\n\nexport const FOLDER_ENCRYPTED_FOLDERS = UserKeyDefinition.record(\n FOLDER_DISK,\n \"folders\",\n {\n deserializer: (obj: Jsonify) => FolderData.fromJSON(obj),\n clearOn: [\"logout\"],\n },\n);\n\nexport const FOLDER_DECRYPTED_FOLDERS = DeriveDefinition.from<\n Record,\n FolderView[],\n { folderService: FolderService; cryptoService: CryptoService }\n>(FOLDER_ENCRYPTED_FOLDERS, {\n deserializer: (obj) => obj.map((f) => FolderView.fromJSON(f)),\n derive: async (from, { folderService, cryptoService }) => {\n const folders = Object.values(from || {}).map((f) => new Folder(f));\n\n if (await cryptoService.hasUserKey()) {\n return await folderService.decryptFolders(folders);\n } else {\n return [];\n }\n },\n});\n","import { CryptoFunctionService } from \"../../platform/abstractions/crypto-function.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { TotpService as TotpServiceAbstraction } from \"../abstractions/totp.service\";\n\nconst B32Chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\nconst SteamChars = \"23456789BCDFGHJKMNPQRTVWXY\";\n\nexport class TotpService implements TotpServiceAbstraction {\n constructor(\n private cryptoFunctionService: CryptoFunctionService,\n private logService: LogService,\n ) {}\n\n async getCode(key: string): Promise {\n if (key == null) {\n return null;\n }\n let period = 30;\n let alg: \"sha1\" | \"sha256\" | \"sha512\" = \"sha1\";\n let digits = 6;\n let keyB32 = key;\n const isOtpAuth = key.toLowerCase().indexOf(\"otpauth://\") === 0;\n const isSteamAuth = !isOtpAuth && key.toLowerCase().indexOf(\"steam://\") === 0;\n if (isOtpAuth) {\n const params = Utils.getQueryParams(key);\n if (params.has(\"digits\") && params.get(\"digits\") != null) {\n try {\n const digitParams = parseInt(params.get(\"digits\").trim(), null);\n if (digitParams > 10) {\n digits = 10;\n } else if (digitParams > 0) {\n digits = digitParams;\n }\n } catch {\n this.logService.error(\"Invalid digits param.\");\n }\n }\n if (params.has(\"period\") && params.get(\"period\") != null) {\n try {\n const periodParam = parseInt(params.get(\"period\").trim(), null);\n if (periodParam > 0) {\n period = periodParam;\n }\n } catch {\n this.logService.error(\"Invalid period param.\");\n }\n }\n if (params.has(\"secret\") && params.get(\"secret\") != null) {\n keyB32 = params.get(\"secret\");\n }\n if (params.has(\"algorithm\") && params.get(\"algorithm\") != null) {\n const algParam = params.get(\"algorithm\").toLowerCase();\n if (algParam === \"sha1\" || algParam === \"sha256\" || algParam === \"sha512\") {\n alg = algParam;\n }\n }\n } else if (isSteamAuth) {\n keyB32 = key.substr(\"steam://\".length);\n digits = 5;\n }\n\n const epoch = Math.round(new Date().getTime() / 1000.0);\n const timeHex = this.leftPad(this.decToHex(Math.floor(epoch / period)), 16, \"0\");\n const timeBytes = Utils.fromHexToArray(timeHex);\n const keyBytes = this.b32ToBytes(keyB32);\n\n if (!keyBytes.length || !timeBytes.length) {\n return null;\n }\n\n const hash = await this.sign(keyBytes, timeBytes, alg);\n if (hash.length === 0) {\n return null;\n }\n\n const offset = hash[hash.length - 1] & 0xf;\n const binary =\n ((hash[offset] & 0x7f) << 24) |\n ((hash[offset + 1] & 0xff) << 16) |\n ((hash[offset + 2] & 0xff) << 8) |\n (hash[offset + 3] & 0xff);\n\n let otp = \"\";\n if (isSteamAuth) {\n let fullCode = binary & 0x7fffffff;\n for (let i = 0; i < digits; i++) {\n otp += SteamChars[fullCode % SteamChars.length];\n fullCode = Math.trunc(fullCode / SteamChars.length);\n }\n } else {\n otp = (binary % Math.pow(10, digits)).toString();\n otp = this.leftPad(otp, digits, \"0\");\n }\n\n return otp;\n }\n\n getTimeInterval(key: string): number {\n let period = 30;\n if (key != null && key.toLowerCase().indexOf(\"otpauth://\") === 0) {\n const params = Utils.getQueryParams(key);\n if (params.has(\"period\") && params.get(\"period\") != null) {\n try {\n period = parseInt(params.get(\"period\").trim(), null);\n } catch {\n this.logService.error(\"Invalid period param.\");\n }\n }\n }\n return period;\n }\n\n // Helpers\n\n private leftPad(s: string, l: number, p: string): string {\n if (l + 1 >= s.length) {\n s = Array(l + 1 - s.length).join(p) + s;\n }\n return s;\n }\n\n private decToHex(d: number): string {\n return (d < 15.5 ? \"0\" : \"\") + Math.round(d).toString(16);\n }\n\n private b32ToHex(s: string): string {\n s = s.toUpperCase();\n let cleanedInput = \"\";\n\n for (let i = 0; i < s.length; i++) {\n if (B32Chars.indexOf(s[i]) < 0) {\n continue;\n }\n\n cleanedInput += s[i];\n }\n s = cleanedInput;\n\n let bits = \"\";\n let hex = \"\";\n for (let i = 0; i < s.length; i++) {\n const byteIndex = B32Chars.indexOf(s.charAt(i));\n if (byteIndex < 0) {\n continue;\n }\n bits += this.leftPad(byteIndex.toString(2), 5, \"0\");\n }\n for (let i = 0; i + 4 <= bits.length; i += 4) {\n const chunk = bits.substr(i, 4);\n hex = hex + parseInt(chunk, 2).toString(16);\n }\n return hex;\n }\n\n private b32ToBytes(s: string): Uint8Array {\n return Utils.fromHexToArray(this.b32ToHex(s));\n }\n\n private async sign(\n keyBytes: Uint8Array,\n timeBytes: Uint8Array,\n alg: \"sha1\" | \"sha256\" | \"sha512\",\n ) {\n const signature = await this.cryptoFunctionService.hmac(timeBytes, keyBytes, alg);\n return new Uint8Array(signature);\n }\n}\n","import { VAULT_SETTINGS_DISK, KeyDefinition, UserKeyDefinition } from \"../../../platform/state\";\n\nexport const USER_ENABLE_PASSKEYS = new KeyDefinition(\n VAULT_SETTINGS_DISK,\n \"enablePasskeys\",\n {\n deserializer: (obj) => obj,\n },\n);\n\nexport const SHOW_CARDS_CURRENT_TAB = new UserKeyDefinition(\n VAULT_SETTINGS_DISK,\n \"showCardsCurrentTab\",\n {\n deserializer: (obj) => obj,\n clearOn: [], // do not clear user settings\n },\n);\n\nexport const SHOW_IDENTITIES_CURRENT_TAB = new UserKeyDefinition(\n VAULT_SETTINGS_DISK,\n \"showIdentitiesCurrentTab\",\n {\n deserializer: (obj) => obj,\n clearOn: [], // do not clear user settings\n },\n);\n","import { ErrorHandler, Injectable, Injector, inject } from \"@angular/core\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\n@Injectable()\nexport class LoggingErrorHandler extends ErrorHandler {\n /**\n * When injecting services into an `ErrorHandler`, we must use the `Injector` manually to avoid circular dependency errors.\n *\n * https://stackoverflow.com/a/57115053\n */\n private injector = inject(Injector);\n\n override handleError(error: any): void {\n try {\n const logService = this.injector.get(LogService, null);\n logService.error(\"Unhandled error in angular\", error);\n } catch {\n super.handleError(error);\n }\n }\n}\n","import { Inject, Injectable } from \"@angular/core\";\nimport { fromEvent, map, merge, Observable, of, Subscription, switchMap } from \"rxjs\";\n\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { ThemeStateService } from \"@bitwarden/common/platform/theming/theme-state.service\";\n\nimport { SYSTEM_THEME_OBSERVABLE } from \"../../../services/injection-tokens\";\n\nimport { AbstractThemingService } from \"./theming.service.abstraction\";\n\n@Injectable()\nexport class AngularThemingService implements AbstractThemingService {\n /**\n * Creates a system theme observable based on watching the given window.\n * @param window The window that should be watched for system theme changes.\n * @returns An observable that will track the system theme.\n */\n static createSystemThemeFromWindow(window: Window): Observable {\n return merge(\n // This observable should always emit at least once, so go and get the current system theme designation\n of(AngularThemingService.getSystemThemeFromWindow(window)),\n // Start listening to changes\n fromEvent(\n window.matchMedia(\"(prefers-color-scheme: dark)\"),\n \"change\",\n ).pipe(map((event) => (event.matches ? ThemeType.Dark : ThemeType.Light))),\n );\n }\n\n /**\n * Gets the currently active system theme based on the given window.\n * @param window The window to query for the current theme.\n * @returns The active system theme.\n */\n static getSystemThemeFromWindow(window: Window): ThemeType {\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? ThemeType.Dark\n : ThemeType.Light;\n }\n\n readonly theme$ = this.themeStateService.selectedTheme$.pipe(\n switchMap((configuredTheme) => {\n if (configuredTheme === ThemeType.System) {\n return this.systemTheme$;\n }\n\n return of(configuredTheme);\n }),\n );\n\n constructor(\n private themeStateService: ThemeStateService,\n @Inject(SYSTEM_THEME_OBSERVABLE)\n private systemTheme$: Observable,\n ) {}\n\n applyThemeChangesTo(document: Document): Subscription {\n return this.theme$.subscribe((theme) => {\n document.documentElement.classList.remove(\n \"theme_\" + ThemeType.Light,\n \"theme_\" + ThemeType.Dark,\n \"theme_\" + ThemeType.Nord,\n \"theme_\" + ThemeType.SolarizedDark,\n );\n document.documentElement.classList.add(\"theme_\" + theme);\n });\n }\n}\n","import { ErrorHandler, LOCALE_ID, NgModule } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport {\n RegistrationFinishService as RegistrationFinishServiceAbstraction,\n DefaultRegistrationFinishService,\n} from \"@bitwarden/auth/angular\";\nimport {\n AuthRequestServiceAbstraction,\n AuthRequestService,\n PinServiceAbstraction,\n PinService,\n LoginStrategyServiceAbstraction,\n LoginStrategyService,\n LoginEmailServiceAbstraction,\n LoginEmailService,\n InternalUserDecryptionOptionsServiceAbstraction,\n UserDecryptionOptionsService,\n UserDecryptionOptionsServiceAbstraction,\n LogoutReason,\n RegisterRouteService,\n} from \"@bitwarden/auth/common\";\nimport { ApiService as ApiServiceAbstraction } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService as AuditServiceAbstraction } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService as EventCollectionServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { SearchService as SearchServiceAbstraction } from \"@bitwarden/common/abstractions/search.service\";\nimport { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService as VaultTimeoutServiceAbstraction } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport {\n InternalOrganizationServiceAbstraction,\n OrganizationService as OrganizationServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport {\n OrgDomainInternalServiceAbstraction,\n OrgDomainServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport {\n InternalPolicyService,\n PolicyService as PolicyServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderService as ProviderServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { OrganizationApiService } from \"@bitwarden/common/admin-console/services/organization/organization-api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/services/organization/organization.service\";\nimport { OrgDomainApiService } from \"@bitwarden/common/admin-console/services/organization-domain/org-domain-api.service\";\nimport { OrgDomainService } from \"@bitwarden/common/admin-console/services/organization-domain/org-domain.service\";\nimport { DefaultOrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/services/organization-management-preferences/default-organization-management-preferences.service\";\nimport { OrganizationUserServiceImplementation } from \"@bitwarden/common/admin-console/services/organization-user/organization-user.service.implementation\";\nimport { PolicyApiService } from \"@bitwarden/common/admin-console/services/policy/policy-api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/services/policy/policy.service\";\nimport { ProviderApiService } from \"@bitwarden/common/admin-console/services/provider/provider-api.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/services/provider.service\";\nimport { AccountApiService as AccountApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport {\n AccountService as AccountServiceAbstraction,\n InternalAccountService,\n} from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AnonymousHubService as AnonymousHubServiceAbstraction } from \"@bitwarden/common/auth/abstractions/anonymous-hub.service\";\nimport { AuthService as AuthServiceAbstraction } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AvatarService as AvatarServiceAbstraction } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { DevicesServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices/devices.service.abstraction\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { KdfConfigService as KdfConfigServiceAbstraction } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { KeyConnectorService as KeyConnectorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport {\n InternalMasterPasswordServiceAbstraction,\n MasterPasswordServiceAbstraction,\n} from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"@bitwarden/common/auth/abstractions/password-reset-enrollment.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TokenService as TokenServiceAbstraction } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService as TwoFactorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { UserVerificationApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { UserVerificationService as UserVerificationServiceAbstraction } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-api.service.abstraction\";\nimport { WebAuthnLoginPrfCryptoServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-prf-crypto.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AccountApiServiceImplementation } from \"@bitwarden/common/auth/services/account-api.service\";\nimport { AccountServiceImplementation } from \"@bitwarden/common/auth/services/account.service\";\nimport { AnonymousHubService } from \"@bitwarden/common/auth/services/anonymous-hub.service\";\nimport { AuthService } from \"@bitwarden/common/auth/services/auth.service\";\nimport { AvatarService } from \"@bitwarden/common/auth/services/avatar.service\";\nimport { DeviceTrustService } from \"@bitwarden/common/auth/services/device-trust.service.implementation\";\nimport { DevicesServiceImplementation } from \"@bitwarden/common/auth/services/devices/devices.service.implementation\";\nimport { DevicesApiServiceImplementation } from \"@bitwarden/common/auth/services/devices-api.service.implementation\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/services/kdf-config.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/services/key-connector.service\";\nimport { MasterPasswordService } from \"@bitwarden/common/auth/services/master-password/master-password.service\";\nimport { PasswordResetEnrollmentServiceImplementation } from \"@bitwarden/common/auth/services/password-reset-enrollment.service.implementation\";\nimport { SsoLoginService } from \"@bitwarden/common/auth/services/sso-login.service\";\nimport { TokenService } from \"@bitwarden/common/auth/services/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { UserVerificationApiService } from \"@bitwarden/common/auth/services/user-verification/user-verification-api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/services/user-verification/user-verification.service\";\nimport { WebAuthnLoginApiService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login-api.service\";\nimport { WebAuthnLoginPrfCryptoService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login-prf-crypto.service\";\nimport { WebAuthnLoginService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login.service\";\nimport {\n AutofillSettingsServiceAbstraction,\n AutofillSettingsService,\n} from \"@bitwarden/common/autofill/services/autofill-settings.service\";\nimport {\n BadgeSettingsServiceAbstraction,\n BadgeSettingsService,\n} from \"@bitwarden/common/autofill/services/badge-settings.service\";\nimport {\n DomainSettingsService,\n DefaultDomainSettingsService,\n} from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport {\n BillingApiServiceAbstraction,\n BraintreeServiceAbstraction,\n OrganizationBillingServiceAbstraction,\n PaymentMethodWarningsServiceAbstraction,\n StripeServiceAbstraction,\n} from \"@bitwarden/common/billing/abstractions\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { DefaultBillingAccountProfileStateService } from \"@bitwarden/common/billing/services/account/billing-account-profile-state.service\";\nimport { BillingApiService } from \"@bitwarden/common/billing/services/billing-api.service\";\nimport { OrganizationBillingService } from \"@bitwarden/common/billing/services/organization-billing.service\";\nimport { PaymentMethodWarningsService } from \"@bitwarden/common/billing/services/payment-method-warnings.service\";\nimport { BraintreeService } from \"@bitwarden/common/billing/services/payment-processors/braintree.service\";\nimport { StripeService } from \"@bitwarden/common/billing/services/payment-processors/stripe.service\";\nimport { AppIdService as AppIdServiceAbstraction } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigApiServiceAbstraction } from \"@bitwarden/common/platform/abstractions/config/config-api.service.abstraction\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService as CryptoFunctionServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { CryptoService as CryptoServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { FileUploadService as FileUploadServiceAbstraction } from \"@bitwarden/common/platform/abstractions/file-upload/file-upload.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { KeyGenerationService as KeyGenerationServiceAbstraction } from \"@bitwarden/common/platform/abstractions/key-generation.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService as MessagingServiceAbstraction } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService as PlatformUtilsServiceAbstraction } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService as StateServiceAbstraction } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { ValidationService as ValidationServiceAbstraction } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport {\n BiometricStateService,\n DefaultBiometricStateService,\n} from \"@bitwarden/common/platform/biometrics/biometric-state.service\";\nimport { StateFactory } from \"@bitwarden/common/platform/factories/state-factory\";\nimport { Message, MessageListener, MessageSender } from \"@bitwarden/common/platform/messaging\";\n// eslint-disable-next-line no-restricted-imports -- Used for dependency injection\nimport { SubjectMessageSender } from \"@bitwarden/common/platform/messaging/internal\";\nimport { devFlagEnabled } from \"@bitwarden/common/platform/misc/flags\";\nimport { Account } from \"@bitwarden/common/platform/models/domain/account\";\nimport { GlobalState } from \"@bitwarden/common/platform/models/domain/global-state\";\nimport {\n TaskSchedulerService,\n DefaultTaskSchedulerService,\n} from \"@bitwarden/common/platform/scheduling\";\nimport { AppIdService } from \"@bitwarden/common/platform/services/app-id.service\";\nimport { ConfigApiService } from \"@bitwarden/common/platform/services/config/config-api.service\";\nimport { DefaultConfigService } from \"@bitwarden/common/platform/services/config/default-config.service\";\nimport { ConsoleLogService } from \"@bitwarden/common/platform/services/console-log.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/services/crypto.service\";\nimport { MultithreadEncryptServiceImplementation } from \"@bitwarden/common/platform/services/cryptography/multithread-encrypt.service.implementation\";\nimport { DefaultBroadcasterService } from \"@bitwarden/common/platform/services/default-broadcaster.service\";\nimport { DefaultEnvironmentService } from \"@bitwarden/common/platform/services/default-environment.service\";\nimport { FileUploadService } from \"@bitwarden/common/platform/services/file-upload/file-upload.service\";\nimport { KeyGenerationService } from \"@bitwarden/common/platform/services/key-generation.service\";\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { NoopNotificationsService } from \"@bitwarden/common/platform/services/noop-notifications.service\";\nimport { StateService } from \"@bitwarden/common/platform/services/state.service\";\nimport { StorageServiceProvider } from \"@bitwarden/common/platform/services/storage-service.provider\";\nimport { UserAutoUnlockKeyService } from \"@bitwarden/common/platform/services/user-auto-unlock-key.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/services/validation.service\";\nimport { WebCryptoFunctionService } from \"@bitwarden/common/platform/services/web-crypto-function.service\";\nimport {\n ActiveUserStateProvider,\n GlobalStateProvider,\n SingleUserStateProvider,\n StateProvider,\n DerivedStateProvider,\n} from \"@bitwarden/common/platform/state\";\n/* eslint-disable import/no-restricted-paths -- We need the implementations to inject, but generally these should not be accessed */\nimport { DefaultActiveUserStateProvider } from \"@bitwarden/common/platform/state/implementations/default-active-user-state.provider\";\nimport { DefaultDerivedStateProvider } from \"@bitwarden/common/platform/state/implementations/default-derived-state.provider\";\nimport { DefaultGlobalStateProvider } from \"@bitwarden/common/platform/state/implementations/default-global-state.provider\";\nimport { DefaultSingleUserStateProvider } from \"@bitwarden/common/platform/state/implementations/default-single-user-state.provider\";\nimport { DefaultStateProvider } from \"@bitwarden/common/platform/state/implementations/default-state.provider\";\nimport { StateEventRegistrarService } from \"@bitwarden/common/platform/state/state-event-registrar.service\";\nimport { StateEventRunnerService } from \"@bitwarden/common/platform/state/state-event-runner.service\";\n/* eslint-enable import/no-restricted-paths */\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\n// eslint-disable-next-line no-restricted-imports -- Needed for DI\nimport { DefaultSyncService } from \"@bitwarden/common/platform/sync/internal\";\nimport {\n DefaultThemeStateService,\n ThemeStateService,\n} from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport { ApiService } from \"@bitwarden/common/services/api.service\";\nimport { AuditService } from \"@bitwarden/common/services/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/services/event/event-collection.service\";\nimport { EventUploadService } from \"@bitwarden/common/services/event/event-upload.service\";\nimport { NotificationsService } from \"@bitwarden/common/services/notifications.service\";\nimport { SearchService } from \"@bitwarden/common/services/search.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/services/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/services/vault-timeout/vault-timeout.service\";\nimport {\n PasswordStrengthService,\n PasswordStrengthServiceAbstraction,\n} from \"@bitwarden/common/tools/password-strength\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service\";\nimport { SendApiService as SendApiServiceAbstraction } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendStateProvider as SendStateProvider } from \"@bitwarden/common/tools/send/services/send-state.provider\";\nimport { SendStateProvider as SendStateProviderAbstraction } from \"@bitwarden/common/tools/send/services/send-state.provider.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service\";\nimport {\n InternalSendService,\n SendService as SendServiceAbstraction,\n} from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { CipherService as CipherServiceAbstraction } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService as CollectionServiceAbstraction } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CipherFileUploadService as CipherFileUploadServiceAbstraction } from \"@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport {\n FolderService as FolderServiceAbstraction,\n InternalFolderService,\n} from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService as TotpServiceAbstraction } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { VaultSettingsService as VaultSettingsServiceAbstraction } from \"@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service\";\nimport { CipherService } from \"@bitwarden/common/vault/services/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/services/collection.service\";\nimport { CipherFileUploadService } from \"@bitwarden/common/vault/services/file-upload/cipher-file-upload.service\";\nimport { FolderApiService } from \"@bitwarden/common/vault/services/folder/folder-api.service\";\nimport { FolderService } from \"@bitwarden/common/vault/services/folder/folder.service\";\nimport { TotpService } from \"@bitwarden/common/vault/services/totp.service\";\nimport { VaultSettingsService } from \"@bitwarden/common/vault/services/vault-settings/vault-settings.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport {\n legacyPasswordGenerationServiceFactory,\n legacyUsernameGenerationServiceFactory,\n PasswordGenerationServiceAbstraction,\n UsernameGenerationServiceAbstraction,\n} from \"@bitwarden/generator-legacy\";\nimport {\n ImportApiService,\n ImportApiServiceAbstraction,\n ImportService,\n ImportServiceAbstraction,\n} from \"@bitwarden/importer/core\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\nimport {\n VaultExportService,\n VaultExportServiceAbstraction,\n OrganizationVaultExportService,\n OrganizationVaultExportServiceAbstraction,\n IndividualVaultExportService,\n IndividualVaultExportServiceAbstraction,\n} from \"@bitwarden/vault-export-core\";\n\nimport { AuthGuard } from \"../auth/guards/auth.guard\";\nimport { UnauthGuard } from \"../auth/guards/unauth.guard\";\nimport { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from \"../platform/abstractions/form-validation-errors.service\";\nimport { FormValidationErrorsService } from \"../platform/services/form-validation-errors.service\";\nimport { LoggingErrorHandler } from \"../platform/services/logging-error-handler\";\nimport { AngularThemingService } from \"../platform/services/theming/angular-theming.service\";\nimport { AbstractThemingService } from \"../platform/services/theming/theming.service.abstraction\";\nimport { safeProvider, SafeProvider } from \"../platform/utils/safe-provider\";\n\nimport {\n LOCALES_DIRECTORY,\n LOCKED_CALLBACK,\n LOGOUT_CALLBACK,\n LOG_MAC_FAILURES,\n MEMORY_STORAGE,\n OBSERVABLE_DISK_STORAGE,\n OBSERVABLE_MEMORY_STORAGE,\n SafeInjectionToken,\n SECURE_STORAGE,\n STATE_FACTORY,\n SUPPORTS_SECURE_STORAGE,\n SYSTEM_LANGUAGE,\n SYSTEM_THEME_OBSERVABLE,\n WINDOW,\n DEFAULT_VAULT_TIMEOUT,\n INTRAPROCESS_MESSAGING_SUBJECT,\n CLIENT_TYPE,\n REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n} from \"./injection-tokens\";\nimport { ModalService } from \"./modal.service\";\n\n/**\n * Provider definitions used in the ngModule.\n * Add your provider definition here using the safeProvider function as a wrapper. This will give you type safety.\n * If you need help please ask for it, do NOT change the type of this array.\n */\nconst safeProviders: SafeProvider[] = [\n safeProvider(AuthGuard),\n safeProvider(UnauthGuard),\n safeProvider(ModalService),\n safeProvider(PasswordRepromptService),\n safeProvider({ provide: WINDOW, useValue: window }),\n safeProvider({\n provide: LOCALE_ID as SafeInjectionToken,\n useFactory: (i18nService: I18nServiceAbstraction) => i18nService.translationLocale,\n deps: [I18nServiceAbstraction],\n }),\n safeProvider({\n provide: SUPPORTS_SECURE_STORAGE,\n useFactory: (platformUtilsService: PlatformUtilsServiceAbstraction) =>\n platformUtilsService.supportsSecureStorage(),\n deps: [PlatformUtilsServiceAbstraction],\n }),\n safeProvider({\n provide: LOCALES_DIRECTORY,\n useValue: \"./locales\",\n }),\n safeProvider({\n provide: SYSTEM_LANGUAGE,\n useFactory: (window: Window) => window.navigator.language,\n deps: [WINDOW],\n }),\n safeProvider({\n provide: STATE_FACTORY,\n useValue: new StateFactory(GlobalState, Account),\n }),\n safeProvider({\n provide: LOGOUT_CALLBACK,\n useFactory:\n (messagingService: MessagingServiceAbstraction) =>\n async (logoutReason: LogoutReason, userId?: string) => {\n return Promise.resolve(\n messagingService.send(\"logout\", { logoutReason: logoutReason, userId: userId }),\n );\n },\n deps: [MessagingServiceAbstraction],\n }),\n safeProvider({\n provide: LOCKED_CALLBACK,\n useValue: null,\n }),\n safeProvider({\n provide: LOG_MAC_FAILURES,\n useValue: true,\n }),\n safeProvider({\n provide: SYSTEM_THEME_OBSERVABLE,\n useFactory: (window: Window) => AngularThemingService.createSystemThemeFromWindow(window),\n deps: [WINDOW],\n }),\n safeProvider({\n provide: ThemeStateService,\n useClass: DefaultThemeStateService,\n deps: [GlobalStateProvider],\n }),\n safeProvider({\n provide: AbstractThemingService,\n useClass: AngularThemingService,\n deps: [ThemeStateService, SYSTEM_THEME_OBSERVABLE],\n }),\n safeProvider({\n provide: AppIdServiceAbstraction,\n useClass: AppIdService,\n deps: [GlobalStateProvider],\n }),\n safeProvider({\n provide: AuditServiceAbstraction,\n useClass: AuditService,\n deps: [CryptoFunctionServiceAbstraction, ApiServiceAbstraction],\n }),\n safeProvider({\n provide: AuthServiceAbstraction,\n useClass: AuthService,\n deps: [\n AccountServiceAbstraction,\n MessagingServiceAbstraction,\n CryptoServiceAbstraction,\n ApiServiceAbstraction,\n StateServiceAbstraction,\n TokenServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: LoginStrategyServiceAbstraction,\n useClass: LoginStrategyService,\n deps: [\n AccountServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n CryptoServiceAbstraction,\n ApiServiceAbstraction,\n TokenServiceAbstraction,\n AppIdServiceAbstraction,\n PlatformUtilsServiceAbstraction,\n MessagingServiceAbstraction,\n LogService,\n KeyConnectorServiceAbstraction,\n EnvironmentService,\n StateServiceAbstraction,\n TwoFactorServiceAbstraction,\n I18nServiceAbstraction,\n EncryptService,\n PasswordStrengthServiceAbstraction,\n PolicyServiceAbstraction,\n DeviceTrustServiceAbstraction,\n AuthRequestServiceAbstraction,\n InternalUserDecryptionOptionsServiceAbstraction,\n GlobalStateProvider,\n BillingAccountProfileStateService,\n VaultTimeoutSettingsServiceAbstraction,\n KdfConfigServiceAbstraction,\n TaskSchedulerService,\n ],\n }),\n safeProvider({\n provide: FileUploadServiceAbstraction,\n useClass: FileUploadService,\n deps: [LogService],\n }),\n safeProvider({\n provide: CipherFileUploadServiceAbstraction,\n useClass: CipherFileUploadService,\n deps: [ApiServiceAbstraction, FileUploadServiceAbstraction],\n }),\n safeProvider({\n provide: CipherServiceAbstraction,\n useFactory: (\n cryptoService: CryptoServiceAbstraction,\n domainSettingsService: DomainSettingsService,\n apiService: ApiServiceAbstraction,\n i18nService: I18nServiceAbstraction,\n searchService: SearchServiceAbstraction,\n stateService: StateServiceAbstraction,\n autofillSettingsService: AutofillSettingsServiceAbstraction,\n encryptService: EncryptService,\n fileUploadService: CipherFileUploadServiceAbstraction,\n configService: ConfigService,\n stateProvider: StateProvider,\n ) =>\n new CipherService(\n cryptoService,\n domainSettingsService,\n apiService,\n i18nService,\n searchService,\n stateService,\n autofillSettingsService,\n encryptService,\n fileUploadService,\n configService,\n stateProvider,\n ),\n deps: [\n CryptoServiceAbstraction,\n DomainSettingsService,\n ApiServiceAbstraction,\n I18nServiceAbstraction,\n SearchServiceAbstraction,\n StateServiceAbstraction,\n AutofillSettingsServiceAbstraction,\n EncryptService,\n CipherFileUploadServiceAbstraction,\n ConfigService,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: InternalFolderService,\n useClass: FolderService,\n deps: [\n CryptoServiceAbstraction,\n I18nServiceAbstraction,\n CipherServiceAbstraction,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: FolderServiceAbstraction,\n useExisting: InternalFolderService,\n }),\n safeProvider({\n provide: FolderApiServiceAbstraction,\n useClass: FolderApiService,\n deps: [InternalFolderService, ApiServiceAbstraction],\n }),\n safeProvider({\n provide: AccountApiServiceAbstraction,\n useClass: AccountApiServiceImplementation,\n deps: [\n ApiServiceAbstraction,\n UserVerificationServiceAbstraction,\n LogService,\n InternalAccountService,\n EnvironmentService,\n ],\n }),\n safeProvider({\n provide: InternalAccountService,\n useClass: AccountServiceImplementation,\n deps: [MessagingServiceAbstraction, LogService, GlobalStateProvider],\n }),\n safeProvider({\n provide: AccountServiceAbstraction,\n useExisting: InternalAccountService,\n }),\n safeProvider({\n provide: AvatarServiceAbstraction,\n useClass: AvatarService,\n deps: [ApiServiceAbstraction, StateProvider],\n }),\n safeProvider({ provide: LogService, useFactory: () => new ConsoleLogService(false), deps: [] }),\n safeProvider({\n provide: CollectionServiceAbstraction,\n useClass: CollectionService,\n deps: [CryptoServiceAbstraction, I18nServiceAbstraction, StateProvider],\n }),\n safeProvider({\n provide: EnvironmentService,\n useClass: DefaultEnvironmentService,\n deps: [StateProvider, AccountServiceAbstraction],\n }),\n safeProvider({\n provide: InternalUserDecryptionOptionsServiceAbstraction,\n useClass: UserDecryptionOptionsService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: UserDecryptionOptionsServiceAbstraction,\n useExisting: InternalUserDecryptionOptionsServiceAbstraction,\n }),\n safeProvider({\n provide: TotpServiceAbstraction,\n useClass: TotpService,\n deps: [CryptoFunctionServiceAbstraction, LogService],\n }),\n safeProvider({\n provide: TokenServiceAbstraction,\n useClass: TokenService,\n deps: [\n SingleUserStateProvider,\n GlobalStateProvider,\n SUPPORTS_SECURE_STORAGE,\n SECURE_STORAGE,\n KeyGenerationServiceAbstraction,\n EncryptService,\n LogService,\n LOGOUT_CALLBACK,\n ],\n }),\n safeProvider({\n provide: KeyGenerationServiceAbstraction,\n useClass: KeyGenerationService,\n deps: [CryptoFunctionServiceAbstraction],\n }),\n safeProvider({\n provide: CryptoServiceAbstraction,\n useClass: CryptoService,\n deps: [\n PinServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n KeyGenerationServiceAbstraction,\n CryptoFunctionServiceAbstraction,\n EncryptService,\n PlatformUtilsServiceAbstraction,\n LogService,\n StateServiceAbstraction,\n AccountServiceAbstraction,\n StateProvider,\n KdfConfigServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: PasswordStrengthServiceAbstraction,\n useClass: PasswordStrengthService,\n deps: [],\n }),\n safeProvider({\n provide: PasswordGenerationServiceAbstraction,\n useFactory: legacyPasswordGenerationServiceFactory,\n deps: [\n EncryptService,\n CryptoServiceAbstraction,\n PolicyServiceAbstraction,\n AccountServiceAbstraction,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: UsernameGenerationServiceAbstraction,\n useFactory: legacyUsernameGenerationServiceFactory,\n deps: [\n ApiServiceAbstraction,\n I18nServiceAbstraction,\n CryptoServiceAbstraction,\n EncryptService,\n PolicyServiceAbstraction,\n AccountServiceAbstraction,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n useFactory: (toastService: ToastService, i18nService: I18nServiceAbstraction) => () => {\n toastService.showToast({\n variant: \"error\",\n title: i18nService.t(\"errorRefreshingAccessToken\"),\n message: i18nService.t(\"errorRefreshingAccessTokenDesc\"),\n });\n },\n deps: [ToastService, I18nServiceAbstraction],\n }),\n safeProvider({\n provide: ApiServiceAbstraction,\n useClass: ApiService,\n deps: [\n TokenServiceAbstraction,\n PlatformUtilsServiceAbstraction,\n EnvironmentService,\n AppIdServiceAbstraction,\n REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n LogService,\n LOGOUT_CALLBACK,\n VaultTimeoutSettingsServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: SendServiceAbstraction,\n useExisting: InternalSendService,\n }),\n safeProvider({\n provide: InternalSendService,\n useClass: SendService,\n deps: [\n CryptoServiceAbstraction,\n I18nServiceAbstraction,\n KeyGenerationServiceAbstraction,\n SendStateProviderAbstraction,\n EncryptService,\n ],\n }),\n safeProvider({\n provide: SendStateProviderAbstraction,\n useClass: SendStateProvider,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: SendApiServiceAbstraction,\n useClass: SendApiService,\n deps: [ApiServiceAbstraction, FileUploadServiceAbstraction, InternalSendService],\n }),\n safeProvider({\n provide: SyncService,\n useClass: DefaultSyncService,\n deps: [\n InternalMasterPasswordServiceAbstraction,\n AccountServiceAbstraction,\n ApiServiceAbstraction,\n DomainSettingsService,\n InternalFolderService,\n CipherServiceAbstraction,\n CryptoServiceAbstraction,\n CollectionServiceAbstraction,\n MessagingServiceAbstraction,\n InternalPolicyService,\n InternalSendService,\n LogService,\n KeyConnectorServiceAbstraction,\n StateServiceAbstraction,\n ProviderServiceAbstraction,\n FolderApiServiceAbstraction,\n InternalOrganizationServiceAbstraction,\n SendApiServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n AvatarServiceAbstraction,\n LOGOUT_CALLBACK,\n BillingAccountProfileStateService,\n TokenServiceAbstraction,\n AuthServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: BroadcasterService,\n useClass: DefaultBroadcasterService,\n deps: [MessageListener],\n }),\n safeProvider({\n provide: VaultTimeoutSettingsServiceAbstraction,\n useClass: VaultTimeoutSettingsService,\n deps: [\n AccountServiceAbstraction,\n PinServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n CryptoServiceAbstraction,\n TokenServiceAbstraction,\n PolicyServiceAbstraction,\n BiometricStateService,\n StateProvider,\n LogService,\n DEFAULT_VAULT_TIMEOUT,\n ],\n }),\n safeProvider({\n provide: VaultTimeoutService,\n useClass: VaultTimeoutService,\n deps: [\n AccountServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n CipherServiceAbstraction,\n FolderServiceAbstraction,\n CollectionServiceAbstraction,\n PlatformUtilsServiceAbstraction,\n MessagingServiceAbstraction,\n SearchServiceAbstraction,\n StateServiceAbstraction,\n AuthServiceAbstraction,\n VaultTimeoutSettingsServiceAbstraction,\n StateEventRunnerService,\n TaskSchedulerService,\n LogService,\n LOCKED_CALLBACK,\n LOGOUT_CALLBACK,\n ],\n }),\n safeProvider({\n provide: VaultTimeoutServiceAbstraction,\n useExisting: VaultTimeoutService,\n }),\n safeProvider({\n provide: SsoLoginServiceAbstraction,\n useClass: SsoLoginService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: STATE_FACTORY,\n useValue: new StateFactory(GlobalState, Account),\n }),\n safeProvider({\n provide: StateServiceAbstraction,\n useClass: StateService,\n deps: [\n AbstractStorageService,\n SECURE_STORAGE,\n MEMORY_STORAGE,\n LogService,\n STATE_FACTORY,\n AccountServiceAbstraction,\n EnvironmentService,\n TokenServiceAbstraction,\n MigrationRunner,\n ],\n }),\n safeProvider({\n provide: ImportApiServiceAbstraction,\n useClass: ImportApiService,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: ImportServiceAbstraction,\n useClass: ImportService,\n deps: [\n CipherServiceAbstraction,\n FolderServiceAbstraction,\n ImportApiServiceAbstraction,\n I18nServiceAbstraction,\n CollectionServiceAbstraction,\n CryptoServiceAbstraction,\n PinServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: IndividualVaultExportServiceAbstraction,\n useClass: IndividualVaultExportService,\n deps: [\n FolderServiceAbstraction,\n CipherServiceAbstraction,\n PinServiceAbstraction,\n CryptoServiceAbstraction,\n CryptoFunctionServiceAbstraction,\n KdfConfigServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: OrganizationVaultExportServiceAbstraction,\n useClass: OrganizationVaultExportService,\n deps: [\n CipherServiceAbstraction,\n ApiServiceAbstraction,\n PinServiceAbstraction,\n CryptoServiceAbstraction,\n CryptoFunctionServiceAbstraction,\n CollectionServiceAbstraction,\n KdfConfigServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: VaultExportServiceAbstraction,\n useClass: VaultExportService,\n deps: [IndividualVaultExportServiceAbstraction, OrganizationVaultExportServiceAbstraction],\n }),\n safeProvider({\n provide: SearchServiceAbstraction,\n useClass: SearchService,\n deps: [LogService, I18nServiceAbstraction, StateProvider],\n }),\n safeProvider({\n provide: NotificationsServiceAbstraction,\n useClass: devFlagEnabled(\"noopNotifications\") ? NoopNotificationsService : NotificationsService,\n deps: [\n LogService,\n SyncService,\n AppIdServiceAbstraction,\n ApiServiceAbstraction,\n EnvironmentService,\n LOGOUT_CALLBACK,\n StateServiceAbstraction,\n AuthServiceAbstraction,\n MessagingServiceAbstraction,\n TaskSchedulerService,\n ],\n }),\n safeProvider({\n provide: CryptoFunctionServiceAbstraction,\n useClass: WebCryptoFunctionService,\n deps: [WINDOW],\n }),\n safeProvider({\n provide: EncryptService,\n useClass: MultithreadEncryptServiceImplementation,\n deps: [CryptoFunctionServiceAbstraction, LogService, LOG_MAC_FAILURES],\n }),\n safeProvider({\n provide: EventUploadServiceAbstraction,\n useClass: EventUploadService,\n deps: [\n ApiServiceAbstraction,\n StateProvider,\n LogService,\n AuthServiceAbstraction,\n TaskSchedulerService,\n ],\n }),\n safeProvider({\n provide: EventCollectionServiceAbstraction,\n useClass: EventCollectionService,\n deps: [\n CipherServiceAbstraction,\n StateProvider,\n OrganizationServiceAbstraction,\n EventUploadServiceAbstraction,\n AuthServiceAbstraction,\n AccountServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: InternalPolicyService,\n useClass: PolicyService,\n deps: [StateProvider, OrganizationServiceAbstraction],\n }),\n safeProvider({\n provide: PolicyServiceAbstraction,\n useExisting: InternalPolicyService,\n }),\n safeProvider({\n provide: PolicyApiServiceAbstraction,\n useClass: PolicyApiService,\n deps: [InternalPolicyService, ApiServiceAbstraction],\n }),\n safeProvider({\n provide: InternalMasterPasswordServiceAbstraction,\n useClass: MasterPasswordService,\n deps: [StateProvider, StateServiceAbstraction, KeyGenerationServiceAbstraction, EncryptService],\n }),\n safeProvider({\n provide: MasterPasswordServiceAbstraction,\n useExisting: InternalMasterPasswordServiceAbstraction,\n }),\n safeProvider({\n provide: KeyConnectorServiceAbstraction,\n useClass: KeyConnectorService,\n deps: [\n AccountServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n CryptoServiceAbstraction,\n ApiServiceAbstraction,\n TokenServiceAbstraction,\n LogService,\n OrganizationServiceAbstraction,\n KeyGenerationServiceAbstraction,\n LOGOUT_CALLBACK,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: UserVerificationServiceAbstraction,\n useClass: UserVerificationService,\n deps: [\n CryptoServiceAbstraction,\n AccountServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n I18nServiceAbstraction,\n UserVerificationApiServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n PinServiceAbstraction,\n LogService,\n VaultTimeoutSettingsServiceAbstraction,\n PlatformUtilsServiceAbstraction,\n KdfConfigServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: InternalOrganizationServiceAbstraction,\n useClass: OrganizationService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: OrganizationServiceAbstraction,\n useExisting: InternalOrganizationServiceAbstraction,\n }),\n safeProvider({\n provide: OrganizationUserService,\n useClass: OrganizationUserServiceImplementation,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: PasswordResetEnrollmentServiceAbstraction,\n useClass: PasswordResetEnrollmentServiceImplementation,\n deps: [\n OrganizationApiServiceAbstraction,\n AccountServiceAbstraction,\n CryptoServiceAbstraction,\n OrganizationUserService,\n I18nServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: ProviderServiceAbstraction,\n useClass: ProviderService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: TwoFactorServiceAbstraction,\n useClass: TwoFactorService,\n deps: [I18nServiceAbstraction, PlatformUtilsServiceAbstraction, GlobalStateProvider],\n }),\n safeProvider({\n provide: FormValidationErrorsServiceAbstraction,\n useClass: FormValidationErrorsService,\n deps: [],\n }),\n safeProvider({\n provide: UserVerificationApiServiceAbstraction,\n useClass: UserVerificationApiService,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: OrganizationApiServiceAbstraction,\n useClass: OrganizationApiService,\n // This is a slightly odd dependency tree for a specialized api service\n // it depends on SyncService so that new data can be retrieved through the sync\n // rather than updating the OrganizationService directly. Instead OrganizationService\n // subscribes to sync notifications and will update itself based on that.\n deps: [ApiServiceAbstraction, SyncService],\n }),\n safeProvider({\n provide: DefaultConfigService,\n useClass: DefaultConfigService,\n deps: [\n ConfigApiServiceAbstraction,\n EnvironmentService,\n LogService,\n StateProvider,\n AuthServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: ConfigService,\n useExisting: DefaultConfigService,\n }),\n safeProvider({\n provide: ConfigApiServiceAbstraction,\n useClass: ConfigApiService,\n deps: [ApiServiceAbstraction, TokenServiceAbstraction],\n }),\n safeProvider({\n provide: AnonymousHubServiceAbstraction,\n useClass: AnonymousHubService,\n deps: [EnvironmentService, AuthRequestServiceAbstraction],\n }),\n safeProvider({\n provide: ValidationServiceAbstraction,\n useClass: ValidationService,\n deps: [I18nServiceAbstraction, PlatformUtilsServiceAbstraction],\n }),\n safeProvider({\n provide: LoginEmailServiceAbstraction,\n useClass: LoginEmailService,\n deps: [AccountServiceAbstraction, AuthServiceAbstraction, StateProvider],\n }),\n safeProvider({\n provide: OrgDomainInternalServiceAbstraction,\n useClass: OrgDomainService,\n deps: [PlatformUtilsServiceAbstraction, I18nServiceAbstraction],\n }),\n safeProvider({\n provide: OrgDomainServiceAbstraction,\n useExisting: OrgDomainInternalServiceAbstraction,\n }),\n safeProvider({\n provide: OrgDomainApiServiceAbstraction,\n useClass: OrgDomainApiService,\n deps: [OrgDomainInternalServiceAbstraction, ApiServiceAbstraction],\n }),\n safeProvider({\n provide: DevicesApiServiceAbstraction,\n useClass: DevicesApiServiceImplementation,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: DevicesServiceAbstraction,\n useClass: DevicesServiceImplementation,\n deps: [DevicesApiServiceAbstraction],\n }),\n safeProvider({\n provide: DeviceTrustServiceAbstraction,\n useClass: DeviceTrustService,\n deps: [\n KeyGenerationServiceAbstraction,\n CryptoFunctionServiceAbstraction,\n CryptoServiceAbstraction,\n EncryptService,\n AppIdServiceAbstraction,\n DevicesApiServiceAbstraction,\n I18nServiceAbstraction,\n PlatformUtilsServiceAbstraction,\n StateProvider,\n SECURE_STORAGE,\n UserDecryptionOptionsServiceAbstraction,\n LogService,\n ],\n }),\n safeProvider({\n provide: AuthRequestServiceAbstraction,\n useClass: AuthRequestService,\n deps: [\n AppIdServiceAbstraction,\n AccountServiceAbstraction,\n InternalMasterPasswordServiceAbstraction,\n CryptoServiceAbstraction,\n ApiServiceAbstraction,\n StateProvider,\n ],\n }),\n safeProvider({\n provide: PinServiceAbstraction,\n useClass: PinService,\n deps: [\n AccountServiceAbstraction,\n CryptoFunctionServiceAbstraction,\n EncryptService,\n KdfConfigServiceAbstraction,\n KeyGenerationServiceAbstraction,\n LogService,\n MasterPasswordServiceAbstraction,\n StateProvider,\n StateServiceAbstraction,\n ],\n }),\n safeProvider({\n provide: WebAuthnLoginPrfCryptoServiceAbstraction,\n useClass: WebAuthnLoginPrfCryptoService,\n deps: [CryptoFunctionServiceAbstraction],\n }),\n safeProvider({\n provide: WebAuthnLoginApiServiceAbstraction,\n useClass: WebAuthnLoginApiService,\n deps: [ApiServiceAbstraction, EnvironmentService],\n }),\n safeProvider({\n provide: WebAuthnLoginServiceAbstraction,\n useClass: WebAuthnLoginService,\n deps: [\n WebAuthnLoginApiServiceAbstraction,\n LoginStrategyServiceAbstraction,\n WebAuthnLoginPrfCryptoServiceAbstraction,\n WINDOW,\n LogService,\n ],\n }),\n safeProvider({\n provide: StorageServiceProvider,\n useClass: StorageServiceProvider,\n deps: [OBSERVABLE_DISK_STORAGE, OBSERVABLE_MEMORY_STORAGE],\n }),\n safeProvider({\n provide: StateEventRegistrarService,\n useClass: StateEventRegistrarService,\n deps: [GlobalStateProvider, StorageServiceProvider],\n }),\n safeProvider({\n provide: StateEventRunnerService,\n useClass: StateEventRunnerService,\n deps: [GlobalStateProvider, StorageServiceProvider],\n }),\n safeProvider({\n provide: GlobalStateProvider,\n useClass: DefaultGlobalStateProvider,\n deps: [StorageServiceProvider],\n }),\n safeProvider({\n provide: ActiveUserStateProvider,\n useClass: DefaultActiveUserStateProvider,\n deps: [AccountServiceAbstraction, SingleUserStateProvider],\n }),\n safeProvider({\n provide: SingleUserStateProvider,\n useClass: DefaultSingleUserStateProvider,\n deps: [StorageServiceProvider, StateEventRegistrarService],\n }),\n safeProvider({\n provide: DerivedStateProvider,\n useClass: DefaultDerivedStateProvider,\n deps: [],\n }),\n safeProvider({\n provide: StateProvider,\n useClass: DefaultStateProvider,\n deps: [\n ActiveUserStateProvider,\n SingleUserStateProvider,\n GlobalStateProvider,\n DerivedStateProvider,\n ],\n }),\n safeProvider({\n provide: OrganizationBillingServiceAbstraction,\n useClass: OrganizationBillingService,\n deps: [\n ApiServiceAbstraction,\n CryptoServiceAbstraction,\n EncryptService,\n I18nServiceAbstraction,\n OrganizationApiServiceAbstraction,\n SyncService,\n ],\n }),\n safeProvider({\n provide: AutofillSettingsServiceAbstraction,\n useClass: AutofillSettingsService,\n deps: [StateProvider, PolicyServiceAbstraction],\n }),\n safeProvider({\n provide: BadgeSettingsServiceAbstraction,\n useClass: BadgeSettingsService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: DomainSettingsService,\n useClass: DefaultDomainSettingsService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: BiometricStateService,\n useClass: DefaultBiometricStateService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: VaultSettingsServiceAbstraction,\n useClass: VaultSettingsService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: MigrationRunner,\n useClass: MigrationRunner,\n deps: [AbstractStorageService, LogService, MigrationBuilderService, CLIENT_TYPE],\n }),\n safeProvider({\n provide: MigrationBuilderService,\n useClass: MigrationBuilderService,\n deps: [],\n }),\n safeProvider({\n provide: BillingApiServiceAbstraction,\n useClass: BillingApiService,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: PaymentMethodWarningsServiceAbstraction,\n useClass: PaymentMethodWarningsService,\n deps: [BillingApiServiceAbstraction, StateProvider],\n }),\n safeProvider({\n provide: BillingAccountProfileStateService,\n useClass: DefaultBillingAccountProfileStateService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: OrganizationManagementPreferencesService,\n useClass: DefaultOrganizationManagementPreferencesService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: UserAutoUnlockKeyService,\n useClass: UserAutoUnlockKeyService,\n deps: [CryptoServiceAbstraction],\n }),\n safeProvider({\n provide: ErrorHandler,\n useClass: LoggingErrorHandler,\n deps: [],\n }),\n safeProvider({\n provide: INTRAPROCESS_MESSAGING_SUBJECT,\n useFactory: () => new Subject>>(),\n deps: [],\n }),\n safeProvider({\n provide: MessageListener,\n useFactory: (subject: Subject>>) =>\n new MessageListener(subject.asObservable()),\n deps: [INTRAPROCESS_MESSAGING_SUBJECT],\n }),\n safeProvider({\n provide: MessageSender,\n useFactory: (subject: Subject>>) =>\n new SubjectMessageSender(subject),\n deps: [INTRAPROCESS_MESSAGING_SUBJECT],\n }),\n safeProvider({\n provide: TaskSchedulerService,\n useClass: DefaultTaskSchedulerService,\n deps: [LogService],\n }),\n safeProvider({\n provide: ProviderApiServiceAbstraction,\n useClass: ProviderApiService,\n deps: [ApiServiceAbstraction],\n }),\n safeProvider({\n provide: KdfConfigServiceAbstraction,\n useClass: KdfConfigService,\n deps: [StateProvider],\n }),\n safeProvider({\n provide: BraintreeServiceAbstraction,\n useClass: BraintreeService,\n deps: [LogService],\n }),\n safeProvider({\n provide: StripeServiceAbstraction,\n useClass: StripeService,\n deps: [LogService],\n }),\n safeProvider({\n provide: RegisterRouteService,\n useClass: RegisterRouteService,\n deps: [ConfigService],\n }),\n safeProvider({\n provide: RegistrationFinishServiceAbstraction,\n useClass: DefaultRegistrationFinishService,\n deps: [CryptoServiceAbstraction, AccountApiServiceAbstraction],\n }),\n];\n\n@NgModule({\n declarations: [],\n // Do not register your dependency here! Add it to the typesafeProviders array using the helper function\n providers: safeProviders,\n})\nexport class JslibServicesModule {}\n","import {\n Observable,\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n map,\n of,\n shareReplay,\n switchMap,\n} from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { MessageSender } from \"../../platform/messaging\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { UserId } from \"../../types/guid\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { AuthService as AuthServiceAbstraction } from \"../abstractions/auth.service\";\nimport { TokenService } from \"../abstractions/token.service\";\nimport { AuthenticationStatus } from \"../enums/authentication-status\";\n\nexport class AuthService implements AuthServiceAbstraction {\n activeAccountStatus$: Observable;\n authStatuses$: Observable>;\n\n constructor(\n protected accountService: AccountService,\n protected messageSender: MessageSender,\n protected cryptoService: CryptoService,\n protected apiService: ApiService,\n protected stateService: StateService,\n private tokenService: TokenService,\n ) {\n this.activeAccountStatus$ = this.accountService.activeAccount$.pipe(\n map((account) => account?.id),\n switchMap((userId) => {\n return this.authStatusFor$(userId);\n }),\n );\n\n this.authStatuses$ = this.accountService.accounts$.pipe(\n map((accounts) => Object.keys(accounts) as UserId[]),\n switchMap((entries) => {\n if (entries.length === 0) {\n return of([] as { userId: UserId; status: AuthenticationStatus }[]);\n }\n return combineLatest(\n entries.map((userId) =>\n this.authStatusFor$(userId).pipe(map((status) => ({ userId, status }))),\n ),\n );\n }),\n map((statuses) => {\n return statuses.reduce(\n (acc, { userId, status }) => {\n acc[userId] = status;\n return acc;\n },\n {} as Record,\n );\n }),\n );\n }\n\n authStatusFor$(userId: UserId): Observable {\n if (!Utils.isGuid(userId)) {\n return of(AuthenticationStatus.LoggedOut);\n }\n\n return combineLatest([\n this.cryptoService.getInMemoryUserKeyFor$(userId),\n this.tokenService.hasAccessToken$(userId),\n ]).pipe(\n map(([userKey, hasAccessToken]) => {\n if (!hasAccessToken) {\n return AuthenticationStatus.LoggedOut;\n }\n\n if (!userKey) {\n return AuthenticationStatus.Locked;\n }\n\n return AuthenticationStatus.Unlocked;\n }),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: false }),\n );\n }\n\n async getAuthStatus(userId?: string): Promise {\n userId ??= await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n return await firstValueFrom(this.authStatusFor$(userId as UserId));\n }\n\n logOut(callback: () => void) {\n callback();\n this.messageSender.send(\"loggedOut\");\n }\n}\n","import {\n FileUploadApiMethods,\n FileUploadService as FileUploadServiceAbstraction,\n} from \"../../abstractions/file-upload/file-upload.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { FileUploadType } from \"../../enums\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\n\nimport { AzureFileUploadService } from \"./azure-file-upload.service\";\nimport { BitwardenFileUploadService } from \"./bitwarden-file-upload.service\";\n\nexport class FileUploadService implements FileUploadServiceAbstraction {\n private azureFileUploadService: AzureFileUploadService;\n private bitwardenFileUploadService: BitwardenFileUploadService;\n\n constructor(protected logService: LogService) {\n this.azureFileUploadService = new AzureFileUploadService(logService);\n this.bitwardenFileUploadService = new BitwardenFileUploadService();\n }\n\n async upload(\n uploadData: { url: string; fileUploadType: FileUploadType },\n fileName: EncString,\n encryptedFileData: EncArrayBuffer,\n fileUploadMethods: FileUploadApiMethods,\n ) {\n try {\n switch (uploadData.fileUploadType) {\n case FileUploadType.Direct:\n await this.bitwardenFileUploadService.upload(\n fileName.encryptedString,\n encryptedFileData,\n (fd) => fileUploadMethods.postDirect(fd),\n );\n break;\n case FileUploadType.Azure: {\n await this.azureFileUploadService.upload(\n uploadData.url,\n encryptedFileData,\n fileUploadMethods.renewFileUploadUrl,\n );\n break;\n }\n default:\n throw new Error(\"Unknown file upload type\");\n }\n } catch (e) {\n await fileUploadMethods.rollback();\n throw e;\n }\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport {\n FileUploadApiMethods,\n FileUploadService,\n} from \"../../../platform/abstractions/file-upload/file-upload.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { CipherFileUploadService as CipherFileUploadServiceAbstraction } from \"../../abstractions/file-upload/cipher-file-upload.service\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { AttachmentRequest } from \"../../models/request/attachment.request\";\nimport { AttachmentUploadDataResponse } from \"../../models/response/attachment-upload-data.response\";\nimport { CipherResponse } from \"../../models/response/cipher.response\";\n\nexport class CipherFileUploadService implements CipherFileUploadServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private fileUploadService: FileUploadService,\n ) {}\n\n async upload(\n cipher: Cipher,\n encFileName: EncString,\n encData: EncArrayBuffer,\n admin: boolean,\n dataEncKey: [SymmetricCryptoKey, EncString],\n ): Promise {\n const request: AttachmentRequest = {\n key: dataEncKey[1].encryptedString,\n fileName: encFileName.encryptedString,\n fileSize: encData.buffer.byteLength,\n adminRequest: admin,\n };\n\n let response: CipherResponse;\n try {\n const uploadDataResponse = await this.apiService.postCipherAttachment(cipher.id, request);\n response = admin ? uploadDataResponse.cipherMiniResponse : uploadDataResponse.cipherResponse;\n await this.fileUploadService.upload(\n uploadDataResponse,\n encFileName,\n encData,\n this.generateMethods(uploadDataResponse, response, request.adminRequest),\n );\n } catch (e) {\n if (\n (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) ||\n (e as ErrorResponse).statusCode === 405\n ) {\n response = await this.legacyServerAttachmentFileUpload(\n request.adminRequest,\n cipher.id,\n encFileName,\n encData,\n dataEncKey[1],\n );\n } else if (e instanceof ErrorResponse) {\n throw new Error((e as ErrorResponse).getSingleMessage());\n } else {\n throw e;\n }\n }\n return response;\n }\n\n private generateMethods(\n uploadData: AttachmentUploadDataResponse,\n response: CipherResponse,\n isAdmin: boolean,\n ): FileUploadApiMethods {\n return {\n postDirect: this.generatePostDirectCallback(uploadData, isAdmin),\n renewFileUploadUrl: this.generateRenewFileUploadUrlCallback(uploadData, response, isAdmin),\n rollback: this.generateRollbackCallback(response, uploadData, isAdmin),\n };\n }\n\n private generatePostDirectCallback(uploadData: AttachmentUploadDataResponse, isAdmin: boolean) {\n return (data: FormData) => {\n const response = isAdmin ? uploadData.cipherMiniResponse : uploadData.cipherResponse;\n return this.apiService.postAttachmentFile(response.id, uploadData.attachmentId, data);\n };\n }\n\n private generateRenewFileUploadUrlCallback(\n uploadData: AttachmentUploadDataResponse,\n response: CipherResponse,\n isAdmin: boolean,\n ) {\n return async () => {\n const renewResponse = await this.apiService.renewAttachmentUploadUrl(\n response.id,\n uploadData.attachmentId,\n );\n return renewResponse?.url;\n };\n }\n\n private generateRollbackCallback(\n response: CipherResponse,\n uploadData: AttachmentUploadDataResponse,\n isAdmin: boolean,\n ) {\n return () => {\n if (isAdmin) {\n return this.apiService.deleteCipherAttachmentAdmin(response.id, uploadData.attachmentId);\n } else {\n return this.apiService.deleteCipherAttachment(response.id, uploadData.attachmentId);\n }\n };\n }\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n async legacyServerAttachmentFileUpload(\n admin: boolean,\n cipherId: string,\n encFileName: EncString,\n encData: EncArrayBuffer,\n key: EncString,\n ) {\n const fd = new FormData();\n try {\n const blob = new Blob([encData.buffer], { type: \"application/octet-stream\" });\n fd.append(\"key\", key.encryptedString);\n fd.append(\"data\", blob, encFileName.encryptedString);\n } catch (e) {\n if (Utils.isNode && !Utils.isBrowser) {\n fd.append(\"key\", key.encryptedString);\n fd.append(\n \"data\",\n Buffer.from(encData.buffer) as any,\n {\n filepath: encFileName.encryptedString,\n contentType: \"application/octet-stream\",\n } as any,\n );\n } else {\n throw e;\n }\n }\n\n let response: CipherResponse;\n try {\n if (admin) {\n response = await this.apiService.postCipherAttachmentAdminLegacy(cipherId, fd);\n } else {\n response = await this.apiService.postCipherAttachmentLegacy(cipherId, fd);\n }\n } catch (e) {\n throw new Error((e as ErrorResponse).getSingleMessage());\n }\n\n return response;\n }\n}\n","import { Observable, firstValueFrom, map, shareReplay } from \"rxjs\";\n\nimport { CryptoService } from \"../../../platform/abstractions/crypto.service\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { ActiveUserState, DerivedState, StateProvider } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { CipherService } from \"../../../vault/abstractions/cipher.service\";\nimport { InternalFolderService as InternalFolderServiceAbstraction } from \"../../../vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderData } from \"../../../vault/models/data/folder.data\";\nimport { Folder } from \"../../../vault/models/domain/folder\";\nimport { FolderView } from \"../../../vault/models/view/folder.view\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { FolderWithIdRequest } from \"../../models/request/folder-with-id.request\";\nimport { FOLDER_DECRYPTED_FOLDERS, FOLDER_ENCRYPTED_FOLDERS } from \"../key-state/folder.state\";\n\nexport class FolderService implements InternalFolderServiceAbstraction {\n folders$: Observable;\n folderViews$: Observable;\n\n private encryptedFoldersState: ActiveUserState>;\n private decryptedFoldersState: DerivedState;\n\n constructor(\n private cryptoService: CryptoService,\n private i18nService: I18nService,\n private cipherService: CipherService,\n private stateProvider: StateProvider,\n ) {\n this.encryptedFoldersState = this.stateProvider.getActive(FOLDER_ENCRYPTED_FOLDERS);\n this.decryptedFoldersState = this.stateProvider.getDerived(\n this.encryptedFoldersState.state$,\n FOLDER_DECRYPTED_FOLDERS,\n { folderService: this, cryptoService: this.cryptoService },\n );\n\n this.folders$ = this.encryptedFoldersState.state$.pipe(\n map((folderData) => Object.values(folderData).map((f) => new Folder(f))),\n );\n\n this.folderViews$ = this.decryptedFoldersState.state$;\n }\n\n async clearCache(): Promise {\n await this.decryptedFoldersState.forceValue([]);\n }\n\n // TODO: This should be moved to EncryptService or something\n async encrypt(model: FolderView, key?: SymmetricCryptoKey): Promise {\n const folder = new Folder();\n folder.id = model.id;\n folder.name = await this.cryptoService.encrypt(model.name, key);\n return folder;\n }\n\n async get(id: string): Promise {\n const folders = await firstValueFrom(this.folders$);\n\n return folders.find((folder) => folder.id === id);\n }\n\n getDecrypted$(id: string): Observable {\n return this.folderViews$.pipe(\n map((folders) => folders.find((folder) => folder.id === id)),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n }\n\n async getAllFromState(): Promise {\n return await firstValueFrom(this.folders$);\n }\n\n /**\n * @deprecated For the CLI only\n * @param id id of the folder\n */\n async getFromState(id: string): Promise {\n const folder = await this.get(id);\n if (!folder) {\n return null;\n }\n\n return folder;\n }\n\n /**\n * @deprecated Only use in CLI!\n */\n async getAllDecryptedFromState(): Promise {\n return await firstValueFrom(this.folderViews$);\n }\n\n async upsert(folderData: FolderData | FolderData[]): Promise {\n await this.encryptedFoldersState.update((folders) => {\n if (folders == null) {\n folders = {};\n }\n\n if (folderData instanceof FolderData) {\n const f = folderData as FolderData;\n folders[f.id] = f;\n } else {\n (folderData as FolderData[]).forEach((f) => {\n folders[f.id] = f;\n });\n }\n\n return folders;\n });\n }\n\n async replace(folders: { [id: string]: FolderData }): Promise {\n if (!folders) {\n return;\n }\n\n await this.encryptedFoldersState.update(() => {\n const newFolders: Record = { ...folders };\n return newFolders;\n });\n }\n\n async clear(userId?: UserId): Promise {\n if (userId == null) {\n await this.encryptedFoldersState.update(() => ({}));\n await this.decryptedFoldersState.forceValue([]);\n } else {\n await this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS).update(() => ({}));\n }\n }\n\n async delete(id: string | string[]): Promise {\n await this.encryptedFoldersState.update((folders) => {\n if (folders == null) {\n return;\n }\n\n if (typeof id === \"string\") {\n if (folders[id] == null) {\n return;\n }\n delete folders[id];\n } else {\n (id as string[]).forEach((i) => {\n delete folders[i];\n });\n }\n return folders;\n });\n\n // Items in a deleted folder are re-assigned to \"No Folder\"\n const ciphers = await this.cipherService.getAll();\n if (ciphers != null) {\n const updates: Cipher[] = [];\n for (const cId in ciphers) {\n if (ciphers[cId].folderId === id) {\n ciphers[cId].folderId = null;\n updates.push(ciphers[cId]);\n }\n }\n if (updates.length > 0) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.cipherService.upsert(updates.map((c) => c.toCipherData()));\n }\n }\n }\n\n async decryptFolders(folders: Folder[]) {\n const decryptFolderPromises = folders.map((f) => f.decrypt());\n const decryptedFolders = await Promise.all(decryptFolderPromises);\n\n decryptedFolders.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n\n const noneFolder = new FolderView();\n noneFolder.name = this.i18nService.t(\"noneFolder\");\n decryptedFolders.push(noneFolder);\n return decryptedFolders;\n }\n\n async getRotatedData(\n originalUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (newUserKey == null) {\n throw new Error(\"New user key is required for rotation.\");\n }\n\n let encryptedFolders: FolderWithIdRequest[] = [];\n const folders = await firstValueFrom(this.folderViews$);\n if (!folders) {\n return encryptedFolders;\n }\n encryptedFolders = await Promise.all(\n folders.map(async (folder) => {\n const encryptedFolder = await this.encrypt(folder, newUserKey);\n return new FolderWithIdRequest(encryptedFolder);\n }),\n );\n return encryptedFolders;\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { FolderApiServiceAbstraction } from \"../../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../../vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderData } from \"../../../vault/models/data/folder.data\";\nimport { Folder } from \"../../../vault/models/domain/folder\";\nimport { FolderRequest } from \"../../../vault/models/request/folder.request\";\nimport { FolderResponse } from \"../../../vault/models/response/folder.response\";\n\nexport class FolderApiService implements FolderApiServiceAbstraction {\n constructor(\n private folderService: InternalFolderService,\n private apiService: ApiService,\n ) {}\n\n async save(folder: Folder): Promise {\n const request = new FolderRequest(folder);\n\n let response: FolderResponse;\n if (folder.id == null) {\n response = await this.postFolder(request);\n folder.id = response.id;\n } else {\n response = await this.putFolder(folder.id, request);\n }\n\n const data = new FolderData(response);\n await this.folderService.upsert(data);\n }\n\n async delete(id: string): Promise {\n await this.deleteFolder(id);\n await this.folderService.delete(id);\n }\n\n async get(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/folders/\" + id, null, true, true);\n return new FolderResponse(r);\n }\n\n private async postFolder(request: FolderRequest): Promise {\n const r = await this.apiService.send(\"POST\", \"/folders\", request, true, true);\n return new FolderResponse(r);\n }\n\n async putFolder(id: string, request: FolderRequest): Promise {\n const r = await this.apiService.send(\"PUT\", \"/folders/\" + id, request, true, true);\n return new FolderResponse(r);\n }\n\n private deleteFolder(id: string): Promise {\n return this.apiService.send(\"DELETE\", \"/folders/\" + id, null, true, false);\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../models/response/error.response\";\nimport { EnvironmentService } from \"../../platform/abstractions/environment.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { AccountApiService } from \"../abstractions/account-api.service\";\nimport { InternalAccountService } from \"../abstractions/account.service\";\nimport { UserVerificationService } from \"../abstractions/user-verification/user-verification.service.abstraction\";\nimport { RegisterFinishRequest } from \"../models/request/registration/register-finish.request\";\nimport { RegisterSendVerificationEmailRequest } from \"../models/request/registration/register-send-verification-email.request\";\nimport { Verification } from \"../types/verification\";\n\nexport class AccountApiServiceImplementation implements AccountApiService {\n constructor(\n private apiService: ApiService,\n private userVerificationService: UserVerificationService,\n private logService: LogService,\n private accountService: InternalAccountService,\n private environmentService: EnvironmentService,\n ) {}\n\n async deleteAccount(verification: Verification): Promise {\n try {\n const verificationRequest = await this.userVerificationService.buildRequest(verification);\n await this.apiService.send(\"DELETE\", \"/accounts\", verificationRequest, true, false);\n this.accountService.delete();\n } catch (e) {\n this.logService.error(e);\n throw e;\n }\n }\n\n async registerSendVerificationEmail(\n request: RegisterSendVerificationEmailRequest,\n ): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n\n try {\n const response = await this.apiService.send(\n \"POST\",\n \"/accounts/register/send-verification-email\",\n request,\n false,\n true,\n env.getIdentityUrl(),\n );\n\n return response;\n } catch (e: unknown) {\n if (e instanceof ErrorResponse) {\n if (e.statusCode === 204) {\n // No content is a success response.\n return null;\n }\n }\n\n this.logService.error(e);\n throw e;\n }\n }\n\n async registerFinish(request: RegisterFinishRequest): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n\n try {\n const response = await this.apiService.send(\n \"POST\",\n \"/accounts/register/finish\",\n request,\n false,\n true,\n env.getIdentityUrl(),\n );\n\n return response;\n } catch (e: unknown) {\n this.logService.error(e);\n throw e;\n }\n }\n}\n","import { Argon2KdfConfig, KdfConfig, PBKDF2KdfConfig } from \"../../auth/models/domain/kdf-config\";\nimport { CsprngArray } from \"../../types/csprng\";\nimport { CryptoFunctionService } from \"../abstractions/crypto-function.service\";\nimport { KeyGenerationService as KeyGenerationServiceAbstraction } from \"../abstractions/key-generation.service\";\nimport { KdfType } from \"../enums\";\nimport { Utils } from \"../misc/utils\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport class KeyGenerationService implements KeyGenerationServiceAbstraction {\n constructor(private cryptoFunctionService: CryptoFunctionService) {}\n\n async createKey(bitLength: 256 | 512): Promise {\n const key = await this.cryptoFunctionService.aesGenerateKey(bitLength);\n return new SymmetricCryptoKey(key);\n }\n\n async createKeyWithPurpose(\n bitLength: 128 | 192 | 256 | 512,\n purpose: string,\n salt?: string,\n ): Promise<{ salt: string; material: CsprngArray; derivedKey: SymmetricCryptoKey }> {\n if (salt == null) {\n const bytes = await this.cryptoFunctionService.randomBytes(32);\n salt = Utils.fromBufferToUtf8(bytes);\n }\n const material = await this.cryptoFunctionService.aesGenerateKey(bitLength);\n const key = await this.cryptoFunctionService.hkdf(material, salt, purpose, 64, \"sha256\");\n return { salt, material, derivedKey: new SymmetricCryptoKey(key) };\n }\n\n async deriveKeyFromMaterial(\n material: CsprngArray,\n salt: string,\n purpose: string,\n ): Promise {\n const key = await this.cryptoFunctionService.hkdf(material, salt, purpose, 64, \"sha256\");\n return new SymmetricCryptoKey(key);\n }\n\n async deriveKeyFromPassword(\n password: string | Uint8Array,\n salt: string | Uint8Array,\n kdfConfig: KdfConfig,\n ): Promise {\n let key: Uint8Array = null;\n if (kdfConfig.kdfType == null || kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n if (kdfConfig.iterations == null) {\n kdfConfig.iterations = PBKDF2KdfConfig.ITERATIONS.defaultValue;\n }\n\n key = await this.cryptoFunctionService.pbkdf2(password, salt, \"sha256\", kdfConfig.iterations);\n } else if (kdfConfig.kdfType == KdfType.Argon2id) {\n if (kdfConfig.iterations == null) {\n kdfConfig.iterations = Argon2KdfConfig.ITERATIONS.defaultValue;\n }\n\n if (kdfConfig.memory == null) {\n kdfConfig.memory = Argon2KdfConfig.MEMORY.defaultValue;\n }\n\n if (kdfConfig.parallelism == null) {\n kdfConfig.parallelism = Argon2KdfConfig.PARALLELISM.defaultValue;\n }\n\n const saltHash = await this.cryptoFunctionService.hash(salt, \"sha256\");\n key = await this.cryptoFunctionService.argon2(\n password,\n saltHash,\n kdfConfig.iterations,\n kdfConfig.memory * 1024, // convert to KiB from MiB\n kdfConfig.parallelism,\n );\n } else {\n throw new Error(\"Unknown Kdf.\");\n }\n return new SymmetricCryptoKey(key);\n }\n\n async stretchKey(key: SymmetricCryptoKey): Promise {\n const newKey = new Uint8Array(64);\n const encKey = await this.cryptoFunctionService.hkdfExpand(key.key, \"enc\", 32, \"sha256\");\n const macKey = await this.cryptoFunctionService.hkdfExpand(key.key, \"mac\", 32, \"sha256\");\n\n newKey.set(new Uint8Array(encKey));\n newKey.set(new Uint8Array(macKey), 32);\n\n return new SymmetricCryptoKey(newKey);\n }\n}\n","import * as bigInt from \"big-integer\";\nimport {\n NEVER,\n Observable,\n combineLatest,\n firstValueFrom,\n forkJoin,\n map,\n of,\n switchMap,\n} from \"rxjs\";\n\nimport { PinServiceAbstraction } from \"../../../../auth/src/common/abstractions\";\nimport { EncryptedOrganizationKeyData } from \"../../admin-console/models/data/encrypted-organization-key.data\";\nimport { BaseEncryptedOrganizationKey } from \"../../admin-console/models/domain/encrypted-organization-key\";\nimport { ProfileOrganizationResponse } from \"../../admin-console/models/response/profile-organization.response\";\nimport { ProfileProviderOrganizationResponse } from \"../../admin-console/models/response/profile-provider-organization.response\";\nimport { ProfileProviderResponse } from \"../../admin-console/models/response/profile-provider.response\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { KdfConfigService } from \"../../auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../auth/abstractions/master-password.service.abstraction\";\nimport { KdfConfig } from \"../../auth/models/domain/kdf-config\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { VAULT_TIMEOUT } from \"../../services/vault-timeout/vault-timeout-settings.state\";\nimport { CsprngArray } from \"../../types/csprng\";\nimport { OrganizationId, ProviderId, UserId } from \"../../types/guid\";\nimport {\n OrgKey,\n UserKey,\n MasterKey,\n ProviderKey,\n CipherKey,\n UserPrivateKey,\n UserPublicKey,\n} from \"../../types/key\";\nimport { VaultTimeoutStringType } from \"../../types/vault-timeout.type\";\nimport { CryptoFunctionService } from \"../abstractions/crypto-function.service\";\nimport {\n CipherDecryptionKeys,\n CryptoService as CryptoServiceAbstraction,\n} from \"../abstractions/crypto.service\";\nimport { EncryptService } from \"../abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"../abstractions/key-generation.service\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { PlatformUtilsService } from \"../abstractions/platform-utils.service\";\nimport { StateService } from \"../abstractions/state.service\";\nimport { KeySuffixOptions, HashPurpose, EncryptionType } from \"../enums\";\nimport { convertValues } from \"../misc/convert-values\";\nimport { EFFLongWordList } from \"../misc/wordlist\";\nimport { EncArrayBuffer } from \"../models/domain/enc-array-buffer\";\nimport { EncString, EncryptedString } from \"../models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\nimport { ActiveUserState, StateProvider } from \"../state\";\n\nimport { USER_ENCRYPTED_ORGANIZATION_KEYS } from \"./key-state/org-keys.state\";\nimport { USER_ENCRYPTED_PROVIDER_KEYS } from \"./key-state/provider-keys.state\";\nimport {\n USER_ENCRYPTED_PRIVATE_KEY,\n USER_EVER_HAD_USER_KEY,\n USER_KEY,\n} from \"./key-state/user-key.state\";\n\nexport class CryptoService implements CryptoServiceAbstraction {\n private readonly activeUserEverHadUserKey: ActiveUserState;\n\n readonly everHadUserKey$: Observable;\n\n readonly activeUserOrgKeys$: Observable>;\n\n constructor(\n protected pinService: PinServiceAbstraction,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected keyGenerationService: KeyGenerationService,\n protected cryptoFunctionService: CryptoFunctionService,\n protected encryptService: EncryptService,\n protected platformUtilService: PlatformUtilsService,\n protected logService: LogService,\n protected stateService: StateService,\n protected accountService: AccountService,\n protected stateProvider: StateProvider,\n protected kdfConfigService: KdfConfigService,\n ) {\n // User Key\n this.activeUserEverHadUserKey = stateProvider.getActive(USER_EVER_HAD_USER_KEY);\n this.everHadUserKey$ = this.activeUserEverHadUserKey.state$.pipe(map((x) => x ?? false));\n\n this.activeUserOrgKeys$ = this.stateProvider.activeUserId$.pipe(\n switchMap((userId) => (userId != null ? this.orgKeys$(userId) : NEVER)),\n );\n }\n\n async setUserKey(key: UserKey, userId?: UserId): Promise {\n if (key == null) {\n throw new Error(\"No key provided. Lock the user to clear the key\");\n }\n // Set userId to ensure we have one for the account status update\n [userId, key] = await this.stateProvider.setUserState(USER_KEY, key, userId);\n await this.stateProvider.setUserState(USER_EVER_HAD_USER_KEY, true, userId);\n\n await this.storeAdditionalKeys(key, userId);\n }\n\n async refreshAdditionalKeys(): Promise {\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (activeUserId == null) {\n throw new Error(\"Can only refresh keys while there is an active user.\");\n }\n\n const key = await this.getUserKey(activeUserId);\n await this.setUserKey(key, activeUserId);\n }\n\n getInMemoryUserKeyFor$(userId: UserId): Observable {\n return this.stateProvider.getUserState$(USER_KEY, userId);\n }\n\n async getUserKey(userId?: UserId): Promise {\n const userKey = await firstValueFrom(this.stateProvider.getUserState$(USER_KEY, userId));\n return userKey;\n }\n\n async isLegacyUser(masterKey?: MasterKey, userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n masterKey ??= await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n\n return await this.validateUserKey(masterKey as unknown as UserKey, userId);\n }\n\n // TODO: legacy support for user key is no longer needed since we require users to migrate on login\n async getUserKeyWithLegacySupport(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n const userKey = await this.getUserKey(userId);\n if (userKey) {\n return userKey;\n }\n\n // Legacy support: encryption used to be done with the master key (derived from master password).\n // Users who have not migrated will have a null user key and must use the master key instead.\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n return masterKey as unknown as UserKey;\n }\n\n async getUserKeyFromStorage(keySuffix: KeySuffixOptions, userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n const userKey = await this.getKeyFromStorage(keySuffix, userId);\n if (userKey) {\n if (!(await this.validateUserKey(userKey, userId))) {\n this.logService.warning(\"Invalid key, throwing away stored keys\");\n await this.clearAllStoredUserKeys(userId);\n }\n return userKey;\n }\n }\n\n async hasUserKey(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n if (userId == null) {\n return false;\n }\n return await this.hasUserKeyInMemory(userId);\n }\n\n async hasUserKeyInMemory(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n if (userId == null) {\n return false;\n }\n\n return (await firstValueFrom(this.stateProvider.getUserState$(USER_KEY, userId))) != null;\n }\n\n async hasUserKeyStored(keySuffix: KeySuffixOptions, userId?: UserId): Promise {\n return (await this.getKeyFromStorage(keySuffix, userId)) != null;\n }\n\n async makeUserKey(masterKey: MasterKey): Promise<[UserKey, EncString]> {\n if (!masterKey) {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n }\n if (masterKey == null) {\n throw new Error(\"No Master Key found.\");\n }\n\n const newUserKey = await this.keyGenerationService.createKey(512);\n return this.buildProtectedSymmetricKey(masterKey, newUserKey.key);\n }\n\n /**\n * Clears the user key. Clears all stored versions of the user keys as well, such as the biometrics key\n * @param userId The desired user\n */\n private async clearUserKey(userId: UserId): Promise {\n if (userId == null) {\n // nothing to do\n return;\n }\n // Set userId to ensure we have one for the account status update\n await this.stateProvider.setUserState(USER_KEY, null, userId);\n await this.clearAllStoredUserKeys(userId);\n }\n\n async clearStoredUserKey(keySuffix: KeySuffixOptions, userId?: UserId): Promise {\n if (keySuffix === KeySuffixOptions.Auto) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.clearDeprecatedKeys(KeySuffixOptions.Auto, userId);\n }\n if (keySuffix === KeySuffixOptions.Pin) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n }\n }\n\n async setMasterKeyEncryptedUserKey(userKeyMasterKey: string, userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n await this.masterPasswordService.setMasterKeyEncryptedUserKey(\n new EncString(userKeyMasterKey),\n userId,\n );\n }\n\n // TODO: Move to MasterPasswordService\n async getOrDeriveMasterKey(password: string, userId?: UserId) {\n const [resolvedUserId, email] = await firstValueFrom(\n combineLatest([this.accountService.activeAccount$, this.accountService.accounts$]).pipe(\n map(([activeAccount, accounts]) => {\n userId ??= activeAccount?.id;\n return [userId, accounts[userId]?.email];\n }),\n ),\n );\n let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(resolvedUserId));\n return (masterKey ||= await this.makeMasterKey(\n password,\n email,\n await this.kdfConfigService.getKdfConfig(),\n ));\n }\n\n /**\n * Derive a master key from a password and email.\n *\n * @remarks\n * Does not validate the kdf config to ensure it satisfies the minimum requirements for the given kdf type.\n * TODO: Move to MasterPasswordService\n */\n async makeMasterKey(password: string, email: string, KdfConfig: KdfConfig): Promise {\n return (await this.keyGenerationService.deriveKeyFromPassword(\n password,\n email,\n KdfConfig,\n )) as MasterKey;\n }\n\n async encryptUserKeyWithMasterKey(\n masterKey: MasterKey,\n userKey?: UserKey,\n ): Promise<[UserKey, EncString]> {\n userKey ||= await this.getUserKey();\n return await this.buildProtectedSymmetricKey(masterKey, userKey.key);\n }\n\n // TODO: move to MasterPasswordService\n async hashMasterKey(\n password: string,\n key: MasterKey,\n hashPurpose?: HashPurpose,\n ): Promise {\n if (!key) {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n key = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n }\n\n if (password == null || key == null) {\n throw new Error(\"Invalid parameters.\");\n }\n\n const iterations = hashPurpose === HashPurpose.LocalAuthorization ? 2 : 1;\n const hash = await this.cryptoFunctionService.pbkdf2(key.key, password, \"sha256\", iterations);\n return Utils.fromBufferToB64(hash);\n }\n\n // TODO: move to MasterPasswordService\n async compareAndUpdateKeyHash(masterPassword: string, masterKey: MasterKey): Promise {\n const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n const storedPasswordHash = await firstValueFrom(\n this.masterPasswordService.masterKeyHash$(userId),\n );\n if (masterPassword != null && storedPasswordHash != null) {\n const localKeyHash = await this.hashMasterKey(\n masterPassword,\n masterKey,\n HashPurpose.LocalAuthorization,\n );\n if (localKeyHash != null && storedPasswordHash === localKeyHash) {\n return true;\n }\n\n // TODO: remove serverKeyHash check in 1-2 releases after everyone's keyHash has been updated\n const serverKeyHash = await this.hashMasterKey(\n masterPassword,\n masterKey,\n HashPurpose.ServerAuthorization,\n );\n if (serverKeyHash != null && storedPasswordHash === serverKeyHash) {\n await this.masterPasswordService.setMasterKeyHash(localKeyHash, userId);\n return true;\n }\n }\n\n return false;\n }\n\n async setOrgKeys(\n orgs: ProfileOrganizationResponse[],\n providerOrgs: ProfileProviderOrganizationResponse[],\n userId: UserId,\n ): Promise {\n await this.stateProvider.getUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS).update(() => {\n const encOrgKeyData: { [orgId: string]: EncryptedOrganizationKeyData } = {};\n\n orgs.forEach((org) => {\n encOrgKeyData[org.id] = {\n type: \"organization\",\n key: org.key,\n };\n });\n\n providerOrgs.forEach((org) => {\n encOrgKeyData[org.id] = {\n type: \"provider\",\n providerId: org.providerId,\n key: org.key,\n };\n });\n\n return encOrgKeyData;\n });\n }\n\n async getOrgKey(orgId: OrganizationId): Promise {\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n if (activeUserId == null) {\n throw new Error(\"A user must be active to retrieve an org key\");\n }\n const orgKeys = await firstValueFrom(this.orgKeys$(activeUserId));\n return orgKeys[orgId];\n }\n\n async makeDataEncKey(\n key: T,\n ): Promise<[SymmetricCryptoKey, EncString]> {\n if (key == null) {\n throw new Error(\"No key provided\");\n }\n\n const newSymKey = await this.keyGenerationService.createKey(512);\n return this.buildProtectedSymmetricKey(key, newSymKey.key);\n }\n\n private async clearOrgKeys(userId: UserId): Promise {\n if (userId == null) {\n // nothing to do\n return;\n }\n await this.stateProvider.setUserState(USER_ENCRYPTED_ORGANIZATION_KEYS, null, userId);\n }\n\n async setProviderKeys(providers: ProfileProviderResponse[], userId: UserId): Promise {\n await this.stateProvider.getUser(userId, USER_ENCRYPTED_PROVIDER_KEYS).update(() => {\n const encProviderKeys: { [providerId: ProviderId]: EncryptedString } = {};\n\n providers.forEach((provider) => {\n encProviderKeys[provider.id as ProviderId] = provider.key as EncryptedString;\n });\n\n return encProviderKeys;\n });\n }\n\n // TODO: Deprecate in favor of observable\n async getProviderKey(providerId: ProviderId): Promise {\n if (providerId == null) {\n return null;\n }\n\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n const providerKeys = await firstValueFrom(this.providerKeys$(activeUserId));\n\n return providerKeys[providerId] ?? null;\n }\n\n private async clearProviderKeys(userId: UserId): Promise {\n if (userId == null) {\n // nothing to do\n return;\n }\n await this.stateProvider.setUserState(USER_ENCRYPTED_PROVIDER_KEYS, null, userId);\n }\n\n // TODO: Make userId required\n async makeOrgKey(userId?: UserId): Promise<[EncString, T]> {\n const shareKey = await this.keyGenerationService.createKey(512);\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n const publicKey = await firstValueFrom(this.userPublicKey$(userId));\n const encShareKey = await this.rsaEncrypt(shareKey.key, publicKey);\n return [encShareKey, shareKey as T];\n }\n\n async setPrivateKey(encPrivateKey: EncryptedString, userId: UserId): Promise {\n if (encPrivateKey == null) {\n return;\n }\n\n await this.stateProvider\n .getUser(userId, USER_ENCRYPTED_PRIVATE_KEY)\n .update(() => encPrivateKey);\n }\n\n async getPrivateKey(): Promise {\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (activeUserId == null) {\n throw new Error(\"User must be active while attempting to retrieve private key.\");\n }\n\n return await firstValueFrom(this.userPrivateKey$(activeUserId));\n }\n\n // TODO: Make public key required\n async getFingerprint(fingerprintMaterial: string, publicKey?: Uint8Array): Promise {\n if (publicKey == null) {\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n publicKey = await firstValueFrom(this.userPublicKey$(activeUserId));\n }\n\n if (publicKey === null) {\n throw new Error(\"No public key available.\");\n }\n const keyFingerprint = await this.cryptoFunctionService.hash(publicKey, \"sha256\");\n const userFingerprint = await this.cryptoFunctionService.hkdfExpand(\n keyFingerprint,\n fingerprintMaterial,\n 32,\n \"sha256\",\n );\n return this.hashPhrase(userFingerprint);\n }\n\n async makeKeyPair(key: SymmetricCryptoKey): Promise<[string, EncString]> {\n if (key == null) {\n throw new Error(\"'key' is a required parameter and must be non-null.\");\n }\n\n const keyPair = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n const publicB64 = Utils.fromBufferToB64(keyPair[0]);\n const privateEnc = await this.encryptService.encrypt(keyPair[1], key);\n return [publicB64, privateEnc];\n }\n\n /**\n * Clears the user's key pair\n * @param userId The desired user\n */\n private async clearKeyPair(userId: UserId): Promise {\n if (userId == null) {\n // nothing to do\n return;\n }\n\n await this.stateProvider.setUserState(USER_ENCRYPTED_PRIVATE_KEY, null, userId);\n }\n\n async clearPinKeys(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (userId == null) {\n throw new Error(\"Cannot clear PIN keys, no user Id resolved.\");\n }\n\n await this.pinService.clearPinKeyEncryptedUserKeyPersistent(userId);\n await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n await this.pinService.clearUserKeyEncryptedPin(userId);\n await this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n }\n\n async makeSendKey(keyMaterial: CsprngArray): Promise {\n return await this.keyGenerationService.deriveKeyFromMaterial(\n keyMaterial,\n \"bitwarden-send\",\n \"send\",\n );\n }\n\n async makeCipherKey(): Promise {\n return (await this.keyGenerationService.createKey(512)) as CipherKey;\n }\n\n async clearKeys(userId?: UserId): Promise {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (userId == null) {\n throw new Error(\"Cannot clear keys, no user Id resolved.\");\n }\n\n await this.masterPasswordService.clearMasterKeyHash(userId);\n await this.clearUserKey(userId);\n await this.clearOrgKeys(userId);\n await this.clearProviderKeys(userId);\n await this.clearKeyPair(userId);\n await this.clearPinKeys(userId);\n await this.stateProvider.setUserState(USER_EVER_HAD_USER_KEY, null, userId);\n }\n\n async rsaEncrypt(data: Uint8Array, publicKey: Uint8Array): Promise {\n if (publicKey == null) {\n throw new Error(\"'publicKey' is a required parameter and must be non-null\");\n }\n\n const encBytes = await this.cryptoFunctionService.rsaEncrypt(data, publicKey, \"sha1\");\n return new EncString(EncryptionType.Rsa2048_OaepSha1_B64, Utils.fromBufferToB64(encBytes));\n }\n\n async rsaDecrypt(encValue: string, privateKey: Uint8Array): Promise {\n if (privateKey == null) {\n throw new Error(\"'privateKey' is a required parameter and must be non-null\");\n }\n\n const headerPieces = encValue.split(\".\");\n let encType: EncryptionType = null;\n let encPieces: string[];\n\n if (headerPieces.length === 1) {\n encType = EncryptionType.Rsa2048_OaepSha256_B64;\n encPieces = [headerPieces[0]];\n } else if (headerPieces.length === 2) {\n try {\n encType = parseInt(headerPieces[0], null);\n encPieces = headerPieces[1].split(\"|\");\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n switch (encType) {\n case EncryptionType.Rsa2048_OaepSha256_B64:\n case EncryptionType.Rsa2048_OaepSha1_B64:\n case EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64: // HmacSha256 types are deprecated\n case EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:\n break;\n default:\n throw new Error(\"encType unavailable.\");\n }\n\n if (encPieces == null || encPieces.length <= 0) {\n throw new Error(\"encPieces unavailable.\");\n }\n\n const data = Utils.fromB64ToArray(encPieces[0]);\n\n let alg: \"sha1\" | \"sha256\" = \"sha1\";\n switch (encType) {\n case EncryptionType.Rsa2048_OaepSha256_B64:\n case EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:\n alg = \"sha256\";\n break;\n case EncryptionType.Rsa2048_OaepSha1_B64:\n case EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:\n break;\n default:\n throw new Error(\"encType unavailable.\");\n }\n\n return this.cryptoFunctionService.rsaDecrypt(data, privateKey, alg);\n }\n\n // EFForg/OpenWireless\n // ref https://github.com/EFForg/OpenWireless/blob/master/app/js/diceware.js\n async randomNumber(min: number, max: number): Promise {\n let rval = 0;\n const range = max - min + 1;\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"We cannot generate numbers larger than 53 bits.\");\n }\n\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n // 7776 -> (2^13 = 8192) -1 == 8191 or 0x00001111 11111111\n\n // Fill a byte array with N random numbers\n const byteArray = new Uint8Array(await this.cryptoFunctionService.randomBytes(bytesNeeded));\n\n let p = (bytesNeeded - 1) * 8;\n for (let i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n // Use & to apply the mask and reduce the number of recursive lookups\n rval = rval & mask;\n\n if (rval >= range) {\n // Integer out of acceptable range\n return this.randomNumber(min, max);\n }\n\n // Return an integer that falls within the range\n return min + rval;\n }\n\n // ---HELPERS---\n protected async validateUserKey(key: UserKey, userId: UserId): Promise {\n if (!key) {\n return false;\n }\n\n try {\n const encPrivateKey = await firstValueFrom(\n this.stateProvider.getUser(userId, USER_ENCRYPTED_PRIVATE_KEY).state$,\n );\n\n if (encPrivateKey == null) {\n return false;\n }\n\n // Can decrypt private key\n const privateKey = await this.decryptPrivateKey(encPrivateKey, key);\n\n if (privateKey == null) {\n // failed to decrypt\n return false;\n }\n\n // Can successfully derive public key\n const publicKey = await this.derivePublicKey(privateKey);\n\n if (publicKey == null) {\n // failed to decrypt\n return false;\n }\n } catch (e) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Initialize all necessary crypto keys needed for a new account.\n * Warning! This completely replaces any existing keys!\n */\n async initAccount(): Promise<{\n userKey: UserKey;\n publicKey: string;\n privateKey: EncString;\n }> {\n const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (activeUserId == null) {\n throw new Error(\"Cannot initilize an account if one is not active.\");\n }\n\n // Verify user key doesn't exist\n const existingUserKey = await this.getUserKey(activeUserId);\n\n if (existingUserKey != null) {\n this.logService.error(\"Tried to initialize account with existing user key.\");\n throw new Error(\"Cannot initialize account, keys already exist.\");\n }\n\n const userKey = (await this.keyGenerationService.createKey(512)) as UserKey;\n const [publicKey, privateKey] = await this.makeKeyPair(userKey);\n await this.setUserKey(userKey, activeUserId);\n await this.stateProvider\n .getUser(activeUserId, USER_ENCRYPTED_PRIVATE_KEY)\n .update(() => privateKey.encryptedString);\n\n return {\n userKey,\n publicKey,\n privateKey,\n };\n }\n\n /**\n * Generates any additional keys if needed. Additional keys are\n * keys such as biometrics, auto, and pin keys.\n * Useful to make sure other keys stay in sync when the user key\n * has been rotated.\n * @param key The user key\n * @param userId The desired user\n */\n protected async storeAdditionalKeys(key: UserKey, userId?: UserId) {\n userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n if (userId == null) {\n throw new Error(\"Cannot store additional keys, no user Id resolved.\");\n }\n\n const storeAuto = await this.shouldStoreKey(KeySuffixOptions.Auto, userId);\n if (storeAuto) {\n await this.stateService.setUserKeyAutoUnlock(key.keyB64, { userId: userId });\n } else {\n await this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n }\n await this.clearDeprecatedKeys(KeySuffixOptions.Auto, userId);\n\n const storePin = await this.shouldStoreKey(KeySuffixOptions.Pin, userId);\n if (storePin) {\n // Decrypt userKeyEncryptedPin with user key\n const pin = await this.encryptService.decryptToUtf8(\n await this.pinService.getUserKeyEncryptedPin(userId),\n key,\n );\n\n const pinKeyEncryptedUserKey = await this.pinService.createPinKeyEncryptedUserKey(\n pin,\n key,\n userId,\n );\n const noPreExistingPersistentKey =\n (await this.pinService.getPinKeyEncryptedUserKeyPersistent(userId)) == null;\n\n await this.pinService.storePinKeyEncryptedUserKey(\n pinKeyEncryptedUserKey,\n noPreExistingPersistentKey,\n userId,\n );\n // We can't always clear deprecated keys because the pin is only\n // migrated once used to unlock\n await this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n } else {\n await this.pinService.clearPinKeyEncryptedUserKeyPersistent(userId);\n await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n }\n }\n\n protected async shouldStoreKey(keySuffix: KeySuffixOptions, userId?: UserId) {\n let shouldStoreKey = false;\n switch (keySuffix) {\n case KeySuffixOptions.Auto: {\n // TODO: Sharing the UserKeyDefinition is temporary to get around a circ dep issue between\n // the VaultTimeoutSettingsSvc and this service.\n // This should be fixed as part of the PM-7082 - Auto Key Service work.\n const vaultTimeout = await firstValueFrom(\n this.stateProvider.getUserState$(VAULT_TIMEOUT, userId),\n );\n\n shouldStoreKey = vaultTimeout == VaultTimeoutStringType.Never;\n break;\n }\n case KeySuffixOptions.Pin: {\n const userKeyEncryptedPin = await this.pinService.getUserKeyEncryptedPin(userId);\n shouldStoreKey = !!userKeyEncryptedPin;\n break;\n }\n }\n return shouldStoreKey;\n }\n\n protected async getKeyFromStorage(\n keySuffix: KeySuffixOptions,\n userId?: UserId,\n ): Promise {\n if (keySuffix === KeySuffixOptions.Auto) {\n const userKey = await this.stateService.getUserKeyAutoUnlock({ userId: userId });\n if (userKey) {\n return new SymmetricCryptoKey(Utils.fromB64ToArray(userKey)) as UserKey;\n }\n }\n return null;\n }\n\n protected async clearAllStoredUserKeys(userId?: UserId): Promise {\n await this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n }\n\n private async hashPhrase(hash: Uint8Array, minimumEntropy = 64) {\n const entropyPerWord = Math.log(EFFLongWordList.length) / Math.log(2);\n let numWords = Math.ceil(minimumEntropy / entropyPerWord);\n\n const hashArr = Array.from(new Uint8Array(hash));\n const entropyAvailable = hashArr.length * 4;\n if (numWords * entropyPerWord > entropyAvailable) {\n throw new Error(\"Output entropy of hash function is too small\");\n }\n\n const phrase: string[] = [];\n let hashNumber = bigInt.fromArray(hashArr, 256);\n while (numWords--) {\n const remainder = hashNumber.mod(EFFLongWordList.length);\n hashNumber = hashNumber.divide(EFFLongWordList.length);\n phrase.push(EFFLongWordList[remainder as any]);\n }\n return phrase;\n }\n\n private async buildProtectedSymmetricKey(\n encryptionKey: SymmetricCryptoKey,\n newSymKey: Uint8Array,\n ): Promise<[T, EncString]> {\n let protectedSymKey: EncString = null;\n if (encryptionKey.key.byteLength === 32) {\n const stretchedEncryptionKey = await this.keyGenerationService.stretchKey(encryptionKey);\n protectedSymKey = await this.encryptService.encrypt(newSymKey, stretchedEncryptionKey);\n } else if (encryptionKey.key.byteLength === 64) {\n protectedSymKey = await this.encryptService.encrypt(newSymKey, encryptionKey);\n } else {\n throw new Error(\"Invalid key size.\");\n }\n return [new SymmetricCryptoKey(newSymKey) as T, protectedSymKey];\n }\n\n // --LEGACY METHODS--\n // We previously used the master key for additional keys, but now we use the user key.\n // These methods support migrating the old keys to the new ones.\n // TODO: Remove after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3475)\n\n async clearDeprecatedKeys(keySuffix: KeySuffixOptions, userId?: UserId) {\n if (keySuffix === KeySuffixOptions.Auto) {\n await this.stateService.setCryptoMasterKeyAuto(null, { userId: userId });\n } else if (keySuffix === KeySuffixOptions.Pin) {\n await this.pinService.clearOldPinKeyEncryptedMasterKey(userId);\n }\n }\n\n // --DEPRECATED METHODS--\n\n /**\n * @deprecated July 25 2022: Get the key you need from CryptoService (getKeyForUserEncryption or getOrgKey)\n * and then call encryptService.encrypt\n */\n async encrypt(plainValue: string | Uint8Array, key?: SymmetricCryptoKey): Promise {\n key ||= await this.getUserKeyWithLegacySupport();\n return await this.encryptService.encrypt(plainValue, key);\n }\n\n /**\n * @deprecated July 25 2022: Get the key you need from CryptoService (getKeyForUserEncryption or getOrgKey)\n * and then call encryptService.encryptToBytes\n */\n async encryptToBytes(plainValue: Uint8Array, key?: SymmetricCryptoKey): Promise {\n key ||= await this.getUserKeyWithLegacySupport();\n return this.encryptService.encryptToBytes(plainValue, key);\n }\n\n /**\n * @deprecated July 25 2022: Get the key you need from CryptoService (getKeyForUserEncryption or getOrgKey)\n * and then call encryptService.decryptToBytes\n */\n async decryptToBytes(encString: EncString, key?: SymmetricCryptoKey): Promise {\n key ||= await this.getUserKeyWithLegacySupport();\n return this.encryptService.decryptToBytes(encString, key);\n }\n\n /**\n * @deprecated July 25 2022: Get the key you need from CryptoService (getKeyForUserEncryption or getOrgKey)\n * and then call encryptService.decryptToUtf8\n */\n async decryptToUtf8(encString: EncString, key?: SymmetricCryptoKey): Promise {\n key ||= await this.getUserKeyWithLegacySupport();\n return await this.encryptService.decryptToUtf8(encString, key);\n }\n\n /**\n * @deprecated July 25 2022: Get the key you need from CryptoService (getKeyForUserEncryption or getOrgKey)\n * and then call encryptService.decryptToBytes\n */\n async decryptFromBytes(encBuffer: EncArrayBuffer, key: SymmetricCryptoKey): Promise {\n if (encBuffer == null) {\n throw new Error(\"No buffer provided for decryption.\");\n }\n\n key ||= await this.getUserKeyWithLegacySupport();\n\n return this.encryptService.decryptToBytes(encBuffer, key);\n }\n\n userKey$(userId: UserId) {\n return this.stateProvider.getUser(userId, USER_KEY).state$;\n }\n\n private userKeyWithLegacySupport$(userId: UserId) {\n return this.userKey$(userId).pipe(\n switchMap((userKey) => {\n if (userKey != null) {\n return of(userKey);\n }\n\n // Legacy path\n return this.masterPasswordService.masterKey$(userId).pipe(\n switchMap(async (masterKey) => {\n if (!(await this.validateUserKey(masterKey as unknown as UserKey, userId))) {\n // We don't have a UserKey or a valid MasterKey\n return null;\n }\n\n // The master key is valid meaning, the org keys and such are encrypted with this key\n return masterKey as unknown as UserKey;\n }),\n );\n }),\n );\n }\n\n userPublicKey$(userId: UserId) {\n return this.userPrivateKey$(userId).pipe(\n switchMap(async (pk) => await this.derivePublicKey(pk)),\n );\n }\n\n private async derivePublicKey(privateKey: UserPrivateKey) {\n return (await this.cryptoFunctionService.rsaExtractPublicKey(privateKey)) as UserPublicKey;\n }\n\n userPrivateKey$(userId: UserId): Observable {\n return this.userPrivateKeyHelper$(userId, false).pipe(map((keys) => keys?.userPrivateKey));\n }\n\n userPrivateKeyWithLegacySupport$(userId: UserId): Observable {\n return this.userPrivateKeyHelper$(userId, true).pipe(map((keys) => keys?.userPrivateKey));\n }\n\n private userPrivateKeyHelper$(userId: UserId, legacySupport: boolean) {\n const userKey$ = legacySupport ? this.userKeyWithLegacySupport$(userId) : this.userKey$(userId);\n return userKey$.pipe(\n switchMap((userKey) => {\n if (userKey == null) {\n return of(null);\n }\n\n return this.stateProvider.getUser(userId, USER_ENCRYPTED_PRIVATE_KEY).state$.pipe(\n switchMap(\n async (encryptedPrivateKey) =>\n await this.decryptPrivateKey(encryptedPrivateKey, userKey),\n ),\n // Combine outerscope info with user private key\n map((userPrivateKey) => ({\n userKey,\n userPrivateKey,\n })),\n );\n }),\n );\n }\n\n private async decryptPrivateKey(encryptedPrivateKey: EncryptedString, key: SymmetricCryptoKey) {\n if (encryptedPrivateKey == null) {\n return null;\n }\n\n return (await this.encryptService.decryptToBytes(\n new EncString(encryptedPrivateKey),\n key,\n )) as UserPrivateKey;\n }\n\n providerKeys$(userId: UserId) {\n return this.userPrivateKey$(userId).pipe(\n switchMap((userPrivateKey) => {\n if (userPrivateKey == null) {\n return of(null);\n }\n\n return this.providerKeysHelper$(userId, userPrivateKey);\n }),\n );\n }\n\n /**\n * A helper for decrypting provider keys that requires a user id and that users decrypted private key\n * this is helpful for when you may have already grabbed the user private key and don't want to redo\n * that work to get the provider keys.\n */\n private providerKeysHelper$(\n userId: UserId,\n userPrivateKey: UserPrivateKey,\n ): Observable> {\n return this.stateProvider.getUser(userId, USER_ENCRYPTED_PROVIDER_KEYS).state$.pipe(\n // Convert each value in the record to it's own decryption observable\n convertValues(async (_, value) => {\n const decrypted = await this.encryptService.rsaDecrypt(\n new EncString(value),\n userPrivateKey,\n );\n return new SymmetricCryptoKey(decrypted) as ProviderKey;\n }),\n // switchMap since there are no side effects\n switchMap((encryptedProviderKeys) => {\n if (encryptedProviderKeys == null) {\n return of(null);\n }\n\n // Can't give an empty record to forkJoin\n if (Object.keys(encryptedProviderKeys).length === 0) {\n return of({});\n }\n\n return forkJoin(encryptedProviderKeys);\n }),\n );\n }\n\n orgKeys$(userId: UserId) {\n return this.cipherDecryptionKeys$(userId, true).pipe(map((keys) => keys?.orgKeys));\n }\n\n cipherDecryptionKeys$(\n userId: UserId,\n legacySupport: boolean = false,\n ): Observable {\n return this.userPrivateKeyHelper$(userId, legacySupport).pipe(\n switchMap((userKeys) => {\n if (userKeys == null) {\n return of(null);\n }\n\n const userPrivateKey = userKeys.userPrivateKey;\n\n if (userPrivateKey == null) {\n // We can't do any org based decryption\n return of({ userKey: userKeys.userKey, orgKeys: null });\n }\n\n return combineLatest([\n this.stateProvider.getUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS).state$,\n this.providerKeysHelper$(userId, userPrivateKey),\n ]).pipe(\n switchMap(async ([encryptedOrgKeys, providerKeys]) => {\n const result: Record = {};\n for (const orgId of Object.keys(encryptedOrgKeys ?? {}) as OrganizationId[]) {\n if (result[orgId] != null) {\n continue;\n }\n const encrypted = BaseEncryptedOrganizationKey.fromData(encryptedOrgKeys[orgId]);\n\n let decrypted: OrgKey;\n\n if (BaseEncryptedOrganizationKey.isProviderEncrypted(encrypted)) {\n decrypted = await encrypted.decrypt(this.encryptService, providerKeys);\n } else {\n decrypted = await encrypted.decrypt(this.encryptService, userPrivateKey);\n }\n\n result[orgId] = decrypted;\n }\n\n return result;\n }),\n // Combine them back together\n map((orgKeys) => ({ userKey: userKeys.userKey, orgKeys: orgKeys })),\n );\n }),\n );\n }\n}\n","import { ObservableInput, OperatorFunction, map } from \"rxjs\";\n\n/**\n * Converts a record of keys and values into a record preserving the original key and converting each value into an {@link ObservableInput}.\n * @param project A function to project a given key and value pair into an {@link ObservableInput}\n */\nexport function convertValues(\n project: (key: TKey, value: TInput) => ObservableInput,\n): OperatorFunction, Record>> {\n return map((inputRecord) => {\n if (inputRecord == null) {\n return null;\n }\n\n // Can't use TKey in here, have to use `PropertyKey`\n const result: Record> = {};\n for (const [key, value] of Object.entries(inputRecord) as [TKey, TInput][]) {\n result[key] = project(key, value);\n }\n\n return result;\n });\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\n\nimport { ApiService as ApiServiceAbstraction } from \"../abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { OrganizationConnectionType } from \"../admin-console/enums\";\nimport { OrganizationSponsorshipCreateRequest } from \"../admin-console/models/request/organization/organization-sponsorship-create.request\";\nimport { OrganizationSponsorshipRedeemRequest } from \"../admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { OrganizationConnectionRequest } from \"../admin-console/models/request/organization-connection.request\";\nimport { ProviderAddOrganizationRequest } from \"../admin-console/models/request/provider/provider-add-organization.request\";\nimport { ProviderOrganizationCreateRequest } from \"../admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderUserAcceptRequest } from \"../admin-console/models/request/provider/provider-user-accept.request\";\nimport { ProviderUserBulkConfirmRequest } from \"../admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"../admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"../admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserInviteRequest } from \"../admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"../admin-console/models/request/provider/provider-user-update.request\";\nimport { SelectionReadOnlyRequest } from \"../admin-console/models/request/selection-read-only.request\";\nimport {\n OrganizationConnectionConfigApis,\n OrganizationConnectionResponse,\n} from \"../admin-console/models/response/organization-connection.response\";\nimport { OrganizationExportResponse } from \"../admin-console/models/response/organization-export.response\";\nimport { OrganizationSponsorshipSyncStatusResponse } from \"../admin-console/models/response/organization-sponsorship-sync-status.response\";\nimport {\n ProviderOrganizationOrganizationDetailsResponse,\n ProviderOrganizationResponse,\n} from \"../admin-console/models/response/provider/provider-organization.response\";\nimport { ProviderUserBulkPublicKeyResponse } from \"../admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"../admin-console/models/response/provider/provider-user-bulk.response\";\nimport {\n ProviderUserResponse,\n ProviderUserUserDetailsResponse,\n} from \"../admin-console/models/response/provider/provider-user.response\";\nimport { SelectionReadOnlyResponse } from \"../admin-console/models/response/selection-read-only.response\";\nimport { TokenService } from \"../auth/abstractions/token.service\";\nimport { CreateAuthRequest } from \"../auth/models/request/create-auth.request\";\nimport { DeviceVerificationRequest } from \"../auth/models/request/device-verification.request\";\nimport { EmailTokenRequest } from \"../auth/models/request/email-token.request\";\nimport { EmailRequest } from \"../auth/models/request/email.request\";\nimport { DeviceRequest } from \"../auth/models/request/identity-token/device.request\";\nimport { PasswordTokenRequest } from \"../auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"../auth/models/request/identity-token/sso-token.request\";\nimport { TokenTwoFactorRequest } from \"../auth/models/request/identity-token/token-two-factor.request\";\nimport { UserApiTokenRequest } from \"../auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"../auth/models/request/identity-token/webauthn-login-token.request\";\nimport { KeyConnectorUserKeyRequest } from \"../auth/models/request/key-connector-user-key.request\";\nimport { PasswordHintRequest } from \"../auth/models/request/password-hint.request\";\nimport { PasswordRequest } from \"../auth/models/request/password.request\";\nimport { PasswordlessAuthRequest } from \"../auth/models/request/passwordless-auth.request\";\nimport { SecretVerificationRequest } from \"../auth/models/request/secret-verification.request\";\nimport { SetKeyConnectorKeyRequest } from \"../auth/models/request/set-key-connector-key.request\";\nimport { SetPasswordRequest } from \"../auth/models/request/set-password.request\";\nimport { TwoFactorEmailRequest } from \"../auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviderRequest } from \"../auth/models/request/two-factor-provider.request\";\nimport { TwoFactorRecoveryRequest } from \"../auth/models/request/two-factor-recovery.request\";\nimport { UpdateProfileRequest } from \"../auth/models/request/update-profile.request\";\nimport { UpdateTempPasswordRequest } from \"../auth/models/request/update-temp-password.request\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"../auth/models/request/update-two-factor-authenticator.request\";\nimport { UpdateTwoFactorDuoRequest } from \"../auth/models/request/update-two-factor-duo.request\";\nimport { UpdateTwoFactorEmailRequest } from \"../auth/models/request/update-two-factor-email.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"../auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"../auth/models/request/update-two-factor-web-authn.request\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"../auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { ApiKeyResponse } from \"../auth/models/response/api-key.response\";\nimport { AuthRequestResponse } from \"../auth/models/response/auth-request.response\";\nimport { DeviceVerificationResponse } from \"../auth/models/response/device-verification.response\";\nimport { IdentityCaptchaResponse } from \"../auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"../auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"../auth/models/response/identity-two-factor.response\";\nimport { KeyConnectorUserKeyResponse } from \"../auth/models/response/key-connector-user-key.response\";\nimport { PreloginResponse } from \"../auth/models/response/prelogin.response\";\nimport { RegisterResponse } from \"../auth/models/response/register.response\";\nimport { SsoPreValidateResponse } from \"../auth/models/response/sso-pre-validate.response\";\nimport { TwoFactorAuthenticatorResponse } from \"../auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"../auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"../auth/models/response/two-factor-email.response\";\nimport { TwoFactorProviderResponse } from \"../auth/models/response/two-factor-provider.response\";\nimport { TwoFactorRecoverResponse } from \"../auth/models/response/two-factor-recover.response\";\nimport {\n ChallengeResponse,\n TwoFactorWebAuthnResponse,\n} from \"../auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"../auth/models/response/two-factor-yubi-key.response\";\nimport { BitPayInvoiceRequest } from \"../billing/models/request/bit-pay-invoice.request\";\nimport { PaymentRequest } from \"../billing/models/request/payment.request\";\nimport { TaxInfoUpdateRequest } from \"../billing/models/request/tax-info-update.request\";\nimport { BillingHistoryResponse } from \"../billing/models/response/billing-history.response\";\nimport { BillingPaymentResponse } from \"../billing/models/response/billing-payment.response\";\nimport { PaymentResponse } from \"../billing/models/response/payment.response\";\nimport { PlanResponse } from \"../billing/models/response/plan.response\";\nimport { SubscriptionResponse } from \"../billing/models/response/subscription.response\";\nimport { TaxInfoResponse } from \"../billing/models/response/tax-info.response\";\nimport { TaxRateResponse } from \"../billing/models/response/tax-rate.response\";\nimport { DeviceType } from \"../enums\";\nimport { VaultTimeoutAction } from \"../enums/vault-timeout-action.enum\";\nimport { CollectionBulkDeleteRequest } from \"../models/request/collection-bulk-delete.request\";\nimport { DeleteRecoverRequest } from \"../models/request/delete-recover.request\";\nimport { EventRequest } from \"../models/request/event.request\";\nimport { KdfRequest } from \"../models/request/kdf.request\";\nimport { KeysRequest } from \"../models/request/keys.request\";\nimport { OrganizationImportRequest } from \"../models/request/organization-import.request\";\nimport { PreloginRequest } from \"../models/request/prelogin.request\";\nimport { RegisterRequest } from \"../models/request/register.request\";\nimport { StorageRequest } from \"../models/request/storage.request\";\nimport { UpdateAvatarRequest } from \"../models/request/update-avatar.request\";\nimport { UpdateDomainsRequest } from \"../models/request/update-domains.request\";\nimport { VerifyDeleteRecoverRequest } from \"../models/request/verify-delete-recover.request\";\nimport { VerifyEmailRequest } from \"../models/request/verify-email.request\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { DomainsResponse } from \"../models/response/domains.response\";\nimport { ErrorResponse } from \"../models/response/error.response\";\nimport { EventResponse } from \"../models/response/event.response\";\nimport { ListResponse } from \"../models/response/list.response\";\nimport { ProfileResponse } from \"../models/response/profile.response\";\nimport { UserKeyResponse } from \"../models/response/user-key.response\";\nimport { AppIdService } from \"../platform/abstractions/app-id.service\";\nimport { EnvironmentService } from \"../platform/abstractions/environment.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"../platform/abstractions/platform-utils.service\";\nimport { Utils } from \"../platform/misc/utils\";\nimport { SyncResponse } from \"../platform/sync\";\nimport { UserId } from \"../types/guid\";\nimport { AttachmentRequest } from \"../vault/models/request/attachment.request\";\nimport { CipherBulkDeleteRequest } from \"../vault/models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../vault/models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../vault/models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../vault/models/request/cipher-bulk-share.request\";\nimport { CipherCollectionsRequest } from \"../vault/models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../vault/models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../vault/models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../vault/models/request/cipher-share.request\";\nimport { CipherRequest } from \"../vault/models/request/cipher.request\";\nimport { CollectionRequest } from \"../vault/models/request/collection.request\";\nimport { AttachmentUploadDataResponse } from \"../vault/models/response/attachment-upload-data.response\";\nimport { AttachmentResponse } from \"../vault/models/response/attachment.response\";\nimport { CipherResponse } from \"../vault/models/response/cipher.response\";\nimport {\n CollectionAccessDetailsResponse,\n CollectionDetailsResponse,\n CollectionResponse,\n} from \"../vault/models/response/collection.response\";\nimport { OptionalCipherResponse } from \"../vault/models/response/optional-cipher.response\";\n\n/**\n * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual\n * api services. The `send` method is still allowed to be used within api services. For background\n * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service.\n */\nexport class ApiService implements ApiServiceAbstraction {\n private device: DeviceType;\n private deviceType: string;\n private isWebClient = false;\n private isDesktopClient = false;\n\n constructor(\n private tokenService: TokenService,\n private platformUtilsService: PlatformUtilsService,\n private environmentService: EnvironmentService,\n private appIdService: AppIdService,\n private refreshAccessTokenErrorCallback: () => void,\n private logService: LogService,\n private logoutCallback: (logoutReason: LogoutReason) => Promise,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n private customUserAgent: string = null,\n ) {\n this.device = platformUtilsService.getDevice();\n this.deviceType = this.device.toString();\n this.isWebClient =\n this.device === DeviceType.IEBrowser ||\n this.device === DeviceType.ChromeBrowser ||\n this.device === DeviceType.EdgeBrowser ||\n this.device === DeviceType.FirefoxBrowser ||\n this.device === DeviceType.OperaBrowser ||\n this.device === DeviceType.SafariBrowser ||\n this.device === DeviceType.UnknownBrowser ||\n this.device === DeviceType.VivaldiBrowser;\n this.isDesktopClient =\n this.device === DeviceType.WindowsDesktop ||\n this.device === DeviceType.MacOsDesktop ||\n this.device === DeviceType.LinuxDesktop ||\n this.device === DeviceType.WindowsCLI ||\n this.device === DeviceType.MacOsCLI ||\n this.device === DeviceType.LinuxCLI;\n }\n\n // Auth APIs\n\n async postIdentityToken(\n request:\n | UserApiTokenRequest\n | PasswordTokenRequest\n | SsoTokenRequest\n | WebAuthnLoginTokenRequest,\n ): Promise {\n const headers = new Headers({\n \"Content-Type\": \"application/x-www-form-urlencoded; charset=utf-8\",\n Accept: \"application/json\",\n \"Device-Type\": this.deviceType,\n });\n if (this.customUserAgent != null) {\n headers.set(\"User-Agent\", this.customUserAgent);\n }\n request.alterIdentityTokenHeaders(headers);\n\n const identityToken =\n request instanceof UserApiTokenRequest\n ? request.toIdentityToken()\n : request.toIdentityToken(this.platformUtilsService.getClientType());\n\n const env = await firstValueFrom(this.environmentService.environment$);\n\n const response = await this.fetch(\n new Request(env.getIdentityUrl() + \"/connect/token\", {\n body: this.qsStringify(identityToken),\n credentials: await this.getCredentials(),\n cache: \"no-store\",\n headers: headers,\n method: \"POST\",\n }),\n );\n\n let responseJson: any = null;\n if (this.isJsonResponse(response)) {\n responseJson = await response.json();\n }\n\n if (responseJson != null) {\n if (response.status === 200) {\n return new IdentityTokenResponse(responseJson);\n } else if (\n response.status === 400 &&\n responseJson.TwoFactorProviders2 &&\n Object.keys(responseJson.TwoFactorProviders2).length\n ) {\n return new IdentityTwoFactorResponse(responseJson);\n } else if (\n response.status === 400 &&\n responseJson.HCaptcha_SiteKey &&\n Object.keys(responseJson.HCaptcha_SiteKey).length\n ) {\n return new IdentityCaptchaResponse(responseJson);\n }\n }\n\n return Promise.reject(new ErrorResponse(responseJson, response.status, true));\n }\n\n async refreshIdentityToken(): Promise {\n try {\n await this.refreshToken();\n } catch (e) {\n this.logService.error(\"Error refreshing access token: \", e);\n throw e;\n }\n }\n\n // TODO: PM-3519: Create and move to AuthRequest Api service\n async postAuthRequest(request: CreateAuthRequest): Promise {\n const r = await this.send(\"POST\", \"/auth-requests/\", request, false, true);\n return new AuthRequestResponse(r);\n }\n async postAdminAuthRequest(request: CreateAuthRequest): Promise {\n const r = await this.send(\"POST\", \"/auth-requests/admin-request\", request, true, true);\n return new AuthRequestResponse(r);\n }\n\n async getAuthResponse(id: string, accessCode: string): Promise {\n const path = `/auth-requests/${id}/response?code=${accessCode}`;\n const r = await this.send(\"GET\", path, null, false, true);\n return new AuthRequestResponse(r);\n }\n\n async getAuthRequest(id: string): Promise {\n const path = `/auth-requests/${id}`;\n const r = await this.send(\"GET\", path, null, true, true);\n return new AuthRequestResponse(r);\n }\n\n async putAuthRequest(id: string, request: PasswordlessAuthRequest): Promise {\n const path = `/auth-requests/${id}`;\n const r = await this.send(\"PUT\", path, request, true, true);\n return new AuthRequestResponse(r);\n }\n\n async getAuthRequests(): Promise> {\n const path = `/auth-requests/`;\n const r = await this.send(\"GET\", path, null, true, true);\n return new ListResponse(r, AuthRequestResponse);\n }\n\n async getLastAuthRequest(): Promise {\n const requests = await this.getAuthRequests();\n const activeRequests = requests.data.filter((m) => !m.isAnswered && !m.isExpired);\n const lastRequest = activeRequests.sort((a: AuthRequestResponse, b: AuthRequestResponse) =>\n a.creationDate.localeCompare(b.creationDate),\n )[activeRequests.length - 1];\n return lastRequest;\n }\n\n // Account APIs\n\n async getProfile(): Promise {\n const r = await this.send(\"GET\", \"/accounts/profile\", null, true, true);\n return new ProfileResponse(r);\n }\n\n async getUserSubscription(): Promise {\n const r = await this.send(\"GET\", \"/accounts/subscription\", null, true, true);\n return new SubscriptionResponse(r);\n }\n\n async getTaxInfo(): Promise {\n const r = await this.send(\"GET\", \"/accounts/tax\", null, true, true);\n return new TaxInfoResponse(r);\n }\n\n async putProfile(request: UpdateProfileRequest): Promise {\n const r = await this.send(\"PUT\", \"/accounts/profile\", request, true, true);\n return new ProfileResponse(r);\n }\n\n async putAvatar(request: UpdateAvatarRequest): Promise {\n const r = await this.send(\"PUT\", \"/accounts/avatar\", request, true, true);\n return new ProfileResponse(r);\n }\n\n putTaxInfo(request: TaxInfoUpdateRequest): Promise {\n return this.send(\"PUT\", \"/accounts/tax\", request, true, false);\n }\n\n async postPrelogin(request: PreloginRequest): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n const r = await this.send(\n \"POST\",\n \"/accounts/prelogin\",\n request,\n false,\n true,\n env.getIdentityUrl(),\n );\n return new PreloginResponse(r);\n }\n\n postEmailToken(request: EmailTokenRequest): Promise {\n return this.send(\"POST\", \"/accounts/email-token\", request, true, false);\n }\n\n postEmail(request: EmailRequest): Promise {\n return this.send(\"POST\", \"/accounts/email\", request, true, false);\n }\n\n postPassword(request: PasswordRequest): Promise {\n return this.send(\"POST\", \"/accounts/password\", request, true, false);\n }\n\n setPassword(request: SetPasswordRequest): Promise {\n return this.send(\"POST\", \"/accounts/set-password\", request, true, false);\n }\n\n postSetKeyConnectorKey(request: SetKeyConnectorKeyRequest): Promise {\n return this.send(\"POST\", \"/accounts/set-key-connector-key\", request, true, false);\n }\n\n postSecurityStamp(request: SecretVerificationRequest): Promise {\n return this.send(\"POST\", \"/accounts/security-stamp\", request, true, false);\n }\n\n async getAccountRevisionDate(): Promise {\n const r = await this.send(\"GET\", \"/accounts/revision-date\", null, true, true);\n return r as number;\n }\n\n postPasswordHint(request: PasswordHintRequest): Promise {\n return this.send(\"POST\", \"/accounts/password-hint\", request, false, false);\n }\n\n async postRegister(request: RegisterRequest): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n const r = await this.send(\n \"POST\",\n \"/accounts/register\",\n request,\n false,\n true,\n env.getIdentityUrl(),\n );\n return new RegisterResponse(r);\n }\n\n async postPremium(data: FormData): Promise {\n const r = await this.send(\"POST\", \"/accounts/premium\", data, true, true);\n return new PaymentResponse(r);\n }\n\n postReinstatePremium(): Promise {\n return this.send(\"POST\", \"/accounts/reinstate-premium\", null, true, false);\n }\n\n async postAccountStorage(request: StorageRequest): Promise {\n const r = await this.send(\"POST\", \"/accounts/storage\", request, true, true);\n return new PaymentResponse(r);\n }\n\n postAccountPayment(request: PaymentRequest): Promise {\n return this.send(\"POST\", \"/accounts/payment\", request, true, false);\n }\n\n postAccountLicense(data: FormData): Promise {\n return this.send(\"POST\", \"/accounts/license\", data, true, false);\n }\n\n postAccountKeys(request: KeysRequest): Promise {\n return this.send(\"POST\", \"/accounts/keys\", request, true, false);\n }\n\n postAccountVerifyEmail(): Promise {\n return this.send(\"POST\", \"/accounts/verify-email\", null, true, false);\n }\n\n postAccountVerifyEmailToken(request: VerifyEmailRequest): Promise {\n return this.send(\"POST\", \"/accounts/verify-email-token\", request, false, false);\n }\n\n postAccountRecoverDelete(request: DeleteRecoverRequest): Promise {\n return this.send(\"POST\", \"/accounts/delete-recover\", request, false, false);\n }\n\n postAccountRecoverDeleteToken(request: VerifyDeleteRecoverRequest): Promise {\n return this.send(\"POST\", \"/accounts/delete-recover-token\", request, false, false);\n }\n\n postAccountKdf(request: KdfRequest): Promise {\n return this.send(\"POST\", \"/accounts/kdf\", request, true, false);\n }\n\n async deleteSsoUser(organizationId: string): Promise {\n return this.send(\"DELETE\", \"/accounts/sso/\" + organizationId, null, true, false);\n }\n\n async getSsoUserIdentifier(): Promise {\n return this.send(\"GET\", \"/accounts/sso/user-identifier\", null, true, true);\n }\n\n async postUserApiKey(id: string, request: SecretVerificationRequest): Promise {\n const r = await this.send(\"POST\", \"/accounts/api-key\", request, true, true);\n return new ApiKeyResponse(r);\n }\n\n async postUserRotateApiKey(\n id: string,\n request: SecretVerificationRequest,\n ): Promise {\n const r = await this.send(\"POST\", \"/accounts/rotate-api-key\", request, true, true);\n return new ApiKeyResponse(r);\n }\n\n putUpdateTempPassword(request: UpdateTempPasswordRequest): Promise {\n return this.send(\"PUT\", \"/accounts/update-temp-password\", request, true, false);\n }\n\n postConvertToKeyConnector(): Promise {\n return this.send(\"POST\", \"/accounts/convert-to-key-connector\", null, true, false);\n }\n\n // Account Billing APIs\n\n async getUserBillingHistory(): Promise {\n const r = await this.send(\"GET\", \"/accounts/billing/history\", null, true, true);\n return new BillingHistoryResponse(r);\n }\n\n async getUserBillingPayment(): Promise {\n const r = await this.send(\"GET\", \"/accounts/billing/payment-method\", null, true, true);\n return new BillingPaymentResponse(r);\n }\n\n // Cipher APIs\n\n async getCipher(id: string): Promise {\n const r = await this.send(\"GET\", \"/ciphers/\" + id, null, true, true);\n return new CipherResponse(r);\n }\n\n async getFullCipherDetails(id: string): Promise {\n const r = await this.send(\"GET\", \"/ciphers/\" + id + \"/details\", null, true, true);\n return new CipherResponse(r);\n }\n\n async getCipherAdmin(id: string): Promise {\n const r = await this.send(\"GET\", \"/ciphers/\" + id + \"/admin\", null, true, true);\n return new CipherResponse(r);\n }\n\n async getCiphersOrganization(organizationId: string): Promise> {\n const r = await this.send(\n \"GET\",\n \"/ciphers/organization-details?organizationId=\" + organizationId,\n null,\n true,\n true,\n );\n return new ListResponse(r, CipherResponse);\n }\n\n async postCipher(request: CipherRequest): Promise {\n const r = await this.send(\"POST\", \"/ciphers\", request, true, true);\n return new CipherResponse(r);\n }\n\n async postCipherCreate(request: CipherCreateRequest): Promise {\n const r = await this.send(\"POST\", \"/ciphers/create\", request, true, true);\n return new CipherResponse(r);\n }\n\n async postCipherAdmin(request: CipherCreateRequest): Promise {\n const r = await this.send(\"POST\", \"/ciphers/admin\", request, true, true);\n return new CipherResponse(r);\n }\n\n async putCipher(id: string, request: CipherRequest): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id, request, true, true);\n return new CipherResponse(r);\n }\n\n async putPartialCipher(id: string, request: CipherPartialRequest): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/partial\", request, true, true);\n return new CipherResponse(r);\n }\n\n async putCipherAdmin(id: string, request: CipherRequest): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/admin\", request, true, true);\n return new CipherResponse(r);\n }\n\n deleteCipher(id: string): Promise {\n return this.send(\"DELETE\", \"/ciphers/\" + id, null, true, false);\n }\n\n deleteCipherAdmin(id: string): Promise {\n return this.send(\"DELETE\", \"/ciphers/\" + id + \"/admin\", null, true, false);\n }\n\n deleteManyCiphers(request: CipherBulkDeleteRequest): Promise {\n return this.send(\"DELETE\", \"/ciphers\", request, true, false);\n }\n\n deleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise {\n return this.send(\"DELETE\", \"/ciphers/admin\", request, true, false);\n }\n\n putMoveCiphers(request: CipherBulkMoveRequest): Promise {\n return this.send(\"PUT\", \"/ciphers/move\", request, true, false);\n }\n\n async putShareCipher(id: string, request: CipherShareRequest): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/share\", request, true, true);\n return new CipherResponse(r);\n }\n\n putShareCiphers(request: CipherBulkShareRequest): Promise {\n return this.send(\"PUT\", \"/ciphers/share\", request, true, false);\n }\n\n async putCipherCollections(\n id: string,\n request: CipherCollectionsRequest,\n ): Promise {\n const response = await this.send(\n \"PUT\",\n \"/ciphers/\" + id + \"/collections_v2\",\n request,\n true,\n true,\n );\n return new OptionalCipherResponse(response);\n }\n\n putCipherCollectionsAdmin(id: string, request: CipherCollectionsRequest): Promise {\n return this.send(\"PUT\", \"/ciphers/\" + id + \"/collections-admin\", request, true, false);\n }\n\n postPurgeCiphers(\n request: SecretVerificationRequest,\n organizationId: string = null,\n ): Promise {\n let path = \"/ciphers/purge\";\n if (organizationId != null) {\n path += \"?organizationId=\" + organizationId;\n }\n return this.send(\"POST\", path, request, true, false);\n }\n\n putDeleteCipher(id: string): Promise {\n return this.send(\"PUT\", \"/ciphers/\" + id + \"/delete\", null, true, false);\n }\n\n putDeleteCipherAdmin(id: string): Promise {\n return this.send(\"PUT\", \"/ciphers/\" + id + \"/delete-admin\", null, true, false);\n }\n\n putDeleteManyCiphers(request: CipherBulkDeleteRequest): Promise {\n return this.send(\"PUT\", \"/ciphers/delete\", request, true, false);\n }\n\n putDeleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise {\n return this.send(\"PUT\", \"/ciphers/delete-admin\", request, true, false);\n }\n\n async putRestoreCipher(id: string): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/restore\", null, true, true);\n return new CipherResponse(r);\n }\n\n async putRestoreCipherAdmin(id: string): Promise {\n const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/restore-admin\", null, true, true);\n return new CipherResponse(r);\n }\n\n async putRestoreManyCiphers(\n request: CipherBulkRestoreRequest,\n ): Promise> {\n const r = await this.send(\"PUT\", \"/ciphers/restore\", request, true, true);\n return new ListResponse(r, CipherResponse);\n }\n\n async putRestoreManyCiphersAdmin(\n request: CipherBulkRestoreRequest,\n ): Promise> {\n const r = await this.send(\"PUT\", \"/ciphers/restore-admin\", request, true, true);\n return new ListResponse(r, CipherResponse);\n }\n\n // Attachments APIs\n\n async getAttachmentData(\n cipherId: string,\n attachmentId: string,\n emergencyAccessId?: string,\n ): Promise {\n const path =\n (emergencyAccessId != null ? \"/emergency-access/\" + emergencyAccessId + \"/\" : \"/ciphers/\") +\n cipherId +\n \"/attachment/\" +\n attachmentId;\n const r = await this.send(\"GET\", path, null, true, true);\n return new AttachmentResponse(r);\n }\n\n async postCipherAttachment(\n id: string,\n request: AttachmentRequest,\n ): Promise {\n const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment/v2\", request, true, true);\n return new AttachmentUploadDataResponse(r);\n }\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n async postCipherAttachmentLegacy(id: string, data: FormData): Promise {\n const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment\", data, true, true);\n return new CipherResponse(r);\n }\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n async postCipherAttachmentAdminLegacy(id: string, data: FormData): Promise {\n const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment-admin\", data, true, true);\n return new CipherResponse(r);\n }\n\n deleteCipherAttachment(id: string, attachmentId: string): Promise {\n return this.send(\"DELETE\", \"/ciphers/\" + id + \"/attachment/\" + attachmentId, null, true, false);\n }\n\n deleteCipherAttachmentAdmin(id: string, attachmentId: string): Promise {\n return this.send(\n \"DELETE\",\n \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/admin\",\n null,\n true,\n false,\n );\n }\n\n postShareCipherAttachment(\n id: string,\n attachmentId: string,\n data: FormData,\n organizationId: string,\n ): Promise {\n return this.send(\n \"POST\",\n \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/share?organizationId=\" + organizationId,\n data,\n true,\n false,\n );\n }\n\n async renewAttachmentUploadUrl(\n id: string,\n attachmentId: string,\n ): Promise {\n const r = await this.send(\n \"GET\",\n \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/renew\",\n null,\n true,\n true,\n );\n return new AttachmentUploadDataResponse(r);\n }\n\n postAttachmentFile(id: string, attachmentId: string, data: FormData): Promise {\n return this.send(\"POST\", \"/ciphers/\" + id + \"/attachment/\" + attachmentId, data, true, false);\n }\n\n // Collections APIs\n\n async getCollectionAccessDetails(\n organizationId: string,\n id: string,\n ): Promise {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/collections/\" + id + \"/details\",\n null,\n true,\n true,\n );\n return new CollectionAccessDetailsResponse(r);\n }\n\n async getUserCollections(): Promise> {\n const r = await this.send(\"GET\", \"/collections\", null, true, true);\n return new ListResponse(r, CollectionResponse);\n }\n\n async getCollections(organizationId: string): Promise> {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/collections\",\n null,\n true,\n true,\n );\n return new ListResponse(r, CollectionResponse);\n }\n\n async getManyCollectionsWithAccessDetails(\n organizationId: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/collections/details\",\n null,\n true,\n true,\n );\n return new ListResponse(r, CollectionAccessDetailsResponse);\n }\n\n async getCollectionUsers(\n organizationId: string,\n id: string,\n ): Promise {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/collections/\" + id + \"/users\",\n null,\n true,\n true,\n );\n return r.map((dr: any) => new SelectionReadOnlyResponse(dr));\n }\n\n async postCollection(\n organizationId: string,\n request: CollectionRequest,\n ): Promise {\n const r = await this.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/collections\",\n request,\n true,\n true,\n );\n return new CollectionAccessDetailsResponse(r);\n }\n\n async putCollection(\n organizationId: string,\n id: string,\n request: CollectionRequest,\n ): Promise {\n const r = await this.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/collections/\" + id,\n request,\n true,\n true,\n );\n return new CollectionAccessDetailsResponse(r);\n }\n\n async putCollectionUsers(\n organizationId: string,\n id: string,\n request: SelectionReadOnlyRequest[],\n ): Promise {\n await this.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/collections/\" + id + \"/users\",\n request,\n true,\n false,\n );\n }\n\n deleteCollection(organizationId: string, id: string): Promise {\n return this.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/collections/\" + id,\n null,\n true,\n false,\n );\n }\n\n deleteManyCollections(organizationId: string, collectionIds: string[]): Promise {\n return this.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/collections\",\n new CollectionBulkDeleteRequest(collectionIds),\n true,\n false,\n );\n }\n\n deleteCollectionUser(\n organizationId: string,\n id: string,\n organizationUserId: string,\n ): Promise {\n return this.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/collections/\" + id + \"/user/\" + organizationUserId,\n null,\n true,\n false,\n );\n }\n\n // Groups APIs\n\n async getGroupUsers(organizationId: string, id: string): Promise {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/groups/\" + id + \"/users\",\n null,\n true,\n true,\n );\n return r;\n }\n\n deleteGroupUser(organizationId: string, id: string, organizationUserId: string): Promise {\n return this.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/groups/\" + id + \"/user/\" + organizationUserId,\n null,\n true,\n false,\n );\n }\n\n // Plan APIs\n\n async getPlans(): Promise> {\n const r = await this.send(\"GET\", \"/plans\", null, false, true);\n return new ListResponse(r, PlanResponse);\n }\n\n async postPublicImportDirectory(request: OrganizationImportRequest): Promise {\n return this.send(\"POST\", \"/public/organization/import\", request, true, false);\n }\n\n async getTaxRates(): Promise> {\n const r = await this.send(\"GET\", \"/plans/sales-tax-rates/\", null, true, true);\n return new ListResponse(r, TaxRateResponse);\n }\n\n // Settings APIs\n\n async getSettingsDomains(): Promise {\n const r = await this.send(\"GET\", \"/settings/domains\", null, true, true);\n return new DomainsResponse(r);\n }\n\n async putSettingsDomains(request: UpdateDomainsRequest): Promise {\n const r = await this.send(\"PUT\", \"/settings/domains\", request, true, true);\n return new DomainsResponse(r);\n }\n\n // Sync APIs\n\n async getSync(): Promise {\n const path = this.isDesktopClient || this.isWebClient ? \"/sync?excludeDomains=true\" : \"/sync\";\n const r = await this.send(\"GET\", path, null, true, true);\n return new SyncResponse(r);\n }\n\n // Two-factor APIs\n\n async getTwoFactorProviders(): Promise> {\n const r = await this.send(\"GET\", \"/two-factor\", null, true, true);\n return new ListResponse(r, TwoFactorProviderResponse);\n }\n\n async getTwoFactorOrganizationProviders(\n organizationId: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/two-factor\",\n null,\n true,\n true,\n );\n return new ListResponse(r, TwoFactorProviderResponse);\n }\n\n async getTwoFactorAuthenticator(\n request: SecretVerificationRequest,\n ): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-authenticator\", request, true, true);\n return new TwoFactorAuthenticatorResponse(r);\n }\n\n async getTwoFactorEmail(request: SecretVerificationRequest): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-email\", request, true, true);\n return new TwoFactorEmailResponse(r);\n }\n\n async getTwoFactorDuo(request: SecretVerificationRequest): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-duo\", request, true, true);\n return new TwoFactorDuoResponse(r);\n }\n\n async getTwoFactorOrganizationDuo(\n organizationId: string,\n request: SecretVerificationRequest,\n ): Promise {\n const r = await this.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/two-factor/get-duo\",\n request,\n true,\n true,\n );\n return new TwoFactorDuoResponse(r);\n }\n\n async getTwoFactorYubiKey(request: SecretVerificationRequest): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-yubikey\", request, true, true);\n return new TwoFactorYubiKeyResponse(r);\n }\n\n async getTwoFactorWebAuthn(\n request: SecretVerificationRequest,\n ): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-webauthn\", request, true, true);\n return new TwoFactorWebAuthnResponse(r);\n }\n\n async getTwoFactorWebAuthnChallenge(\n request: SecretVerificationRequest,\n ): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-webauthn-challenge\", request, true, true);\n return new ChallengeResponse(r);\n }\n\n async getTwoFactorRecover(request: SecretVerificationRequest): Promise {\n const r = await this.send(\"POST\", \"/two-factor/get-recover\", request, true, true);\n return new TwoFactorRecoverResponse(r);\n }\n\n async putTwoFactorAuthenticator(\n request: UpdateTwoFactorAuthenticatorRequest,\n ): Promise {\n const r = await this.send(\"PUT\", \"/two-factor/authenticator\", request, true, true);\n return new TwoFactorAuthenticatorResponse(r);\n }\n\n async putTwoFactorEmail(request: UpdateTwoFactorEmailRequest): Promise {\n const r = await this.send(\"PUT\", \"/two-factor/email\", request, true, true);\n return new TwoFactorEmailResponse(r);\n }\n\n async putTwoFactorDuo(request: UpdateTwoFactorDuoRequest): Promise {\n const r = await this.send(\"PUT\", \"/two-factor/duo\", request, true, true);\n return new TwoFactorDuoResponse(r);\n }\n\n async putTwoFactorOrganizationDuo(\n organizationId: string,\n request: UpdateTwoFactorDuoRequest,\n ): Promise {\n const r = await this.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/two-factor/duo\",\n request,\n true,\n true,\n );\n return new TwoFactorDuoResponse(r);\n }\n\n async putTwoFactorYubiKey(\n request: UpdateTwoFactorYubikeyOtpRequest,\n ): Promise {\n const r = await this.send(\"PUT\", \"/two-factor/yubikey\", request, true, true);\n return new TwoFactorYubiKeyResponse(r);\n }\n\n async putTwoFactorWebAuthn(\n request: UpdateTwoFactorWebAuthnRequest,\n ): Promise {\n const response = request.deviceResponse.response as AuthenticatorAttestationResponse;\n const data: any = Object.assign({}, request);\n\n data.deviceResponse = {\n id: request.deviceResponse.id,\n rawId: btoa(request.deviceResponse.id),\n type: request.deviceResponse.type,\n extensions: request.deviceResponse.getClientExtensionResults(),\n response: {\n AttestationObject: Utils.fromBufferToB64(response.attestationObject),\n clientDataJson: Utils.fromBufferToB64(response.clientDataJSON),\n },\n };\n\n const r = await this.send(\"PUT\", \"/two-factor/webauthn\", data, true, true);\n return new TwoFactorWebAuthnResponse(r);\n }\n\n async deleteTwoFactorWebAuthn(\n request: UpdateTwoFactorWebAuthnDeleteRequest,\n ): Promise {\n const r = await this.send(\"DELETE\", \"/two-factor/webauthn\", request, true, true);\n return new TwoFactorWebAuthnResponse(r);\n }\n\n async putTwoFactorDisable(request: TwoFactorProviderRequest): Promise {\n const r = await this.send(\"PUT\", \"/two-factor/disable\", request, true, true);\n return new TwoFactorProviderResponse(r);\n }\n\n async putTwoFactorOrganizationDisable(\n organizationId: string,\n request: TwoFactorProviderRequest,\n ): Promise {\n const r = await this.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/two-factor/disable\",\n request,\n true,\n true,\n );\n return new TwoFactorProviderResponse(r);\n }\n\n postTwoFactorRecover(request: TwoFactorRecoveryRequest): Promise {\n return this.send(\"POST\", \"/two-factor/recover\", request, false, false);\n }\n\n postTwoFactorEmailSetup(request: TwoFactorEmailRequest): Promise {\n return this.send(\"POST\", \"/two-factor/send-email\", request, true, false);\n }\n\n postTwoFactorEmail(request: TwoFactorEmailRequest): Promise {\n return this.send(\"POST\", \"/two-factor/send-email-login\", request, false, false);\n }\n\n async getDeviceVerificationSettings(): Promise {\n const r = await this.send(\n \"GET\",\n \"/two-factor/get-device-verification-settings\",\n null,\n true,\n true,\n );\n return new DeviceVerificationResponse(r);\n }\n\n async putDeviceVerificationSettings(\n request: DeviceVerificationRequest,\n ): Promise {\n const r = await this.send(\n \"PUT\",\n \"/two-factor/device-verification-settings\",\n request,\n true,\n true,\n );\n return new DeviceVerificationResponse(r);\n }\n\n // Organization APIs\n\n async getCloudCommunicationsEnabled(): Promise {\n const r = await this.send(\"GET\", \"/organizations/connections/enabled\", null, true, true);\n return r as boolean;\n }\n\n async getOrganizationConnection(\n id: string,\n type: OrganizationConnectionType,\n configType: { new (response: any): TConfig },\n ): Promise> {\n const r = await this.send(\"GET\", `/organizations/connections/${id}/${type}`, null, true, true);\n return new OrganizationConnectionResponse(r, configType);\n }\n\n async createOrganizationConnection(\n request: OrganizationConnectionRequest,\n configType: { new (response: any): TConfig },\n ): Promise> {\n const r = await this.send(\"POST\", \"/organizations/connections/\", request, true, true);\n return new OrganizationConnectionResponse(r, configType);\n }\n\n async updateOrganizationConnection(\n request: OrganizationConnectionRequest,\n configType: { new (response: any): TConfig },\n organizationConnectionId?: string,\n ): Promise> {\n const r = await this.send(\n \"PUT\",\n \"/organizations/connections/\" + organizationConnectionId,\n request,\n true,\n true,\n );\n return new OrganizationConnectionResponse(r, configType);\n }\n\n async deleteOrganizationConnection(id: string): Promise {\n return this.send(\"DELETE\", \"/organizations/connections/\" + id, null, true, false);\n }\n\n // Provider User APIs\n\n async getProviderUsers(\n providerId: string,\n ): Promise> {\n const r = await this.send(\"GET\", \"/providers/\" + providerId + \"/users\", null, true, true);\n return new ListResponse(r, ProviderUserUserDetailsResponse);\n }\n\n async getProviderUser(providerId: string, id: string): Promise {\n const r = await this.send(\"GET\", \"/providers/\" + providerId + \"/users/\" + id, null, true, true);\n return new ProviderUserResponse(r);\n }\n\n postProviderUserInvite(providerId: string, request: ProviderUserInviteRequest): Promise {\n return this.send(\"POST\", \"/providers/\" + providerId + \"/users/invite\", request, true, false);\n }\n\n postProviderUserReinvite(providerId: string, id: string): Promise {\n return this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/\" + id + \"/reinvite\",\n null,\n true,\n false,\n );\n }\n\n async postManyProviderUserReinvite(\n providerId: string,\n request: ProviderUserBulkRequest,\n ): Promise> {\n const r = await this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/reinvite\",\n request,\n true,\n true,\n );\n return new ListResponse(r, ProviderUserBulkResponse);\n }\n\n async postProviderUserBulkConfirm(\n providerId: string,\n request: ProviderUserBulkConfirmRequest,\n ): Promise> {\n const r = await this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/confirm\",\n request,\n true,\n true,\n );\n return new ListResponse(r, ProviderUserBulkResponse);\n }\n\n async deleteManyProviderUsers(\n providerId: string,\n request: ProviderUserBulkRequest,\n ): Promise> {\n const r = await this.send(\"DELETE\", \"/providers/\" + providerId + \"/users\", request, true, true);\n return new ListResponse(r, ProviderUserBulkResponse);\n }\n\n postProviderUserAccept(\n providerId: string,\n id: string,\n request: ProviderUserAcceptRequest,\n ): Promise {\n return this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/\" + id + \"/accept\",\n request,\n true,\n false,\n );\n }\n\n postProviderUserConfirm(\n providerId: string,\n id: string,\n request: ProviderUserConfirmRequest,\n ): Promise {\n return this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/\" + id + \"/confirm\",\n request,\n true,\n false,\n );\n }\n\n async postProviderUsersPublicKey(\n providerId: string,\n request: ProviderUserBulkRequest,\n ): Promise> {\n const r = await this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/users/public-keys\",\n request,\n true,\n true,\n );\n return new ListResponse(r, ProviderUserBulkPublicKeyResponse);\n }\n\n putProviderUser(\n providerId: string,\n id: string,\n request: ProviderUserUpdateRequest,\n ): Promise {\n return this.send(\"PUT\", \"/providers/\" + providerId + \"/users/\" + id, request, true, false);\n }\n\n deleteProviderUser(providerId: string, id: string): Promise {\n return this.send(\"DELETE\", \"/providers/\" + providerId + \"/users/\" + id, null, true, false);\n }\n\n // Provider Organization APIs\n\n async getProviderClients(\n providerId: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n \"/providers/\" + providerId + \"/organizations\",\n null,\n true,\n true,\n );\n return new ListResponse(r, ProviderOrganizationOrganizationDetailsResponse);\n }\n\n postProviderAddOrganization(\n providerId: string,\n request: ProviderAddOrganizationRequest,\n ): Promise {\n return this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/organizations/add\",\n request,\n true,\n false,\n );\n }\n\n async postProviderCreateOrganization(\n providerId: string,\n request: ProviderOrganizationCreateRequest,\n ): Promise {\n const r = await this.send(\n \"POST\",\n \"/providers/\" + providerId + \"/organizations\",\n request,\n true,\n true,\n );\n return new ProviderOrganizationResponse(r);\n }\n\n deleteProviderOrganization(providerId: string, id: string): Promise {\n return this.send(\n \"DELETE\",\n \"/providers/\" + providerId + \"/organizations/\" + id,\n null,\n true,\n false,\n );\n }\n\n // Event APIs\n\n async getEvents(start: string, end: string, token: string): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\"/events\", start, end, token),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async getEventsCipher(\n id: string,\n start: string,\n end: string,\n token: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\"/ciphers/\" + id + \"/events\", start, end, token),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async getEventsOrganization(\n id: string,\n start: string,\n end: string,\n token: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\"/organizations/\" + id + \"/events\", start, end, token),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async getEventsOrganizationUser(\n organizationId: string,\n id: string,\n start: string,\n end: string,\n token: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/events\",\n start,\n end,\n token,\n ),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async getEventsProvider(\n id: string,\n start: string,\n end: string,\n token: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\"/providers/\" + id + \"/events\", start, end, token),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async getEventsProviderUser(\n providerId: string,\n id: string,\n start: string,\n end: string,\n token: string,\n ): Promise> {\n const r = await this.send(\n \"GET\",\n this.addEventParameters(\n \"/providers/\" + providerId + \"/users/\" + id + \"/events\",\n start,\n end,\n token,\n ),\n null,\n true,\n true,\n );\n return new ListResponse(r, EventResponse);\n }\n\n async postEventsCollect(request: EventRequest[], userId?: UserId): Promise {\n const authHeader = await this.tokenService.getAccessToken(userId);\n const headers = new Headers({\n \"Device-Type\": this.deviceType,\n Authorization: \"Bearer \" + authHeader,\n \"Content-Type\": \"application/json; charset=utf-8\",\n });\n if (this.customUserAgent != null) {\n headers.set(\"User-Agent\", this.customUserAgent);\n }\n const env = await firstValueFrom(this.environmentService.environment$);\n const response = await this.fetch(\n new Request(env.getEventsUrl() + \"/collect\", {\n cache: \"no-store\",\n credentials: await this.getCredentials(),\n method: \"POST\",\n body: JSON.stringify(request),\n headers: headers,\n }),\n );\n if (response.status !== 200) {\n return Promise.reject(\"Event post failed.\");\n }\n }\n\n // User APIs\n\n async getUserPublicKey(id: string): Promise {\n const r = await this.send(\"GET\", \"/users/\" + id + \"/public-key\", null, true, true);\n return new UserKeyResponse(r);\n }\n\n // HIBP APIs\n\n async getHibpBreach(username: string): Promise {\n const r = await this.send(\"GET\", \"/hibp/breach?username=\" + username, null, true, true);\n return r.map((a: any) => new BreachAccountResponse(a));\n }\n\n // Misc\n\n async postBitPayInvoice(request: BitPayInvoiceRequest): Promise {\n const r = await this.send(\"POST\", \"/bitpay-invoice\", request, true, true);\n return r as string;\n }\n\n async postSetupPayment(): Promise {\n const r = await this.send(\"POST\", \"/setup-payment\", null, true, true);\n return r as string;\n }\n\n // Key Connector\n\n async getMasterKeyFromKeyConnector(\n keyConnectorUrl: string,\n ): Promise {\n const authHeader = await this.getActiveBearerToken();\n\n const response = await this.fetch(\n new Request(keyConnectorUrl + \"/user-keys\", {\n cache: \"no-store\",\n method: \"GET\",\n headers: new Headers({\n Accept: \"application/json\",\n Authorization: \"Bearer \" + authHeader,\n }),\n }),\n );\n\n if (response.status !== 200) {\n const error = await this.handleError(response, false, true);\n return Promise.reject(error);\n }\n\n return new KeyConnectorUserKeyResponse(await response.json());\n }\n\n async postUserKeyToKeyConnector(\n keyConnectorUrl: string,\n request: KeyConnectorUserKeyRequest,\n ): Promise {\n const authHeader = await this.getActiveBearerToken();\n\n const response = await this.fetch(\n new Request(keyConnectorUrl + \"/user-keys\", {\n cache: \"no-store\",\n method: \"POST\",\n headers: new Headers({\n Accept: \"application/json\",\n Authorization: \"Bearer \" + authHeader,\n \"Content-Type\": \"application/json; charset=utf-8\",\n }),\n body: JSON.stringify(request),\n }),\n );\n\n if (response.status !== 200) {\n const error = await this.handleError(response, false, true);\n return Promise.reject(error);\n }\n }\n\n async getKeyConnectorAlive(keyConnectorUrl: string) {\n const response = await this.fetch(\n new Request(keyConnectorUrl + \"/alive\", {\n cache: \"no-store\",\n method: \"GET\",\n headers: new Headers({\n Accept: \"application/json\",\n \"Content-Type\": \"application/json; charset=utf-8\",\n }),\n }),\n );\n\n if (response.status !== 200) {\n const error = await this.handleError(response, false, true);\n return Promise.reject(error);\n }\n }\n\n async getOrganizationExport(organizationId: string): Promise {\n const r = await this.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/export\",\n null,\n true,\n true,\n );\n return new OrganizationExportResponse(r);\n }\n\n // Helpers\n\n async getActiveBearerToken(): Promise {\n let accessToken = await this.tokenService.getAccessToken();\n if (await this.tokenService.tokenNeedsRefresh()) {\n accessToken = await this.refreshToken();\n }\n return accessToken;\n }\n\n async fetch(request: Request): Promise {\n if (request.method === \"GET\") {\n request.headers.set(\"Cache-Control\", \"no-store\");\n request.headers.set(\"Pragma\", \"no-cache\");\n }\n request.headers.set(\"Bitwarden-Client-Name\", this.platformUtilsService.getClientType());\n request.headers.set(\n \"Bitwarden-Client-Version\",\n await this.platformUtilsService.getApplicationVersionNumber(),\n );\n return this.nativeFetch(request);\n }\n\n nativeFetch(request: Request): Promise {\n return fetch(request);\n }\n\n async preValidateSso(identifier: string): Promise {\n if (identifier == null || identifier === \"\") {\n throw new Error(\"Organization Identifier was not provided.\");\n }\n const headers = new Headers({\n Accept: \"application/json\",\n \"Device-Type\": this.deviceType,\n });\n if (this.customUserAgent != null) {\n headers.set(\"User-Agent\", this.customUserAgent);\n }\n\n const env = await firstValueFrom(this.environmentService.environment$);\n const path = `/sso/prevalidate?domainHint=${encodeURIComponent(identifier)}`;\n const response = await this.fetch(\n new Request(env.getIdentityUrl() + path, {\n cache: \"no-store\",\n credentials: await this.getCredentials(),\n headers: headers,\n method: \"GET\",\n }),\n );\n\n if (response.status === 200) {\n const body = await response.json();\n return new SsoPreValidateResponse(body);\n } else {\n const error = await this.handleError(response, false, true);\n return Promise.reject(error);\n }\n }\n\n async postCreateSponsorship(\n sponsoredOrgId: string,\n request: OrganizationSponsorshipCreateRequest,\n ): Promise {\n return await this.send(\n \"POST\",\n \"/organization/sponsorship/\" +\n (this.platformUtilsService.isSelfHost() ? \"self-hosted/\" : \"\") +\n sponsoredOrgId +\n \"/families-for-enterprise\",\n request,\n true,\n false,\n );\n }\n\n async getSponsorshipSyncStatus(\n sponsoredOrgId: string,\n ): Promise {\n const response = await this.send(\n \"GET\",\n \"/organization/sponsorship/\" + sponsoredOrgId + \"/sync-status\",\n null,\n true,\n true,\n );\n return new OrganizationSponsorshipSyncStatusResponse(response);\n }\n\n async deleteRevokeSponsorship(sponsoringOrganizationId: string): Promise {\n return await this.send(\n \"DELETE\",\n \"/organization/sponsorship/\" +\n (this.platformUtilsService.isSelfHost() ? \"self-hosted/\" : \"\") +\n sponsoringOrganizationId,\n null,\n true,\n false,\n );\n }\n\n async deleteRemoveSponsorship(sponsoringOrgId: string): Promise {\n return await this.send(\n \"DELETE\",\n \"/organization/sponsorship/sponsored/\" + sponsoringOrgId,\n null,\n true,\n false,\n );\n }\n\n async postPreValidateSponsorshipToken(sponsorshipToken: string): Promise {\n const r = await this.send(\n \"POST\",\n \"/organization/sponsorship/validate-token?sponsorshipToken=\" +\n encodeURIComponent(sponsorshipToken),\n null,\n true,\n true,\n );\n return r as boolean;\n }\n\n async postRedeemSponsorship(\n sponsorshipToken: string,\n request: OrganizationSponsorshipRedeemRequest,\n ): Promise {\n return await this.send(\n \"POST\",\n \"/organization/sponsorship/redeem?sponsorshipToken=\" + encodeURIComponent(sponsorshipToken),\n request,\n true,\n false,\n );\n }\n\n async postResendSponsorshipOffer(sponsoringOrgId: string): Promise {\n return await this.send(\n \"POST\",\n \"/organization/sponsorship/\" + sponsoringOrgId + \"/families-for-enterprise/resend\",\n null,\n true,\n false,\n );\n }\n\n protected async refreshToken(): Promise {\n const refreshToken = await this.tokenService.getRefreshToken();\n if (refreshToken != null && refreshToken !== \"\") {\n return this.refreshAccessToken();\n }\n\n const clientId = await this.tokenService.getClientId();\n const clientSecret = await this.tokenService.getClientSecret();\n if (!Utils.isNullOrWhitespace(clientId) && !Utils.isNullOrWhitespace(clientSecret)) {\n return this.refreshApiToken();\n }\n\n this.refreshAccessTokenErrorCallback();\n\n throw new Error(\"Cannot refresh access token, no refresh token or api keys are stored.\");\n }\n\n protected async refreshAccessToken(): Promise {\n const refreshToken = await this.tokenService.getRefreshToken();\n if (refreshToken == null || refreshToken === \"\") {\n throw new Error();\n }\n const headers = new Headers({\n \"Content-Type\": \"application/x-www-form-urlencoded; charset=utf-8\",\n Accept: \"application/json\",\n \"Device-Type\": this.deviceType,\n });\n if (this.customUserAgent != null) {\n headers.set(\"User-Agent\", this.customUserAgent);\n }\n\n const env = await firstValueFrom(this.environmentService.environment$);\n const decodedToken = await this.tokenService.decodeAccessToken();\n const response = await this.fetch(\n new Request(env.getIdentityUrl() + \"/connect/token\", {\n body: this.qsStringify({\n grant_type: \"refresh_token\",\n client_id: decodedToken.client_id,\n refresh_token: refreshToken,\n }),\n cache: \"no-store\",\n credentials: await this.getCredentials(),\n headers: headers,\n method: \"POST\",\n }),\n );\n\n if (response.status === 200) {\n const responseJson = await response.json();\n const tokenResponse = new IdentityTokenResponse(responseJson);\n\n const newDecodedAccessToken = await this.tokenService.decodeAccessToken(\n tokenResponse.accessToken,\n );\n const userId = newDecodedAccessToken.sub;\n\n const vaultTimeoutAction = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n );\n const vaultTimeout = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n );\n\n const refreshedTokens = await this.tokenService.setTokens(\n tokenResponse.accessToken,\n vaultTimeoutAction as VaultTimeoutAction,\n vaultTimeout,\n tokenResponse.refreshToken,\n );\n return refreshedTokens.accessToken;\n } else {\n const error = await this.handleError(response, true, true);\n return Promise.reject(error);\n }\n }\n\n protected async refreshApiToken(): Promise {\n const clientId = await this.tokenService.getClientId();\n const clientSecret = await this.tokenService.getClientSecret();\n\n const appId = await this.appIdService.getAppId();\n const deviceRequest = new DeviceRequest(appId, this.platformUtilsService);\n const tokenRequest = new UserApiTokenRequest(\n clientId,\n clientSecret,\n new TokenTwoFactorRequest(),\n deviceRequest,\n );\n\n const response = await this.postIdentityToken(tokenRequest);\n if (!(response instanceof IdentityTokenResponse)) {\n throw new Error(\"Invalid response received when refreshing api token\");\n }\n\n const newDecodedAccessToken = await this.tokenService.decodeAccessToken(response.accessToken);\n const userId = newDecodedAccessToken.sub;\n\n const vaultTimeoutAction = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n );\n const vaultTimeout = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n );\n\n const refreshedToken = await this.tokenService.setAccessToken(\n response.accessToken,\n vaultTimeoutAction as VaultTimeoutAction,\n vaultTimeout,\n );\n return refreshedToken;\n }\n\n async send(\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\",\n path: string,\n body: any,\n authed: boolean,\n hasResponse: boolean,\n apiUrl?: string,\n alterHeaders?: (headers: Headers) => void,\n ): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n apiUrl = Utils.isNullOrWhitespace(apiUrl) ? env.getApiUrl() : apiUrl;\n\n // Prevent directory traversal from malicious paths\n const pathParts = path.split(\"?\");\n const requestUrl =\n apiUrl + Utils.normalizePath(pathParts[0]) + (pathParts.length > 1 ? `?${pathParts[1]}` : \"\");\n\n const headers = new Headers({\n \"Device-Type\": this.deviceType,\n });\n if (this.customUserAgent != null) {\n headers.set(\"User-Agent\", this.customUserAgent);\n }\n\n const requestInit: RequestInit = {\n cache: \"no-store\",\n credentials: await this.getCredentials(),\n method: method,\n };\n\n if (authed) {\n const authHeader = await this.getActiveBearerToken();\n headers.set(\"Authorization\", \"Bearer \" + authHeader);\n }\n if (body != null) {\n if (typeof body === \"string\") {\n requestInit.body = body;\n headers.set(\"Content-Type\", \"application/x-www-form-urlencoded; charset=utf-8\");\n } else if (typeof body === \"object\") {\n if (body instanceof FormData) {\n requestInit.body = body;\n } else {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n requestInit.body = JSON.stringify(body);\n }\n }\n }\n if (hasResponse) {\n headers.set(\"Accept\", \"application/json\");\n }\n if (alterHeaders != null) {\n alterHeaders(headers);\n }\n\n requestInit.headers = headers;\n const response = await this.fetch(new Request(requestUrl, requestInit));\n\n const responseType = response.headers.get(\"content-type\");\n const responseIsJson = responseType != null && responseType.indexOf(\"application/json\") !== -1;\n const responseIsCsv = responseType != null && responseType.indexOf(\"text/csv\") !== -1;\n if (hasResponse && response.status === 200 && responseIsJson) {\n const responseJson = await response.json();\n return responseJson;\n } else if (hasResponse && response.status === 200 && responseIsCsv) {\n return await response.text();\n } else if (response.status !== 200) {\n const error = await this.handleError(response, false, authed);\n return Promise.reject(error);\n }\n }\n\n private async handleError(\n response: Response,\n tokenError: boolean,\n authed: boolean,\n ): Promise {\n let responseJson: any = null;\n if (this.isJsonResponse(response)) {\n responseJson = await response.json();\n } else if (this.isTextResponse(response)) {\n responseJson = { Message: await response.text() };\n }\n\n if (authed) {\n if (\n response.status === 401 ||\n response.status === 403 ||\n (tokenError &&\n response.status === 400 &&\n responseJson != null &&\n responseJson.error === \"invalid_grant\")\n ) {\n await this.logoutCallback(\"invalidGrantError\");\n return null;\n }\n }\n\n return new ErrorResponse(responseJson, response.status, tokenError);\n }\n\n private qsStringify(params: any): string {\n return Object.keys(params)\n .map((key) => {\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(params[key]);\n })\n .join(\"&\");\n }\n\n private async getCredentials(): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n if (!this.isWebClient || env.hasBaseUrl()) {\n return \"include\";\n }\n return undefined;\n }\n\n private addEventParameters(base: string, start: string, end: string, token: string) {\n if (start != null) {\n base += \"?start=\" + start;\n }\n if (end != null) {\n base += base.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n base += \"end=\" + end;\n }\n if (token != null) {\n base += base.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n base += \"continuationToken=\" + token;\n }\n return base;\n }\n\n private isJsonResponse(response: Response): boolean {\n const typeHeader = response.headers.get(\"content-type\");\n return typeHeader != null && typeHeader.indexOf(\"application/json\") > -1;\n }\n\n private isTextResponse(response: Response): boolean {\n const typeHeader = response.headers.get(\"content-type\");\n return typeHeader != null && typeHeader.indexOf(\"text\") > -1;\n }\n}\n","import { Observable, concatMap, distinctUntilChanged, firstValueFrom, map } from \"rxjs\";\n\nimport { PBKDF2KdfConfig } from \"../../../auth/models/domain/kdf-config\";\nimport { CryptoService } from \"../../../platform/abstractions/crypto.service\";\nimport { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { KeyGenerationService } from \"../../../platform/abstractions/key-generation.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { SendType } from \"../enums/send-type\";\nimport { SendData } from \"../models/data/send.data\";\nimport { Send } from \"../models/domain/send\";\nimport { SendFile } from \"../models/domain/send-file\";\nimport { SendText } from \"../models/domain/send-text\";\nimport { SendWithIdRequest } from \"../models/request/send-with-id.request\";\nimport { SendView } from \"../models/view/send.view\";\nimport { SEND_KDF_ITERATIONS } from \"../send-kdf\";\n\nimport { SendStateProvider } from \"./send-state.provider.abstraction\";\nimport { InternalSendService as InternalSendServiceAbstraction } from \"./send.service.abstraction\";\n\nexport class SendService implements InternalSendServiceAbstraction {\n readonly sendKeySalt = \"bitwarden-send\";\n readonly sendKeyPurpose = \"send\";\n\n sends$ = this.stateProvider.encryptedState$.pipe(\n map((record) => Object.values(record || {}).map((data) => new Send(data))),\n );\n sendViews$ = this.stateProvider.encryptedState$.pipe(\n concatMap((record) =>\n this.decryptSends(Object.values(record || {}).map((data) => new Send(data))),\n ),\n );\n\n constructor(\n private cryptoService: CryptoService,\n private i18nService: I18nService,\n private keyGenerationService: KeyGenerationService,\n private stateProvider: SendStateProvider,\n private encryptService: EncryptService,\n ) {}\n\n async encrypt(\n model: SendView,\n file: File | ArrayBuffer,\n password: string,\n key?: SymmetricCryptoKey,\n ): Promise<[Send, EncArrayBuffer]> {\n let fileData: EncArrayBuffer = null;\n const send = new Send();\n send.id = model.id;\n send.type = model.type;\n send.disabled = model.disabled;\n send.hideEmail = model.hideEmail;\n send.maxAccessCount = model.maxAccessCount;\n if (model.key == null) {\n const key = await this.keyGenerationService.createKeyWithPurpose(\n 128,\n this.sendKeyPurpose,\n this.sendKeySalt,\n );\n model.key = key.material;\n model.cryptoKey = key.derivedKey;\n }\n if (password != null) {\n const passwordKey = await this.keyGenerationService.deriveKeyFromPassword(\n password,\n model.key,\n new PBKDF2KdfConfig(SEND_KDF_ITERATIONS),\n );\n send.password = passwordKey.keyB64;\n }\n if (key == null) {\n key = await this.cryptoService.getUserKey();\n }\n send.key = await this.encryptService.encrypt(model.key, key);\n send.name = await this.encryptService.encrypt(model.name, model.cryptoKey);\n send.notes = await this.encryptService.encrypt(model.notes, model.cryptoKey);\n if (send.type === SendType.Text) {\n send.text = new SendText();\n send.text.text = await this.encryptService.encrypt(model.text.text, model.cryptoKey);\n send.text.hidden = model.text.hidden;\n } else if (send.type === SendType.File) {\n send.file = new SendFile();\n if (file != null) {\n if (file instanceof ArrayBuffer) {\n const [name, data] = await this.encryptFileData(\n model.file.fileName,\n file,\n model.cryptoKey,\n );\n send.file.fileName = name;\n fileData = data;\n } else {\n fileData = await this.parseFile(send, file, model.cryptoKey);\n }\n }\n }\n\n return [send, fileData];\n }\n\n get$(id: string): Observable {\n return this.sends$.pipe(\n distinctUntilChanged((oldSends, newSends) => {\n const oldSend = oldSends.find((oldSend) => oldSend.id === id);\n const newSend = newSends.find((newSend) => newSend.id === id);\n if (!oldSend || !newSend) {\n // If either oldSend or newSend is not found, consider them different\n return false;\n }\n\n // Compare each property of the old and new Send objects\n const allPropertiesSame = Object.keys(newSend).every((key) => {\n if (\n (oldSend[key as keyof Send] != null && newSend[key as keyof Send] === null) ||\n (oldSend[key as keyof Send] === null && newSend[key as keyof Send] != null)\n ) {\n // If a key from either old or new send is not found, and the key from the other send has a value, consider them different\n return false;\n }\n\n switch (key) {\n case \"name\":\n case \"notes\":\n case \"key\":\n if (oldSend[key] === null && newSend[key] === null) {\n return true;\n }\n\n return oldSend[key].encryptedString === newSend[key].encryptedString;\n case \"text\":\n if (oldSend[key].text == null && newSend[key].text == null) {\n return true;\n }\n if (\n (oldSend[key].text != null && newSend[key].text == null) ||\n (oldSend[key].text == null && newSend[key].text != null)\n ) {\n return false;\n }\n return oldSend[key].text.encryptedString === newSend[key].text.encryptedString;\n case \"file\":\n //Files are never updated so never will be changed.\n return true;\n case \"revisionDate\":\n case \"expirationDate\":\n case \"deletionDate\":\n if (oldSend[key] === null && newSend[key] === null) {\n return true;\n }\n return oldSend[key].getTime() === newSend[key].getTime();\n default:\n // For other properties, compare directly\n return oldSend[key as keyof Send] === newSend[key as keyof Send];\n }\n });\n\n return allPropertiesSame;\n }),\n map((sends) => sends.find((o) => o.id === id)),\n );\n }\n\n async getFromState(id: string): Promise {\n const sends = await this.stateProvider.getEncryptedSends();\n // eslint-disable-next-line\n if (sends == null || !sends.hasOwnProperty(id)) {\n return null;\n }\n\n return new Send(sends[id]);\n }\n\n async getAll(): Promise {\n const sends = await this.stateProvider.getEncryptedSends();\n const response: Send[] = [];\n for (const id in sends) {\n // eslint-disable-next-line\n if (sends.hasOwnProperty(id)) {\n response.push(new Send(sends[id]));\n }\n }\n return response;\n }\n\n async getAllDecryptedFromState(): Promise {\n let decSends = await this.stateProvider.getDecryptedSends();\n if (decSends != null) {\n return decSends;\n }\n\n decSends = [];\n const hasKey = await this.cryptoService.hasUserKey();\n if (!hasKey) {\n throw new Error(\"No user key found.\");\n }\n\n const promises: Promise[] = [];\n const sends = await this.getAll();\n sends.forEach((send) => {\n promises.push(send.decrypt().then((f) => decSends.push(f)));\n });\n\n await Promise.all(promises);\n decSends.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n\n await this.stateProvider.setDecryptedSends(decSends);\n return decSends;\n }\n\n async upsert(send: SendData | SendData[]): Promise {\n let sends = await this.stateProvider.getEncryptedSends();\n if (sends == null) {\n sends = {};\n }\n if (send instanceof SendData) {\n const s = send as SendData;\n sends[s.id] = s;\n } else {\n (send as SendData[]).forEach((s) => {\n sends[s.id] = s;\n });\n }\n\n await this.replace(sends);\n }\n\n async clear(userId?: string): Promise {\n await this.stateProvider.setDecryptedSends(null);\n await this.stateProvider.setEncryptedSends(null);\n }\n\n async delete(id: string | string[]): Promise {\n const sends = await this.stateProvider.getEncryptedSends();\n if (sends == null) {\n return;\n }\n\n if (typeof id === \"string\") {\n if (sends[id] == null) {\n return;\n }\n delete sends[id];\n } else {\n (id as string[]).forEach((i) => {\n delete sends[i];\n });\n }\n\n await this.replace(sends);\n }\n\n async replace(sends: { [id: string]: SendData }): Promise {\n await this.stateProvider.setEncryptedSends(sends);\n }\n\n async getRotatedData(\n originalUserKey: UserKey,\n newUserKey: UserKey,\n userId: UserId,\n ): Promise {\n if (newUserKey == null) {\n throw new Error(\"New user key is required for rotation.\");\n }\n if (originalUserKey == null) {\n throw new Error(\"Original user key is required for rotation.\");\n }\n\n const req = await firstValueFrom(\n this.sends$.pipe(\n concatMap(async (sends) => this.toRotatedKeyRequestMap(sends, originalUserKey, newUserKey)),\n ),\n );\n // separate return for easier debugging\n return req;\n }\n\n private async toRotatedKeyRequestMap(\n sends: Send[],\n originalUserKey: UserKey,\n rotateUserKey: UserKey,\n ) {\n const requests = await Promise.all(\n sends.map(async (send) => {\n const sendKey = await this.encryptService.decryptToBytes(send.key, originalUserKey);\n send.key = await this.encryptService.encrypt(sendKey, rotateUserKey);\n return new SendWithIdRequest(send);\n }),\n );\n return requests;\n }\n\n private parseFile(send: Send, file: File, key: SymmetricCryptoKey): Promise {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(file);\n reader.onload = async (evt) => {\n try {\n const [name, data] = await this.encryptFileData(\n file.name,\n evt.target.result as ArrayBuffer,\n key,\n );\n send.file.fileName = name;\n resolve(data);\n } catch (e) {\n reject(e);\n }\n };\n reader.onerror = () => {\n reject(\"Error reading file.\");\n };\n });\n }\n\n private async encryptFileData(\n fileName: string,\n data: ArrayBuffer,\n key: SymmetricCryptoKey,\n ): Promise<[EncString, EncArrayBuffer]> {\n if (key == null) {\n key = await this.cryptoService.getUserKey();\n }\n const encFileName = await this.encryptService.encrypt(fileName, key);\n const encFileData = await this.encryptService.encryptToBytes(new Uint8Array(data), key);\n return [encFileName, encFileData];\n }\n\n private async decryptSends(sends: Send[]) {\n const decryptSendPromises = sends.map((s) => s.decrypt());\n const decryptedSends = await Promise.all(decryptSendPromises);\n\n decryptedSends.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n return decryptedSends;\n }\n}\n","import { Observable, firstValueFrom } from \"rxjs\";\n\nimport { ActiveUserState, StateProvider } from \"../../../platform/state\";\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\nimport { SEND_USER_DECRYPTED, SEND_USER_ENCRYPTED } from \"./key-definitions\";\nimport { SendStateProvider as SendStateProviderAbstraction } from \"./send-state.provider.abstraction\";\n\n/** State provider for sends */\nexport class SendStateProvider implements SendStateProviderAbstraction {\n /** Observable for the encrypted sends for an active user */\n encryptedState$: Observable>;\n /** Observable with the decrypted sends for an active user */\n decryptedState$: Observable;\n\n private activeUserEncryptedState: ActiveUserState>;\n private activeUserDecryptedState: ActiveUserState;\n\n constructor(protected stateProvider: StateProvider) {\n this.activeUserEncryptedState = this.stateProvider.getActive(SEND_USER_ENCRYPTED);\n this.encryptedState$ = this.activeUserEncryptedState.state$;\n\n this.activeUserDecryptedState = this.stateProvider.getActive(SEND_USER_DECRYPTED);\n this.decryptedState$ = this.activeUserDecryptedState.state$;\n }\n\n /** Gets the encrypted sends from state for an active user */\n async getEncryptedSends(): Promise<{ [id: string]: SendData }> {\n return await firstValueFrom(this.encryptedState$);\n }\n\n /** Sets the encrypted send state for an active user */\n async setEncryptedSends(value: { [id: string]: SendData }): Promise {\n await this.activeUserEncryptedState.update(() => value);\n }\n\n /** Gets the decrypted sends from state for the active user */\n async getDecryptedSends(): Promise {\n return await firstValueFrom(this.decryptedState$);\n }\n\n /** Sets the decrypted send state for an active user */\n async setDecryptedSends(value: SendView[]): Promise {\n await this.activeUserDecryptedState.update(() => value);\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport {\n FileUploadApiMethods,\n FileUploadService,\n} from \"../../../platform/abstractions/file-upload/file-upload.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { SendType } from \"../enums/send-type\";\nimport { SendData } from \"../models/data/send.data\";\nimport { Send } from \"../models/domain/send\";\nimport { SendAccessRequest } from \"../models/request/send-access.request\";\nimport { SendRequest } from \"../models/request/send.request\";\nimport { SendAccessResponse } from \"../models/response/send-access.response\";\nimport { SendFileDownloadDataResponse } from \"../models/response/send-file-download-data.response\";\nimport { SendFileUploadDataResponse } from \"../models/response/send-file-upload-data.response\";\nimport { SendResponse } from \"../models/response/send.response\";\nimport { SendAccessView } from \"../models/view/send-access.view\";\n\nimport { SendApiService as SendApiServiceAbstraction } from \"./send-api.service.abstraction\";\nimport { InternalSendService } from \"./send.service.abstraction\";\n\nexport class SendApiService implements SendApiServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private fileUploadService: FileUploadService,\n private sendService: InternalSendService,\n ) {}\n\n async getSend(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/sends/\" + id, null, true, true);\n return new SendResponse(r);\n }\n\n async postSendAccess(\n id: string,\n request: SendAccessRequest,\n apiUrl?: string,\n ): Promise {\n const addSendIdHeader = (headers: Headers) => {\n headers.set(\"Send-Id\", id);\n };\n const r = await this.apiService.send(\n \"POST\",\n \"/sends/access/\" + id,\n request,\n false,\n true,\n apiUrl,\n addSendIdHeader,\n );\n return new SendAccessResponse(r);\n }\n\n async getSendFileDownloadData(\n send: SendAccessView,\n request: SendAccessRequest,\n apiUrl?: string,\n ): Promise {\n const addSendIdHeader = (headers: Headers) => {\n headers.set(\"Send-Id\", send.id);\n };\n const r = await this.apiService.send(\n \"POST\",\n \"/sends/\" + send.id + \"/access/file/\" + send.file.id,\n request,\n false,\n true,\n apiUrl,\n addSendIdHeader,\n );\n return new SendFileDownloadDataResponse(r);\n }\n\n async getSends(): Promise> {\n const r = await this.apiService.send(\"GET\", \"/sends\", null, true, true);\n return new ListResponse(r, SendResponse);\n }\n\n async postSend(request: SendRequest): Promise {\n const r = await this.apiService.send(\"POST\", \"/sends\", request, true, true);\n return new SendResponse(r);\n }\n\n async postFileTypeSend(request: SendRequest): Promise {\n const r = await this.apiService.send(\"POST\", \"/sends/file/v2\", request, true, true);\n return new SendFileUploadDataResponse(r);\n }\n\n async renewSendFileUploadUrl(\n sendId: string,\n fileId: string,\n ): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/sends/\" + sendId + \"/file/\" + fileId,\n null,\n true,\n true,\n );\n return new SendFileUploadDataResponse(r);\n }\n\n postSendFile(sendId: string, fileId: string, data: FormData): Promise {\n return this.apiService.send(\"POST\", \"/sends/\" + sendId + \"/file/\" + fileId, data, true, false);\n }\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n async postSendFileLegacy(data: FormData): Promise {\n const r = await this.apiService.send(\"POST\", \"/sends/file\", data, true, true);\n return new SendResponse(r);\n }\n\n async putSend(id: string, request: SendRequest): Promise {\n const r = await this.apiService.send(\"PUT\", \"/sends/\" + id, request, true, true);\n return new SendResponse(r);\n }\n\n async putSendRemovePassword(id: string): Promise {\n const r = await this.apiService.send(\n \"PUT\",\n \"/sends/\" + id + \"/remove-password\",\n null,\n true,\n true,\n );\n return new SendResponse(r);\n }\n\n deleteSend(id: string): Promise {\n return this.apiService.send(\"DELETE\", \"/sends/\" + id, null, true, false);\n }\n\n async save(sendData: [Send, EncArrayBuffer]): Promise {\n const response = await this.upload(sendData);\n\n const data = new SendData(response);\n await this.sendService.upsert(data);\n }\n\n async delete(id: string): Promise {\n await this.deleteSend(id);\n await this.sendService.delete(id);\n }\n\n async removePassword(id: string): Promise {\n const response = await this.putSendRemovePassword(id);\n const data = new SendData(response);\n await this.sendService.upsert(data);\n }\n\n // Send File Upload methods\n\n private async upload(sendData: [Send, EncArrayBuffer]): Promise {\n const request = new SendRequest(sendData[0], sendData[1]?.buffer.byteLength);\n let response: SendResponse;\n if (sendData[0].id == null) {\n if (sendData[0].type === SendType.Text) {\n response = await this.postSend(request);\n } else {\n try {\n const uploadDataResponse = await this.postFileTypeSend(request);\n response = uploadDataResponse.sendResponse;\n await this.fileUploadService.upload(\n uploadDataResponse,\n sendData[0].file.fileName,\n sendData[1],\n this.generateMethods(uploadDataResponse, response),\n );\n } catch (e) {\n if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {\n response = await this.legacyServerSendFileUpload(sendData, request);\n } else if (e instanceof ErrorResponse) {\n throw new Error((e as ErrorResponse).getSingleMessage());\n } else {\n throw e;\n }\n }\n }\n sendData[0].id = response.id;\n sendData[0].accessId = response.accessId;\n } else {\n response = await this.putSend(sendData[0].id, request);\n }\n return response;\n }\n\n private generateMethods(\n uploadData: SendFileUploadDataResponse,\n response: SendResponse,\n ): FileUploadApiMethods {\n return {\n postDirect: this.generatePostDirectCallback(response),\n renewFileUploadUrl: this.generateRenewFileUploadUrlCallback(response.id, response.file.id),\n rollback: this.generateRollbackCallback(response.id),\n };\n }\n\n private generatePostDirectCallback(sendResponse: SendResponse) {\n return (data: FormData) => {\n return this.postSendFile(sendResponse.id, sendResponse.file.id, data);\n };\n }\n\n private generateRenewFileUploadUrlCallback(sendId: string, fileId: string) {\n return async () => {\n const renewResponse = await this.renewSendFileUploadUrl(sendId, fileId);\n return renewResponse?.url;\n };\n }\n\n private generateRollbackCallback(sendId: string) {\n return () => {\n return this.deleteSend(sendId);\n };\n }\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n async legacyServerSendFileUpload(\n sendData: [Send, EncArrayBuffer],\n request: SendRequest,\n ): Promise {\n const fd = new FormData();\n try {\n const blob = new Blob([sendData[1].buffer], { type: \"application/octet-stream\" });\n fd.append(\"model\", JSON.stringify(request));\n fd.append(\"data\", blob, sendData[0].file.fileName.encryptedString);\n } catch (e) {\n if (Utils.isNode && !Utils.isBrowser) {\n fd.append(\"model\", JSON.stringify(request));\n fd.append(\n \"data\",\n Buffer.from(sendData[1].buffer) as any,\n {\n filepath: sendData[0].file.fileName.encryptedString,\n contentType: \"application/octet-stream\",\n } as any,\n );\n } else {\n throw e;\n }\n }\n return await this.postSendFileLegacy(fd);\n }\n}\n","import { Subscription } from \"rxjs\";\n\nimport { BroadcasterService, MessageBase } from \"../abstractions/broadcaster.service\";\nimport { MessageListener } from \"../messaging\";\n\n/**\n * Temporary implementation that just delegates to the message sender and message listener\n * and manages their subscriptions.\n */\nexport class DefaultBroadcasterService implements BroadcasterService {\n subscriptions = new Map();\n\n constructor(private readonly messageListener: MessageListener) {}\n\n subscribe(id: string, messageCallback: (message: MessageBase) => void) {\n this.subscriptions.set(\n id,\n this.messageListener.allMessages$.subscribe((message) => {\n messageCallback(message);\n }),\n );\n }\n\n unsubscribe(id: string) {\n const subscription = this.subscriptions.get(id);\n subscription?.unsubscribe();\n this.subscriptions.delete(id);\n }\n}\n","import {\n EMPTY,\n Observable,\n catchError,\n combineLatest,\n defer,\n distinctUntilChanged,\n firstValueFrom,\n from,\n map,\n shareReplay,\n switchMap,\n tap,\n} from \"rxjs\";\n\nimport {\n PinServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\n\nimport { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from \"../../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../admin-console/enums\";\nimport { Policy } from \"../../admin-console/models/domain/policy\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { BiometricStateService } from \"../../platform/biometrics/biometric-state.service\";\nimport { StateProvider } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"../../types/vault-timeout.type\";\n\nimport { VAULT_TIMEOUT, VAULT_TIMEOUT_ACTION } from \"./vault-timeout-settings.state\";\n\nexport class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceAbstraction {\n constructor(\n private accountService: AccountService,\n private pinService: PinServiceAbstraction,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n private cryptoService: CryptoService,\n private tokenService: TokenService,\n private policyService: PolicyService,\n private biometricStateService: BiometricStateService,\n private stateProvider: StateProvider,\n private logService: LogService,\n private defaultVaultTimeout: VaultTimeout,\n ) {}\n\n async setVaultTimeoutOptions(\n userId: UserId,\n timeout: VaultTimeout,\n action: VaultTimeoutAction,\n ): Promise {\n if (!userId) {\n throw new Error(\"User id required. Cannot set vault timeout settings.\");\n }\n\n if (timeout == null) {\n throw new Error(\"Vault Timeout cannot be null.\");\n }\n\n if (action == null) {\n throw new Error(\"Vault Timeout Action cannot be null.\");\n }\n\n // We swap these tokens from being on disk for lock actions, and in memory for logout actions\n // Get them here to set them to their new location after changing the timeout action and clearing if needed\n const accessToken = await this.tokenService.getAccessToken();\n const refreshToken = await this.tokenService.getRefreshToken();\n const clientId = await this.tokenService.getClientId();\n const clientSecret = await this.tokenService.getClientSecret();\n\n await this.setVaultTimeout(userId, timeout);\n\n if (timeout != VaultTimeoutStringType.Never && action === VaultTimeoutAction.LogOut) {\n // if we have a vault timeout and the action is log out, reset tokens\n // as the tokens were stored on disk and now should be stored in memory\n await this.tokenService.clearTokens();\n }\n\n await this.setVaultTimeoutAction(userId, action);\n\n await this.tokenService.setTokens(accessToken, action, timeout, refreshToken, [\n clientId,\n clientSecret,\n ]);\n\n await this.cryptoService.refreshAdditionalKeys();\n }\n\n availableVaultTimeoutActions$(userId?: string) {\n return defer(() => this.getAvailableVaultTimeoutActions(userId));\n }\n\n async isBiometricLockSet(userId?: string): Promise {\n const biometricUnlockPromise =\n userId == null\n ? firstValueFrom(this.biometricStateService.biometricUnlockEnabled$)\n : this.biometricStateService.getBiometricUnlockEnabled(userId as UserId);\n return await biometricUnlockPromise;\n }\n\n private async setVaultTimeout(userId: UserId, timeout: VaultTimeout): Promise {\n if (!userId) {\n throw new Error(\"User id required. Cannot set vault timeout.\");\n }\n\n if (timeout == null) {\n throw new Error(\"Vault Timeout cannot be null.\");\n }\n\n await this.stateProvider.setUserState(VAULT_TIMEOUT, timeout, userId);\n }\n\n getVaultTimeoutByUserId$(userId: UserId): Observable {\n if (!userId) {\n throw new Error(\"User id required. Cannot get vault timeout.\");\n }\n\n return combineLatest([\n this.stateProvider.getUserState$(VAULT_TIMEOUT, userId),\n this.getMaxVaultTimeoutPolicyByUserId$(userId),\n ]).pipe(\n switchMap(([currentVaultTimeout, maxVaultTimeoutPolicy]) => {\n return from(this.determineVaultTimeout(currentVaultTimeout, maxVaultTimeoutPolicy)).pipe(\n tap((vaultTimeout: VaultTimeout) => {\n // As a side effect, set the new value determined by determineVaultTimeout into state if it's different from the current\n if (vaultTimeout !== currentVaultTimeout) {\n return this.stateProvider.setUserState(VAULT_TIMEOUT, vaultTimeout, userId);\n }\n }),\n catchError((error: unknown) => {\n // Protect outer observable from canceling on error by catching and returning EMPTY\n this.logService.error(`Error getting vault timeout: ${error}`);\n return EMPTY;\n }),\n );\n }),\n distinctUntilChanged(), // Avoid having the set side effect trigger a new emission of the same action\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n }\n\n private async determineVaultTimeout(\n currentVaultTimeout: VaultTimeout | null,\n maxVaultTimeoutPolicy: Policy | null,\n ): Promise {\n // if current vault timeout is null, apply the client specific default\n currentVaultTimeout = currentVaultTimeout ?? this.defaultVaultTimeout;\n\n // If no policy applies, return the current vault timeout\n if (!maxVaultTimeoutPolicy) {\n return currentVaultTimeout;\n }\n\n // User is subject to a max vault timeout policy\n const maxVaultTimeoutPolicyData = maxVaultTimeoutPolicy.data;\n\n // If the current vault timeout is not numeric, change it to the policy compliant value\n if (typeof currentVaultTimeout === \"string\") {\n return maxVaultTimeoutPolicyData.minutes;\n }\n\n // For numeric vault timeouts, ensure they are smaller than maximum allowed value according to policy\n const policyCompliantTimeout = Math.min(currentVaultTimeout, maxVaultTimeoutPolicyData.minutes);\n\n return policyCompliantTimeout;\n }\n\n private async setVaultTimeoutAction(userId: UserId, action: VaultTimeoutAction): Promise {\n if (!userId) {\n throw new Error(\"User id required. Cannot set vault timeout action.\");\n }\n\n if (!action) {\n throw new Error(\"Vault Timeout Action cannot be null\");\n }\n\n await this.stateProvider.setUserState(VAULT_TIMEOUT_ACTION, action, userId);\n }\n\n getVaultTimeoutActionByUserId$(userId: UserId): Observable {\n if (!userId) {\n throw new Error(\"User id required. Cannot get vault timeout action.\");\n }\n\n return combineLatest([\n this.stateProvider.getUserState$(VAULT_TIMEOUT_ACTION, userId),\n this.getMaxVaultTimeoutPolicyByUserId$(userId),\n ]).pipe(\n switchMap(([currentVaultTimeoutAction, maxVaultTimeoutPolicy]) => {\n return from(\n this.determineVaultTimeoutAction(\n userId,\n currentVaultTimeoutAction,\n maxVaultTimeoutPolicy,\n ),\n ).pipe(\n tap((vaultTimeoutAction: VaultTimeoutAction) => {\n // As a side effect, set the new value determined by determineVaultTimeout into state if it's different from the current\n // We want to avoid having a null timeout action always so we set it to the default if it is null\n // and if the user becomes subject to a policy that requires a specific action, we set it to that\n if (vaultTimeoutAction !== currentVaultTimeoutAction) {\n return this.stateProvider.setUserState(\n VAULT_TIMEOUT_ACTION,\n vaultTimeoutAction,\n userId,\n );\n }\n }),\n catchError((error: unknown) => {\n // Protect outer observable from canceling on error by catching and returning EMPTY\n this.logService.error(`Error getting vault timeout: ${error}`);\n return EMPTY;\n }),\n );\n }),\n distinctUntilChanged(), // Avoid having the set side effect trigger a new emission of the same action\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n }\n\n private async determineVaultTimeoutAction(\n userId: string,\n currentVaultTimeoutAction: VaultTimeoutAction | null,\n maxVaultTimeoutPolicy: Policy | null,\n ): Promise {\n const availableVaultTimeoutActions = await this.getAvailableVaultTimeoutActions(userId);\n if (availableVaultTimeoutActions.length === 1) {\n return availableVaultTimeoutActions[0];\n }\n\n if (\n maxVaultTimeoutPolicy?.data?.action &&\n availableVaultTimeoutActions.includes(maxVaultTimeoutPolicy.data.action)\n ) {\n // return policy defined vault timeout action\n return maxVaultTimeoutPolicy.data.action;\n }\n\n // No policy applies from here on\n // If the current vault timeout is null and lock is an option, set it as the default\n if (\n currentVaultTimeoutAction == null &&\n availableVaultTimeoutActions.includes(VaultTimeoutAction.Lock)\n ) {\n return VaultTimeoutAction.Lock;\n }\n\n return currentVaultTimeoutAction;\n }\n\n private getMaxVaultTimeoutPolicyByUserId$(userId: UserId): Observable {\n if (!userId) {\n throw new Error(\"User id required. Cannot get max vault timeout policy.\");\n }\n\n return this.policyService\n .getAll$(PolicyType.MaximumVaultTimeout, userId)\n .pipe(map((policies) => policies[0] ?? null));\n }\n\n private async getAvailableVaultTimeoutActions(userId?: string): Promise {\n userId ??= (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n const availableActions = [VaultTimeoutAction.LogOut];\n\n const canLock =\n (await this.userHasMasterPassword(userId)) ||\n (await this.pinService.isPinSet(userId as UserId)) ||\n (await this.isBiometricLockSet(userId));\n\n if (canLock) {\n availableActions.push(VaultTimeoutAction.Lock);\n }\n\n return availableActions;\n }\n\n async clear(userId?: string): Promise {\n await this.cryptoService.clearPinKeys(userId);\n }\n\n private async userHasMasterPassword(userId: string): Promise {\n if (userId) {\n const decryptionOptions = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),\n );\n\n return !!decryptionOptions?.hasMasterPassword;\n } else {\n return await firstValueFrom(this.userDecryptionOptionsService.hasMasterPassword$);\n }\n }\n}\n","import { NotificationsService as NotificationsServiceAbstraction } from \"../../abstractions/notifications.service\";\nimport { LogService } from \"../abstractions/log.service\";\n\nexport class NoopNotificationsService implements NotificationsServiceAbstraction {\n constructor(private logService: LogService) {}\n\n init(): Promise {\n this.logService.info(\n \"Initializing no-op notification service, no push notifications will be received\",\n );\n return Promise.resolve();\n }\n\n updateConnection(sync?: boolean): Promise {\n this.logService.info(\"Updating notification service connection\");\n return Promise.resolve();\n }\n\n reconnectFromActivity(): Promise {\n this.logService.info(\"Reconnecting notification service from activity\");\n return Promise.resolve();\n }\n\n disconnectFromInactivity(): Promise {\n this.logService.info(\"Disconnecting notification service from inactivity\");\n return Promise.resolve();\n }\n}\n","import * as signalR from \"@microsoft/signalr\";\nimport * as signalRMsgPack from \"@microsoft/signalr-protocol-msgpack\";\nimport { firstValueFrom, Subscription } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\n\nimport { ApiService } from \"../abstractions/api.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"../abstractions/notifications.service\";\nimport { AuthService } from \"../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../auth/enums/authentication-status\";\nimport { NotificationType } from \"../enums\";\nimport {\n NotificationResponse,\n SyncCipherNotification,\n SyncFolderNotification,\n SyncSendNotification,\n} from \"../models/response/notification.response\";\nimport { AppIdService } from \"../platform/abstractions/app-id.service\";\nimport { EnvironmentService } from \"../platform/abstractions/environment.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport { MessagingService } from \"../platform/abstractions/messaging.service\";\nimport { StateService } from \"../platform/abstractions/state.service\";\nimport { ScheduledTaskNames } from \"../platform/scheduling/scheduled-task-name.enum\";\nimport { TaskSchedulerService } from \"../platform/scheduling/task-scheduler.service\";\nimport { SyncService } from \"../vault/abstractions/sync/sync.service.abstraction\";\n\nexport class NotificationsService implements NotificationsServiceAbstraction {\n private signalrConnection: signalR.HubConnection;\n private url: string;\n private connected = false;\n private inited = false;\n private inactive = false;\n private reconnectTimerSubscription: Subscription;\n private isSyncingOnReconnect = true;\n\n constructor(\n private logService: LogService,\n private syncService: SyncService,\n private appIdService: AppIdService,\n private apiService: ApiService,\n private environmentService: EnvironmentService,\n private logoutCallback: (logoutReason: LogoutReason) => Promise,\n private stateService: StateService,\n private authService: AuthService,\n private messagingService: MessagingService,\n private taskSchedulerService: TaskSchedulerService,\n ) {\n this.taskSchedulerService.registerTaskHandler(\n ScheduledTaskNames.notificationsReconnectTimeout,\n () => this.reconnect(this.isSyncingOnReconnect),\n );\n this.environmentService.environment$.subscribe(() => {\n if (!this.inited) {\n return;\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.init();\n });\n }\n\n async init(): Promise {\n this.inited = false;\n this.url = (await firstValueFrom(this.environmentService.environment$)).getNotificationsUrl();\n\n // Set notifications server URL to `https://-` to effectively disable communication\n // with the notifications server from the client app\n if (this.url === \"https://-\") {\n return;\n }\n\n if (this.signalrConnection != null) {\n this.signalrConnection.off(\"ReceiveMessage\");\n this.signalrConnection.off(\"Heartbeat\");\n await this.signalrConnection.stop();\n this.connected = false;\n this.signalrConnection = null;\n }\n\n this.signalrConnection = new signalR.HubConnectionBuilder()\n .withUrl(this.url + \"/hub\", {\n accessTokenFactory: () => this.apiService.getActiveBearerToken(),\n skipNegotiation: true,\n transport: signalR.HttpTransportType.WebSockets,\n })\n .withHubProtocol(new signalRMsgPack.MessagePackHubProtocol() as signalR.IHubProtocol)\n // .configureLogging(signalR.LogLevel.Trace)\n .build();\n\n this.signalrConnection.on(\"ReceiveMessage\", (data: any) =>\n this.processNotification(new NotificationResponse(data)),\n );\n // eslint-disable-next-line\n this.signalrConnection.on(\"Heartbeat\", (data: any) => {\n /*console.log('Heartbeat!');*/\n });\n this.signalrConnection.onclose(() => {\n this.connected = false;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.reconnect(true);\n });\n this.inited = true;\n if (await this.isAuthedAndUnlocked()) {\n await this.reconnect(false);\n }\n }\n\n async updateConnection(sync = false): Promise {\n if (!this.inited) {\n return;\n }\n try {\n if (await this.isAuthedAndUnlocked()) {\n await this.reconnect(sync);\n } else {\n await this.signalrConnection.stop();\n }\n } catch (e) {\n this.logService.error(e.toString());\n }\n }\n\n async reconnectFromActivity(): Promise {\n this.inactive = false;\n if (this.inited && !this.connected) {\n await this.reconnect(true);\n }\n }\n\n async disconnectFromInactivity(): Promise {\n this.inactive = true;\n if (this.inited && this.connected) {\n await this.signalrConnection.stop();\n }\n }\n\n private async processNotification(notification: NotificationResponse) {\n const appId = await this.appIdService.getAppId();\n if (notification == null || notification.contextId === appId) {\n return;\n }\n\n const isAuthenticated = await this.stateService.getIsAuthenticated();\n const payloadUserId = notification.payload.userId || notification.payload.UserId;\n const myUserId = await this.stateService.getUserId();\n if (isAuthenticated && payloadUserId != null && payloadUserId !== myUserId) {\n return;\n }\n\n switch (notification.type) {\n case NotificationType.SyncCipherCreate:\n case NotificationType.SyncCipherUpdate:\n await this.syncService.syncUpsertCipher(\n notification.payload as SyncCipherNotification,\n notification.type === NotificationType.SyncCipherUpdate,\n );\n break;\n case NotificationType.SyncCipherDelete:\n case NotificationType.SyncLoginDelete:\n await this.syncService.syncDeleteCipher(notification.payload as SyncCipherNotification);\n break;\n case NotificationType.SyncFolderCreate:\n case NotificationType.SyncFolderUpdate:\n await this.syncService.syncUpsertFolder(\n notification.payload as SyncFolderNotification,\n notification.type === NotificationType.SyncFolderUpdate,\n );\n break;\n case NotificationType.SyncFolderDelete:\n await this.syncService.syncDeleteFolder(notification.payload as SyncFolderNotification);\n break;\n case NotificationType.SyncVault:\n case NotificationType.SyncCiphers:\n case NotificationType.SyncSettings:\n if (isAuthenticated) {\n await this.syncService.fullSync(false);\n }\n break;\n case NotificationType.SyncOrganizations:\n if (isAuthenticated) {\n // An organization update may not have bumped the user's account revision date, so force a sync\n await this.syncService.fullSync(true);\n }\n break;\n case NotificationType.SyncOrgKeys:\n if (isAuthenticated) {\n await this.syncService.fullSync(true);\n // Stop so a reconnect can be made\n await this.signalrConnection.stop();\n }\n break;\n case NotificationType.LogOut:\n if (isAuthenticated) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.logoutCallback(\"logoutNotification\");\n }\n break;\n case NotificationType.SyncSendCreate:\n case NotificationType.SyncSendUpdate:\n await this.syncService.syncUpsertSend(\n notification.payload as SyncSendNotification,\n notification.type === NotificationType.SyncSendUpdate,\n );\n break;\n case NotificationType.SyncSendDelete:\n await this.syncService.syncDeleteSend(notification.payload as SyncSendNotification);\n break;\n case NotificationType.AuthRequest:\n {\n this.messagingService.send(\"openLoginApproval\", {\n notificationId: notification.payload.id,\n });\n }\n break;\n default:\n break;\n }\n }\n\n private async reconnect(sync: boolean) {\n this.reconnectTimerSubscription?.unsubscribe();\n\n if (this.connected || !this.inited || this.inactive) {\n return;\n }\n const authedAndUnlocked = await this.isAuthedAndUnlocked();\n if (!authedAndUnlocked) {\n return;\n }\n\n try {\n await this.signalrConnection.start();\n this.connected = true;\n if (sync) {\n await this.syncService.fullSync(false);\n }\n } catch (e) {\n this.logService.error(e);\n }\n\n if (!this.connected) {\n this.isSyncingOnReconnect = sync;\n this.reconnectTimerSubscription = this.taskSchedulerService.setTimeout(\n ScheduledTaskNames.notificationsReconnectTimeout,\n this.random(120000, 300000),\n );\n }\n }\n\n private async isAuthedAndUnlocked() {\n const authStatus = await this.authService.getAuthStatus();\n return authStatus >= AuthenticationStatus.Unlocked;\n }\n\n private random(min: number, max: number) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n}\n","import * as argon2 from \"argon2-browser\";\nimport * as forge from \"node-forge\";\n\nimport { Utils } from \"../../platform/misc/utils\";\nimport { CsprngArray } from \"../../types/csprng\";\nimport { CryptoFunctionService } from \"../abstractions/crypto-function.service\";\nimport { DecryptParameters } from \"../models/domain/decrypt-parameters\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport class WebCryptoFunctionService implements CryptoFunctionService {\n private crypto: Crypto;\n private subtle: SubtleCrypto;\n private wasmSupported: boolean;\n\n constructor(globalContext: Window | typeof global) {\n this.crypto = typeof globalContext.crypto !== \"undefined\" ? globalContext.crypto : null;\n this.subtle =\n !!this.crypto && typeof this.crypto.subtle !== \"undefined\" ? this.crypto.subtle : null;\n this.wasmSupported = this.checkIfWasmSupported();\n }\n\n async pbkdf2(\n password: string | Uint8Array,\n salt: string | Uint8Array,\n algorithm: \"sha256\" | \"sha512\",\n iterations: number,\n ): Promise {\n const wcLen = algorithm === \"sha256\" ? 256 : 512;\n const passwordBuf = this.toBuf(password);\n const saltBuf = this.toBuf(salt);\n\n const pbkdf2Params: Pbkdf2Params = {\n name: \"PBKDF2\",\n salt: saltBuf,\n iterations: iterations,\n hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n };\n\n const impKey = await this.subtle.importKey(\n \"raw\",\n passwordBuf,\n { name: \"PBKDF2\" } as any,\n false,\n [\"deriveBits\"],\n );\n const buffer = await this.subtle.deriveBits(pbkdf2Params as any, impKey, wcLen);\n return new Uint8Array(buffer);\n }\n\n async argon2(\n password: string | Uint8Array,\n salt: string | Uint8Array,\n iterations: number,\n memory: number,\n parallelism: number,\n ): Promise {\n if (!this.wasmSupported) {\n throw \"Webassembly support is required for the Argon2 KDF feature.\";\n }\n\n const passwordArr = new Uint8Array(this.toBuf(password));\n const saltArr = new Uint8Array(this.toBuf(salt));\n\n const result = await argon2.hash({\n pass: passwordArr,\n salt: saltArr,\n time: iterations,\n mem: memory,\n parallelism: parallelism,\n hashLen: 32,\n type: argon2.ArgonType.Argon2id,\n });\n argon2.unloadRuntime();\n return result.hash;\n }\n\n async hkdf(\n ikm: Uint8Array,\n salt: string | Uint8Array,\n info: string | Uint8Array,\n outputByteSize: number,\n algorithm: \"sha256\" | \"sha512\",\n ): Promise {\n const saltBuf = this.toBuf(salt);\n const infoBuf = this.toBuf(info);\n\n const hkdfParams: HkdfParams = {\n name: \"HKDF\",\n salt: saltBuf,\n info: infoBuf,\n hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n };\n\n const impKey = await this.subtle.importKey(\"raw\", ikm, { name: \"HKDF\" } as any, false, [\n \"deriveBits\",\n ]);\n const buffer = await this.subtle.deriveBits(hkdfParams as any, impKey, outputByteSize * 8);\n return new Uint8Array(buffer);\n }\n\n // ref: https://tools.ietf.org/html/rfc5869\n async hkdfExpand(\n prk: Uint8Array,\n info: string | Uint8Array,\n outputByteSize: number,\n algorithm: \"sha256\" | \"sha512\",\n ): Promise {\n const hashLen = algorithm === \"sha256\" ? 32 : 64;\n if (outputByteSize > 255 * hashLen) {\n throw new Error(\"outputByteSize is too large.\");\n }\n const prkArr = new Uint8Array(prk);\n if (prkArr.length < hashLen) {\n throw new Error(\"prk is too small.\");\n }\n const infoBuf = this.toBuf(info);\n const infoArr = new Uint8Array(infoBuf);\n let runningOkmLength = 0;\n let previousT = new Uint8Array(0);\n const n = Math.ceil(outputByteSize / hashLen);\n const okm = new Uint8Array(n * hashLen);\n for (let i = 0; i < n; i++) {\n const t = new Uint8Array(previousT.length + infoArr.length + 1);\n t.set(previousT);\n t.set(infoArr, previousT.length);\n t.set([i + 1], t.length - 1);\n previousT = new Uint8Array(await this.hmac(t, prk, algorithm));\n okm.set(previousT, runningOkmLength);\n runningOkmLength += previousT.length;\n if (runningOkmLength >= outputByteSize) {\n break;\n }\n }\n return okm.slice(0, outputByteSize);\n }\n\n async hash(\n value: string | Uint8Array,\n algorithm: \"sha1\" | \"sha256\" | \"sha512\" | \"md5\",\n ): Promise {\n if (algorithm === \"md5\") {\n const md = forge.md.md5.create();\n const valueBytes = this.toByteString(value);\n md.update(valueBytes, \"raw\");\n return Utils.fromByteStringToArray(md.digest().data);\n }\n\n const valueBuf = this.toBuf(value);\n const buffer = await this.subtle.digest(\n { name: this.toWebCryptoAlgorithm(algorithm) },\n valueBuf,\n );\n return new Uint8Array(buffer);\n }\n\n async hmac(\n value: Uint8Array,\n key: Uint8Array,\n algorithm: \"sha1\" | \"sha256\" | \"sha512\",\n ): Promise {\n const signingAlgorithm = {\n name: \"HMAC\",\n hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n };\n\n const impKey = await this.subtle.importKey(\"raw\", key, signingAlgorithm, false, [\"sign\"]);\n const buffer = await this.subtle.sign(signingAlgorithm, impKey, value);\n return new Uint8Array(buffer);\n }\n\n // Safely compare two values in a way that protects against timing attacks (Double HMAC Verification).\n // ref: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/\n // ref: https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy\n async compare(a: Uint8Array, b: Uint8Array): Promise {\n const macKey = await this.randomBytes(32);\n const signingAlgorithm = {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n };\n const impKey = await this.subtle.importKey(\"raw\", macKey, signingAlgorithm, false, [\"sign\"]);\n const mac1 = await this.subtle.sign(signingAlgorithm, impKey, a);\n const mac2 = await this.subtle.sign(signingAlgorithm, impKey, b);\n\n if (mac1.byteLength !== mac2.byteLength) {\n return false;\n }\n\n const arr1 = new Uint8Array(mac1);\n const arr2 = new Uint8Array(mac2);\n for (let i = 0; i < arr2.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n hmacFast(value: string, key: string, algorithm: \"sha1\" | \"sha256\" | \"sha512\"): Promise {\n const hmac = forge.hmac.create();\n hmac.start(algorithm, key);\n hmac.update(value);\n const bytes = hmac.digest().getBytes();\n return Promise.resolve(bytes);\n }\n\n async compareFast(a: string, b: string): Promise {\n const rand = await this.randomBytes(32);\n const bytes = new Uint32Array(rand);\n const buffer = forge.util.createBuffer();\n for (let i = 0; i < bytes.length; i++) {\n buffer.putInt32(bytes[i]);\n }\n const macKey = buffer.getBytes();\n\n const hmac = forge.hmac.create();\n hmac.start(\"sha256\", macKey);\n hmac.update(a);\n const mac1 = hmac.digest().getBytes();\n\n hmac.start(null, null);\n hmac.update(b);\n const mac2 = hmac.digest().getBytes();\n\n const equals = mac1 === mac2;\n return equals;\n }\n\n async aesEncrypt(data: Uint8Array, iv: Uint8Array, key: Uint8Array): Promise {\n const impKey = await this.subtle.importKey(\"raw\", key, { name: \"AES-CBC\" } as any, false, [\n \"encrypt\",\n ]);\n const buffer = await this.subtle.encrypt({ name: \"AES-CBC\", iv: iv }, impKey, data);\n return new Uint8Array(buffer);\n }\n\n aesDecryptFastParameters(\n data: string,\n iv: string,\n mac: string,\n key: SymmetricCryptoKey,\n ): DecryptParameters {\n const p = new DecryptParameters();\n if (key.meta != null) {\n p.encKey = key.meta.encKeyByteString;\n p.macKey = key.meta.macKeyByteString;\n }\n\n if (p.encKey == null) {\n p.encKey = forge.util.decode64(key.encKeyB64);\n }\n p.data = forge.util.decode64(data);\n p.iv = forge.util.decode64(iv);\n p.macData = p.iv + p.data;\n if (p.macKey == null && key.macKeyB64 != null) {\n p.macKey = forge.util.decode64(key.macKeyB64);\n }\n if (mac != null) {\n p.mac = forge.util.decode64(mac);\n }\n\n // cache byte string keys for later\n if (key.meta == null) {\n key.meta = {};\n }\n if (key.meta.encKeyByteString == null) {\n key.meta.encKeyByteString = p.encKey;\n }\n if (p.macKey != null && key.meta.macKeyByteString == null) {\n key.meta.macKeyByteString = p.macKey;\n }\n\n return p;\n }\n\n aesDecryptFast(parameters: DecryptParameters, mode: \"cbc\" | \"ecb\"): Promise {\n const decipher = (forge as any).cipher.createDecipher(\n this.toWebCryptoAesMode(mode),\n parameters.encKey,\n );\n const options = {} as any;\n if (mode === \"cbc\") {\n options.iv = parameters.iv;\n }\n const dataBuffer = (forge as any).util.createBuffer(parameters.data);\n decipher.start(options);\n decipher.update(dataBuffer);\n decipher.finish();\n const val = decipher.output.toString();\n return Promise.resolve(val);\n }\n\n async aesDecrypt(\n data: Uint8Array,\n iv: Uint8Array,\n key: Uint8Array,\n mode: \"cbc\" | \"ecb\",\n ): Promise {\n if (mode === \"ecb\") {\n // Web crypto does not support AES-ECB mode, so we need to do this in forge.\n const params = new DecryptParameters();\n params.data = this.toByteString(data);\n params.encKey = this.toByteString(key);\n const result = await this.aesDecryptFast(params, \"ecb\");\n return Utils.fromByteStringToArray(result);\n }\n const impKey = await this.subtle.importKey(\"raw\", key, { name: \"AES-CBC\" } as any, false, [\n \"decrypt\",\n ]);\n const buffer = await this.subtle.decrypt({ name: \"AES-CBC\", iv: iv }, impKey, data);\n return new Uint8Array(buffer);\n }\n\n async rsaEncrypt(\n data: Uint8Array,\n publicKey: Uint8Array,\n algorithm: \"sha1\" | \"sha256\",\n ): Promise {\n // Note: Edge browser requires that we specify name and hash for both key import and decrypt.\n // We cannot use the proper types here.\n const rsaParams = {\n name: \"RSA-OAEP\",\n hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n };\n const impKey = await this.subtle.importKey(\"spki\", publicKey, rsaParams, false, [\"encrypt\"]);\n const buffer = await this.subtle.encrypt(rsaParams, impKey, data);\n return new Uint8Array(buffer);\n }\n\n async rsaDecrypt(\n data: Uint8Array,\n privateKey: Uint8Array,\n algorithm: \"sha1\" | \"sha256\",\n ): Promise {\n // Note: Edge browser requires that we specify name and hash for both key import and decrypt.\n // We cannot use the proper types here.\n const rsaParams = {\n name: \"RSA-OAEP\",\n hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n };\n const impKey = await this.subtle.importKey(\"pkcs8\", privateKey, rsaParams, false, [\"decrypt\"]);\n const buffer = await this.subtle.decrypt(rsaParams, impKey, data);\n return new Uint8Array(buffer);\n }\n\n async rsaExtractPublicKey(privateKey: Uint8Array): Promise {\n const rsaParams = {\n name: \"RSA-OAEP\",\n // Have to specify some algorithm\n hash: { name: this.toWebCryptoAlgorithm(\"sha1\") },\n };\n const impPrivateKey = await this.subtle.importKey(\"pkcs8\", privateKey, rsaParams, true, [\n \"decrypt\",\n ]);\n const jwkPrivateKey = await this.subtle.exportKey(\"jwk\", impPrivateKey);\n const jwkPublicKeyParams = {\n kty: \"RSA\",\n e: jwkPrivateKey.e,\n n: jwkPrivateKey.n,\n alg: \"RSA-OAEP\",\n ext: true,\n };\n const impPublicKey = await this.subtle.importKey(\"jwk\", jwkPublicKeyParams, rsaParams, true, [\n \"encrypt\",\n ]);\n const buffer = await this.subtle.exportKey(\"spki\", impPublicKey);\n return new Uint8Array(buffer);\n }\n\n async aesGenerateKey(bitLength = 128 | 192 | 256 | 512): Promise {\n if (bitLength === 512) {\n // 512 bit keys are not supported in WebCrypto, so we concat two 256 bit keys\n const key1 = await this.aesGenerateKey(256);\n const key2 = await this.aesGenerateKey(256);\n return new Uint8Array([...key1, ...key2]) as CsprngArray;\n }\n const aesParams = {\n name: \"AES-CBC\",\n length: bitLength,\n };\n\n const key = await this.subtle.generateKey(aesParams, true, [\"encrypt\", \"decrypt\"]);\n const rawKey = await this.subtle.exportKey(\"raw\", key);\n return new Uint8Array(rawKey) as CsprngArray;\n }\n\n async rsaGenerateKeyPair(length: 1024 | 2048 | 4096): Promise<[Uint8Array, Uint8Array]> {\n const rsaParams = {\n name: \"RSA-OAEP\",\n modulusLength: length,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // 65537\n // Have to specify some algorithm\n hash: { name: this.toWebCryptoAlgorithm(\"sha1\") },\n };\n const keyPair = await this.subtle.generateKey(rsaParams, true, [\"encrypt\", \"decrypt\"]);\n const publicKey = await this.subtle.exportKey(\"spki\", keyPair.publicKey);\n const privateKey = await this.subtle.exportKey(\"pkcs8\", keyPair.privateKey);\n return [new Uint8Array(publicKey), new Uint8Array(privateKey)];\n }\n\n randomBytes(length: number): Promise {\n const arr = new Uint8Array(length);\n this.crypto.getRandomValues(arr);\n return Promise.resolve(arr as CsprngArray);\n }\n\n private toBuf(value: string | Uint8Array): Uint8Array {\n let buf: Uint8Array;\n if (typeof value === \"string\") {\n buf = Utils.fromUtf8ToArray(value);\n } else {\n buf = value;\n }\n return buf;\n }\n\n private toByteString(value: string | Uint8Array): string {\n let bytes: string;\n if (typeof value === \"string\") {\n bytes = forge.util.encodeUtf8(value);\n } else {\n bytes = Utils.fromBufferToByteString(value);\n }\n return bytes;\n }\n\n private toWebCryptoAlgorithm(algorithm: \"sha1\" | \"sha256\" | \"sha512\" | \"md5\"): string {\n if (algorithm === \"md5\") {\n throw new Error(\"MD5 is not supported in WebCrypto.\");\n }\n return algorithm === \"sha1\" ? \"SHA-1\" : algorithm === \"sha256\" ? \"SHA-256\" : \"SHA-512\";\n }\n\n private toWebCryptoAesMode(mode: \"cbc\" | \"ecb\"): string {\n return mode === \"cbc\" ? \"AES-CBC\" : \"AES-ECB\";\n }\n\n // ref: https://stackoverflow.com/a/47880734/1090359\n private checkIfWasmSupported(): boolean {\n try {\n if (typeof WebAssembly === \"object\" && typeof WebAssembly.instantiate === \"function\") {\n const module = new WebAssembly.Module(\n Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00),\n );\n if (module instanceof WebAssembly.Module) {\n return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;\n }\n }\n } catch {\n return false;\n }\n return false;\n }\n}\n","import { defaultIfEmpty, filter, firstValueFrom, fromEvent, map, Subject, takeUntil } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { Decryptable } from \"../../interfaces/decryptable.interface\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\n\nimport { EncryptServiceImplementation } from \"./encrypt.service.implementation\";\nimport { getClassInitializer } from \"./get-class-initializer\";\n\n// TTL (time to live) is not strictly required but avoids tying up memory resources if inactive\nconst workerTTL = 3 * 60000; // 3 minutes\n\nexport class MultithreadEncryptServiceImplementation extends EncryptServiceImplementation {\n private worker: Worker;\n private timeout: any;\n\n private clear$ = new Subject();\n\n /**\n * Sends items to a web worker to decrypt them.\n * This utilises multithreading to decrypt items faster without interrupting other operations (e.g. updating UI).\n */\n async decryptItems(\n items: Decryptable[],\n key: SymmetricCryptoKey,\n ): Promise {\n if (items == null || items.length < 1) {\n return [];\n }\n\n this.logService.info(\"Starting decryption using multithreading\");\n\n this.worker ??= new Worker(\n new URL(\n /* webpackChunkName: 'encrypt-worker' */\n \"@bitwarden/common/platform/services/cryptography/encrypt.worker.ts\",\n import.meta.url,\n ),\n );\n\n this.restartTimeout();\n\n const request = {\n id: Utils.newGuid(),\n items: items,\n key: key,\n };\n\n this.worker.postMessage(JSON.stringify(request));\n\n return await firstValueFrom(\n fromEvent(this.worker, \"message\").pipe(\n filter((response: MessageEvent) => response.data?.id === request.id),\n map((response) => JSON.parse(response.data.items)),\n map((items) =>\n items.map((jsonItem: Jsonify) => {\n const initializer = getClassInitializer(jsonItem.initializerKey);\n return initializer(jsonItem);\n }),\n ),\n takeUntil(this.clear$),\n defaultIfEmpty([]),\n ),\n );\n }\n\n private clear() {\n this.clear$.next();\n this.worker?.terminate();\n this.worker = null;\n this.clearTimeout();\n }\n\n private restartTimeout() {\n this.clearTimeout();\n this.timeout = setTimeout(() => this.clear(), workerTTL);\n }\n\n private clearTimeout() {\n if (this.timeout != null) {\n clearTimeout(this.timeout);\n }\n }\n}\n","import { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"../../abstractions/event/event-upload.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { EventData } from \"../../models/data/event.data\";\nimport { EventRequest } from \"../../models/request/event.request\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { ScheduledTaskNames } from \"../../platform/scheduling/scheduled-task-name.enum\";\nimport { TaskSchedulerService } from \"../../platform/scheduling/task-scheduler.service\";\nimport { StateProvider } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\n\nimport { EVENT_COLLECTION } from \"./key-definitions\";\n\nexport class EventUploadService implements EventUploadServiceAbstraction {\n private inited = false;\n constructor(\n private apiService: ApiService,\n private stateProvider: StateProvider,\n private logService: LogService,\n private authService: AuthService,\n private taskSchedulerService: TaskSchedulerService,\n ) {\n this.taskSchedulerService.registerTaskHandler(ScheduledTaskNames.eventUploadsInterval, () =>\n this.uploadEvents(),\n );\n }\n\n init(checkOnInterval: boolean) {\n if (this.inited) {\n return;\n }\n\n this.inited = true;\n if (checkOnInterval) {\n void this.uploadEvents();\n this.taskSchedulerService.setInterval(\n ScheduledTaskNames.eventUploadsInterval,\n 60 * 1000, // check every 60 seconds\n );\n }\n }\n\n /** Upload the event collection from state.\n * @param userId upload events for provided user. If not active user will be used.\n */\n async uploadEvents(userId?: UserId): Promise {\n if (!userId) {\n userId = await firstValueFrom(this.stateProvider.activeUserId$);\n }\n\n if (!userId) {\n return;\n }\n\n const isUnlocked = await firstValueFrom(\n this.authService\n .authStatusFor$(userId)\n .pipe(map((status) => status === AuthenticationStatus.Unlocked)),\n );\n if (!isUnlocked) {\n return;\n }\n\n const eventCollection = await this.takeEvents(userId);\n\n if (eventCollection == null || eventCollection.length === 0) {\n return;\n }\n const request = eventCollection.map((e) => {\n const req = new EventRequest();\n req.type = e.type;\n req.cipherId = e.cipherId;\n req.date = e.date;\n req.organizationId = e.organizationId;\n return req;\n });\n try {\n await this.apiService.postEventsCollect(request, userId);\n } catch (e) {\n this.logService.error(e);\n // Add the events back to state if there was an error and they were not uploaded.\n await this.stateProvider.setUserState(EVENT_COLLECTION, eventCollection, userId);\n }\n }\n\n /** Return user's events and then clear them from state\n * @param userId the user to grab and clear events for\n */\n private async takeEvents(userId: UserId): Promise {\n let taken = null;\n await this.stateProvider.getUser(userId, EVENT_COLLECTION).update((current) => {\n taken = current ?? [];\n return [];\n });\n\n return taken;\n }\n}\n","import { firstValueFrom, map, from, zip, Observable } from \"rxjs\";\n\nimport { EventCollectionService as EventCollectionServiceAbstraction } from \"../../abstractions/event/event-collection.service\";\nimport { EventUploadService } from \"../../abstractions/event/event-upload.service\";\nimport { OrganizationService } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { EventType } from \"../../enums\";\nimport { EventData } from \"../../models/data/event.data\";\nimport { StateProvider } from \"../../platform/state\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nimport { EVENT_COLLECTION } from \"./key-definitions\";\n\nexport class EventCollectionService implements EventCollectionServiceAbstraction {\n private orgIds$: Observable;\n\n constructor(\n private cipherService: CipherService,\n private stateProvider: StateProvider,\n private organizationService: OrganizationService,\n private eventUploadService: EventUploadService,\n private authService: AuthService,\n private accountService: AccountService,\n ) {\n this.orgIds$ = this.organizationService.organizations$.pipe(\n map((orgs) => orgs?.filter((o) => o.useEvents)?.map((x) => x.id) ?? []),\n );\n }\n\n /** Adds an event to the active user's event collection\n * @param eventType the event type to be added\n * @param ciphers The collection of ciphers to log events for\n * @param uploadImmediately in some cases the recorded events should be uploaded right after being added\n */\n async collectMany(\n eventType: EventType,\n ciphers: CipherView[],\n uploadImmediately = false,\n ): Promise {\n const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n const eventStore = this.stateProvider.getUser(userId, EVENT_COLLECTION);\n\n if (!(await this.shouldUpdate(null, eventType, ciphers))) {\n return;\n }\n\n const events$ = this.orgIds$.pipe(\n map((orgs) =>\n ciphers\n .filter((c) => orgs.includes(c.organizationId))\n .map((c) => ({\n type: eventType,\n cipherId: c.id,\n date: new Date().toISOString(),\n organizationId: c.organizationId,\n })),\n ),\n );\n\n await eventStore.update(\n (currentEvents, newEvents) => [...(currentEvents ?? []), ...newEvents],\n {\n combineLatestWith: events$,\n },\n );\n\n if (uploadImmediately) {\n await this.eventUploadService.uploadEvents();\n }\n }\n\n /** Adds an event to the active user's event collection\n * @param eventType the event type to be added\n * @param cipherId if provided the id of the cipher involved in the event\n * @param uploadImmediately in some cases the recorded events should be uploaded right after being added\n * @param organizationId the organizationId involved in the event. If the cipherId is not provided an organizationId is required\n */\n async collect(\n eventType: EventType,\n cipherId: string = null,\n uploadImmediately = false,\n organizationId: string = null,\n ): Promise {\n const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n const eventStore = this.stateProvider.getUser(userId, EVENT_COLLECTION);\n\n if (!(await this.shouldUpdate(organizationId, eventType, undefined, cipherId))) {\n return;\n }\n\n const event = new EventData();\n event.type = eventType;\n event.cipherId = cipherId;\n event.date = new Date().toISOString();\n event.organizationId = organizationId;\n\n await eventStore.update((events) => {\n events = events ?? [];\n events.push(event);\n return events;\n });\n\n if (uploadImmediately) {\n await this.eventUploadService.uploadEvents();\n }\n }\n\n /** Verifies if the event collection should be updated for the provided information\n * @param cipherId the cipher for the event\n * @param organizationId the organization for the event\n */\n private async shouldUpdate(\n organizationId: string = null,\n eventType: EventType = null,\n ciphers: CipherView[] = [],\n cipherId?: string,\n ): Promise {\n const cipher$ = from(this.cipherService.get(cipherId));\n\n const [authStatus, orgIds, cipher] = await firstValueFrom(\n zip(this.authService.activeAccountStatus$, this.orgIds$, cipher$),\n );\n\n // The user must be authorized\n if (authStatus != AuthenticationStatus.Unlocked) {\n return false;\n }\n\n // User must have organizations assigned to them\n if (orgIds == null || orgIds.length == 0) {\n return false;\n }\n\n // Individual vault export doesn't need cipher id or organization id.\n if (eventType == EventType.User_ClientExportedVault) {\n return true;\n }\n\n // If the cipherId was provided and a cipher exists, add it to the collection\n if (cipher != null) {\n ciphers.push(new CipherView(cipher));\n }\n\n // If no ciphers there must be an organization id provided\n if ((ciphers == null || ciphers.length == 0) && organizationId == null) {\n return false;\n }\n\n // If the input list of ciphers is provided. Check the ciphers to see if any\n // are in the user's org list\n if (ciphers != null && ciphers.length > 0) {\n const filtered = ciphers.filter((c) => orgIds.includes(c.organizationId));\n return filtered.length > 0;\n }\n\n // If the organization id is provided it must be in the user's org list\n if (organizationId != null && !orgIds.includes(organizationId)) {\n return false;\n }\n\n return true;\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { HttpStatusCode } from \"../../../enums\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { PolicyApiServiceAbstraction } from \"../../abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"../../abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { PolicyRequest } from \"../../models/request/policy.request\";\nimport { PolicyResponse } from \"../../models/response/policy.response\";\n\nexport class PolicyApiService implements PolicyApiServiceAbstraction {\n constructor(\n private policyService: InternalPolicyService,\n private apiService: ApiService,\n ) {}\n\n async getPolicy(organizationId: string, type: PolicyType): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/policies/\" + type,\n null,\n true,\n true,\n );\n return new PolicyResponse(r);\n }\n\n async getPolicies(organizationId: string): Promise> {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/policies\",\n null,\n true,\n true,\n );\n return new ListResponse(r, PolicyResponse);\n }\n\n async getPoliciesByToken(\n organizationId: string,\n token: string,\n email: string,\n organizationUserId: string,\n ): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" +\n organizationId +\n \"/policies/token?\" +\n \"token=\" +\n encodeURIComponent(token) +\n \"&email=\" +\n Utils.encodeRFC3986URIComponent(email) +\n \"&organizationUserId=\" +\n organizationUserId,\n null,\n false,\n true,\n );\n return Policy.fromListResponse(new ListResponse(r, PolicyResponse));\n }\n\n private async getMasterPasswordPolicyResponseForOrgUser(\n organizationId: string,\n ): Promise {\n const response = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/policies/master-password\",\n null,\n true,\n true,\n );\n\n return new PolicyResponse(response);\n }\n\n async getMasterPasswordPolicyOptsForOrgUser(\n orgId: string,\n ): Promise {\n try {\n const masterPasswordPolicyResponse =\n await this.getMasterPasswordPolicyResponseForOrgUser(orgId);\n\n const masterPasswordPolicy = Policy.fromResponse(masterPasswordPolicyResponse);\n\n if (!masterPasswordPolicy) {\n return null;\n }\n\n return await firstValueFrom(\n this.policyService.masterPasswordPolicyOptions$([masterPasswordPolicy]),\n );\n } catch (error) {\n // If policy not found, return null\n if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n return null;\n }\n // otherwise rethrow error\n throw error;\n }\n }\n\n async putPolicy(organizationId: string, type: PolicyType, request: PolicyRequest): Promise {\n const r = await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/policies/\" + type,\n request,\n true,\n true,\n );\n const response = new PolicyResponse(r);\n const data = new PolicyData(response);\n await this.policyService.upsert(data);\n }\n}\n","import { firstValueFrom, map } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\n\nimport { PinServiceAbstraction } from \"../../../../../auth/src/common/abstractions/pin.service.abstraction\";\nimport { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from \"../../../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { CryptoService } from \"../../../platform/abstractions/crypto.service\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { LogService } from \"../../../platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"../../../platform/abstractions/platform-utils.service\";\nimport { HashPurpose } from \"../../../platform/enums\";\nimport { KeySuffixOptions } from \"../../../platform/enums/key-suffix-options.enum\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { AccountService } from \"../../abstractions/account.service\";\nimport { KdfConfigService } from \"../../abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../abstractions/master-password.service.abstraction\";\nimport { UserVerificationApiServiceAbstraction } from \"../../abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { UserVerificationService as UserVerificationServiceAbstraction } from \"../../abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"../../enums/verification-type\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\nimport { UserVerificationOptions } from \"../../types/user-verification-options\";\nimport {\n MasterPasswordVerification,\n MasterPasswordVerificationResponse,\n OtpVerification,\n PinVerification,\n ServerSideVerification,\n Verification,\n VerificationWithSecret,\n verificationHasSecret,\n} from \"../../types/verification\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Use it to verify the input collected by UserVerificationComponent.\n */\nexport class UserVerificationService implements UserVerificationServiceAbstraction {\n constructor(\n private cryptoService: CryptoService,\n private accountService: AccountService,\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n private i18nService: I18nService,\n private userVerificationApiService: UserVerificationApiServiceAbstraction,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n private pinService: PinServiceAbstraction,\n private logService: LogService,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsServiceAbstraction,\n private platformUtilsService: PlatformUtilsService,\n private kdfConfigService: KdfConfigService,\n ) {}\n\n async getAvailableVerificationOptions(\n verificationType: keyof UserVerificationOptions,\n ): Promise {\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n if (verificationType === \"client\") {\n const [userHasMasterPassword, pinLockType, biometricsLockSet, biometricsUserKeyStored] =\n await Promise.all([\n this.hasMasterPasswordAndMasterKeyHash(userId),\n this.pinService.getPinLockType(userId),\n this.vaultTimeoutSettingsService.isBiometricLockSet(userId),\n this.cryptoService.hasUserKeyStored(KeySuffixOptions.Biometric, userId),\n ]);\n\n // note: we do not need to check this.platformUtilsService.supportsBiometric() because\n // we can just use the logic below which works for both desktop & the browser extension.\n\n return {\n client: {\n masterPassword: userHasMasterPassword,\n pin: pinLockType !== \"DISABLED\",\n biometrics:\n biometricsLockSet &&\n (biometricsUserKeyStored || !this.platformUtilsService.supportsSecureStorage()),\n },\n server: {\n masterPassword: false,\n otp: false,\n },\n };\n } else {\n // server\n // Don't check if have MP hash locally, because we are going to send the secret to the server to be verified.\n const userHasMasterPassword = await this.hasMasterPassword(userId);\n\n return {\n client: {\n masterPassword: false,\n pin: false,\n biometrics: false,\n },\n server: { masterPassword: userHasMasterPassword, otp: !userHasMasterPassword },\n };\n }\n }\n\n async buildRequest(\n verification: ServerSideVerification,\n requestClass?: new () => T,\n alreadyHashed?: boolean,\n ) {\n this.validateSecretInput(verification);\n\n const request =\n requestClass != null ? new requestClass() : (new SecretVerificationRequest() as T);\n\n if (verification.type === VerificationType.OTP) {\n request.otp = verification.secret;\n } else {\n const [userId, email] = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n );\n let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n if (!masterKey && !alreadyHashed) {\n masterKey = await this.cryptoService.makeMasterKey(\n verification.secret,\n email,\n await this.kdfConfigService.getKdfConfig(),\n );\n }\n request.masterPasswordHash = alreadyHashed\n ? verification.secret\n : await this.cryptoService.hashMasterKey(verification.secret, masterKey);\n }\n\n return request;\n }\n\n async verifyUser(verification: Verification): Promise {\n if (verification == null) {\n throw new Error(\"Verification is required.\");\n }\n\n const [userId, email] = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n );\n\n if (verificationHasSecret(verification)) {\n this.validateSecretInput(verification);\n }\n\n switch (verification.type) {\n case VerificationType.OTP:\n return this.verifyUserByOTP(verification);\n case VerificationType.MasterPassword:\n await this.verifyUserByMasterPassword(verification, userId, email);\n return true;\n case VerificationType.PIN:\n return this.verifyUserByPIN(verification, userId);\n case VerificationType.Biometrics:\n return this.verifyUserByBiometrics();\n default: {\n // Compile-time check for exhaustive switch\n const _exhaustiveCheck: never = verification;\n return _exhaustiveCheck;\n }\n }\n }\n\n private async verifyUserByOTP(verification: OtpVerification): Promise {\n const request = new VerifyOTPRequest(verification.secret);\n try {\n await this.userVerificationApiService.postAccountVerifyOTP(request);\n } catch (e) {\n throw new Error(this.i18nService.t(\"invalidVerificationCode\"));\n }\n return true;\n }\n\n async verifyUserByMasterPassword(\n verification: MasterPasswordVerification,\n userId: UserId,\n email: string,\n ): Promise {\n if (!verification.secret) {\n throw new Error(\"Master Password is required. Cannot verify user without a master password.\");\n }\n if (!userId) {\n throw new Error(\"User ID is required. Cannot verify user by master password.\");\n }\n if (!email) {\n throw new Error(\"Email is required. Cannot verify user by master password.\");\n }\n\n const kdfConfig = await this.kdfConfigService.getKdfConfig();\n if (!kdfConfig) {\n throw new Error(\"KDF config is required. Cannot verify user by master password.\");\n }\n\n let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n if (!masterKey) {\n masterKey = await this.cryptoService.makeMasterKey(verification.secret, email, kdfConfig);\n }\n\n if (!masterKey) {\n throw new Error(\"Master key could not be created to verify the master password.\");\n }\n\n let policyOptions: MasterPasswordPolicyResponse | null;\n // Client-side verification\n if (await this.hasMasterPasswordAndMasterKeyHash(userId)) {\n const passwordValid = await this.cryptoService.compareAndUpdateKeyHash(\n verification.secret,\n masterKey,\n );\n if (!passwordValid) {\n throw new Error(this.i18nService.t(\"invalidMasterPassword\"));\n }\n policyOptions = null;\n } else {\n // Server-side verification\n const request = new SecretVerificationRequest();\n const serverKeyHash = await this.cryptoService.hashMasterKey(\n verification.secret,\n masterKey,\n HashPurpose.ServerAuthorization,\n );\n request.masterPasswordHash = serverKeyHash;\n try {\n policyOptions = await this.userVerificationApiService.postAccountVerifyPassword(request);\n } catch (e) {\n throw new Error(this.i18nService.t(\"invalidMasterPassword\"));\n }\n }\n\n const localKeyHash = await this.cryptoService.hashMasterKey(\n verification.secret,\n masterKey,\n HashPurpose.LocalAuthorization,\n );\n await this.masterPasswordService.setMasterKeyHash(localKeyHash, userId);\n await this.masterPasswordService.setMasterKey(masterKey, userId);\n return { policyOptions, masterKey };\n }\n\n private async verifyUserByPIN(verification: PinVerification, userId: UserId): Promise {\n if (!userId) {\n throw new Error(\"User ID is required. Cannot verify user by PIN.\");\n }\n\n const userKey = await this.pinService.decryptUserKeyWithPin(verification.secret, userId);\n\n return userKey != null;\n }\n\n private async verifyUserByBiometrics(): Promise {\n let userKey: UserKey;\n // Biometrics crashes and doesn't return a value if the user cancels the prompt\n try {\n userKey = await this.cryptoService.getUserKeyFromStorage(KeySuffixOptions.Biometric);\n } catch (e) {\n this.logService.error(`Biometrics User Verification failed: ${e.message}`);\n // So, any failures should be treated as a failed verification\n return false;\n }\n\n return userKey != null;\n }\n\n async requestOTP() {\n await this.userVerificationApiService.postAccountRequestOTP();\n }\n\n async hasMasterPassword(userId?: string): Promise {\n if (userId) {\n const decryptionOptions = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),\n );\n\n if (decryptionOptions?.hasMasterPassword != undefined) {\n return decryptionOptions.hasMasterPassword;\n }\n }\n return await firstValueFrom(this.userDecryptionOptionsService.hasMasterPassword$);\n }\n\n async hasMasterPasswordAndMasterKeyHash(userId?: string): Promise {\n userId ??= (await firstValueFrom(this.accountService.activeAccount$))?.id;\n return (\n (await this.hasMasterPassword(userId)) &&\n (await firstValueFrom(this.masterPasswordService.masterKeyHash$(userId as UserId))) != null\n );\n }\n\n private validateSecretInput(verification: VerificationWithSecret) {\n if (verification?.secret == null || verification.secret === \"\") {\n switch (verification.type) {\n case VerificationType.OTP:\n throw new Error(this.i18nService.t(\"verificationCodeRequired\"));\n case VerificationType.MasterPassword:\n throw new Error(this.i18nService.t(\"masterPasswordRequired\"));\n case VerificationType.PIN:\n throw new Error(this.i18nService.t(\"pinRequired\"));\n }\n }\n }\n}\n","import { MasterKey } from \"../../types/key\";\nimport { VerificationType } from \"../enums/verification-type\";\nimport { MasterPasswordPolicyResponse } from \"../models/response/master-password-policy.response\";\n\nexport type OtpVerification = { type: VerificationType.OTP; secret: string };\nexport type MasterPasswordVerification = { type: VerificationType.MasterPassword; secret: string };\nexport type PinVerification = { type: VerificationType.PIN; secret: string };\nexport type BiometricsVerification = { type: VerificationType.Biometrics };\n\nexport type VerificationWithSecret = OtpVerification | MasterPasswordVerification | PinVerification;\nexport type VerificationWithoutSecret = BiometricsVerification;\n\nexport type Verification = VerificationWithSecret | VerificationWithoutSecret;\n\nexport function verificationHasSecret(\n verification: Verification,\n): verification is VerificationWithSecret {\n return \"secret\" in verification;\n}\n\nexport type ServerSideVerification = OtpVerification | MasterPasswordVerification;\n\nexport type MasterPasswordVerificationResponse = {\n masterKey: MasterKey;\n policyOptions: MasterPasswordPolicyResponse;\n};\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { OrganizationUserService } from \"../../abstractions/organization-user/organization-user.service\";\nimport {\n OrganizationUserAcceptInitRequest,\n OrganizationUserAcceptRequest,\n OrganizationUserBulkConfirmRequest,\n OrganizationUserConfirmRequest,\n OrganizationUserInviteRequest,\n OrganizationUserResetPasswordEnrollmentRequest,\n OrganizationUserResetPasswordRequest,\n OrganizationUserUpdateRequest,\n} from \"../../abstractions/organization-user/requests\";\nimport {\n OrganizationUserBulkPublicKeyResponse,\n OrganizationUserBulkResponse,\n OrganizationUserDetailsResponse,\n OrganizationUserResetPasswordDetailsResponse,\n OrganizationUserUserDetailsResponse,\n} from \"../../abstractions/organization-user/responses\";\n\nimport { OrganizationUserBulkRequest } from \"./requests\";\n\nexport class OrganizationUserServiceImplementation implements OrganizationUserService {\n constructor(private apiService: ApiService) {}\n\n async getOrganizationUser(\n organizationId: string,\n id: string,\n options?: {\n includeGroups?: boolean;\n },\n ): Promise {\n const params = new URLSearchParams();\n\n if (options?.includeGroups) {\n params.set(\"includeGroups\", \"true\");\n }\n\n const r = await this.apiService.send(\n \"GET\",\n `/organizations/${organizationId}/users/${id}?${params.toString()}`,\n null,\n true,\n true,\n );\n return new OrganizationUserDetailsResponse(r);\n }\n\n async getOrganizationUserGroups(organizationId: string, id: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/groups\",\n null,\n true,\n true,\n );\n return r;\n }\n\n async getAllUsers(\n organizationId: string,\n options?: {\n includeCollections?: boolean;\n includeGroups?: boolean;\n },\n ): Promise> {\n const params = new URLSearchParams();\n\n if (options?.includeCollections) {\n params.set(\"includeCollections\", \"true\");\n }\n if (options?.includeGroups) {\n params.set(\"includeGroups\", \"true\");\n }\n\n const r = await this.apiService.send(\n \"GET\",\n `/organizations/${organizationId}/users?${params.toString()}`,\n null,\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserUserDetailsResponse);\n }\n\n async getOrganizationUserResetPasswordDetails(\n organizationId: string,\n id: string,\n ): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/reset-password-details\",\n null,\n true,\n true,\n );\n return new OrganizationUserResetPasswordDetailsResponse(r);\n }\n\n async getManyOrganizationUserAccountRecoveryDetails(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/account-recovery-details\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserResetPasswordDetailsResponse);\n }\n\n postOrganizationUserInvite(\n organizationId: string,\n request: OrganizationUserInviteRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/invite\",\n request,\n true,\n false,\n );\n }\n\n postOrganizationUserReinvite(organizationId: string, id: string): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/reinvite\",\n null,\n true,\n false,\n );\n }\n\n async postManyOrganizationUserReinvite(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/reinvite\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkResponse);\n }\n\n postOrganizationUserAcceptInit(\n organizationId: string,\n id: string,\n request: OrganizationUserAcceptInitRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/accept-init\",\n request,\n true,\n false,\n );\n }\n\n postOrganizationUserAccept(\n organizationId: string,\n id: string,\n request: OrganizationUserAcceptRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/accept\",\n request,\n true,\n false,\n );\n }\n\n postOrganizationUserConfirm(\n organizationId: string,\n id: string,\n request: OrganizationUserConfirmRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/confirm\",\n request,\n true,\n false,\n );\n }\n\n async postOrganizationUsersPublicKey(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/public-keys\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkPublicKeyResponse);\n }\n\n async postOrganizationUserBulkConfirm(\n organizationId: string,\n request: OrganizationUserBulkConfirmRequest,\n ): Promise> {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/users/confirm\",\n request,\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkResponse);\n }\n\n async putOrganizationUserBulkEnableSecretsManager(\n organizationId: string,\n ids: string[],\n ): Promise {\n await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/enable-secrets-manager\",\n new OrganizationUserBulkRequest(ids),\n true,\n false,\n );\n }\n\n putOrganizationUser(\n organizationId: string,\n id: string,\n request: OrganizationUserUpdateRequest,\n ): Promise {\n return this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/\" + id,\n request,\n true,\n false,\n );\n }\n\n putOrganizationUserResetPasswordEnrollment(\n organizationId: string,\n userId: string,\n request: OrganizationUserResetPasswordEnrollmentRequest,\n ): Promise {\n return this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/\" + userId + \"/reset-password-enrollment\",\n request,\n true,\n false,\n );\n }\n\n putOrganizationUserResetPassword(\n organizationId: string,\n id: string,\n request: OrganizationUserResetPasswordRequest,\n ): Promise {\n return this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/reset-password\",\n request,\n true,\n false,\n );\n }\n\n deleteOrganizationUser(organizationId: string, id: string): Promise {\n return this.apiService.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/users/\" + id,\n null,\n true,\n false,\n );\n }\n\n async deleteManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"DELETE\",\n \"/organizations/\" + organizationId + \"/users\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkResponse);\n }\n\n revokeOrganizationUser(organizationId: string, id: string): Promise {\n return this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/revoke\",\n null,\n true,\n false,\n );\n }\n\n async revokeManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/revoke\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkResponse);\n }\n\n restoreOrganizationUser(organizationId: string, id: string): Promise {\n return this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/\" + id + \"/restore\",\n null,\n true,\n false,\n );\n }\n\n async restoreManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise> {\n const r = await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + organizationId + \"/users/restore\",\n new OrganizationUserBulkRequest(ids),\n true,\n true,\n );\n return new ListResponse(r, OrganizationUserBulkResponse);\n }\n}\n","import { firstValueFrom, map } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"../../admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationUserService } from \"../../admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserResetPasswordEnrollmentRequest } from \"../../admin-console/abstractions/organization-user/requests\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { UserKey } from \"../../types/key\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"../abstractions/password-reset-enrollment.service.abstraction\";\n\nexport class PasswordResetEnrollmentServiceImplementation\n implements PasswordResetEnrollmentServiceAbstraction\n{\n constructor(\n protected organizationApiService: OrganizationApiServiceAbstraction,\n protected accountService: AccountService,\n protected cryptoService: CryptoService,\n protected organizationUserService: OrganizationUserService,\n protected i18nService: I18nService,\n ) {}\n\n async enrollIfRequired(organizationSsoIdentifier: string): Promise {\n const orgAutoEnrollStatusResponse =\n await this.organizationApiService.getAutoEnrollStatus(organizationSsoIdentifier);\n\n if (!orgAutoEnrollStatusResponse.resetPasswordEnabled) {\n await this.enroll(orgAutoEnrollStatusResponse.id, null, null);\n }\n }\n\n async enroll(organizationId: string): Promise;\n async enroll(organizationId: string, userId: string, userKey: UserKey): Promise;\n async enroll(organizationId: string, userId?: string, userKey?: UserKey): Promise {\n const orgKeyResponse = await this.organizationApiService.getKeys(organizationId);\n if (orgKeyResponse == null) {\n throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n }\n\n const orgPublicKey = Utils.fromB64ToArray(orgKeyResponse.publicKey);\n\n userId =\n userId ?? (await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id))));\n userKey = userKey ?? (await this.cryptoService.getUserKey(userId));\n // RSA Encrypt user's userKey.key with organization public key\n const encryptedKey = await this.cryptoService.rsaEncrypt(userKey.key, orgPublicKey);\n\n const resetRequest = new OrganizationUserResetPasswordEnrollmentRequest();\n resetRequest.resetPasswordKey = encryptedKey.encryptedString;\n\n await this.organizationUserService.putOrganizationUserResetPasswordEnrollment(\n organizationId,\n userId,\n resetRequest,\n );\n }\n}\n","import { UntypedFormGroup, ValidationErrors } from \"@angular/forms\";\n\nimport {\n FormGroupControls,\n FormValidationErrorsService as FormValidationErrorsAbstraction,\n AllValidationErrors,\n} from \"../abstractions/form-validation-errors.service\";\n\nexport class FormValidationErrorsService implements FormValidationErrorsAbstraction {\n getFormValidationErrors(controls: FormGroupControls): AllValidationErrors[] {\n let errors: AllValidationErrors[] = [];\n Object.keys(controls).forEach((key) => {\n const control = controls[key];\n if (control instanceof UntypedFormGroup) {\n errors = errors.concat(this.getFormValidationErrors(control.controls));\n }\n\n const controlErrors: ValidationErrors = controls[key].errors;\n if (controlErrors !== null) {\n Object.keys(controlErrors).forEach((keyError) => {\n errors.push({\n controlName: key,\n errorName: keyError,\n });\n });\n }\n });\n\n return errors;\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { UserVerificationApiServiceAbstraction } from \"../../abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\n\nexport class UserVerificationApiService implements UserVerificationApiServiceAbstraction {\n constructor(private apiService: ApiService) {}\n\n postAccountVerifyOTP(request: VerifyOTPRequest): Promise {\n return this.apiService.send(\"POST\", \"/accounts/verify-otp\", request, true, false);\n }\n async postAccountRequestOTP(): Promise {\n return this.apiService.send(\"POST\", \"/accounts/request-otp\", null, true, false);\n }\n postAccountVerifyPassword(\n request: SecretVerificationRequest,\n ): Promise {\n return this.apiService.send(\"POST\", \"/accounts/verify-password\", request, true, true);\n }\n}\n","import { BillingHistoryResponse } from \"@bitwarden/common/billing/models/response/billing-history.response\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { OrganizationApiKeyRequest } from \"../../../admin-console/models/request/organization-api-key.request\";\nimport { OrganizationSsoRequest } from \"../../../auth/models/request/organization-sso.request\";\nimport { SecretVerificationRequest } from \"../../../auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"../../../auth/models/response/api-key.response\";\nimport { OrganizationSsoResponse } from \"../../../auth/models/response/organization-sso.response\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../../billing/models/request/expanded-tax-info-update.request\";\nimport { OrganizationSmSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-sm-subscription-update.request\";\nimport { OrganizationSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-subscription-update.request\";\nimport { PaymentRequest } from \"../../../billing/models/request/payment.request\";\nimport { SecretsManagerSubscribeRequest } from \"../../../billing/models/request/sm-subscribe.request\";\nimport { BillingResponse } from \"../../../billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"../../../billing/models/response/organization-subscription.response\";\nimport { PaymentResponse } from \"../../../billing/models/response/payment.response\";\nimport { TaxInfoResponse } from \"../../../billing/models/response/tax-info.response\";\nimport { ImportDirectoryRequest } from \"../../../models/request/import-directory.request\";\nimport { SeatRequest } from \"../../../models/request/seat.request\";\nimport { StorageRequest } from \"../../../models/request/storage.request\";\nimport { VerifyBankRequest } from \"../../../models/request/verify-bank.request\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { SyncService } from \"../../../vault/abstractions/sync/sync.service.abstraction\";\nimport { OrganizationApiServiceAbstraction } from \"../../abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationApiKeyType } from \"../../enums\";\nimport { OrganizationCollectionManagementUpdateRequest } from \"../../models/request/organization-collection-management-update.request\";\nimport { OrganizationCreateRequest } from \"../../models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../models/request/organization-keys.request\";\nimport { OrganizationUpdateRequest } from \"../../models/request/organization-update.request\";\nimport { OrganizationUpgradeRequest } from \"../../models/request/organization-upgrade.request\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"../../models/request/organization-verify-delete-recover.request\";\nimport { OrganizationApiKeyInformationResponse } from \"../../models/response/organization-api-key-information.response\";\nimport { OrganizationAutoEnrollStatusResponse } from \"../../models/response/organization-auto-enroll-status.response\";\nimport { OrganizationKeysResponse } from \"../../models/response/organization-keys.response\";\nimport { OrganizationResponse } from \"../../models/response/organization.response\";\nimport { ProfileOrganizationResponse } from \"../../models/response/profile-organization.response\";\n\nexport class OrganizationApiService implements OrganizationApiServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private syncService: SyncService,\n ) {}\n\n async get(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/organizations/\" + id, null, true, true);\n return new OrganizationResponse(r);\n }\n\n async getBilling(id: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + id + \"/billing\",\n null,\n true,\n true,\n );\n return new BillingResponse(r);\n }\n\n async getBillingHistory(id: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + id + \"/billing/history\",\n null,\n true,\n true,\n );\n return new BillingHistoryResponse(r);\n }\n\n async getSubscription(id: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + id + \"/subscription\",\n null,\n true,\n true,\n );\n return new OrganizationSubscriptionResponse(r);\n }\n\n async getLicense(id: string, installationId: string): Promise {\n return this.apiService.send(\n \"GET\",\n \"/organizations/\" + id + \"/license?installationId=\" + installationId,\n null,\n true,\n true,\n );\n }\n\n async getAutoEnrollStatus(identifier: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + identifier + \"/auto-enroll-status\",\n null,\n true,\n true,\n );\n return new OrganizationAutoEnrollStatusResponse(r);\n }\n\n async create(request: OrganizationCreateRequest): Promise {\n const r = await this.apiService.send(\"POST\", \"/organizations\", request, true, true);\n // Forcing a sync will notify organization service that they need to repull\n await this.syncService.fullSync(true);\n return new OrganizationResponse(r);\n }\n\n async createLicense(data: FormData): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/licenses/self-hosted\",\n data,\n true,\n true,\n );\n return new OrganizationResponse(r);\n }\n\n async save(id: string, request: OrganizationUpdateRequest): Promise {\n const r = await this.apiService.send(\"PUT\", \"/organizations/\" + id, request, true, true);\n const data = new OrganizationResponse(r);\n await this.syncService.fullSync(true);\n return data;\n }\n\n async updatePayment(id: string, request: PaymentRequest): Promise {\n return this.apiService.send(\"POST\", \"/organizations/\" + id + \"/payment\", request, true, false);\n }\n\n async upgrade(id: string, request: OrganizationUpgradeRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/upgrade\",\n request,\n true,\n true,\n );\n return new PaymentResponse(r);\n }\n\n async updatePasswordManagerSeats(\n id: string,\n request: OrganizationSubscriptionUpdateRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/subscription\",\n request,\n true,\n false,\n );\n }\n\n async updateSecretsManagerSubscription(\n id: string,\n request: OrganizationSmSubscriptionUpdateRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/sm-subscription\",\n request,\n true,\n false,\n );\n }\n\n async updateSeats(id: string, request: SeatRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/seat\",\n request,\n true,\n true,\n );\n return new PaymentResponse(r);\n }\n\n async updateStorage(id: string, request: StorageRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/storage\",\n request,\n true,\n true,\n );\n return new PaymentResponse(r);\n }\n\n async verifyBank(id: string, request: VerifyBankRequest): Promise {\n await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/verify-bank\",\n request,\n true,\n false,\n );\n }\n\n async reinstate(id: string): Promise {\n return this.apiService.send(\"POST\", \"/organizations/\" + id + \"/reinstate\", null, true, false);\n }\n\n async leave(id: string): Promise {\n await this.apiService.send(\"POST\", \"/organizations/\" + id + \"/leave\", null, true, false);\n await this.syncService.fullSync(true);\n }\n\n async delete(id: string, request: SecretVerificationRequest): Promise {\n await this.apiService.send(\"DELETE\", \"/organizations/\" + id, request, true, false);\n await this.syncService.fullSync(true);\n }\n\n deleteUsingToken(\n organizationId: string,\n request: OrganizationVerifyDeleteRecoverRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/delete-recover-token\",\n request,\n false,\n false,\n );\n }\n\n async updateLicense(id: string, data: FormData): Promise {\n await this.apiService.send(\n \"POST\",\n \"/organizations/licenses/self-hosted/\" + id,\n data,\n true,\n false,\n );\n }\n\n async importDirectory(organizationId: string, request: ImportDirectoryRequest): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/import\",\n request,\n true,\n false,\n );\n }\n\n async getOrCreateApiKey(id: string, request: OrganizationApiKeyRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/api-key\",\n request,\n true,\n true,\n );\n return new ApiKeyResponse(r);\n }\n\n async getApiKeyInformation(\n id: string,\n organizationApiKeyType: OrganizationApiKeyType = null,\n ): Promise> {\n const uri =\n organizationApiKeyType === null\n ? \"/organizations/\" + id + \"/api-key-information\"\n : \"/organizations/\" + id + \"/api-key-information/\" + organizationApiKeyType;\n const r = await this.apiService.send(\"GET\", uri, null, true, true);\n return new ListResponse(r, OrganizationApiKeyInformationResponse);\n }\n\n async rotateApiKey(id: string, request: OrganizationApiKeyRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/rotate-api-key\",\n request,\n true,\n true,\n );\n return new ApiKeyResponse(r);\n }\n\n async getTaxInfo(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/tax\", null, true, true);\n return new TaxInfoResponse(r);\n }\n\n async updateTaxInfo(id: string, request: ExpandedTaxInfoUpdateRequest): Promise {\n // Can't broadcast anything because the response doesn't have content\n return this.apiService.send(\"PUT\", \"/organizations/\" + id + \"/tax\", request, true, false);\n }\n\n async getKeys(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/keys\", null, true, true);\n return new OrganizationKeysResponse(r);\n }\n\n async updateKeys(\n id: string,\n request: OrganizationKeysRequest,\n ): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/keys\",\n request,\n true,\n true,\n );\n // Not broadcasting anything because data on this response doesn't correspond to `Organization`\n return new OrganizationKeysResponse(r);\n }\n\n async getSso(id: string): Promise {\n const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/sso\", null, true, true);\n return new OrganizationSsoResponse(r);\n }\n\n async updateSso(id: string, request: OrganizationSsoRequest): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/sso\",\n request,\n true,\n true,\n );\n // Not broadcasting anything because data on this response doesn't correspond to `Organization`\n return new OrganizationSsoResponse(r);\n }\n\n async selfHostedSyncLicense(id: string) {\n await this.apiService.send(\n \"POST\",\n \"/organizations/licenses/self-hosted/\" + id + \"/sync/\",\n null,\n true,\n false,\n );\n }\n\n async subscribeToSecretsManager(\n id: string,\n request: SecretsManagerSubscribeRequest,\n ): Promise {\n const r = await this.apiService.send(\n \"POST\",\n \"/organizations/\" + id + \"/subscribe-secrets-manager\",\n request,\n true,\n true,\n );\n return new ProfileOrganizationResponse(r);\n }\n\n async updateCollectionManagement(\n id: string,\n request: OrganizationCollectionManagementUpdateRequest,\n ): Promise {\n const r = await this.apiService.send(\n \"PUT\",\n \"/organizations/\" + id + \"/collection-management\",\n request,\n true,\n true,\n );\n const data = new OrganizationResponse(r);\n await this.syncService.fullSync(true);\n return data;\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { TokenService } from \"../../../auth/abstractions/token.service\";\nimport { UserId } from \"../../../types/guid\";\nimport { ConfigApiServiceAbstraction } from \"../../abstractions/config/config-api.service.abstraction\";\nimport { ServerConfigResponse } from \"../../models/response/server-config.response\";\n\nexport class ConfigApiService implements ConfigApiServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private tokenService: TokenService,\n ) {}\n\n async get(userId: UserId | undefined): Promise {\n // Authentication adds extra context to config responses, if the user has an access token, we want to use it\n // We don't particularly care about ensuring the token is valid and not expired, just that it exists\n const authed: boolean =\n userId == null ? false : (await this.tokenService.getAccessToken(userId)) != null;\n\n const r = await this.apiService.send(\"GET\", \"/config\", null, authed, true);\n return new ServerConfigResponse(r);\n }\n}\n","import {\n HttpTransportType,\n HubConnection,\n HubConnectionBuilder,\n IHubProtocol,\n} from \"@microsoft/signalr\";\nimport { MessagePackHubProtocol } from \"@microsoft/signalr-protocol-msgpack\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthRequestServiceAbstraction } from \"../../../../auth/src/common/abstractions\";\nimport { NotificationType } from \"../../enums\";\nimport {\n AuthRequestPushNotification,\n NotificationResponse,\n} from \"../../models/response/notification.response\";\nimport { EnvironmentService } from \"../../platform/abstractions/environment.service\";\nimport { AnonymousHubService as AnonymousHubServiceAbstraction } from \"../abstractions/anonymous-hub.service\";\n\nexport class AnonymousHubService implements AnonymousHubServiceAbstraction {\n private anonHubConnection: HubConnection;\n private url: string;\n\n constructor(\n private environmentService: EnvironmentService,\n private authRequestService: AuthRequestServiceAbstraction,\n ) {}\n\n async createHubConnection(token: string) {\n this.url = (await firstValueFrom(this.environmentService.environment$)).getNotificationsUrl();\n\n this.anonHubConnection = new HubConnectionBuilder()\n .withUrl(this.url + \"/anonymous-hub?Token=\" + token, {\n skipNegotiation: true,\n transport: HttpTransportType.WebSockets,\n })\n .withHubProtocol(new MessagePackHubProtocol() as IHubProtocol)\n .build();\n\n await this.anonHubConnection.start();\n\n this.anonHubConnection.on(\"AuthRequestResponseRecieved\", (data: any) => {\n this.ProcessNotification(new NotificationResponse(data));\n });\n }\n\n async stopHubConnection() {\n if (this.anonHubConnection) {\n await this.anonHubConnection.stop();\n }\n }\n\n private ProcessNotification(notification: NotificationResponse) {\n switch (notification.type) {\n case NotificationType.AuthRequestResponse:\n this.authRequestService.sendAuthRequestPushNotification(\n notification.payload as AuthRequestPushNotification,\n );\n }\n }\n}\n","import { ErrorResponse } from \"../../models/response/error.response\";\nimport { I18nService } from \"../abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../abstractions/platform-utils.service\";\nimport { ValidationService as ValidationServiceAbstraction } from \"../abstractions/validation.service\";\n\nexport class ValidationService implements ValidationServiceAbstraction {\n constructor(\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n ) {}\n\n showError(data: any): string[] {\n const defaultErrorMessage = this.i18nService.t(\"unexpectedError\");\n let errors: string[] = [];\n\n if (data != null && typeof data === \"string\") {\n errors.push(data);\n } else if (data == null || typeof data !== \"object\") {\n errors.push(defaultErrorMessage);\n } else if (data.validationErrors != null) {\n errors = errors.concat((data as ErrorResponse).getAllMessages());\n } else {\n errors.push(data.message ? data.message : defaultErrorMessage);\n }\n\n if (errors.length === 1) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errors[0]);\n } else if (errors.length > 1) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errors, {\n timeout: 5000 * errors.length,\n });\n }\n\n return errors;\n }\n}\n","import { BehaviorSubject } from \"rxjs\";\n\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../../../platform/abstractions/platform-utils.service\";\nimport { OrgDomainInternalServiceAbstraction } from \"../../abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainResponse } from \"../../abstractions/organization-domain/responses/organization-domain.response\";\n\nexport class OrgDomainService implements OrgDomainInternalServiceAbstraction {\n protected _orgDomains$: BehaviorSubject = new BehaviorSubject([]);\n\n orgDomains$ = this._orgDomains$.asObservable();\n\n constructor(\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n ) {}\n\n get(orgDomainId: string): OrganizationDomainResponse {\n const orgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n return orgDomains.find((orgDomain) => orgDomain.id === orgDomainId);\n }\n\n copyDnsTxt(dnsTxt: string): void {\n this.platformUtilsService.copyToClipboard(dnsTxt);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"valueCopied\", this.i18nService.t(\"dnsTxtRecord\")),\n );\n }\n\n upsert(orgDomains: OrganizationDomainResponse[]): void {\n const existingOrgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n orgDomains.forEach((orgDomain: OrganizationDomainResponse) => {\n // Determine if passed in orgDomain exists in existing array:\n const index = existingOrgDomains.findIndex(\n (existingOrgDomain) => existingOrgDomain.id === orgDomain.id,\n );\n if (index !== -1) {\n existingOrgDomains[index] = orgDomain;\n } else {\n existingOrgDomains.push(orgDomain);\n }\n });\n\n this._orgDomains$.next(existingOrgDomains);\n }\n\n replace(orgDomains: OrganizationDomainResponse[]): void {\n this._orgDomains$.next(orgDomains);\n }\n\n clearCache(): void {\n this._orgDomains$.next([]);\n }\n\n delete(orgDomainIds: string[]): void {\n const existingOrgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n orgDomainIds.forEach((orgDomainId: string) => {\n const index = existingOrgDomains.findIndex(\n (existingOrgDomain) => existingOrgDomain.id === orgDomainId,\n );\n if (index !== -1) {\n existingOrgDomains.splice(index, 1);\n }\n });\n\n this._orgDomains$.next(existingOrgDomains);\n }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { OrgDomainApiServiceAbstraction } from \"../../abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrgDomainInternalServiceAbstraction } from \"../../abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainSsoDetailsResponse } from \"../../abstractions/organization-domain/responses/organization-domain-sso-details.response\";\nimport { OrganizationDomainResponse } from \"../../abstractions/organization-domain/responses/organization-domain.response\";\n\nimport { OrganizationDomainSsoDetailsRequest } from \"./requests/organization-domain-sso-details.request\";\nimport { OrganizationDomainRequest } from \"./requests/organization-domain.request\";\n\nexport class OrgDomainApiService implements OrgDomainApiServiceAbstraction {\n constructor(\n private orgDomainService: OrgDomainInternalServiceAbstraction,\n private apiService: ApiService,\n ) {}\n\n async getAllByOrgId(orgId: string): Promise> {\n const listResponse: ListResponse = await this.apiService.send(\n \"GET\",\n `/organizations/${orgId}/domain`,\n null,\n true,\n true,\n );\n\n const orgDomains = listResponse.data.map(\n (resultOrgDomain: any) => new OrganizationDomainResponse(resultOrgDomain),\n );\n\n this.orgDomainService.replace(orgDomains);\n\n return orgDomains;\n }\n\n async getByOrgIdAndOrgDomainId(\n orgId: string,\n orgDomainId: string,\n ): Promise {\n const result = await this.apiService.send(\n \"GET\",\n `/organizations/${orgId}/domain/${orgDomainId}`,\n null,\n true,\n true,\n );\n\n const response = new OrganizationDomainResponse(result);\n\n this.orgDomainService.upsert([response]);\n\n return response;\n }\n\n async post(\n orgId: string,\n orgDomainReq: OrganizationDomainRequest,\n ): Promise {\n const result = await this.apiService.send(\n \"POST\",\n `/organizations/${orgId}/domain`,\n orgDomainReq,\n true,\n true,\n );\n\n const response = new OrganizationDomainResponse(result);\n\n this.orgDomainService.upsert([response]);\n\n return response;\n }\n\n async verify(orgId: string, orgDomainId: string): Promise {\n const result = await this.apiService.send(\n \"POST\",\n `/organizations/${orgId}/domain/${orgDomainId}/verify`,\n null,\n true,\n true,\n );\n\n const response = new OrganizationDomainResponse(result);\n\n this.orgDomainService.upsert([response]);\n\n return response;\n }\n\n async delete(orgId: string, orgDomainId: string): Promise {\n await this.apiService.send(\n \"DELETE\",\n `/organizations/${orgId}/domain/${orgDomainId}`,\n null,\n true,\n false,\n );\n this.orgDomainService.delete([orgDomainId]);\n }\n\n async getClaimedOrgDomainByEmail(email: string): Promise {\n const result = await this.apiService.send(\n \"POST\",\n `/organizations/domain/sso/details`,\n new OrganizationDomainSsoDetailsRequest(email),\n false, // anonymous\n true,\n );\n const response = new OrganizationDomainSsoDetailsResponse(result);\n\n return response;\n }\n}\n","import { ApiService } from \"../../abstractions/api.service\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { DevicesApiServiceAbstraction } from \"../abstractions/devices-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport { UpdateDevicesTrustRequest } from \"../models/request/update-devices-trust.request\";\nimport { ProtectedDeviceResponse } from \"../models/response/protected-device.response\";\n\nimport { TrustedDeviceKeysRequest } from \"./devices/requests/trusted-device-keys.request\";\n\nexport class DevicesApiServiceImplementation implements DevicesApiServiceAbstraction {\n constructor(private apiService: ApiService) {}\n\n async getKnownDevice(email: string, deviceIdentifier: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/devices/knowndevice\",\n null,\n false,\n true,\n null,\n (headers) => {\n headers.set(\"X-Device-Identifier\", deviceIdentifier);\n headers.set(\"X-Request-Email\", Utils.fromUtf8ToUrlB64(email));\n },\n );\n return r as boolean;\n }\n\n /**\n * Get device by identifier\n * @param deviceIdentifier - client generated id (not device id in DB)\n */\n async getDeviceByIdentifier(deviceIdentifier: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n `/devices/identifier/${deviceIdentifier}`,\n null,\n true,\n true,\n );\n return new DeviceResponse(r);\n }\n\n async getDevices(): Promise> {\n const r = await this.apiService.send(\"GET\", \"/devices\", null, true, true, null);\n return new ListResponse(r, DeviceResponse);\n }\n\n async updateTrustedDeviceKeys(\n deviceIdentifier: string,\n devicePublicKeyEncryptedUserKey: string,\n userKeyEncryptedDevicePublicKey: string,\n deviceKeyEncryptedDevicePrivateKey: string,\n ): Promise {\n const request = new TrustedDeviceKeysRequest(\n devicePublicKeyEncryptedUserKey,\n userKeyEncryptedDevicePublicKey,\n deviceKeyEncryptedDevicePrivateKey,\n );\n\n const result = await this.apiService.send(\n \"PUT\",\n `/devices/${deviceIdentifier}/keys`,\n request,\n true,\n true,\n );\n\n return new DeviceResponse(result);\n }\n\n async updateTrust(\n updateDevicesTrustRequestModel: UpdateDevicesTrustRequest,\n deviceIdentifier: string,\n ): Promise {\n await this.apiService.send(\n \"POST\",\n \"/devices/update-trust\",\n updateDevicesTrustRequestModel,\n true,\n false,\n null,\n (headers) => {\n headers.set(\"Device-Identifier\", deviceIdentifier);\n },\n );\n }\n\n async getDeviceKeys(\n deviceIdentifier: string,\n secretVerificationRequest: SecretVerificationRequest,\n ): Promise {\n const result = await this.apiService.send(\n \"POST\",\n `/devices/${deviceIdentifier}/retrieve-keys`,\n secretVerificationRequest,\n true,\n true,\n );\n return new ProtectedDeviceResponse(result);\n }\n}\n","import { Observable, defer, map } from \"rxjs\";\n\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { DevicesServiceAbstraction } from \"../../abstractions/devices/devices.service.abstraction\";\nimport { DeviceResponse } from \"../../abstractions/devices/responses/device.response\";\nimport { DeviceView } from \"../../abstractions/devices/views/device.view\";\nimport { DevicesApiServiceAbstraction } from \"../../abstractions/devices-api.service.abstraction\";\n\n/**\n * @class DevicesServiceImplementation\n * @implements {DevicesServiceAbstraction}\n * @description Observable based data store service for Devices.\n * note: defer is used to convert the promises to observables and to ensure\n * that observables are created for each subscription\n * (i.e., promsise --> observables are cold until subscribed to)\n */\nexport class DevicesServiceImplementation implements DevicesServiceAbstraction {\n constructor(private devicesApiService: DevicesApiServiceAbstraction) {}\n\n /**\n * @description Gets the list of all devices.\n */\n getDevices$(): Observable> {\n return defer(() => this.devicesApiService.getDevices()).pipe(\n map((deviceResponses: ListResponse) => {\n return deviceResponses.data.map((deviceResponse: DeviceResponse) => {\n return new DeviceView(deviceResponse);\n });\n }),\n );\n }\n\n /**\n * @description Gets the device with the specified identifier.\n */\n getDeviceByIdentifier$(deviceIdentifier: string): Observable {\n return defer(() => this.devicesApiService.getDeviceByIdentifier(deviceIdentifier)).pipe(\n map((deviceResponse: DeviceResponse) => new DeviceView(deviceResponse)),\n );\n }\n\n /**\n * @description Checks if a device is known for a user by user's email and device's identifier.\n */\n isDeviceKnownForUser$(email: string, deviceIdentifier: string): Observable {\n return defer(() => this.devicesApiService.getKnownDevice(email, deviceIdentifier));\n }\n\n /**\n * @description Updates the keys for the specified device.\n */\n\n updateTrustedDeviceKeys$(\n deviceIdentifier: string,\n devicePublicKeyEncryptedUserKey: string,\n userKeyEncryptedDevicePublicKey: string,\n deviceKeyEncryptedDevicePrivateKey: string,\n ): Observable {\n return defer(() =>\n this.devicesApiService.updateTrustedDeviceKeys(\n deviceIdentifier,\n devicePublicKeyEncryptedUserKey,\n userKeyEncryptedDevicePublicKey,\n deviceKeyEncryptedDevicePrivateKey,\n ),\n ).pipe(map((deviceResponse: DeviceResponse) => new DeviceView(deviceResponse)));\n }\n}\n","import { CryptoFunctionService } from \"../../../platform/abstractions/crypto-function.service\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { PrfKey } from \"../../../types/key\";\nimport { WebAuthnLoginPrfCryptoServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-prf-crypto.service.abstraction\";\n\nconst LoginWithPrfSalt = \"passwordless-login\";\n\nexport class WebAuthnLoginPrfCryptoService implements WebAuthnLoginPrfCryptoServiceAbstraction {\n constructor(private cryptoFunctionService: CryptoFunctionService) {}\n\n async getLoginWithPrfSalt(): Promise {\n return await this.cryptoFunctionService.hash(LoginWithPrfSalt, \"sha256\");\n }\n\n async createSymmetricKeyFromPrf(prf: ArrayBuffer): Promise {\n return (await this.stretchKey(new Uint8Array(prf))) as PrfKey;\n }\n\n // TODO: use keyGenerationService.stretchKey\n private async stretchKey(key: Uint8Array): Promise {\n const newKey = new Uint8Array(64);\n const encKey = await this.cryptoFunctionService.hkdfExpand(key, \"enc\", 32, \"sha256\");\n const macKey = await this.cryptoFunctionService.hkdfExpand(key, \"mac\", 32, \"sha256\");\n newKey.set(new Uint8Array(encKey));\n newKey.set(new Uint8Array(macKey), 32);\n return new SymmetricCryptoKey(newKey);\n }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { EnvironmentService } from \"../../../platform/abstractions/environment.service\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-api.service.abstraction\";\n\nimport { CredentialAssertionOptionsResponse } from \"./response/credential-assertion-options.response\";\n\nexport class WebAuthnLoginApiService implements WebAuthnLoginApiServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private environmentService: EnvironmentService,\n ) {}\n\n async getCredentialAssertionOptions(): Promise {\n const env = await firstValueFrom(this.environmentService.environment$);\n const response = await this.apiService.send(\n \"GET\",\n `/accounts/webauthn/assertion-options`,\n null,\n false,\n true,\n env.getIdentityUrl(),\n );\n return new CredentialAssertionOptionsResponse(response);\n }\n}\n","import { LoginStrategyServiceAbstraction, WebAuthnLoginCredentials } from \"@bitwarden/auth/common\";\n\nimport { LogService } from \"../../../platform/abstractions/log.service\";\nimport { PrfKey } from \"../../../types/key\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-api.service.abstraction\";\nimport { WebAuthnLoginPrfCryptoServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-prf-crypto.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"../../models/domain/auth-result\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion.view\";\n\nimport { WebAuthnLoginAssertionResponseRequest } from \"./request/webauthn-login-assertion-response.request\";\n\nexport class WebAuthnLoginService implements WebAuthnLoginServiceAbstraction {\n private navigatorCredentials: CredentialsContainer;\n\n constructor(\n private webAuthnLoginApiService: WebAuthnLoginApiServiceAbstraction,\n private loginStrategyService: LoginStrategyServiceAbstraction,\n private webAuthnLoginPrfCryptoService: WebAuthnLoginPrfCryptoServiceAbstraction,\n private window: Window,\n private logService?: LogService,\n ) {\n this.navigatorCredentials = this.window.navigator.credentials;\n }\n\n async getCredentialAssertionOptions(): Promise {\n const response = await this.webAuthnLoginApiService.getCredentialAssertionOptions();\n return new WebAuthnLoginCredentialAssertionOptionsView(response.options, response.token);\n }\n\n async assertCredential(\n credentialAssertionOptions: WebAuthnLoginCredentialAssertionOptionsView,\n ): Promise {\n const nativeOptions: CredentialRequestOptions = {\n publicKey: credentialAssertionOptions.options,\n };\n // TODO: Remove `any` when typescript typings add support for PRF\n nativeOptions.publicKey.extensions = {\n prf: { eval: { first: await this.webAuthnLoginPrfCryptoService.getLoginWithPrfSalt() } },\n } as any;\n\n try {\n const response = await this.navigatorCredentials.get(nativeOptions);\n if (!(response instanceof PublicKeyCredential)) {\n return undefined;\n }\n // TODO: Remove `any` when typescript typings add support for PRF\n const prfResult = (response.getClientExtensionResults() as any).prf?.results?.first;\n let symmetricPrfKey: PrfKey | undefined;\n if (prfResult != undefined) {\n symmetricPrfKey =\n await this.webAuthnLoginPrfCryptoService.createSymmetricKeyFromPrf(prfResult);\n }\n\n const deviceResponse = new WebAuthnLoginAssertionResponseRequest(response);\n\n // Verify that we aren't going to send PRF information to the server in any case.\n // Note: this will only happen if a dev has done something wrong.\n if (\"prf\" in deviceResponse.extensions) {\n throw new Error(\"PRF information is not allowed to be sent to the server.\");\n }\n\n return new WebAuthnLoginCredentialAssertionView(\n credentialAssertionOptions.token,\n deviceResponse,\n symmetricPrfKey,\n );\n } catch (error) {\n this.logService?.error(error);\n return undefined;\n }\n }\n\n async logIn(assertion: WebAuthnLoginCredentialAssertionView): Promise {\n const credential = new WebAuthnLoginCredentials(\n assertion.token,\n assertion.deviceResponse,\n assertion.prfKey,\n );\n const result = await this.loginStrategyService.logIn(credential);\n return result;\n }\n}\n","import { StorageServiceProvider } from \"../../services/storage-service.provider\";\nimport { GlobalState } from \"../global-state\";\nimport { GlobalStateProvider } from \"../global-state.provider\";\nimport { KeyDefinition } from \"../key-definition\";\n\nimport { DefaultGlobalState } from \"./default-global-state\";\n\nexport class DefaultGlobalStateProvider implements GlobalStateProvider {\n private globalStateCache: Record> = {};\n\n constructor(private storageServiceProvider: StorageServiceProvider) {}\n\n get(keyDefinition: KeyDefinition): GlobalState {\n const [location, storageService] = this.storageServiceProvider.get(\n keyDefinition.stateDefinition.defaultStorageLocation,\n keyDefinition.stateDefinition.storageLocationOverrides,\n );\n const cacheKey = this.buildCacheKey(location, keyDefinition);\n const existingGlobalState = this.globalStateCache[cacheKey];\n if (existingGlobalState != null) {\n // The cast into the actual generic is safe because of rules around key definitions\n // being unique.\n return existingGlobalState as DefaultGlobalState;\n }\n\n const newGlobalState = new DefaultGlobalState(keyDefinition, storageService);\n\n this.globalStateCache[cacheKey] = newGlobalState;\n return newGlobalState;\n }\n\n private buildCacheKey(location: string, keyDefinition: KeyDefinition) {\n return `${location}_${keyDefinition.fullName}`;\n }\n}\n","import { Observable, distinctUntilChanged, map } from \"rxjs\";\n\nimport { AccountService } from \"../../../auth/abstractions/account.service\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserState } from \"../user-state\";\nimport { ActiveUserStateProvider, SingleUserStateProvider } from \"../user-state.provider\";\n\nimport { DefaultActiveUserState } from \"./default-active-user-state\";\n\nexport class DefaultActiveUserStateProvider implements ActiveUserStateProvider {\n activeUserId$: Observable;\n\n constructor(\n private readonly accountService: AccountService,\n private readonly singleUserStateProvider: SingleUserStateProvider,\n ) {\n this.activeUserId$ = this.accountService.activeAccount$.pipe(\n map((account) => account?.id),\n // To avoid going to storage when we don't need to, only get updates when there is a true change.\n distinctUntilChanged((a, b) => (a == null || b == null ? a == b : a === b)), // Treat null and undefined as equal\n );\n }\n\n get(keyDefinition: UserKeyDefinition): ActiveUserState {\n // All other providers cache the creation of their corresponding `State` objects, this instance\n // doesn't need to do that since it calls `SingleUserStateProvider` it will go through their caching\n // layer, because of that, the creation of this instance is quite simple and not worth caching.\n return new DefaultActiveUserState(\n keyDefinition,\n this.activeUserId$,\n this.singleUserStateProvider,\n );\n }\n}\n","import { UserId } from \"../../../types/guid\";\nimport { StorageServiceProvider } from \"../../services/storage-service.provider\";\nimport { StateEventRegistrarService } from \"../state-event-registrar.service\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { SingleUserState } from \"../user-state\";\nimport { SingleUserStateProvider } from \"../user-state.provider\";\n\nimport { DefaultSingleUserState } from \"./default-single-user-state\";\n\nexport class DefaultSingleUserStateProvider implements SingleUserStateProvider {\n private cache: Record> = {};\n\n constructor(\n private readonly storageServiceProvider: StorageServiceProvider,\n private readonly stateEventRegistrarService: StateEventRegistrarService,\n ) {}\n\n get(userId: UserId, keyDefinition: UserKeyDefinition): SingleUserState {\n const [location, storageService] = this.storageServiceProvider.get(\n keyDefinition.stateDefinition.defaultStorageLocation,\n keyDefinition.stateDefinition.storageLocationOverrides,\n );\n const cacheKey = this.buildCacheKey(location, userId, keyDefinition);\n const existingUserState = this.cache[cacheKey];\n if (existingUserState != null) {\n // I have to cast out of the unknown generic but this should be safe if rules\n // around domain token are made\n return existingUserState as SingleUserState;\n }\n\n const newUserState = new DefaultSingleUserState(\n userId,\n keyDefinition,\n storageService,\n this.stateEventRegistrarService,\n );\n this.cache[cacheKey] = newUserState;\n return newUserState;\n }\n\n private buildCacheKey(\n location: string,\n userId: UserId,\n keyDefinition: UserKeyDefinition,\n ) {\n return `${location}_${keyDefinition.fullName}_${userId}`;\n }\n}\n","import { Observable } from \"rxjs\";\n\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\nimport { DerivedStateProvider } from \"../derived-state.provider\";\n\nimport { DefaultDerivedState } from \"./default-derived-state\";\n\nexport class DefaultDerivedStateProvider implements DerivedStateProvider {\n private cache: Record> = {};\n\n constructor() {}\n\n get(\n parentState$: Observable,\n deriveDefinition: DeriveDefinition,\n dependencies: TDeps,\n ): DerivedState {\n const cacheKey = deriveDefinition.buildCacheKey();\n const existingDerivedState = this.cache[cacheKey];\n if (existingDerivedState != null) {\n // I have to cast out of the unknown generic but this should be safe if rules\n // around domain token are made\n return existingDerivedState as DefaultDerivedState;\n }\n\n const newDerivedState = this.buildDerivedState(parentState$, deriveDefinition, dependencies);\n this.cache[cacheKey] = newDerivedState;\n return newDerivedState;\n }\n\n protected buildDerivedState(\n parentState$: Observable,\n deriveDefinition: DeriveDefinition,\n dependencies: TDeps,\n ): DerivedState {\n return new DefaultDerivedState(parentState$, deriveDefinition, dependencies);\n }\n}\n","import { Observable, filter, of, switchMap, take } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\nimport { DerivedStateProvider } from \"../derived-state.provider\";\nimport { GlobalStateProvider } from \"../global-state.provider\";\nimport { StateProvider } from \"../state.provider\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserStateProvider, SingleUserStateProvider } from \"../user-state.provider\";\n\nexport class DefaultStateProvider implements StateProvider {\n activeUserId$: Observable;\n constructor(\n private readonly activeUserStateProvider: ActiveUserStateProvider,\n private readonly singleUserStateProvider: SingleUserStateProvider,\n private readonly globalStateProvider: GlobalStateProvider,\n private readonly derivedStateProvider: DerivedStateProvider,\n ) {\n this.activeUserId$ = this.activeUserStateProvider.activeUserId$;\n }\n\n getUserState$(userKeyDefinition: UserKeyDefinition, userId?: UserId): Observable {\n if (userId) {\n return this.getUser(userId, userKeyDefinition).state$;\n } else {\n return this.activeUserId$.pipe(\n filter((userId) => userId != null), // Filter out null-ish user ids since we can't get state for a null user id\n take(1),\n switchMap((userId) => this.getUser(userId, userKeyDefinition).state$),\n );\n }\n }\n\n getUserStateOrDefault$(\n userKeyDefinition: UserKeyDefinition,\n config: { userId: UserId | undefined; defaultValue?: T },\n ): Observable {\n const { userId, defaultValue = null } = config;\n if (userId) {\n return this.getUser(userId, userKeyDefinition).state$;\n } else {\n return this.activeUserId$.pipe(\n take(1),\n switchMap((userId) =>\n userId != null ? this.getUser(userId, userKeyDefinition).state$ : of(defaultValue),\n ),\n );\n }\n }\n\n async setUserState(\n userKeyDefinition: UserKeyDefinition,\n value: T,\n userId?: UserId,\n ): Promise<[UserId, T]> {\n if (userId) {\n return [userId, await this.getUser(userId, userKeyDefinition).update(() => value)];\n } else {\n return await this.getActive(userKeyDefinition).update(() => value);\n }\n }\n\n getActive: InstanceType[\"get\"] =\n this.activeUserStateProvider.get.bind(this.activeUserStateProvider);\n getUser: InstanceType[\"get\"] =\n this.singleUserStateProvider.get.bind(this.singleUserStateProvider);\n getGlobal: InstanceType[\"get\"] = this.globalStateProvider.get.bind(\n this.globalStateProvider,\n );\n getDerived: (\n parentState$: Observable,\n deriveDefinition: DeriveDefinition,\n dependencies: TDeps,\n ) => DerivedState = this.derivedStateProvider.get.bind(this.derivedStateProvider);\n}\n","import { ApiService } from \"../../abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction as OrganizationApiService } from \"../../admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationCreateRequest } from \"../../admin-console/models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../admin-console/models/request/organization-keys.request\";\nimport { OrganizationResponse } from \"../../admin-console/models/response/organization.response\";\nimport { CryptoService } from \"../../platform/abstractions/crypto.service\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { OrgKey } from \"../../types/key\";\nimport { SyncService } from \"../../vault/abstractions/sync/sync.service.abstraction\";\nimport {\n OrganizationBillingServiceAbstraction,\n OrganizationInformation,\n PaymentInformation,\n PlanInformation,\n SubscriptionInformation,\n} from \"../abstractions/organization-billing.service\";\nimport { PlanType } from \"../enums\";\n\ninterface OrganizationKeys {\n encryptedKey: EncString;\n publicKey: string;\n encryptedPrivateKey: EncString;\n encryptedCollectionName: EncString;\n}\n\nexport class OrganizationBillingService implements OrganizationBillingServiceAbstraction {\n constructor(\n private apiService: ApiService,\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n private i18nService: I18nService,\n private organizationApiService: OrganizationApiService,\n private syncService: SyncService,\n ) {}\n\n async purchaseSubscription(subscription: SubscriptionInformation): Promise {\n const request = new OrganizationCreateRequest();\n\n const organizationKeys = await this.makeOrganizationKeys();\n\n this.setOrganizationKeys(request, organizationKeys);\n\n this.setOrganizationInformation(request, subscription.organization);\n\n this.setPlanInformation(request, subscription.plan);\n\n this.setPaymentInformation(request, subscription.payment);\n\n const response = await this.organizationApiService.create(request);\n\n await this.apiService.refreshIdentityToken();\n\n await this.syncService.fullSync(true);\n\n return response;\n }\n\n async startFree(subscription: SubscriptionInformation): Promise {\n const request = new OrganizationCreateRequest();\n\n const organizationKeys = await this.makeOrganizationKeys();\n\n this.setOrganizationKeys(request, organizationKeys);\n\n this.setOrganizationInformation(request, subscription.organization);\n\n this.setPlanInformation(request, subscription.plan);\n\n const response = await this.organizationApiService.create(request);\n\n await this.apiService.refreshIdentityToken();\n\n await this.syncService.fullSync(true);\n\n return response;\n }\n\n private async makeOrganizationKeys(): Promise {\n const [encryptedKey, key] = await this.cryptoService.makeOrgKey();\n const [publicKey, encryptedPrivateKey] = await this.cryptoService.makeKeyPair(key);\n const encryptedCollectionName = await this.encryptService.encrypt(\n this.i18nService.t(\"defaultCollection\"),\n key,\n );\n return {\n encryptedKey,\n publicKey,\n encryptedPrivateKey,\n encryptedCollectionName,\n };\n }\n\n private prohibitsAdditionalSeats(planType: PlanType) {\n switch (planType) {\n case PlanType.Free:\n case PlanType.FamiliesAnnually:\n case PlanType.FamiliesAnnually2019:\n case PlanType.TeamsStarter2023:\n case PlanType.TeamsStarter:\n return true;\n default:\n return false;\n }\n }\n\n private setOrganizationInformation(\n request: OrganizationCreateRequest,\n information: OrganizationInformation,\n ): void {\n request.name = information.name;\n request.businessName = information.businessName;\n request.billingEmail = information.billingEmail;\n request.initiationPath = information.initiationPath;\n }\n\n private setOrganizationKeys(request: OrganizationCreateRequest, keys: OrganizationKeys): void {\n request.key = keys.encryptedKey.encryptedString;\n request.keys = new OrganizationKeysRequest(\n keys.publicKey,\n keys.encryptedPrivateKey.encryptedString,\n );\n request.collectionName = keys.encryptedCollectionName.encryptedString;\n }\n\n private setPaymentInformation(\n request: OrganizationCreateRequest,\n information: PaymentInformation,\n ) {\n const [paymentToken, paymentMethodType] = information.paymentMethod;\n request.paymentToken = paymentToken;\n request.paymentMethodType = paymentMethodType;\n\n const billingInformation = information.billing;\n request.billingAddressPostalCode = billingInformation.postalCode;\n request.billingAddressCountry = billingInformation.country;\n\n if (billingInformation.taxId) {\n request.taxIdNumber = billingInformation.taxId;\n request.billingAddressLine1 = billingInformation.addressLine1;\n request.billingAddressLine2 = billingInformation.addressLine2;\n request.billingAddressCity = billingInformation.city;\n request.billingAddressState = billingInformation.state;\n }\n }\n\n private setPlanInformation(\n request: OrganizationCreateRequest,\n information: PlanInformation,\n ): void {\n request.planType = information.type;\n\n if (this.prohibitsAdditionalSeats(request.planType)) {\n request.useSecretsManager = information.subscribeToSecretsManager;\n request.isFromSecretsManagerTrial = information.isFromSecretsManagerTrial;\n return;\n }\n\n request.additionalSeats = information.passwordManagerSeats;\n\n if (information.subscribeToSecretsManager) {\n request.useSecretsManager = true;\n request.isFromSecretsManagerTrial = information.isFromSecretsManagerTrial;\n request.additionalSmSeats = information.secretsManagerSeats;\n request.additionalServiceAccounts = information.secretsManagerServiceAccounts;\n }\n\n if (information.storage) {\n request.additionalStorageGb = information.storage;\n }\n }\n}\n","import { Observable } from \"rxjs\";\n/**\n * Service for managing vault settings.\n */\nexport abstract class VaultSettingsService {\n /**\n * An observable monitoring the state of the enable passkeys setting.\n * The observable updates when the setting changes.\n */\n enablePasskeys$: Observable;\n /**\n * An observable monitoring the state of the show cards on the current tab.\n */\n showCardsCurrentTab$: Observable;\n /**\n * An observable monitoring the state of the show identities on the current tab.\n */\n showIdentitiesCurrentTab$: Observable;\n /**\n\n /**\n * Saves the enable passkeys setting to disk.\n * @param value The new value for the passkeys setting.\n */\n setEnablePasskeys: (value: boolean) => Promise;\n /**\n * Saves the show cards on tab page setting to disk.\n * @param value The new value for the show cards on tab page setting.\n */\n setShowCardsCurrentTab: (value: boolean) => Promise;\n /**\n * Saves the show identities on tab page setting to disk.\n * @param value The new value for the show identities on tab page setting.\n */\n setShowIdentitiesCurrentTab: (value: boolean) => Promise;\n}\n","import { Observable, map } from \"rxjs\";\n\nimport { ActiveUserState, GlobalState, StateProvider } from \"../../../platform/state\";\nimport { VaultSettingsService as VaultSettingsServiceAbstraction } from \"../../abstractions/vault-settings/vault-settings.service\";\nimport {\n SHOW_CARDS_CURRENT_TAB,\n SHOW_IDENTITIES_CURRENT_TAB,\n USER_ENABLE_PASSKEYS,\n} from \"../key-state/vault-settings.state\";\n\n/**\n * {@link VaultSettingsServiceAbstraction}\n */\nexport class VaultSettingsService implements VaultSettingsServiceAbstraction {\n private enablePasskeysState: GlobalState =\n this.stateProvider.getGlobal(USER_ENABLE_PASSKEYS);\n /**\n * {@link VaultSettingsServiceAbstraction.enablePasskeys$}\n */\n readonly enablePasskeys$: Observable = this.enablePasskeysState.state$.pipe(\n map((x) => x ?? true),\n );\n\n private showCardsCurrentTabState: ActiveUserState =\n this.stateProvider.getActive(SHOW_CARDS_CURRENT_TAB);\n /**\n * {@link VaultSettingsServiceAbstraction.showCardsCurrentTab$}\n */\n readonly showCardsCurrentTab$: Observable = this.showCardsCurrentTabState.state$.pipe(\n map((x) => x ?? true),\n );\n\n private showIdentitiesCurrentTabState: ActiveUserState = this.stateProvider.getActive(\n SHOW_IDENTITIES_CURRENT_TAB,\n );\n /**\n * {@link VaultSettingsServiceAbstraction.showIdentitiesCurrentTab$}\n */\n readonly showIdentitiesCurrentTab$: Observable =\n this.showIdentitiesCurrentTabState.state$.pipe(map((x) => x ?? true));\n\n constructor(private stateProvider: StateProvider) {}\n\n /**\n * {@link VaultSettingsServiceAbstraction.setShowCardsCurrentTab}\n */\n async setShowCardsCurrentTab(value: boolean): Promise {\n await this.showCardsCurrentTabState.update(() => value);\n }\n\n /**\n * {@link VaultSettingsServiceAbstraction.setDontShowIdentitiesCurrentTab}\n */\n async setShowIdentitiesCurrentTab(value: boolean): Promise {\n await this.showIdentitiesCurrentTabState.update(() => value);\n }\n\n /**\n * {@link VaultSettingsServiceAbstraction.setEnablePasskeys}\n */\n async setEnablePasskeys(value: boolean): Promise {\n await this.enablePasskeysState.update(() => value);\n }\n}\n","import { InvoicesResponse } from \"@bitwarden/common/billing/models/response/invoices.response\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { BillingApiServiceAbstraction } from \"../../billing/abstractions\";\nimport { PaymentMethodType } from \"../../billing/enums\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../billing/models/request/expanded-tax-info-update.request\";\nimport { SubscriptionCancellationRequest } from \"../../billing/models/request/subscription-cancellation.request\";\nimport { TokenizedPaymentMethodRequest } from \"../../billing/models/request/tokenized-payment-method.request\";\nimport { VerifyBankAccountRequest } from \"../../billing/models/request/verify-bank-account.request\";\nimport { OrganizationBillingMetadataResponse } from \"../../billing/models/response/organization-billing-metadata.response\";\nimport { OrganizationBillingStatusResponse } from \"../../billing/models/response/organization-billing-status.response\";\nimport { OrganizationSubscriptionResponse } from \"../../billing/models/response/organization-subscription.response\";\nimport { PaymentInformationResponse } from \"../../billing/models/response/payment-information.response\";\nimport { PlanResponse } from \"../../billing/models/response/plan.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { CreateClientOrganizationRequest } from \"../models/request/create-client-organization.request\";\nimport { UpdateClientOrganizationRequest } from \"../models/request/update-client-organization.request\";\nimport { ProviderSubscriptionResponse } from \"../models/response/provider-subscription-response\";\n\nexport class BillingApiService implements BillingApiServiceAbstraction {\n constructor(private apiService: ApiService) {}\n\n cancelOrganizationSubscription(\n organizationId: string,\n request: SubscriptionCancellationRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/organizations/\" + organizationId + \"/cancel\",\n request,\n true,\n false,\n );\n }\n\n cancelPremiumUserSubscription(request: SubscriptionCancellationRequest): Promise {\n return this.apiService.send(\"POST\", \"/accounts/cancel\", request, true, false);\n }\n\n createClientOrganization(\n providerId: string,\n request: CreateClientOrganizationRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/providers/\" + providerId + \"/clients\",\n request,\n true,\n false,\n );\n }\n\n async createSetupIntent(type: PaymentMethodType) {\n const getPath = () => {\n switch (type) {\n case PaymentMethodType.BankAccount: {\n return \"/setup-intent/bank-account\";\n }\n case PaymentMethodType.Card: {\n return \"/setup-intent/card\";\n }\n }\n };\n const response = await this.apiService.send(\"POST\", getPath(), null, true, true);\n return response as string;\n }\n\n async getBillingStatus(id: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + id + \"/billing-status\",\n null,\n true,\n true,\n );\n return new OrganizationBillingStatusResponse(r);\n }\n\n async getOrganizationBillingMetadata(\n organizationId: string,\n ): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/billing/metadata\",\n null,\n true,\n true,\n );\n\n return new OrganizationBillingMetadataResponse(r);\n }\n\n async getOrganizationSubscription(\n organizationId: string,\n ): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/organizations/\" + organizationId + \"/subscription\",\n null,\n true,\n true,\n );\n return new OrganizationSubscriptionResponse(r);\n }\n\n async getPlans(): Promise> {\n const r = await this.apiService.send(\"GET\", \"/plans\", null, false, true);\n return new ListResponse(r, PlanResponse);\n }\n\n async getProviderClientInvoiceReport(providerId: string, invoiceId: string): Promise {\n const response = await this.apiService.send(\n \"GET\",\n \"/providers/\" + providerId + \"/billing/invoices/\" + invoiceId,\n null,\n true,\n true,\n );\n return response as string;\n }\n\n async getProviderInvoices(providerId: string): Promise {\n const response = await this.apiService.send(\n \"GET\",\n \"/providers/\" + providerId + \"/billing/invoices\",\n null,\n true,\n true,\n );\n return new InvoicesResponse(response);\n }\n\n async getProviderPaymentInformation(providerId: string): Promise {\n const response = await this.apiService.send(\n \"GET\",\n \"/providers/\" + providerId + \"/billing/payment-information\",\n null,\n true,\n true,\n );\n return new PaymentInformationResponse(response);\n }\n\n async getProviderSubscription(providerId: string): Promise {\n const r = await this.apiService.send(\n \"GET\",\n \"/providers/\" + providerId + \"/billing/subscription\",\n null,\n true,\n true,\n );\n return new ProviderSubscriptionResponse(r);\n }\n\n async updateClientOrganization(\n providerId: string,\n organizationId: string,\n request: UpdateClientOrganizationRequest,\n ): Promise {\n return await this.apiService.send(\n \"PUT\",\n \"/providers/\" + providerId + \"/clients/\" + organizationId,\n request,\n true,\n false,\n );\n }\n\n async updateProviderPaymentMethod(\n providerId: string,\n request: TokenizedPaymentMethodRequest,\n ): Promise {\n return await this.apiService.send(\n \"PUT\",\n \"/providers/\" + providerId + \"/billing/payment-method\",\n request,\n true,\n false,\n );\n }\n\n async updateProviderTaxInformation(providerId: string, request: ExpandedTaxInfoUpdateRequest) {\n return await this.apiService.send(\n \"PUT\",\n \"/providers/\" + providerId + \"/billing/tax-information\",\n request,\n true,\n false,\n );\n }\n\n async verifyProviderBankAccount(providerId: string, request: VerifyBankAccountRequest) {\n return await this.apiService.send(\n \"POST\",\n \"/providers/\" + providerId + \"/billing/payment-method/verify-bank-account\",\n request,\n true,\n false,\n );\n }\n}\n","import { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { ActiveUserState, StateProvider } from \"../../platform/state\";\nimport { BillingApiServiceAbstraction as BillingApiService } from \"../abstractions/billilng-api.service.abstraction\";\nimport { PaymentMethodWarningsServiceAbstraction } from \"../abstractions/payment-method-warnings-service.abstraction\";\nimport { PAYMENT_METHOD_WARNINGS_KEY } from \"../models/billing-keys.state\";\nimport { PaymentMethodWarning } from \"../models/domain/payment-method-warning\";\n\nexport class PaymentMethodWarningsService implements PaymentMethodWarningsServiceAbstraction {\n private paymentMethodWarningsState: ActiveUserState>;\n paymentMethodWarnings$: Observable>;\n\n constructor(\n private billingApiService: BillingApiService,\n private stateProvider: StateProvider,\n ) {\n this.paymentMethodWarningsState = this.stateProvider.getActive(PAYMENT_METHOD_WARNINGS_KEY);\n this.paymentMethodWarnings$ = this.paymentMethodWarningsState.state$;\n }\n\n async acknowledge(organizationId: string): Promise {\n await this.paymentMethodWarningsState.update((state) => {\n const current = state[organizationId];\n state[organizationId] = {\n ...current,\n acknowledged: true,\n };\n return state;\n });\n }\n\n async removeSubscriptionRisk(organizationId: string): Promise {\n await this.paymentMethodWarningsState.update((state) => {\n const current = state[organizationId];\n state[organizationId] = {\n ...current,\n risksSubscriptionFailure: false,\n };\n return state;\n });\n }\n\n async clear(): Promise {\n await this.paymentMethodWarningsState.update(() => ({}));\n }\n\n async update(organizationId: string): Promise {\n const warning = await firstValueFrom(\n this.paymentMethodWarningsState.state$.pipe(\n map((state) => (!state ? null : state[organizationId])),\n ),\n );\n if (!warning || warning.savedAt < this.getOneWeekAgo()) {\n const { organizationName, risksSubscriptionFailure } =\n await this.billingApiService.getBillingStatus(organizationId);\n await this.paymentMethodWarningsState.update((state) => {\n state ??= {};\n state[organizationId] = {\n organizationName,\n risksSubscriptionFailure,\n acknowledged: false,\n savedAt: new Date(),\n };\n return state;\n });\n }\n }\n\n private getOneWeekAgo = (): Date => {\n const date = new Date();\n date.setDate(date.getDate() - 7);\n return date;\n };\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ProviderApiServiceAbstraction } from \"../../abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderSetupRequest } from \"../../models/request/provider/provider-setup.request\";\nimport { ProviderUpdateRequest } from \"../../models/request/provider/provider-update.request\";\nimport { ProviderVerifyRecoverDeleteRequest } from \"../../models/request/provider/provider-verify-recover-delete.request\";\nimport { ProviderResponse } from \"../../models/response/provider/provider.response\";\n\nexport class ProviderApiService implements ProviderApiServiceAbstraction {\n constructor(private apiService: ApiService) {}\n async postProviderSetup(id: string, request: ProviderSetupRequest) {\n const r = await this.apiService.send(\n \"POST\",\n \"/providers/\" + id + \"/setup\",\n request,\n true,\n true,\n );\n return new ProviderResponse(r);\n }\n\n async getProvider(id: string) {\n const r = await this.apiService.send(\"GET\", \"/providers/\" + id, null, true, true);\n return new ProviderResponse(r);\n }\n\n async putProvider(id: string, request: ProviderUpdateRequest) {\n const r = await this.apiService.send(\"PUT\", \"/providers/\" + id, request, true, true);\n return new ProviderResponse(r);\n }\n\n providerRecoverDeleteToken(\n providerId: string,\n request: ProviderVerifyRecoverDeleteRequest,\n ): Promise {\n return this.apiService.send(\n \"POST\",\n \"/providers/\" + providerId + \"/delete-recover-token\",\n request,\n false,\n false,\n );\n }\n\n async deleteProvider(id: string): Promise {\n await this.apiService.send(\"DELETE\", \"/providers/\" + id, null, true, false);\n }\n}\n","import { LogService } from \"../../../platform/abstractions/log.service\";\nimport { BraintreeServiceAbstraction } from \"../../abstractions\";\n\nexport class BraintreeService implements BraintreeServiceAbstraction {\n private braintree: any;\n private containerId: string;\n\n constructor(private logService: LogService) {}\n\n createDropin() {\n window.setTimeout(() => {\n const window$ = window as any;\n window$.braintree.dropin.create(\n {\n authorization: process.env.BRAINTREE_KEY,\n container: this.containerId,\n paymentOptionPriority: [\"paypal\"],\n paypal: {\n flow: \"vault\",\n buttonStyle: {\n label: \"pay\",\n size: \"medium\",\n shape: \"pill\",\n color: \"blue\",\n tagline: \"false\",\n },\n },\n },\n (error: any, instance: any) => {\n if (error != null) {\n this.logService.error(error);\n return;\n }\n this.braintree = instance;\n },\n );\n }, 250);\n }\n\n loadBraintree(containerId: string, autoCreateDropin: boolean) {\n const script = window.document.createElement(\"script\");\n script.id = \"dropin-script\";\n script.src = `scripts/dropin.js?cache=${process.env.CACHE_TAG}`;\n script.async = true;\n if (autoCreateDropin) {\n script.onload = () => this.createDropin();\n }\n this.containerId = containerId;\n window.document.head.appendChild(script);\n }\n\n requestPaymentMethod(): Promise {\n return new Promise((resolve, reject) => {\n this.braintree.requestPaymentMethod((error: any, payload: any) => {\n if (error) {\n this.logService.error(error);\n reject(error.message);\n } else {\n resolve(payload.nonce as string);\n }\n });\n });\n }\n\n unloadBraintree() {\n const script = window.document.getElementById(\"dropin-script\");\n window.document.head.removeChild(script);\n window.setTimeout(() => {\n const scripts = Array.from(window.document.head.querySelectorAll(\"script\")).filter(\n (script) => script.src != null && script.src.indexOf(\"paypal\") > -1,\n );\n scripts.forEach((script) => {\n try {\n window.document.head.removeChild(script);\n } catch (error) {\n this.logService.error(error);\n }\n });\n const stylesheet = window.document.head.querySelector(\"#braintree-dropin-stylesheet\");\n if (stylesheet != null) {\n try {\n window.document.head.removeChild(stylesheet);\n } catch (error) {\n this.logService.error(error);\n }\n }\n }, 500);\n }\n}\n","import { LogService } from \"../../../platform/abstractions/log.service\";\nimport { StripeServiceAbstraction } from \"../../abstractions\";\nimport { BankAccount } from \"../../models/domain\";\n\nexport class StripeService implements StripeServiceAbstraction {\n private stripe: any;\n private elements: any;\n private elementIds: {\n cardNumber: string;\n cardExpiry: string;\n cardCvc: string;\n };\n\n constructor(private logService: LogService) {}\n\n loadStripe(\n elementIds: { cardNumber: string; cardExpiry: string; cardCvc: string },\n autoMount: boolean,\n ) {\n this.elementIds = elementIds;\n const script = window.document.createElement(\"script\");\n script.id = \"stripe-script\";\n script.src = \"https://js.stripe.com/v3?advancedFraudSignals=false\";\n script.onload = () => {\n const window$ = window as any;\n this.stripe = window$.Stripe(process.env.STRIPE_KEY);\n this.elements = this.stripe.elements();\n const options = this.getElementOptions();\n setTimeout(() => {\n this.elements.create(\"cardNumber\", options);\n this.elements.create(\"cardExpiry\", options);\n this.elements.create(\"cardCvc\", options);\n if (autoMount) {\n this.mountElements();\n }\n }, 50);\n };\n\n window.document.head.appendChild(script);\n }\n\n mountElements() {\n setTimeout(() => {\n const cardNumber = this.elements.getElement(\"cardNumber\");\n const cardExpiry = this.elements.getElement(\"cardExpiry\");\n const cardCvc = this.elements.getElement(\"cardCvc\");\n cardNumber.mount(this.elementIds.cardNumber);\n cardExpiry.mount(this.elementIds.cardExpiry);\n cardCvc.mount(this.elementIds.cardCvc);\n });\n }\n\n async setupBankAccountPaymentMethod(\n clientSecret: string,\n { accountHolderName, routingNumber, accountNumber, accountHolderType }: BankAccount,\n ): Promise {\n const result = await this.stripe.confirmUsBankAccountSetup(clientSecret, {\n payment_method: {\n us_bank_account: {\n routing_number: routingNumber,\n account_number: accountNumber,\n account_holder_type: accountHolderType,\n },\n billing_details: {\n name: accountHolderName,\n },\n },\n });\n if (result.error || (result.setupIntent && result.setupIntent.status !== \"requires_action\")) {\n this.logService.error(result.error);\n throw result.error;\n }\n return result.setupIntent.payment_method as string;\n }\n\n async setupCardPaymentMethod(clientSecret: string): Promise {\n const cardNumber = this.elements.getElement(\"cardNumber\");\n const result = await this.stripe.confirmCardSetup(clientSecret, {\n payment_method: {\n card: cardNumber,\n },\n });\n if (result.error || (result.setupIntent && result.setupIntent.status !== \"succeeded\")) {\n this.logService.error(result.error);\n throw result.error;\n }\n return result.setupIntent.payment_method as string;\n }\n\n unloadStripe() {\n const script = window.document.getElementById(\"stripe-script\");\n window.document.head.removeChild(script);\n window.setTimeout(() => {\n const iFrames = Array.from(window.document.querySelectorAll(\"iframe\")).filter(\n (element) => element.src != null && element.src.indexOf(\"stripe\") > -1,\n );\n iFrames.forEach((iFrame) => {\n try {\n window.document.body.removeChild(iFrame);\n } catch (error) {\n this.logService.error(error);\n }\n });\n }, 500);\n }\n\n private getElementOptions(): any {\n const options: any = {\n style: {\n base: {\n color: null,\n fontFamily:\n '\"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif, ' +\n '\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"',\n fontSize: \"14px\",\n fontSmoothing: \"antialiased\",\n \"::placeholder\": {\n color: null,\n },\n },\n invalid: {\n color: null,\n },\n },\n classes: {\n focus: \"is-focused\",\n empty: \"is-empty\",\n invalid: \"is-invalid\",\n },\n };\n\n const style = getComputedStyle(document.documentElement);\n options.style.base.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n options.style.base[\"::placeholder\"].color = `rgb(${style.getPropertyValue(\n \"--color-text-muted\",\n )})`;\n options.style.invalid.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n options.style.invalid.borderColor = `rgb(${style.getPropertyValue(\"--color-danger-600\")})`;\n\n return options;\n }\n}\n","import { Subject } from \"rxjs\";\n\nimport { AbstractStorageService, StorageUpdate } from \"../abstractions/storage.service\";\n\nexport class MemoryStorageService extends AbstractStorageService {\n protected store = new Map();\n private updatesSubject = new Subject();\n\n get valuesRequireDeserialization(): boolean {\n return false;\n }\n get updates$() {\n return this.updatesSubject.asObservable();\n }\n\n get(key: string): Promise {\n if (this.store.has(key)) {\n const obj = this.store.get(key);\n return Promise.resolve(obj as T);\n }\n return Promise.resolve(null);\n }\n\n async has(key: string): Promise {\n return (await this.get(key)) != null;\n }\n\n save(key: string, obj: T): Promise {\n if (obj == null) {\n return this.remove(key);\n }\n // TODO: Remove once foreground/background contexts are separated in browser\n // Needed to ensure ownership of all memory by the context running the storage service\n const toStore = structuredClone(obj);\n this.store.set(key, toStore);\n this.updatesSubject.next({ key, updateType: \"save\" });\n return Promise.resolve();\n }\n\n remove(key: string): Promise {\n this.store.delete(key);\n this.updatesSubject.next({ key, updateType: \"remove\" });\n return Promise.resolve();\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport {\n AbstractStorageService,\n StorageUpdate,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { HtmlStorageLocation } from \"@bitwarden/common/platform/enums\";\nimport { StorageOptions } from \"@bitwarden/common/platform/models/domain/storage-options\";\n\n@Injectable()\nexport class HtmlStorageService implements AbstractStorageService {\n private updatesSubject = new Subject();\n\n get defaultOptions(): StorageOptions {\n return { htmlStorageLocation: HtmlStorageLocation.Session };\n }\n\n get valuesRequireDeserialization(): boolean {\n return true;\n }\n updates$;\n\n constructor() {\n this.updates$ = this.updatesSubject.asObservable();\n }\n\n get(key: string, options: StorageOptions = this.defaultOptions): Promise {\n let json: string = null;\n switch (options.htmlStorageLocation) {\n case HtmlStorageLocation.Local:\n json = window.localStorage.getItem(key);\n break;\n case HtmlStorageLocation.Session:\n default:\n json = window.sessionStorage.getItem(key);\n break;\n }\n\n if (json != null) {\n const obj = JSON.parse(json);\n return Promise.resolve(obj as T);\n }\n return Promise.resolve(null);\n }\n\n async has(key: string, options: StorageOptions = this.defaultOptions): Promise {\n return (await this.get(key, options)) != null;\n }\n\n save(key: string, obj: any, options: StorageOptions = this.defaultOptions): Promise {\n if (obj == null) {\n return this.remove(key, options);\n }\n\n if (obj instanceof Set) {\n obj = Array.from(obj);\n }\n\n const json = JSON.stringify(obj);\n switch (options.htmlStorageLocation) {\n case HtmlStorageLocation.Local:\n window.localStorage.setItem(key, json);\n break;\n case HtmlStorageLocation.Session:\n default:\n window.sessionStorage.setItem(key, json);\n break;\n }\n this.updatesSubject.next({ key, updateType: \"save\" });\n return Promise.resolve();\n }\n\n remove(key: string, options: StorageOptions = this.defaultOptions): Promise {\n switch (options.htmlStorageLocation) {\n case HtmlStorageLocation.Local:\n window.localStorage.removeItem(key);\n break;\n case HtmlStorageLocation.Session:\n default:\n window.sessionStorage.removeItem(key);\n break;\n }\n this.updatesSubject.next({ key, updateType: \"remove\" });\n return Promise.resolve();\n }\n}\n","import { TranslationService as TranslationServiceAbstraction } from \"../abstractions/translation.service\";\n\nexport abstract class TranslationService implements TranslationServiceAbstraction {\n // First locale is the default (English)\n supportedTranslationLocales: string[] = [\"en\"];\n defaultLocale = \"en\";\n abstract translationLocale: string;\n collator: Intl.Collator;\n localeNames = new Map([\n [\"af\", \"Afrikaans\"],\n [\"ar\", \"العربية الفصحى\"],\n [\"az\", \"Azərbaycanca\"],\n [\"be\", \"Беларуская\"],\n [\"bg\", \"български\"],\n [\"bn\", \"বাংলা\"],\n [\"bs\", \"bosanski jezik\"],\n [\"ca\", \"català\"],\n [\"cs\", \"čeština\"],\n [\"cy\", \"Cymraeg, y Gymraeg\"],\n [\"da\", \"dansk\"],\n [\"de\", \"Deutsch\"],\n [\"el\", \"Ελληνικά\"],\n [\"en\", \"English\"],\n [\"en-GB\", \"English (British)\"],\n [\"en-IN\", \"English (India)\"],\n [\"eo\", \"Esperanto\"],\n [\"es\", \"español\"],\n [\"et\", \"eesti\"],\n [\"eu\", \"euskara\"],\n [\"fa\", \"فارسی\"],\n [\"fi\", \"suomi\"],\n [\"fil\", \"Wikang Filipino\"],\n [\"fr\", \"français\"],\n [\"gl\", \"galego\"],\n [\"he\", \"עברית\"],\n [\"hi\", \"हिन्दी\"],\n [\"hr\", \"hrvatski\"],\n [\"hu\", \"magyar\"],\n [\"id\", \"Bahasa Indonesia\"],\n [\"it\", \"italiano\"],\n [\"ja\", \"日本語\"],\n [\"ka\", \"ქართული\"],\n [\"km\", \"ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ\"],\n [\"kn\", \"ಕನ್ನಡ\"],\n [\"ko\", \"한국어\"],\n [\"lt\", \"lietuvių kalba\"],\n [\"lv\", \"Latvietis\"],\n [\"me\", \"црногорски\"],\n [\"ml\", \"മലയാളം\"],\n [\"mr\", \"मराठी\"],\n [\"my\", \"ဗမာစကား\"],\n [\"nb\", \"norsk (bokmål)\"],\n [\"ne\", \"नेपाली\"],\n [\"nl\", \"Nederlands\"],\n [\"nn\", \"Norsk Nynorsk\"],\n [\"or\", \"ଓଡ଼ିଆ\"],\n [\"pl\", \"polski\"],\n [\"pt-BR\", \"português do Brasil\"],\n [\"pt-PT\", \"português\"],\n [\"ro\", \"română\"],\n [\"ru\", \"русский\"],\n [\"si\", \"සිංහල\"],\n [\"sk\", \"slovenčina\"],\n [\"sl\", \"Slovenski jezik, Slovenščina\"],\n [\"sr\", \"Српски\"],\n [\"sv\", \"svenska\"],\n [\"te\", \"తెలుగు\"],\n [\"th\", \"ไทย\"],\n [\"tr\", \"Türkçe\"],\n [\"uk\", \"українська\"],\n [\"vi\", \"Tiếng Việt\"],\n [\"zh-CN\", \"中文(中国大陆)\"],\n [\"zh-TW\", \"中文(台灣)\"],\n ]);\n\n protected inited: boolean;\n protected defaultMessages: any = {};\n protected localeMessages: any = {};\n\n constructor(\n protected systemLanguage: string,\n protected localesDirectory: string,\n protected getLocalesJson: (formattedLocale: string) => Promise,\n ) {\n this.systemLanguage = systemLanguage.replace(\"_\", \"-\");\n }\n\n async init(locale?: string) {\n if (this.inited) {\n throw new Error(\"i18n already initialized.\");\n }\n if (this.supportedTranslationLocales == null || this.supportedTranslationLocales.length === 0) {\n throw new Error(\"supportedTranslationLocales not set.\");\n }\n\n this.inited = true;\n this.translationLocale = locale != null ? locale : this.systemLanguage;\n\n try {\n this.collator = new Intl.Collator(this.translationLocale, {\n numeric: true,\n sensitivity: \"base\",\n });\n } catch {\n this.collator = null;\n }\n\n if (this.supportedTranslationLocales.indexOf(this.translationLocale) === -1) {\n this.translationLocale = this.translationLocale.slice(0, 2);\n\n if (this.supportedTranslationLocales.indexOf(this.translationLocale) === -1) {\n this.translationLocale = this.defaultLocale;\n }\n }\n\n if (this.localesDirectory != null) {\n await this.loadMessages(this.translationLocale, this.localeMessages);\n if (this.translationLocale !== this.defaultLocale) {\n await this.loadMessages(this.defaultLocale, this.defaultMessages);\n }\n }\n }\n\n t(id: string, p1?: string, p2?: string, p3?: string): string {\n return this.translate(id, p1, p2, p3);\n }\n\n translate(id: string, p1?: string | number, p2?: string | number, p3?: string | number): string {\n let result: string;\n // eslint-disable-next-line\n if (this.localeMessages.hasOwnProperty(id) && this.localeMessages[id]) {\n result = this.localeMessages[id];\n // eslint-disable-next-line\n } else if (this.defaultMessages.hasOwnProperty(id) && this.defaultMessages[id]) {\n result = this.defaultMessages[id];\n } else {\n result = \"\";\n }\n\n if (result !== \"\") {\n if (p1 != null) {\n result = result.split(\"__$1__\").join(p1.toString());\n }\n if (p2 != null) {\n result = result.split(\"__$2__\").join(p2.toString());\n }\n if (p3 != null) {\n result = result.split(\"__$3__\").join(p3.toString());\n }\n }\n\n return result;\n }\n\n protected async loadMessages(locale: string, messagesObj: any): Promise {\n const formattedLocale = locale.replace(\"-\", \"_\");\n const locales = await this.getLocalesJson(formattedLocale);\n for (const prop in locales) {\n // eslint-disable-next-line\n if (!locales.hasOwnProperty(prop)) {\n continue;\n }\n messagesObj[prop] = locales[prop].message;\n\n if (locales[prop].placeholders) {\n for (const placeProp in locales[prop].placeholders) {\n if (\n !locales[prop].placeholders.hasOwnProperty(placeProp) || // eslint-disable-line\n !locales[prop].placeholders[placeProp].content\n ) {\n continue;\n }\n\n const replaceToken = \"\\\\$\" + placeProp.toUpperCase() + \"\\\\$\";\n let replaceContent = locales[prop].placeholders[placeProp].content;\n if (replaceContent === \"$1\" || replaceContent === \"$2\" || replaceContent === \"$3\") {\n replaceContent = \"__$\" + replaceContent + \"__\";\n }\n messagesObj[prop] = messagesObj[prop].replace(\n new RegExp(replaceToken, \"g\"),\n replaceContent,\n );\n }\n }\n }\n }\n}\n","import { Observable, firstValueFrom, map } from \"rxjs\";\n\nimport { I18nService as I18nServiceAbstraction } from \"../abstractions/i18n.service\";\nimport { GlobalState, GlobalStateProvider, KeyDefinition, TRANSLATION_DISK } from \"../state\";\n\nimport { TranslationService } from \"./translation.service\";\n\nconst LOCALE_KEY = new KeyDefinition(TRANSLATION_DISK, \"locale\", {\n deserializer: (value) => value,\n});\n\nexport class I18nService extends TranslationService implements I18nServiceAbstraction {\n translationLocale: string;\n protected translationLocaleState: GlobalState;\n userSetLocale$: Observable;\n locale$: Observable;\n\n constructor(\n protected systemLanguage: string,\n protected localesDirectory: string,\n protected getLocalesJson: (formattedLocale: string) => Promise,\n globalStateProvider: GlobalStateProvider,\n ) {\n super(systemLanguage, localesDirectory, getLocalesJson);\n this.translationLocaleState = globalStateProvider.get(LOCALE_KEY);\n this.userSetLocale$ = this.translationLocaleState.state$;\n this.locale$ = this.userSetLocale$.pipe(map((locale) => locale ?? this.translationLocale));\n }\n\n async setLocale(locale: string): Promise {\n await this.translationLocaleState.update(() => locale);\n }\n\n override async init() {\n const storedLocale = await firstValueFrom(this.translationLocaleState.state$);\n await super.init(storedLocale);\n }\n}\n","// Please leave 'en' where it is, as it's our fallback language in case no translation can be found\nexport const SupportedTranslationLocales: string[] = [\n \"en\",\n \"af\",\n \"ar\",\n \"az\",\n \"be\",\n \"bg\",\n \"bn\",\n \"bs\",\n \"ca\",\n \"cs\",\n \"cy\",\n \"da\",\n \"de\",\n \"el\",\n \"en-GB\",\n \"en-IN\",\n \"eo\",\n \"es\",\n \"et\",\n \"eu\",\n \"fa\",\n \"fi\",\n \"fil\",\n \"fr\",\n \"gl\",\n \"he\",\n \"hi\",\n \"hr\",\n \"hu\",\n \"id\",\n \"it\",\n \"ja\",\n \"ka\",\n \"km\",\n \"kn\",\n \"ko\",\n \"lv\",\n \"ml\",\n \"mr\",\n \"my\",\n \"nb\",\n \"ne\",\n \"nl\",\n \"nn\",\n \"or\",\n \"pl\",\n \"pt-PT\",\n \"pt-BR\",\n \"ro\",\n \"ru\",\n \"si\",\n \"sk\",\n \"sl\",\n \"sr\",\n \"sv\",\n \"te\",\n \"th\",\n \"tr\",\n \"uk\",\n \"vi\",\n \"zh-CN\",\n \"zh-TW\",\n];\n","import { ReplaySubject } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport {\n Environment,\n Region,\n RegionConfig,\n Urls,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n CloudEnvironment,\n DefaultEnvironmentService,\n SelfHostedEnvironment,\n} from \"@bitwarden/common/platform/services/default-environment.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\n/**\n * Web specific environment service. Ensures that the urls are set from the window location.\n */\nexport class WebEnvironmentService extends DefaultEnvironmentService {\n constructor(\n private win: Window,\n stateProvider: StateProvider,\n accountService: AccountService,\n ) {\n super(stateProvider, accountService);\n\n // The web vault always uses the current location as the base url\n const urls = process.env.URLS as Urls;\n urls.base ??= this.win.location.origin;\n\n // Find the region\n const domain = Utils.getDomain(this.win.location.href);\n const region = this.availableRegions().find((r) => Utils.getDomain(r.urls.webVault) === domain);\n\n let environment: Environment;\n if (region) {\n environment = new WebCloudEnvironment(region, urls);\n } else {\n environment = new SelfHostedEnvironment(urls);\n }\n\n // Override the environment observable with a replay subject\n const subject = new ReplaySubject(1);\n subject.next(environment);\n this.environment$ = subject.asObservable();\n }\n\n // Web cannot set environment\n async setEnvironment(region: Region, urls?: Urls): Promise {\n return;\n }\n}\n\nclass WebCloudEnvironment extends CloudEnvironment {\n constructor(config: RegionConfig, urls: Urls) {\n super(config);\n // We override the urls to avoid CORS issues\n this.urls = urls;\n }\n}\n","import { ClientType } from \"@bitwarden/common/enums\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { MigrationHelper } from \"@bitwarden/common/state-migrations/migration-helper\";\n\nimport { WindowStorageService } from \"./window-storage.service\";\n\nexport class WebMigrationRunner extends MigrationRunner {\n constructor(\n diskStorage: AbstractStorageService,\n logService: LogService,\n migrationBuilderService: MigrationBuilderService,\n private diskLocalStorage: WindowStorageService,\n ) {\n super(diskStorage, logService, migrationBuilderService, ClientType.Web);\n }\n\n override async run(): Promise {\n // Run the default migration against session storage\n await super.run();\n\n // run web disk local specific migrations\n const migrationBuilder = this.migrationBuilderService.build();\n\n let stateVersion = await this.diskLocalStorage.get(\"stateVersion\");\n if (stateVersion == null) {\n // Web has never stored a state version in disk local before\n // TODO: Is this a good number?\n stateVersion = 12;\n }\n\n // Run migrations again specifically for web `localStorage`.\n const helper = new WebMigrationHelper(stateVersion, this.diskLocalStorage, this.logService);\n\n await migrationBuilder.migrate(helper);\n }\n}\n\nclass WebMigrationHelper extends MigrationHelper {\n private readonly diskLocalStorageService: WindowStorageService;\n\n constructor(\n currentVersion: number,\n storageService: WindowStorageService,\n logService: LogService,\n ) {\n super(currentVersion, storageService, logService, \"web-disk-local\", ClientType.Web);\n this.diskLocalStorageService = storageService;\n }\n\n override async getAccounts(): Promise<\n { userId: string; account: ExpectedAccountType }[]\n > {\n // Get all the keys of things stored in `localStorage`\n const keys = this.diskLocalStorageService.getKeys();\n\n const accounts: { userId: string; account: ExpectedAccountType }[] = [];\n\n for (const key of keys) {\n // Is this is likely a userid\n if (!Utils.isGuid(key)) {\n continue;\n }\n\n const accountCandidate = await this.diskLocalStorageService.get(key);\n\n // If there isn't data at that key location, don't bother\n if (accountCandidate == null) {\n continue;\n }\n\n // The legacy account object was always an object, if\n // it is some other primitive, it's like a false positive.\n if (typeof accountCandidate !== \"object\") {\n continue;\n }\n\n accounts.push({ userId: key, account: accountCandidate as ExpectedAccountType });\n }\n\n // TODO: Cache this for future calls?\n return accounts;\n }\n}\n","import { Observable, Subject } from \"rxjs\";\n\nimport {\n AbstractStorageService,\n ObservableStorageService,\n StorageUpdate,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { StorageOptions } from \"@bitwarden/common/platform/models/domain/storage-options\";\n\nexport class WindowStorageService implements AbstractStorageService, ObservableStorageService {\n private readonly updatesSubject = new Subject();\n\n updates$: Observable;\n constructor(private readonly storage: Storage) {\n this.updates$ = this.updatesSubject.asObservable();\n }\n\n get valuesRequireDeserialization(): boolean {\n return true;\n }\n\n get(key: string, options?: StorageOptions): Promise {\n const jsonValue = this.storage.getItem(key);\n if (jsonValue != null) {\n return Promise.resolve(JSON.parse(jsonValue) as T);\n }\n\n return Promise.resolve(null);\n }\n\n async has(key: string, options?: StorageOptions): Promise {\n return (await this.get(key, options)) != null;\n }\n\n save(key: string, obj: T, options?: StorageOptions): Promise {\n if (obj == null) {\n return this.remove(key, options);\n }\n\n if (obj instanceof Set) {\n obj = Array.from(obj) as T;\n }\n\n this.storage.setItem(key, JSON.stringify(obj));\n this.updatesSubject.next({ key, updateType: \"save\" });\n }\n\n remove(key: string, options?: StorageOptions): Promise {\n this.storage.removeItem(key);\n this.updatesSubject.next({ key, updateType: \"remove\" });\n return Promise.resolve();\n }\n\n getKeys(): string[] {\n return Object.keys(this.storage);\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { DeviceType, EventType } from \"@bitwarden/common/enums\";\nimport { EventResponse } from \"@bitwarden/common/models/response/event.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Injectable()\nexport class EventService {\n private policies: Policy[];\n\n constructor(\n private i18nService: I18nService,\n policyService: PolicyService,\n ) {\n policyService.policies$.subscribe((policies) => {\n this.policies = policies;\n });\n }\n\n getDefaultDateFilters() {\n const d = new Date();\n const end = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59);\n d.setDate(d.getDate() - 30);\n const start = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0);\n return [this.toDateTimeLocalString(start), this.toDateTimeLocalString(end)];\n }\n\n formatDateFilters(filterStart: string, filterEnd: string) {\n const start: Date = new Date(filterStart);\n const end: Date = new Date(filterEnd + \":59.999\");\n if (isNaN(start.getTime()) || isNaN(end.getTime()) || end < start) {\n throw new Error(\"Invalid date range.\");\n }\n return [start.toISOString(), end.toISOString()];\n }\n\n async getEventInfo(ev: EventResponse, options = new EventOptions()): Promise {\n const appInfo = this.getAppInfo(ev);\n const { message, humanReadableMessage } = await this.getEventMessage(ev, options);\n return {\n message: message,\n humanReadableMessage: humanReadableMessage,\n appIcon: appInfo[0],\n appName: appInfo[1],\n };\n }\n\n private async getEventMessage(ev: EventResponse, options: EventOptions) {\n let msg = \"\";\n let humanReadableMsg = \"\";\n switch (ev.type) {\n // User\n case EventType.User_LoggedIn:\n msg = humanReadableMsg = this.i18nService.t(\"loggedIn\");\n break;\n case EventType.User_ChangedPassword:\n msg = humanReadableMsg = this.i18nService.t(\"changedPassword\");\n break;\n case EventType.User_Updated2fa:\n msg = humanReadableMsg = this.i18nService.t(\"enabledUpdated2fa\");\n break;\n case EventType.User_Disabled2fa:\n msg = humanReadableMsg = this.i18nService.t(\"disabled2fa\");\n break;\n case EventType.User_Recovered2fa:\n msg = humanReadableMsg = this.i18nService.t(\"recovered2fa\");\n break;\n case EventType.User_FailedLogIn:\n msg = humanReadableMsg = this.i18nService.t(\"failedLogin\");\n break;\n case EventType.User_FailedLogIn2fa:\n msg = humanReadableMsg = this.i18nService.t(\"failedLogin2fa\");\n break;\n case EventType.User_ClientExportedVault:\n msg = humanReadableMsg = this.i18nService.t(\"exportedVault\");\n break;\n case EventType.User_UpdatedTempPassword:\n msg = humanReadableMsg = this.i18nService.t(\"updatedTempPassword\");\n break;\n case EventType.User_MigratedKeyToKeyConnector:\n msg = humanReadableMsg = this.i18nService.t(\"migratedKeyConnector\");\n break;\n case EventType.User_RequestedDeviceApproval:\n msg = humanReadableMsg = this.i18nService.t(\"requestedDeviceApproval\");\n break;\n // Cipher\n case EventType.Cipher_Created:\n msg = this.i18nService.t(\"createdItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"createdItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_Updated:\n msg = this.i18nService.t(\"editedItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"editedItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_Deleted:\n msg = this.i18nService.t(\"permanentlyDeletedItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"permanentlyDeletedItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_SoftDeleted:\n msg = this.i18nService.t(\"deletedItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"deletedItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_Restored:\n msg = this.i18nService.t(\"restoredItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"restoredItemId\", this.formatCipherId(ev, options));\n break;\n case EventType.Cipher_AttachmentCreated:\n msg = this.i18nService.t(\"createdAttachmentForItem\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"createdAttachmentForItem\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_AttachmentDeleted:\n msg = this.i18nService.t(\"deletedAttachmentForItem\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"deletedAttachmentForItem\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_Shared:\n msg = this.i18nService.t(\"movedItemIdToOrg\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"movedItemIdToOrg\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_ClientViewed:\n msg = this.i18nService.t(\"viewedItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"viewedItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_ClientToggledPasswordVisible:\n msg = this.i18nService.t(\"viewedPasswordItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"viewedPasswordItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_ClientToggledHiddenFieldVisible:\n msg = this.i18nService.t(\"viewedHiddenFieldItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"viewedHiddenFieldItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_ClientToggledCardNumberVisible:\n msg = this.i18nService.t(\"viewedCardNumberItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"viewedCardNumberItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_ClientToggledCardCodeVisible:\n msg = this.i18nService.t(\"viewedSecurityCodeItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"viewedSecurityCodeItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_ClientCopiedHiddenField:\n msg = this.i18nService.t(\"copiedHiddenFieldItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"copiedHiddenFieldItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_ClientCopiedPassword:\n msg = this.i18nService.t(\"copiedPasswordItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"copiedPasswordItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_ClientCopiedCardCode:\n msg = this.i18nService.t(\"copiedSecurityCodeItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"copiedSecurityCodeItemId\",\n this.getShortId(ev.cipherId),\n );\n break;\n case EventType.Cipher_ClientAutofilled:\n msg = this.i18nService.t(\"autofilledItemId\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\"autofilledItemId\", this.getShortId(ev.cipherId));\n break;\n case EventType.Cipher_UpdatedCollections:\n msg = this.i18nService.t(\"editedCollectionsForItem\", this.formatCipherId(ev, options));\n humanReadableMsg = this.i18nService.t(\n \"editedCollectionsForItem\",\n this.getShortId(ev.cipherId),\n );\n break;\n // Collection\n case EventType.Collection_Created:\n msg = this.i18nService.t(\"createdCollectionId\", this.formatCollectionId(ev));\n humanReadableMsg = this.i18nService.t(\n \"createdCollectionId\",\n this.getShortId(ev.collectionId),\n );\n break;\n case EventType.Collection_Updated:\n msg = this.i18nService.t(\"editedCollectionId\", this.formatCollectionId(ev));\n humanReadableMsg = this.i18nService.t(\n \"editedCollectionId\",\n this.getShortId(ev.collectionId),\n );\n break;\n case EventType.Collection_Deleted:\n msg = this.i18nService.t(\"deletedCollectionId\", this.formatCollectionId(ev));\n humanReadableMsg = this.i18nService.t(\n \"deletedCollectionId\",\n this.getShortId(ev.collectionId),\n );\n break;\n // Group\n case EventType.Group_Created:\n msg = this.i18nService.t(\"createdGroupId\", this.formatGroupId(ev));\n humanReadableMsg = this.i18nService.t(\"createdGroupId\", this.getShortId(ev.groupId));\n break;\n case EventType.Group_Updated:\n msg = this.i18nService.t(\"editedGroupId\", this.formatGroupId(ev));\n humanReadableMsg = this.i18nService.t(\"editedGroupId\", this.getShortId(ev.groupId));\n break;\n case EventType.Group_Deleted:\n msg = this.i18nService.t(\"deletedGroupId\", this.formatGroupId(ev));\n humanReadableMsg = this.i18nService.t(\"deletedGroupId\", this.getShortId(ev.groupId));\n break;\n // Org user\n case EventType.OrganizationUser_Invited:\n msg = this.i18nService.t(\"invitedUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"invitedUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_Confirmed:\n msg = this.i18nService.t(\"confirmedUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"confirmedUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_Updated:\n msg = this.i18nService.t(\"editedUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"editedUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_Removed:\n msg = this.i18nService.t(\"removedUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"removedUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_UpdatedGroups:\n msg = this.i18nService.t(\"editedGroupsForUser\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"editedGroupsForUser\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_UnlinkedSso:\n msg = this.i18nService.t(\"unlinkedSsoUser\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"unlinkedSsoUser\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_ResetPassword_Enroll:\n msg = this.i18nService.t(\"eventEnrollAccountRecovery\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"eventEnrollAccountRecovery\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_ResetPassword_Withdraw:\n msg = this.i18nService.t(\"eventWithdrawAccountRecovery\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"eventWithdrawAccountRecovery\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_AdminResetPassword:\n msg = this.i18nService.t(\"eventAdminPasswordReset\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"eventAdminPasswordReset\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_ResetSsoLink:\n msg = this.i18nService.t(\"eventResetSsoLink\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"eventResetSsoLink\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_FirstSsoLogin:\n msg = this.i18nService.t(\"firstSsoLogin\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"firstSsoLogin\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_Revoked:\n msg = this.i18nService.t(\"revokedUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"revokedUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_Restored:\n msg = this.i18nService.t(\"restoredUserId\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"restoredUserId\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_ApprovedAuthRequest:\n msg = this.i18nService.t(\"approvedAuthRequest\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"approvedAuthRequest\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n case EventType.OrganizationUser_RejectedAuthRequest:\n msg = this.i18nService.t(\"rejectedAuthRequest\", this.formatOrgUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"rejectedAuthRequest\",\n this.getShortId(ev.organizationUserId),\n );\n break;\n // Org\n case EventType.Organization_Updated:\n msg = humanReadableMsg = this.i18nService.t(\"editedOrgSettings\");\n break;\n case EventType.Organization_PurgedVault:\n msg = humanReadableMsg = this.i18nService.t(\"purgedOrganizationVault\");\n break;\n case EventType.Organization_ClientExportedVault:\n msg = humanReadableMsg = this.i18nService.t(\"exportedOrganizationVault\");\n break;\n case EventType.Organization_VaultAccessed:\n msg = humanReadableMsg = this.i18nService.t(\"vaultAccessedByProvider\");\n break;\n case EventType.Organization_EnabledSso:\n msg = humanReadableMsg = this.i18nService.t(\"enabledSso\");\n break;\n case EventType.Organization_DisabledSso:\n msg = humanReadableMsg = this.i18nService.t(\"disabledSso\");\n break;\n case EventType.Organization_EnabledKeyConnector:\n msg = humanReadableMsg = this.i18nService.t(\"enabledKeyConnector\");\n break;\n case EventType.Organization_DisabledKeyConnector:\n msg = humanReadableMsg = this.i18nService.t(\"disabledKeyConnector\");\n break;\n case EventType.Organization_SponsorshipsSynced:\n msg = humanReadableMsg = this.i18nService.t(\"sponsorshipsSynced\");\n break;\n case EventType.Organization_CollectionManagementUpdated:\n msg = this.i18nService.t(\"modifiedCollectionManagement\", this.formatOrganizationId(ev));\n humanReadableMsg = this.i18nService.t(\n \"modifiedCollectionManagement\",\n this.getShortId(ev.organizationId),\n );\n break;\n\n // Policies\n case EventType.Policy_Updated: {\n msg = this.i18nService.t(\"modifiedPolicyId\", this.formatPolicyId(ev));\n\n const policy = this.policies.filter((p) => p.id === ev.policyId)[0];\n let p1 = this.getShortId(ev.policyId);\n if (policy != null) {\n p1 = PolicyType[policy.type];\n }\n\n humanReadableMsg = this.i18nService.t(\"modifiedPolicyId\", p1);\n break;\n }\n // Provider users:\n case EventType.ProviderUser_Invited:\n msg = this.i18nService.t(\"invitedUserId\", this.formatProviderUserId(ev));\n humanReadableMsg = this.i18nService.t(\"invitedUserId\", this.getShortId(ev.providerUserId));\n break;\n case EventType.ProviderUser_Confirmed:\n msg = this.i18nService.t(\"confirmedUserId\", this.formatProviderUserId(ev));\n humanReadableMsg = this.i18nService.t(\n \"confirmedUserId\",\n this.getShortId(ev.providerUserId),\n );\n break;\n case EventType.ProviderUser_Updated:\n msg = this.i18nService.t(\"editedUserId\", this.formatProviderUserId(ev));\n humanReadableMsg = this.i18nService.t(\"editedUserId\", this.getShortId(ev.providerUserId));\n break;\n case EventType.ProviderUser_Removed:\n msg = this.i18nService.t(\"removedUserId\", this.formatProviderUserId(ev));\n humanReadableMsg = this.i18nService.t(\"removedUserId\", this.getShortId(ev.providerUserId));\n break;\n case EventType.ProviderOrganization_Created:\n msg = this.i18nService.t(\"createdOrganizationId\", this.formatProviderOrganizationId(ev));\n humanReadableMsg = this.i18nService.t(\n \"createdOrganizationId\",\n this.getShortId(ev.providerOrganizationId),\n );\n break;\n case EventType.ProviderOrganization_Added:\n msg = this.i18nService.t(\"addedOrganizationId\", this.formatProviderOrganizationId(ev));\n humanReadableMsg = this.i18nService.t(\n \"addedOrganizationId\",\n this.getShortId(ev.providerOrganizationId),\n );\n break;\n case EventType.ProviderOrganization_Removed:\n msg = this.i18nService.t(\"removedOrganizationId\", this.formatProviderOrganizationId(ev));\n humanReadableMsg = this.i18nService.t(\n \"removedOrganizationId\",\n this.getShortId(ev.providerOrganizationId),\n );\n break;\n case EventType.ProviderOrganization_VaultAccessed:\n msg = this.i18nService.t(\"accessedClientVault\", this.formatProviderOrganizationId(ev));\n humanReadableMsg = this.i18nService.t(\n \"accessedClientVault\",\n this.getShortId(ev.providerOrganizationId),\n );\n break;\n // Org Domain claiming events\n case EventType.OrganizationDomain_Added:\n msg = humanReadableMsg = this.i18nService.t(\"addedDomain\", ev.domainName);\n break;\n case EventType.OrganizationDomain_Removed:\n msg = humanReadableMsg = this.i18nService.t(\"removedDomain\", ev.domainName);\n break;\n case EventType.OrganizationDomain_Verified:\n msg = humanReadableMsg = this.i18nService.t(\"domainVerifiedEvent\", ev.domainName);\n break;\n case EventType.OrganizationDomain_NotVerified:\n msg = humanReadableMsg = this.i18nService.t(\"domainNotVerifiedEvent\", ev.domainName);\n break;\n // Secrets Manager\n case EventType.Secret_Retrieved:\n msg = this.i18nService.t(\"accessedSecret\", this.formatSecretId(ev));\n humanReadableMsg = this.i18nService.t(\"accessedSecret\", this.getShortId(ev.secretId));\n break;\n default:\n break;\n }\n return {\n message: msg === \"\" ? null : msg,\n humanReadableMessage: humanReadableMsg === \"\" ? null : humanReadableMsg,\n };\n }\n\n private getAppInfo(ev: EventResponse): [string, string] {\n if (ev.serviceAccountId) {\n return [\"bwi-globe\", this.i18nService.t(\"sdk\")];\n }\n\n switch (ev.deviceType) {\n case DeviceType.Android:\n return [\"bwi-android\", this.i18nService.t(\"mobile\") + \" - Android\"];\n case DeviceType.iOS:\n return [\"bwi-apple\", this.i18nService.t(\"mobile\") + \" - iOS\"];\n case DeviceType.UWP:\n return [\"bwi-windows\", this.i18nService.t(\"mobile\") + \" - Windows\"];\n case DeviceType.ChromeExtension:\n return [\"bwi-chrome\", this.i18nService.t(\"extension\") + \" - Chrome\"];\n case DeviceType.FirefoxExtension:\n return [\"bwi-firefox\", this.i18nService.t(\"extension\") + \" - Firefox\"];\n case DeviceType.OperaExtension:\n return [\"bwi-opera\", this.i18nService.t(\"extension\") + \" - Opera\"];\n case DeviceType.EdgeExtension:\n return [\"bwi-edge\", this.i18nService.t(\"extension\") + \" - Edge\"];\n case DeviceType.VivaldiExtension:\n return [\"bwi-puzzle\", this.i18nService.t(\"extension\") + \" - Vivaldi\"];\n case DeviceType.SafariExtension:\n return [\"bwi-safari\", this.i18nService.t(\"extension\") + \" - Safari\"];\n case DeviceType.WindowsDesktop:\n return [\"bwi-windows\", this.i18nService.t(\"desktop\") + \" - Windows\"];\n case DeviceType.MacOsDesktop:\n return [\"bwi-apple\", this.i18nService.t(\"desktop\") + \" - macOS\"];\n case DeviceType.LinuxDesktop:\n return [\"bwi-linux\", this.i18nService.t(\"desktop\") + \" - Linux\"];\n case DeviceType.ChromeBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Chrome\"];\n case DeviceType.FirefoxBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Firefox\"];\n case DeviceType.OperaBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Opera\"];\n case DeviceType.SafariBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Safari\"];\n case DeviceType.VivaldiBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Vivaldi\"];\n case DeviceType.EdgeBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Edge\"];\n case DeviceType.IEBrowser:\n return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - IE\"];\n case DeviceType.Server:\n return [\"bwi-server\", this.i18nService.t(\"server\")];\n case DeviceType.WindowsCLI:\n return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - Windows\"];\n case DeviceType.MacOsCLI:\n return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - macOS\"];\n case DeviceType.LinuxCLI:\n return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - Linux\"];\n case DeviceType.UnknownBrowser:\n return [\n \"bwi-globe\",\n this.i18nService.t(\"webVault\") + \" - \" + this.i18nService.t(\"unknown\"),\n ];\n default:\n return [\"bwi-globe\", this.i18nService.t(\"unknown\")];\n }\n }\n\n private formatCipherId(ev: EventResponse, options: EventOptions) {\n const shortId = this.getShortId(ev.cipherId);\n if (ev.organizationId == null || !options.cipherInfo) {\n return \"\" + shortId + \"\";\n }\n const a = this.makeAnchor(shortId);\n a.setAttribute(\n \"href\",\n `#/organizations/${ev.organizationId}/vault?search=${shortId}&viewEvents=${ev.cipherId}&type=all`,\n );\n return a.outerHTML;\n }\n\n private formatGroupId(ev: EventResponse) {\n const shortId = this.getShortId(ev.groupId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\"href\", \"#/organizations/\" + ev.organizationId + \"/groups?search=\" + shortId);\n return a.outerHTML;\n }\n\n private formatCollectionId(ev: EventResponse) {\n const shortId = this.getShortId(ev.collectionId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\n \"href\",\n `#/organizations/${ev.organizationId}/vault?collectionId=${ev.collectionId}`,\n );\n return a.outerHTML;\n }\n\n private formatOrgUserId(ev: EventResponse) {\n const shortId = this.getShortId(ev.organizationUserId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\n \"href\",\n \"#/organizations/\" +\n ev.organizationId +\n \"/members?search=\" +\n shortId +\n \"&viewEvents=\" +\n ev.organizationUserId,\n );\n return a.outerHTML;\n }\n\n private formatProviderUserId(ev: EventResponse) {\n const shortId = this.getShortId(ev.providerUserId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\n \"href\",\n \"#/providers/\" +\n ev.providerId +\n \"/manage/people?search=\" +\n shortId +\n \"&viewEvents=\" +\n ev.providerUserId,\n );\n return a.outerHTML;\n }\n\n private formatProviderOrganizationId(ev: EventResponse) {\n const shortId = this.getShortId(ev.providerOrganizationId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\"href\", \"#/providers/\" + ev.providerId + \"/clients?search=\" + shortId);\n return a.outerHTML;\n }\n\n private formatOrganizationId(ev: EventResponse) {\n const shortId = this.getShortId(ev.organizationId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\"href\", \"#/organizations/\" + ev.organizationId + \"/settings/account\");\n return a.outerHTML;\n }\n\n private formatPolicyId(ev: EventResponse) {\n const shortId = this.getShortId(ev.policyId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\n \"href\",\n \"#/organizations/\" + ev.organizationId + \"/settings/policies?policyId=\" + ev.policyId,\n );\n return a.outerHTML;\n }\n\n formatSecretId(ev: EventResponse): string {\n const shortId = this.getShortId(ev.secretId);\n const a = this.makeAnchor(shortId);\n a.setAttribute(\"href\", \"#/sm/\" + ev.organizationId + \"/secrets?search=\" + shortId);\n return a.outerHTML;\n }\n\n private makeAnchor(shortId: string) {\n const a = document.createElement(\"a\");\n a.title = this.i18nService.t(\"view\");\n a.innerHTML = \"\" + shortId + \"\";\n return a;\n }\n\n private getShortId(id: string) {\n return id?.substring(0, 8);\n }\n\n private toDateTimeLocalString(date: Date) {\n return (\n date.getFullYear() +\n \"-\" +\n this.pad(date.getMonth() + 1) +\n \"-\" +\n this.pad(date.getDate()) +\n \"T\" +\n this.pad(date.getHours()) +\n \":\" +\n this.pad(date.getMinutes())\n );\n }\n\n private pad(num: number) {\n const norm = Math.floor(Math.abs(num));\n return (norm < 10 ? \"0\" : \"\") + norm;\n }\n}\n\nexport class EventInfo {\n message: string;\n humanReadableMessage: string;\n appIcon: string;\n appName: string;\n}\n\nexport class EventOptions {\n cipherInfo = true;\n}\n","import { CryptoService } from \"../abstractions/crypto.service\";\nimport { EncryptService } from \"../abstractions/encrypt.service\";\n\nexport class ContainerService {\n constructor(\n private cryptoService: CryptoService,\n private encryptService: EncryptService,\n ) {}\n\n attachToGlobal(global: any) {\n if (!global.bitwardenContainerService) {\n global.bitwardenContainerService = this;\n }\n }\n\n /**\n * @throws Will throw if CryptoService was not instantiated and provided to the ContainerService constructor\n */\n getCryptoService(): CryptoService {\n if (this.cryptoService == null) {\n throw new Error(\"ContainerService.cryptoService not initialized.\");\n }\n return this.cryptoService;\n }\n\n /**\n * @throws Will throw if EncryptService was not instantiated and provided to the ContainerService constructor\n */\n getEncryptService(): EncryptService {\n if (this.encryptService == null) {\n throw new Error(\"ContainerService.encryptService not initialized.\");\n }\n return this.encryptService;\n }\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport { Inject, Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AbstractThemingService } from \"@bitwarden/angular/platform/services/theming/theming.service.abstraction\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { TwoFactorService as TwoFactorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { CryptoService as CryptoServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { StateService as StateServiceAbstraction } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ContainerService } from \"@bitwarden/common/platform/services/container.service\";\nimport { UserAutoUnlockKeyService } from \"@bitwarden/common/platform/services/user-auto-unlock-key.service\";\nimport { EventUploadService } from \"@bitwarden/common/services/event/event-upload.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/services/vault-timeout/vault-timeout.service\";\n\n@Injectable()\nexport class InitService {\n constructor(\n @Inject(WINDOW) private win: Window,\n private notificationsService: NotificationsServiceAbstraction,\n private vaultTimeoutService: VaultTimeoutService,\n private i18nService: I18nServiceAbstraction,\n private eventUploadService: EventUploadServiceAbstraction,\n private twoFactorService: TwoFactorServiceAbstraction,\n private stateService: StateServiceAbstraction,\n private cryptoService: CryptoServiceAbstraction,\n private themingService: AbstractThemingService,\n private encryptService: EncryptService,\n private userAutoUnlockKeyService: UserAutoUnlockKeyService,\n private accountService: AccountService,\n @Inject(DOCUMENT) private document: Document,\n ) {}\n\n init() {\n return async () => {\n await this.stateService.init();\n\n const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n if (activeAccount) {\n // If there is an active account, we must await the process of setting the user key in memory\n // if the auto user key is set to avoid race conditions of any code trying to access the user key from mem.\n await this.userAutoUnlockKeyService.setUserKeyInMemoryIfAutoUserKeySet(activeAccount.id);\n }\n\n setTimeout(() => this.notificationsService.init(), 3000);\n await this.vaultTimeoutService.init(true);\n await this.i18nService.init();\n (this.eventUploadService as EventUploadService).init(true);\n this.twoFactorService.init();\n const htmlEl = this.win.document.documentElement;\n htmlEl.classList.add(\"locale_\" + this.i18nService.translationLocale);\n this.themingService.applyThemeChangesTo(this.document);\n const containerService = new ContainerService(this.cryptoService, this.encryptService);\n containerService.attachToGlobal(this.win);\n };\n }\n}\n","import { Injectable, Injector } from \"@angular/core\";\nimport * as jq from \"jquery\";\nimport { first } from \"rxjs/operators\";\n\nimport { ModalRef } from \"@bitwarden/angular/components/modal/modal.ref\";\nimport { ModalService as BaseModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Injectable()\nexport class ModalService extends BaseModalService {\n el: any = null;\n modalOpen = false;\n\n constructor(\n injector: Injector,\n private messagingService: MessagingService,\n ) {\n super(injector);\n }\n\n protected setupHandlers(modalRef: ModalRef) {\n modalRef.onCreated.pipe(first()).subscribe(() => {\n const modals = Array.from(document.querySelectorAll(\".modal\"));\n if (modals.length > 0) {\n this.el = jq(modals[0]);\n this.el.modal(\"show\");\n\n this.el.on(\"show.bs.modal\", () => {\n modalRef.show();\n this.messagingService.send(\"modalShow\");\n });\n this.el.on(\"shown.bs.modal\", () => {\n modalRef.shown();\n this.messagingService.send(\"modalShown\");\n if (!Utils.isMobileBrowser) {\n this.el.find(\"*[appAutoFocus]\").focus();\n }\n });\n this.el.on(\"hide.bs.modal\", () => {\n this.messagingService.send(\"modalClose\");\n });\n this.el.on(\"hidden.bs.modal\", () => {\n modalRef.closed();\n this.messagingService.send(\"modalClosed\");\n });\n }\n });\n\n modalRef.onClose.pipe(first()).subscribe(() => {\n if (this.el != null) {\n this.el.modal(\"hide\");\n }\n });\n }\n}\n","import { Inject, Injectable } from \"@angular/core\";\n\nimport {\n MEMORY_STORAGE,\n SECURE_STORAGE,\n STATE_FACTORY,\n} from \"@bitwarden/angular/services/injection-tokens\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { StateFactory } from \"@bitwarden/common/platform/factories/state-factory\";\nimport { Account } from \"@bitwarden/common/platform/models/domain/account\";\nimport { GlobalState } from \"@bitwarden/common/platform/models/domain/global-state\";\nimport { StorageOptions } from \"@bitwarden/common/platform/models/domain/storage-options\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { StateService as BaseStateService } from \"@bitwarden/common/platform/services/state.service\";\n\n@Injectable()\nexport class StateService extends BaseStateService {\n constructor(\n storageService: AbstractStorageService,\n @Inject(SECURE_STORAGE) secureStorageService: AbstractStorageService,\n @Inject(MEMORY_STORAGE) memoryStorageService: AbstractStorageService,\n logService: LogService,\n @Inject(STATE_FACTORY) stateFactory: StateFactory,\n accountService: AccountService,\n environmentService: EnvironmentService,\n tokenService: TokenService,\n migrationRunner: MigrationRunner,\n ) {\n super(\n storageService,\n secureStorageService,\n memoryStorageService,\n logService,\n stateFactory,\n accountService,\n environmentService,\n tokenService,\n migrationRunner,\n );\n }\n\n override async getLastSync(options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultInMemoryOptions());\n return await super.getLastSync(options);\n }\n\n override async setLastSync(value: string, options?: StorageOptions): Promise {\n options = this.reconcileOptions(options, await this.defaultInMemoryOptions());\n return await super.setLastSync(value, options);\n }\n}\n","import { FileDownloadRequest } from \"./file-download.request\";\n\nexport class FileDownloadBuilder {\n get blobOptions(): any {\n const options = this._request.blobOptions ?? {};\n if (options.type == null) {\n options.type = this.fileType;\n }\n return options;\n }\n\n get blob(): Blob {\n if (this.blobOptions != null) {\n return new Blob([this._request.blobData], this.blobOptions);\n } else {\n return new Blob([this._request.blobData]);\n }\n }\n\n get downloadMethod(): \"save\" | \"open\" {\n if (this._request.downloadMethod != null) {\n return this._request.downloadMethod;\n }\n return this.fileType != \"application/pdf\" ? \"save\" : \"open\";\n }\n\n private get fileType() {\n const fileNameLower = this._request.fileName.toLowerCase();\n if (fileNameLower.endsWith(\".pdf\")) {\n return \"application/pdf\";\n } else if (fileNameLower.endsWith(\".xlsx\")) {\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n } else if (fileNameLower.endsWith(\".docx\")) {\n return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n } else if (fileNameLower.endsWith(\".pptx\")) {\n return \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n } else if (fileNameLower.endsWith(\".csv\")) {\n return \"text/csv\";\n } else if (fileNameLower.endsWith(\".png\")) {\n return \"image/png\";\n } else if (fileNameLower.endsWith(\".jpg\") || fileNameLower.endsWith(\".jpeg\")) {\n return \"image/jpeg\";\n } else if (fileNameLower.endsWith(\".gif\")) {\n return \"image/gif\";\n }\n return null;\n }\n\n constructor(private readonly _request: FileDownloadRequest) {}\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { FileDownloadBuilder } from \"@bitwarden/common/platform/abstractions/file-download/file-download.builder\";\nimport { FileDownloadRequest } from \"@bitwarden/common/platform/abstractions/file-download/file-download.request\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Injectable()\nexport class WebFileDownloadService implements FileDownloadService {\n constructor(private platformUtilsService: PlatformUtilsService) {}\n\n download(request: FileDownloadRequest): void {\n const builder = new FileDownloadBuilder(request);\n const a = window.document.createElement(\"a\");\n if (builder.downloadMethod === \"save\") {\n a.download = request.fileName;\n } else if (!this.platformUtilsService.isSafari()) {\n a.rel = \"noreferrer\";\n a.target = \"_blank\";\n }\n a.href = URL.createObjectURL(builder.blob);\n a.style.position = \"fixed\";\n window.document.body.appendChild(a);\n a.click();\n window.document.body.removeChild(a);\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { APP_INITIALIZER, NgModule, Optional, SkipSelf } from \"@angular/core\";\n\nimport { SafeProvider, safeProvider } from \"@bitwarden/angular/platform/utils/safe-provider\";\nimport {\n SECURE_STORAGE,\n LOCALES_DIRECTORY,\n SYSTEM_LANGUAGE,\n MEMORY_STORAGE,\n OBSERVABLE_MEMORY_STORAGE,\n OBSERVABLE_DISK_STORAGE,\n OBSERVABLE_DISK_LOCAL_STORAGE,\n WINDOW,\n SafeInjectionToken,\n DEFAULT_VAULT_TIMEOUT,\n CLIENT_TYPE,\n} from \"@bitwarden/angular/services/injection-tokens\";\nimport { JslibServicesModule } from \"@bitwarden/angular/services/jslib-services.module\";\nimport { ModalService as ModalServiceAbstraction } from \"@bitwarden/angular/services/modal.service\";\nimport { RegistrationFinishService as RegistrationFinishServiceAbstraction } from \"@bitwarden/auth/angular\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountApiService as AccountApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { CryptoService as CryptoServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService as PlatformUtilsServiceAbstraction } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { MemoryStorageService } from \"@bitwarden/common/platform/services/memory-storage.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Implementation for memory storage\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { StorageServiceProvider } from \"@bitwarden/common/platform/services/storage-service.provider\";\n/* eslint-disable import/no-restricted-paths -- Implementation for memory storage */\nimport { GlobalStateProvider, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { MemoryStorageService as MemoryStorageServiceForStateProviders } from \"@bitwarden/common/platform/state/storage/memory-storage.service\";\n/* eslint-enable import/no-restricted-paths -- Implementation for memory storage */\nimport {\n DefaultThemeStateService,\n ThemeStateService,\n} from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"@bitwarden/common/types/vault-timeout.type\";\n\nimport { PolicyListService } from \"../admin-console/core/policy-list.service\";\nimport { WebRegistrationFinishService } from \"../auth\";\nimport { AcceptOrganizationInviteService } from \"../auth/organization-invite/accept-organization.service\";\nimport { HtmlStorageService } from \"../core/html-storage.service\";\nimport { I18nService } from \"../core/i18n.service\";\nimport { WebEnvironmentService } from \"../platform/web-environment.service\";\nimport { WebMigrationRunner } from \"../platform/web-migration-runner\";\nimport { WebStorageServiceProvider } from \"../platform/web-storage-service.provider\";\nimport { WindowStorageService } from \"../platform/window-storage.service\";\nimport { CollectionAdminService } from \"../vault/core/collection-admin.service\";\n\nimport { EventService } from \"./event.service\";\nimport { InitService } from \"./init.service\";\nimport { ModalService } from \"./modal.service\";\nimport { RouterService } from \"./router.service\";\nimport { StateService as WebStateService } from \"./state\";\nimport { WebFileDownloadService } from \"./web-file-download.service\";\nimport { WebPlatformUtilsService } from \"./web-platform-utils.service\";\n\n/**\n * Provider definitions used in the ngModule.\n * Add your provider definition here using the safeProvider function as a wrapper. This will give you type safety.\n * If you need help please ask for it, do NOT change the type of this array.\n */\nconst safeProviders: SafeProvider[] = [\n safeProvider(InitService),\n safeProvider(RouterService),\n safeProvider(EventService),\n safeProvider(PolicyListService),\n safeProvider({\n provide: DEFAULT_VAULT_TIMEOUT,\n deps: [PlatformUtilsServiceAbstraction],\n useFactory: (platformUtilsService: PlatformUtilsServiceAbstraction): VaultTimeout =>\n platformUtilsService.isDev() ? VaultTimeoutStringType.Never : 15,\n }),\n safeProvider({\n provide: APP_INITIALIZER as SafeInjectionToken<() => void>,\n useFactory: (initService: InitService) => initService.init(),\n deps: [InitService],\n multi: true,\n }),\n safeProvider({\n provide: I18nServiceAbstraction,\n useClass: I18nService,\n deps: [SYSTEM_LANGUAGE, LOCALES_DIRECTORY, GlobalStateProvider],\n }),\n safeProvider({ provide: AbstractStorageService, useClass: HtmlStorageService, deps: [] }),\n safeProvider({\n provide: SECURE_STORAGE,\n // TODO: platformUtilsService.isDev has a helper for this, but using that service here results in a circular dependency.\n // We have a tech debt item in the backlog to break up platformUtilsService, but in the meantime simply checking the environment here is less cumbersome.\n useClass: process.env.NODE_ENV === \"development\" ? HtmlStorageService : MemoryStorageService,\n deps: [],\n }),\n safeProvider({\n provide: MEMORY_STORAGE,\n useClass: MemoryStorageService,\n deps: [],\n }),\n safeProvider({\n provide: OBSERVABLE_MEMORY_STORAGE,\n useClass: MemoryStorageServiceForStateProviders,\n deps: [],\n }),\n safeProvider({\n provide: OBSERVABLE_DISK_STORAGE,\n useFactory: () => new WindowStorageService(window.sessionStorage),\n deps: [],\n }),\n safeProvider({\n provide: PlatformUtilsServiceAbstraction,\n useClass: WebPlatformUtilsService,\n useAngularDecorators: true,\n }),\n safeProvider({\n provide: ModalServiceAbstraction,\n useClass: ModalService,\n useAngularDecorators: true,\n }),\n safeProvider(WebStateService),\n safeProvider({\n provide: StateService,\n useExisting: WebStateService,\n }),\n safeProvider({\n provide: FileDownloadService,\n useClass: WebFileDownloadService,\n useAngularDecorators: true,\n }),\n safeProvider(CollectionAdminService),\n safeProvider({\n provide: WindowStorageService,\n useFactory: () => new WindowStorageService(window.localStorage),\n deps: [],\n }),\n safeProvider({\n provide: OBSERVABLE_DISK_LOCAL_STORAGE,\n useExisting: WindowStorageService,\n }),\n safeProvider({\n provide: StorageServiceProvider,\n useClass: WebStorageServiceProvider,\n deps: [OBSERVABLE_DISK_STORAGE, OBSERVABLE_MEMORY_STORAGE, OBSERVABLE_DISK_LOCAL_STORAGE],\n }),\n safeProvider({\n provide: MigrationRunner,\n useClass: WebMigrationRunner,\n deps: [AbstractStorageService, LogService, MigrationBuilderService, WindowStorageService],\n }),\n safeProvider({\n provide: EnvironmentService,\n useClass: WebEnvironmentService,\n deps: [WINDOW, StateProvider, AccountService],\n }),\n safeProvider({\n provide: ThemeStateService,\n useFactory: (globalStateProvider: GlobalStateProvider) =>\n // Web chooses to have Light as the default theme\n new DefaultThemeStateService(globalStateProvider, ThemeType.Light),\n deps: [GlobalStateProvider],\n }),\n safeProvider({\n provide: CLIENT_TYPE,\n useValue: ClientType.Web,\n }),\n safeProvider({\n provide: RegistrationFinishServiceAbstraction,\n useClass: WebRegistrationFinishService,\n deps: [\n CryptoServiceAbstraction,\n AccountApiServiceAbstraction,\n AcceptOrganizationInviteService,\n PolicyApiServiceAbstraction,\n LogService,\n PolicyService,\n ],\n }),\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, JslibServicesModule],\n // Do not register your dependency here! Add it to the typesafeProviders array using the helper function\n providers: safeProviders,\n})\nexport class CoreModule {\n constructor(@Optional() @SkipSelf() parentModule?: CoreModule) {\n if (parentModule) {\n throw new Error(\"CoreModule is already loaded. Import it in the AppModule only\");\n }\n }\n}\n","import { I18nService as BaseI18nService } from \"@bitwarden/common/platform/services/i18n.service\";\nimport { GlobalStateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { SupportedTranslationLocales } from \"../../translation-constants\";\n\nexport class I18nService extends BaseI18nService {\n constructor(\n systemLanguage: string,\n localesDirectory: string,\n globalStateProvider: GlobalStateProvider,\n ) {\n super(\n systemLanguage || \"en-US\",\n localesDirectory,\n async (formattedLocale: string) => {\n const filePath =\n this.localesDirectory +\n \"/\" +\n formattedLocale +\n \"/messages.json?cache=\" +\n process.env.CACHE_TAG;\n const localesResult = await fetch(filePath);\n const locales = await localesResult.json();\n return locales;\n },\n globalStateProvider,\n );\n\n this.supportedTranslationLocales = SupportedTranslationLocales;\n }\n}\n","import { Subject } from \"rxjs\";\n\nimport {\n AbstractStorageService,\n ObservableStorageService,\n StorageUpdate,\n} from \"../../abstractions/storage.service\";\n\nexport class MemoryStorageService\n extends AbstractStorageService\n implements ObservableStorageService\n{\n protected store: Record = {};\n private updatesSubject = new Subject();\n\n get valuesRequireDeserialization(): boolean {\n return true;\n }\n get updates$() {\n return this.updatesSubject.asObservable();\n }\n\n get(key: string): Promise {\n const json = this.store[key];\n if (json) {\n const obj = JSON.parse(json as string);\n return Promise.resolve(obj as T);\n }\n return Promise.resolve(null);\n }\n\n async has(key: string): Promise {\n return (await this.get(key)) != null;\n }\n\n save(key: string, obj: T): Promise {\n if (obj == null) {\n return this.remove(key);\n }\n // TODO: Remove once foreground/background contexts are separated in browser\n // Needed to ensure ownership of all memory by the context running the storage service\n this.store[key] = JSON.stringify(obj);\n this.updatesSubject.next({ key, updateType: \"save\" });\n return Promise.resolve();\n }\n\n remove(key: string): Promise {\n delete this.store[key];\n this.updatesSubject.next({ key, updateType: \"remove\" });\n return Promise.resolve();\n }\n}\n","import {\n AbstractStorageService,\n ObservableStorageService,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport {\n PossibleLocation,\n StorageServiceProvider,\n} from \"@bitwarden/common/platform/services/storage-service.provider\";\nimport {\n ClientLocations,\n // eslint-disable-next-line import/no-restricted-paths\n} from \"@bitwarden/common/platform/state/state-definition\";\n\nexport class WebStorageServiceProvider extends StorageServiceProvider {\n constructor(\n diskStorageService: AbstractStorageService & ObservableStorageService,\n memoryStorageService: AbstractStorageService & ObservableStorageService,\n private readonly diskLocalStorageService: AbstractStorageService & ObservableStorageService,\n ) {\n super(diskStorageService, memoryStorageService);\n }\n\n override get(\n defaultLocation: PossibleLocation,\n overrides: Partial,\n ): [location: PossibleLocation, service: AbstractStorageService & ObservableStorageService] {\n const location = overrides[\"web\"] ?? defaultLocation;\n switch (location) {\n case \"disk-local\":\n return [\"disk-local\", this.diskLocalStorageService];\n default:\n // Pass in computed location to super because they could have\n // overriden default \"disk\" with web \"memory\".\n return super.get(location, overrides);\n }\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { Title } from \"@angular/platform-browser\";\nimport { ActivatedRoute, NavigationEnd, Router } from \"@angular/router\";\nimport { filter, firstValueFrom } from \"rxjs\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n KeyDefinition,\n ROUTER_DISK,\n StateProvider,\n GlobalState,\n} from \"@bitwarden/common/platform/state\";\n\n/**\n * Data properties acceptable for use in route objects (see usage in oss-routing.module.ts for example)\n */\nexport interface DataProperties {\n titleId?: string; // sets the title of the current HTML document (shows in browser tab)\n doNotSaveUrl?: boolean; // choose to not keep track of the previous URL in memory\n}\n\nconst DEEP_LINK_REDIRECT_URL = new KeyDefinition(ROUTER_DISK, \"deepLinkRedirectUrl\", {\n deserializer: (value: string) => value,\n});\n\n@Injectable()\nexport class RouterService {\n /**\n * The string value of the URL the user tried to navigate to while unauthenticated.\n *\n * Developed to allow users to deep link even when the navigation gets interrupted\n * by the authentication process.\n */\n private deepLinkRedirectUrlState: GlobalState;\n\n private previousUrl: string = undefined;\n private currentUrl: string = undefined;\n\n constructor(\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private titleService: Title,\n private stateProvider: StateProvider,\n i18nService: I18nService,\n ) {\n this.deepLinkRedirectUrlState = this.stateProvider.getGlobal(DEEP_LINK_REDIRECT_URL);\n\n this.currentUrl = this.router.url;\n\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd))\n .subscribe((event: NavigationEnd) => {\n this.currentUrl = event.url;\n\n let title = i18nService.t(\"bitWebVault\");\n\n if (this.currentUrl.includes(\"/sm/\")) {\n title = i18nService.t(\"bitSecretsManager\");\n }\n\n let child = this.activatedRoute.firstChild;\n while (child.firstChild) {\n child = child.firstChild;\n }\n\n const titleId: string = child?.snapshot?.data?.titleId;\n const rawTitle: string = child?.snapshot?.data?.title;\n const updateUrl = !child?.snapshot?.data?.doNotSaveUrl ?? true;\n\n if (titleId != null || rawTitle != null) {\n const newTitle = rawTitle != null ? rawTitle : i18nService.t(titleId);\n if (newTitle != null && newTitle !== \"\") {\n title = newTitle + \" | \" + title;\n }\n }\n this.titleService.setTitle(title);\n if (updateUrl) {\n this.setPreviousUrl(this.currentUrl);\n }\n });\n }\n\n getPreviousUrl(): string | undefined {\n return this.previousUrl;\n }\n\n setPreviousUrl(url: string): void {\n this.previousUrl = url;\n }\n\n /**\n * Save URL to Global State. This service is used during the login process\n * @param url URL being saved to the Global State\n */\n async persistLoginRedirectUrl(url: string): Promise {\n await this.deepLinkRedirectUrlState.update(() => url);\n }\n\n /**\n * Fetch and clear persisted LoginRedirectUrl if present in state\n */\n async getAndClearLoginRedirectUrl(): Promise {\n const persistedPreLoginUrl = await firstValueFrom(this.deepLinkRedirectUrlState.state$);\n\n if (!Utils.isNullOrEmpty(persistedPreLoginUrl)) {\n await this.persistLoginRedirectUrl(null);\n return persistedPreLoginUrl;\n }\n\n return;\n }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ClientType, DeviceType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Injectable()\nexport class WebPlatformUtilsService implements PlatformUtilsService {\n private browserCache: DeviceType = null;\n\n constructor(\n private i18nService: I18nService,\n private messagingService: MessagingService,\n private logService: LogService,\n ) {}\n\n getDevice(): DeviceType {\n if (this.browserCache != null) {\n return this.browserCache;\n }\n\n if (\n navigator.userAgent.indexOf(\" Firefox/\") !== -1 ||\n navigator.userAgent.indexOf(\" Gecko/\") !== -1\n ) {\n this.browserCache = DeviceType.FirefoxBrowser;\n } else if (navigator.userAgent.indexOf(\" OPR/\") >= 0) {\n this.browserCache = DeviceType.OperaBrowser;\n } else if (navigator.userAgent.indexOf(\" Edg/\") !== -1) {\n this.browserCache = DeviceType.EdgeBrowser;\n } else if (navigator.userAgent.indexOf(\" Vivaldi/\") !== -1) {\n this.browserCache = DeviceType.VivaldiBrowser;\n } else if (\n navigator.userAgent.indexOf(\" Safari/\") !== -1 &&\n navigator.userAgent.indexOf(\"Chrome\") === -1\n ) {\n this.browserCache = DeviceType.SafariBrowser;\n } else if ((window as any).chrome && navigator.userAgent.indexOf(\" Chrome/\") !== -1) {\n this.browserCache = DeviceType.ChromeBrowser;\n } else if (navigator.userAgent.indexOf(\" Trident/\") !== -1) {\n this.browserCache = DeviceType.IEBrowser;\n } else {\n this.browserCache = DeviceType.UnknownBrowser;\n }\n\n return this.browserCache;\n }\n\n getDeviceString(): string {\n const device = DeviceType[this.getDevice()].toLowerCase();\n return device.replace(\"browser\", \"\");\n }\n\n getClientType() {\n return ClientType.Web;\n }\n\n isFirefox(): boolean {\n return this.getDevice() === DeviceType.FirefoxBrowser;\n }\n\n isChrome(): boolean {\n return this.getDevice() === DeviceType.ChromeBrowser;\n }\n\n isEdge(): boolean {\n return this.getDevice() === DeviceType.EdgeBrowser;\n }\n\n isOpera(): boolean {\n return this.getDevice() === DeviceType.OperaBrowser;\n }\n\n isVivaldi(): boolean {\n return this.getDevice() === DeviceType.VivaldiBrowser;\n }\n\n isSafari(): boolean {\n return this.getDevice() === DeviceType.SafariBrowser;\n }\n\n isMacAppStore(): boolean {\n return false;\n }\n\n isViewOpen(): Promise {\n return Promise.resolve(false);\n }\n\n launchUri(uri: string, options?: any): void {\n const a = document.createElement(\"a\");\n a.href = uri;\n if (options == null || !options.sameWindow) {\n a.target = \"_blank\";\n a.rel = \"noreferrer noopener\";\n }\n a.classList.add(\"d-none\");\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n\n getApplicationVersion(): Promise {\n return Promise.resolve(process.env.APPLICATION_VERSION || \"-\");\n }\n\n async getApplicationVersionNumber(): Promise {\n return (await this.getApplicationVersion()).split(RegExp(\"[+|-]\"))[0].trim();\n }\n\n supportsWebAuthn(win: Window): boolean {\n return typeof PublicKeyCredential !== \"undefined\";\n }\n\n supportsDuo(): boolean {\n return true;\n }\n\n showToast(\n type: \"error\" | \"success\" | \"warning\" | \"info\",\n title: string,\n text: string | string[],\n options?: any,\n ): void {\n this.messagingService.send(\"showToast\", {\n text: text,\n title: title,\n type: type,\n options: options,\n });\n }\n\n isDev(): boolean {\n return process.env.NODE_ENV === \"development\";\n }\n\n isSelfHost(): boolean {\n return WebPlatformUtilsService.isSelfHost();\n }\n\n static isSelfHost(): boolean {\n return process.env.ENV.toString() === \"selfhosted\";\n }\n\n copyToClipboard(text: string, options?: any): void | boolean {\n let win = window;\n let doc = window.document;\n if (options && (options.window || options.win)) {\n win = options.window || options.win;\n doc = win.document;\n } else if (options && options.doc) {\n doc = options.doc;\n }\n if (doc.queryCommandSupported && doc.queryCommandSupported(\"copy\")) {\n const textarea = doc.createElement(\"textarea\");\n textarea.textContent = text;\n // Prevent scrolling to bottom of page in MS Edge.\n textarea.style.position = \"fixed\";\n let copyEl = doc.body;\n // For some reason copy command won't work when modal is open if appending to body\n if (doc.body.classList.contains(\"modal-open\")) {\n copyEl = doc.body.querySelector(\".modal\");\n }\n copyEl.appendChild(textarea);\n textarea.select();\n let success = false;\n try {\n // Security exception may be thrown by some browsers.\n success = doc.execCommand(\"copy\");\n if (!success) {\n this.logService.debug(\"Copy command unsupported or disabled.\");\n }\n } catch (e) {\n // eslint-disable-next-line\n console.warn(\"Copy to clipboard failed.\", e);\n } finally {\n copyEl.removeChild(textarea);\n }\n return success;\n }\n }\n\n readFromClipboard(options?: any): Promise {\n throw new Error(\"Cannot read from clipboard on web.\");\n }\n\n supportsBiometric() {\n return Promise.resolve(false);\n }\n\n authenticateBiometric() {\n return Promise.resolve(false);\n }\n\n supportsSecureStorage() {\n return false;\n }\n\n getAutofillKeyboardShortcut(): Promise {\n return null;\n }\n}\n","\n
\n \n \n \n \n \n {{ product.name }}\n \n \n\n \n 0\"\n class=\"tw-mt-4 tw-flex tw-w-full tw-flex-col tw-gap-2 tw-border-0 tw-border-t tw-border-solid tw-border-t-text-muted tw-p-2 tw-pb-0\"\n >\n {{ \"moreFromBitwarden\" | i18n }}\n \n \n {{ product.name }}\n \n \n \n
\n
\n","import { Component, ViewChild } from \"@angular/core\";\n\nimport { MenuComponent } from \"@bitwarden/components\";\n\nimport { ProductSwitcherService } from \"./shared/product-switcher.service\";\n\n@Component({\n selector: \"product-switcher-content\",\n templateUrl: \"./product-switcher-content.component.html\",\n})\nexport class ProductSwitcherContentComponent {\n @ViewChild(\"menu\")\n menu: MenuComponent;\n\n constructor(private productSwitcherService: ProductSwitcherService) {}\n\n protected readonly products$ = this.productSwitcherService.products$;\n}\n","\n\n","import { AfterViewInit, ChangeDetectorRef, Component, Input } from \"@angular/core\";\n\nimport { IconButtonType } from \"@bitwarden/components/src/icon-button/icon-button.component\";\n\nimport { ProductSwitcherService } from \"./shared/product-switcher.service\";\n@Component({\n selector: \"product-switcher\",\n templateUrl: \"./product-switcher.component.html\",\n})\nexport class ProductSwitcherComponent implements AfterViewInit {\n /**\n * Passed to the product switcher's `bitIconButton`\n */\n @Input()\n buttonType: IconButtonType = \"main\";\n\n ngAfterViewInit() {\n /**\n * Resolves https://angular.io/errors/NG0100 [SM-403]\n *\n * Caused by `[bitMenuTriggerFor]=\"content?.menu\"` in template\n */\n this.changeDetector.detectChanges();\n }\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private productSwitcherService: ProductSwitcherService,\n ) {}\n\n protected readonly products$ = this.productSwitcherService.products$;\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerModule } from \"@bitwarden/components\";\n\nimport { DynamicAvatarComponent } from \"../../components/dynamic-avatar.component\";\nimport { SharedModule } from \"../../shared\";\nimport { ProductSwitcherModule } from \"../product-switcher/product-switcher.module\";\n\nimport { WebHeaderComponent } from \"./web-header.component\";\n\n@NgModule({\n imports: [SharedModule, DynamicAvatarComponent, ProductSwitcherModule, BannerModule],\n declarations: [WebHeaderComponent],\n exports: [WebHeaderComponent],\n})\nexport class HeaderModule {}\n","\n
\n
\n \n \n \n {{ title || (routeData.titleId | i18n) }}\n \n \n
\n
\n
\n \n \n \n \n \n \n\n \n
\n \n \n
\n {{ \"loggedInAs\" | i18n }}\n \n {{ account | userName }}\n \n
\n
\n\n \n \n \n {{ hostname }}\n \n \n\n \n\n \n \n {{ \"accountSettings\" | i18n }}\n \n \n \n {{ \"getHelp\" | i18n }}\n \n \n \n {{ \"getApps\" | i18n }}\n \n\n \n\n \n \n
\n \n \n
\n \n \n
\n \n \n \n \n \n\n","import { Component, Input } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { map, Observable } from \"rxjs\";\n\nimport { User } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\n@Component({\n selector: \"app-header\",\n templateUrl: \"./web-header.component.html\",\n})\nexport class WebHeaderComponent {\n /**\n * Custom title that overrides the route data `titleId`\n */\n @Input() title: string;\n\n /**\n * Icon to show before the title\n */\n @Input() icon: string;\n\n protected routeData$: Observable<{ titleId: string }>;\n protected account$: Observable;\n protected canLock$: Observable;\n protected selfHosted: boolean;\n protected hostname = location.hostname;\n\n constructor(\n private route: ActivatedRoute,\n private platformUtilsService: PlatformUtilsService,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n private messagingService: MessagingService,\n private accountService: AccountService,\n ) {\n this.routeData$ = this.route.data.pipe(\n map((params) => {\n return {\n titleId: params.titleId,\n };\n }),\n );\n\n this.selfHosted = this.platformUtilsService.isSelfHost();\n\n this.account$ = this.accountService.activeAccount$;\n this.canLock$ = this.vaultTimeoutSettingsService\n .availableVaultTimeoutActions$()\n .pipe(map((actions) => actions.includes(VaultTimeoutAction.Lock)));\n }\n\n protected lock() {\n this.messagingService.send(\"lockVault\");\n }\n\n protected logout() {\n this.messagingService.send(\"logout\");\n }\n}\n","\n \n \n \n \n \n \n \n \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { combineLatest, map, Observable } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport type { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { NavigationModule } from \"@bitwarden/components\";\n\n@Component({\n selector: \"org-switcher\",\n templateUrl: \"org-switcher.component.html\",\n standalone: true,\n imports: [CommonModule, JslibModule, NavigationModule],\n})\nexport class OrgSwitcherComponent {\n protected organizations$: Observable =\n this.organizationService.organizations$.pipe(\n map((orgs) =>\n orgs.filter((org) => this.filter(org)).sort((a, b) => a.name.localeCompare(b.name)),\n ),\n );\n\n protected activeOrganization$: Observable = combineLatest([\n this.route.paramMap,\n this.organizations$,\n ]).pipe(map(([params, orgs]) => orgs.find((org) => org.id === params.get(\"organizationId\"))));\n\n /**\n * Filter function for displayed organizations in the `org-switcher`\n * @example\n * const smFilter = (org: Organization) => org.canAccessSecretsManager\n * // \n */\n @Input()\n filter: (org: Organization) => boolean = () => true;\n\n /**\n * Is `true` if the expanded content is visible\n */\n @Input()\n open = false;\n @Output()\n openChange = new EventEmitter();\n\n /**\n * Visibility of the New Organization button\n */\n @Input()\n hideNewButton = false;\n\n constructor(\n private route: ActivatedRoute,\n private organizationService: OrganizationService,\n ) {}\n\n protected toggle(event?: MouseEvent) {\n event?.stopPropagation();\n this.open = !this.open;\n this.openChange.emit(this.open);\n }\n}\n","import { A11yModule } from \"@angular/cdk/a11y\";\nimport { NgModule } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { NavigationModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { NavigationProductSwitcherComponent } from \"./navigation-switcher/navigation-switcher.component\";\nimport { ProductSwitcherContentComponent } from \"./product-switcher-content.component\";\nimport { ProductSwitcherComponent } from \"./product-switcher.component\";\n\n@NgModule({\n imports: [SharedModule, A11yModule, RouterModule, NavigationModule],\n declarations: [\n ProductSwitcherComponent,\n ProductSwitcherContentComponent,\n NavigationProductSwitcherComponent,\n ],\n exports: [ProductSwitcherComponent, NavigationProductSwitcherComponent],\n providers: [I18nPipe],\n})\nexport class ProductSwitcherModule {}\n","import { Injectable } from \"@angular/core\";\nimport { ActivatedRoute, NavigationEnd, NavigationStart, ParamMap, Router } from \"@angular/router\";\nimport { combineLatest, concatMap, filter, map, Observable, ReplaySubject, startWith } from \"rxjs\";\n\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n canAccessOrgAdmin,\n OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\n\nexport type ProductSwitcherItem = {\n /**\n * Displayed name\n */\n name: string;\n\n /**\n * Displayed icon\n */\n icon: string;\n\n /**\n * Route for items in the `bentoProducts$` section\n */\n appRoute?: string | any[];\n\n /**\n * Route for items in the `otherProducts$` section\n */\n marketingRoute?: string | any[];\n\n /**\n * Used to apply css styles to show when a button is selected\n */\n isActive?: boolean;\n\n /**\n * A product switcher item can be shown in the left navigation menu.\n * When shown under the \"other\" section the content can be overridden.\n */\n otherProductOverrides?: {\n /** Alternative navigation menu name */\n name?: string;\n /** Supporting text that is shown when the product is rendered in the \"other\" section */\n supportingText?: string;\n };\n};\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ProductSwitcherService {\n /**\n * Emits when the sync service has completed a sync\n *\n * Without waiting for a sync to be complete, in accurate product information\n * can be displayed to the user for a brief moment until the sync is complete\n * and all data is available.\n */\n private syncCompleted$ = new ReplaySubject(1);\n\n /**\n * Certain events should trigger an update to the `products$` observable but the values\n * themselves are not needed. This observable is used to only trigger the update.\n */\n private triggerProductUpdate$: Observable = combineLatest([\n this.syncCompleted$,\n this.router.events.pipe(\n // Product paths need to be updated when routes change, but the router event isn't actually needed\n startWith(null), // Start with a null event to trigger the initial combineLatest\n filter((e) => e instanceof NavigationEnd || e instanceof NavigationStart || e === null),\n ),\n ]).pipe(map(() => null));\n\n constructor(\n private organizationService: OrganizationService,\n private providerService: ProviderService,\n private route: ActivatedRoute,\n private router: Router,\n private i18n: I18nPipe,\n private syncService: SyncService,\n ) {\n this.pollUntilSynced();\n }\n\n products$: Observable<{\n bento: ProductSwitcherItem[];\n other: ProductSwitcherItem[];\n }> = combineLatest([\n this.organizationService.organizations$,\n this.route.paramMap,\n this.triggerProductUpdate$,\n ]).pipe(\n map(([orgs, ...rest]): [Organization[], ParamMap, void] => {\n return [\n // Sort orgs by name to match the order within the sidebar\n orgs.sort((a, b) => a.name.localeCompare(b.name)),\n ...rest,\n ];\n }),\n concatMap(async ([orgs, paramMap]) => {\n let routeOrg = orgs.find((o) => o.id === paramMap.get(\"organizationId\"));\n\n let organizationIdViaPath: string | null = null;\n\n if ([\"/sm/\", \"/organizations/\"].some((path) => this.router.url.includes(path))) {\n // Grab the organization ID from the URL\n organizationIdViaPath = this.router.url.split(\"/\")[2] ?? null;\n }\n\n // When the user is already viewing an organization within an application use it as the active route org\n if (organizationIdViaPath && !routeOrg) {\n routeOrg = orgs.find((o) => o.id === organizationIdViaPath);\n }\n\n // If the active route org doesn't have access to SM, find the first org that does.\n const smOrg =\n routeOrg?.canAccessSecretsManager && routeOrg?.enabled == true\n ? routeOrg\n : orgs.find((o) => o.canAccessSecretsManager && o.enabled == true);\n\n // If the active route org doesn't have access to AC, find the first org that does.\n const acOrg =\n routeOrg != null && canAccessOrgAdmin(routeOrg)\n ? routeOrg\n : orgs.find((o) => canAccessOrgAdmin(o));\n\n // TODO: This should be migrated to an Observable provided by the provider service and moved to the combineLatest above. See AC-2092.\n const providers = await this.providerService.getAll();\n\n const products = {\n pm: {\n name: \"Password Manager\",\n icon: \"bwi-lock\",\n appRoute: \"/vault\",\n marketingRoute: \"https://bitwarden.com/products/personal/\",\n isActive:\n !this.router.url.includes(\"/sm/\") &&\n !this.router.url.includes(\"/organizations/\") &&\n !this.router.url.includes(\"/providers/\"),\n },\n sm: {\n name: \"Secrets Manager\",\n icon: \"bwi-cli\",\n appRoute: [\"/sm\", smOrg?.id],\n marketingRoute: \"https://bitwarden.com/products/secrets-manager/\",\n isActive: this.router.url.includes(\"/sm/\"),\n otherProductOverrides: {\n supportingText: this.i18n.transform(\"secureYourInfrastructure\"),\n },\n },\n ac: {\n name: \"Admin Console\",\n icon: \"bwi-business\",\n appRoute: [\"/organizations\", acOrg?.id],\n marketingRoute: \"https://bitwarden.com/products/business/\",\n isActive: this.router.url.includes(\"/organizations/\"),\n },\n provider: {\n name: \"Provider Portal\",\n icon: \"bwi-provider\",\n appRoute: [\"/providers\", providers[0]?.id],\n isActive: this.router.url.includes(\"/providers/\"),\n },\n orgs: {\n name: \"Organizations\",\n icon: \"bwi-business\",\n marketingRoute: \"https://bitwarden.com/products/business/\",\n otherProductOverrides: {\n name: \"Share your passwords\",\n supportingText: this.i18n.transform(\"protectYourFamilyOrBusiness\"),\n },\n },\n } satisfies Record;\n\n const bento: ProductSwitcherItem[] = [products.pm];\n const other: ProductSwitcherItem[] = [];\n\n if (smOrg) {\n bento.push(products.sm);\n } else {\n other.push(products.sm);\n }\n\n if (acOrg) {\n bento.push(products.ac);\n } else {\n other.push(products.orgs);\n }\n\n if (providers.length > 0) {\n bento.push(products.provider);\n }\n\n return {\n bento,\n other,\n };\n }),\n );\n\n /** Poll the `syncService` until a sync is completed */\n private pollUntilSynced() {\n const interval = setInterval(async () => {\n const lastSync = await this.syncService.getLastSync();\n if (lastSync !== null) {\n clearInterval(interval);\n this.syncCompleted$.next();\n }\n }, 200);\n }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const SecretsManagerLogo = svgIcon`\n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const PasswordManagerLogo = svgIcon`\n\n`;\n","\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\nimport { Observable, combineLatest, concatMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { IconModule } from \"@bitwarden/components\";\n\nimport { PasswordManagerLogo } from \"./password-manager-logo\";\nimport { WebLayoutModule } from \"./web-layout.module\";\n\n@Component({\n selector: \"app-user-layout\",\n templateUrl: \"user-layout.component.html\",\n standalone: true,\n imports: [CommonModule, RouterModule, JslibModule, WebLayoutModule, IconModule],\n})\nexport class UserLayoutComponent implements OnInit {\n protected readonly logo = PasswordManagerLogo;\n protected hasFamilySponsorshipAvailable$: Observable;\n protected showSubscription$: Observable;\n\n constructor(\n private platformUtilsService: PlatformUtilsService,\n private organizationService: OrganizationService,\n private apiService: ApiService,\n private syncService: SyncService,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {}\n\n async ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n\n await this.syncService.fullSync(false);\n\n this.hasFamilySponsorshipAvailable$ = this.organizationService.canManageSponsorships$;\n\n // We want to hide the subscription menu for organizations that provide premium.\n // Except if the user has premium personally or has a billing history.\n this.showSubscription$ = combineLatest([\n this.billingAccountProfileStateService.hasPremiumPersonally$,\n this.billingAccountProfileStateService.hasPremiumFromAnyOrganization$,\n ]).pipe(\n concatMap(async ([hasPremiumPersonally, hasPremiumFromOrg]) => {\n const isCloud = !this.platformUtilsService.isSelfHost();\n\n let billing = null;\n if (isCloud) {\n // TODO: We should remove the need to call this!\n billing = await this.apiService.getUserBillingHistory();\n }\n\n const cloudAndBillingHistory = isCloud && !billing?.hasNoHistory;\n return hasPremiumPersonally || !hasPremiumFromOrg || cloudAndBillingHistory;\n }),\n );\n }\n}\n","\n \n\n \n\n \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LayoutComponent } from \"@bitwarden/components\";\n\nimport { PaymentMethodWarningsModule } from \"../billing/shared\";\n\nimport { ProductSwitcherModule } from \"./product-switcher/product-switcher.module\";\nimport { ToggleWidthComponent } from \"./toggle-width.component\";\n\n@Component({\n selector: \"app-layout\",\n templateUrl: \"web-layout.component.html\",\n standalone: true,\n imports: [\n CommonModule,\n LayoutComponent,\n ProductSwitcherModule,\n ToggleWidthComponent,\n PaymentMethodWarningsModule,\n ],\n})\nexport class WebLayoutComponent {\n protected showPaymentMethodWarningBanners$ = this.configService.getFeatureFlag$(\n FeatureFlag.ShowPaymentMethodWarningBanners,\n );\n\n constructor(private configService: ConfigService) {}\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { NavigationModule } from \"@bitwarden/components\";\n\nimport { WebLayoutComponent } from \"./web-layout.component\";\nimport { WebSideNavComponent } from \"./web-side-nav.component\";\n\n@NgModule({\n imports: [WebLayoutComponent, WebSideNavComponent],\n exports: [NavigationModule, WebLayoutComponent, WebSideNavComponent],\n declarations: [],\n providers: [],\n})\nexport class WebLayoutModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { NavigationModule } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-toggle-width\",\n template: ``,\n standalone: true,\n imports: [CommonModule, NavigationModule],\n})\nexport class ToggleWidthComponent {\n protected isDev: boolean;\n\n constructor(platformUtilsService: PlatformUtilsService) {\n this.isDev = platformUtilsService.isDev();\n }\n\n protected toggleWidth() {\n if (document.body.style.minWidth === \"unset\") {\n document.body.style.minWidth = \"\";\n } else {\n document.body.style.minWidth = \"unset\";\n }\n }\n}\n","\n \n
\n \n \n \n \n
\n \n
\n
\n\n","import { Component, ElementRef, Input, ViewChild } from \"@angular/core\";\n\nimport { SideNavService } from \"./side-nav.service\";\n\nexport type SideNavVariant = \"primary\" | \"secondary\";\n\n@Component({\n selector: \"bit-side-nav\",\n templateUrl: \"side-nav.component.html\",\n})\nexport class SideNavComponent {\n @Input() variant: SideNavVariant = \"primary\";\n\n @ViewChild(\"toggleButton\", { read: ElementRef, static: true })\n private toggleButton: ElementRef;\n\n constructor(protected sideNavService: SideNavService) {}\n\n protected handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n this.sideNavService.setClose();\n this.toggleButton?.nativeElement.focus();\n return false;\n }\n\n return true;\n };\n}\n","
\n \n \n \n \n 0\"\n class=\"tw-mt-2 tw-flex tw-w-full tw-flex-col tw-gap-2 tw-border-0\"\n >\n {{ \"moreFromBitwarden\" | i18n }}\n :not(.bwi)]:hover:tw-underline\"\n >\n \n
\n {{ more.otherProductOverrides?.name ?? more.name }}\n
\n {{ more.otherProductOverrides.supportingText }}\n
\n
\n \n \n
\n
\n","import { Component } from \"@angular/core\";\nimport { map, Observable } from \"rxjs\";\n\nimport { ProductSwitcherItem, ProductSwitcherService } from \"../shared/product-switcher.service\";\n\n@Component({\n selector: \"navigation-product-switcher\",\n templateUrl: \"./navigation-switcher.component.html\",\n})\nexport class NavigationProductSwitcherComponent {\n constructor(private productSwitcherService: ProductSwitcherService) {}\n\n protected readonly accessibleProducts$: Observable =\n this.productSwitcherService.products$.pipe(map((products) => products.bento ?? []));\n\n protected readonly moreProducts$: Observable =\n this.productSwitcherService.products$.pipe(\n map((products) => products.other ?? []),\n // Ensure that organizations is displayed first in the other products list\n // This differs from the order in `ProductSwitcherContentComponent` but matches the intent\n // from product & design\n map((products) => products.sort((product) => (product.name === \"Organizations\" ? -1 : 1))),\n );\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { SideNavVariant, NavigationModule } from \"@bitwarden/components\";\n\nimport { ProductSwitcherModule } from \"./product-switcher/product-switcher.module\";\nimport { ToggleWidthComponent } from \"./toggle-width.component\";\n\n@Component({\n selector: \"app-side-nav\",\n templateUrl: \"web-side-nav.component.html\",\n standalone: true,\n imports: [CommonModule, NavigationModule, ProductSwitcherModule, ToggleWidthComponent],\n})\nexport class WebSideNavComponent {\n @Input() variant: SideNavVariant = \"primary\";\n}\n","\n \n\n \n \n \n \n\n","\n
\n

\n {{ fingerprintLabel }}:\n \n \n
\n {{ fingerprint }}\n

\n
\n","import { Component, Input, OnInit } from \"@angular/core\";\n\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\n\nimport { SharedModule } from \"../../shared.module\";\n\n@Component({\n selector: \"app-account-fingerprint\",\n templateUrl: \"account-fingerprint.component.html\",\n standalone: true,\n imports: [SharedModule],\n})\nexport class AccountFingerprintComponent implements OnInit {\n @Input() fingerprintMaterial: string;\n @Input() publicKeyBuffer: Uint8Array;\n @Input() fingerprintLabel: string;\n\n protected fingerprint: string;\n\n constructor(private cryptoService: CryptoService) {}\n\n async ngOnInit() {\n // TODO - In the future, remove this code and use the fingerprint pipe once merged\n const generatedFingerprint = await this.cryptoService.getFingerprint(\n this.fingerprintMaterial,\n this.publicKeyBuffer,\n );\n this.fingerprint = generatedFingerprint?.join(\"-\") ?? null;\n }\n}\n","\n
{{ title }}\n\n\n
  • \n \n \n \n \n \n \n \n
  • \n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-onboarding-task\",\n templateUrl: \"./onboarding-task.component.html\",\n host: {\n class: \"tw-max-w-max\",\n },\n})\nexport class OnboardingTaskComponent {\n @Input()\n completed = false;\n\n @Input()\n icon = \"bwi-info-circle\";\n\n @Input()\n title: string;\n\n @Input()\n route: string | any[];\n\n @Input()\n isDisabled: boolean = false;\n\n handleClick(ev: MouseEvent) {\n /**\n * If the main `ng-content` is clicked, we don't want to trigger the task's click handler.\n */\n ev.stopPropagation();\n }\n}\n","
    \n \n
    \n \n
    {{ title }}
    \n \n 0; else spinner\">\n {{ \"complete\" | i18n: amountCompleted : tasks.length }}\n \n
    \n
    \n
    \n
      \n \n
    \n
    \n \n
    \n
    \n\n\n \n\n","import { Component, ContentChildren, EventEmitter, Input, Output, QueryList } from \"@angular/core\";\n\nimport { OnboardingTaskComponent } from \"./onboarding-task.component\";\n\n@Component({\n selector: \"app-onboarding\",\n templateUrl: \"./onboarding.component.html\",\n})\nexport class OnboardingComponent {\n @ContentChildren(OnboardingTaskComponent) tasks: QueryList;\n @Input() title: string;\n\n @Output() dismiss = new EventEmitter();\n\n protected open = true;\n protected visible = false;\n\n protected get amountCompleted(): number {\n return this.tasks.filter((task) => task.completed).length;\n }\n\n protected get barWidth(): number {\n return this.tasks.length === 0 ? 0 : (this.amountCompleted / this.tasks.length) * 100;\n }\n\n protected toggle() {\n this.open = !this.open;\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ProgressModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared.module\";\n\nimport { OnboardingTaskComponent } from \"./onboarding-task.component\";\nimport { OnboardingComponent } from \"./onboarding.component\";\n\n@NgModule({\n imports: [SharedModule, ProgressModule],\n exports: [OnboardingComponent, OnboardingTaskComponent],\n declarations: [OnboardingComponent, OnboardingTaskComponent],\n})\nexport class OnboardingModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../../shared\";\n\nimport { ChangeKdfConfirmationComponent } from \"./change-kdf-confirmation.component\";\nimport { ChangeKdfComponent } from \"./change-kdf.component\";\n\n@NgModule({\n imports: [CommonModule, SharedModule],\n declarations: [ChangeKdfComponent, ChangeKdfConfirmationComponent],\n exports: [ChangeKdfComponent, ChangeKdfConfirmationComponent],\n})\nexport class ChangeKdfModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport {\n PasswordCalloutComponent,\n UserVerificationFormInputComponent,\n VaultTimeoutInputComponent,\n} from \"@bitwarden/auth/angular\";\nimport { LayoutComponent, NavigationModule } from \"@bitwarden/components\";\n\nimport { OrganizationLayoutComponent } from \"../admin-console/organizations/layouts/organization-layout.component\";\nimport { EventsComponent as OrgEventsComponent } from \"../admin-console/organizations/manage/events.component\";\nimport { UserConfirmComponent as OrgUserConfirmComponent } from \"../admin-console/organizations/manage/user-confirm.component\";\nimport { VerifyRecoverDeleteOrgComponent } from \"../admin-console/organizations/manage/verify-recover-delete-org.component\";\nimport { AcceptFamilySponsorshipComponent } from \"../admin-console/organizations/sponsorships/accept-family-sponsorship.component\";\nimport { ExposedPasswordsReportComponent as OrgExposedPasswordsReportComponent } from \"../admin-console/organizations/tools/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent as OrgInactiveTwoFactorReportComponent } from \"../admin-console/organizations/tools/inactive-two-factor-report.component\";\nimport { ReusedPasswordsReportComponent as OrgReusedPasswordsReportComponent } from \"../admin-console/organizations/tools/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent } from \"../admin-console/organizations/tools/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from \"../admin-console/organizations/tools/weak-passwords-report.component\";\nimport { ProvidersComponent } from \"../admin-console/providers/providers.component\";\nimport { VerifyRecoverDeleteProviderComponent } from \"../admin-console/providers/verify-recover-delete-provider.component\";\nimport { HintComponent } from \"../auth/hint.component\";\nimport { RecoverDeleteComponent } from \"../auth/recover-delete.component\";\nimport { RecoverTwoFactorComponent } from \"../auth/recover-two-factor.component\";\nimport { RegisterFormModule } from \"../auth/register-form/register-form.module\";\nimport { RemovePasswordComponent } from \"../auth/remove-password.component\";\nimport { SetPasswordComponent } from \"../auth/set-password.component\";\nimport { AccountComponent } from \"../auth/settings/account/account.component\";\nimport { ChangeAvatarDialogComponent } from \"../auth/settings/account/change-avatar-dialog.component\";\nimport { ChangeEmailComponent } from \"../auth/settings/account/change-email.component\";\nimport { DangerZoneComponent } from \"../auth/settings/account/danger-zone.component\";\nimport { DeauthorizeSessionsComponent } from \"../auth/settings/account/deauthorize-sessions.component\";\nimport { DeleteAccountDialogComponent } from \"../auth/settings/account/delete-account-dialog.component\";\nimport { ProfileComponent } from \"../auth/settings/account/profile.component\";\nimport { EmergencyAccessAttachmentsComponent } from \"../auth/settings/emergency-access/attachments/emergency-access-attachments.component\";\nimport { EmergencyAccessConfirmComponent } from \"../auth/settings/emergency-access/confirm/emergency-access-confirm.component\";\nimport { EmergencyAccessAddEditComponent } from \"../auth/settings/emergency-access/emergency-access-add-edit.component\";\nimport { EmergencyAccessComponent } from \"../auth/settings/emergency-access/emergency-access.component\";\nimport { EmergencyAccessTakeoverComponent } from \"../auth/settings/emergency-access/takeover/emergency-access-takeover.component\";\nimport { EmergencyAccessViewComponent } from \"../auth/settings/emergency-access/view/emergency-access-view.component\";\nimport { EmergencyAddEditCipherComponent } from \"../auth/settings/emergency-access/view/emergency-add-edit-cipher.component\";\nimport { ApiKeyComponent } from \"../auth/settings/security/api-key.component\";\nimport { ChangeKdfModule } from \"../auth/settings/security/change-kdf/change-kdf.module\";\nimport { SecurityKeysComponent } from \"../auth/settings/security/security-keys.component\";\nimport { SecurityComponent } from \"../auth/settings/security/security.component\";\nimport { TwoFactorAuthenticatorComponent } from \"../auth/settings/two-factor-authenticator.component\";\nimport { TwoFactorDuoComponent } from \"../auth/settings/two-factor-duo.component\";\nimport { TwoFactorEmailComponent } from \"../auth/settings/two-factor-email.component\";\nimport { TwoFactorRecoveryComponent } from \"../auth/settings/two-factor-recovery.component\";\nimport { TwoFactorSetupComponent } from \"../auth/settings/two-factor-setup.component\";\nimport { TwoFactorVerifyComponent } from \"../auth/settings/two-factor-verify.component\";\nimport { TwoFactorWebAuthnComponent } from \"../auth/settings/two-factor-webauthn.component\";\nimport { TwoFactorYubiKeyComponent } from \"../auth/settings/two-factor-yubikey.component\";\nimport { UserVerificationModule } from \"../auth/shared/components/user-verification\";\nimport { SsoComponent } from \"../auth/sso.component\";\nimport { TwoFactorOptionsComponent } from \"../auth/two-factor-options.component\";\nimport { TwoFactorComponent } from \"../auth/two-factor.component\";\nimport { UpdatePasswordComponent } from \"../auth/update-password.component\";\nimport { UpdateTempPasswordComponent } from \"../auth/update-temp-password.component\";\nimport { VerifyEmailTokenComponent } from \"../auth/verify-email-token.component\";\nimport { VerifyRecoverDeleteComponent } from \"../auth/verify-recover-delete.component\";\nimport { SponsoredFamiliesComponent } from \"../billing/settings/sponsored-families.component\";\nimport { SponsoringOrgRowComponent } from \"../billing/settings/sponsoring-org-row.component\";\nimport { PaymentMethodWarningsModule } from \"../billing/shared\";\nimport { DynamicAvatarComponent } from \"../components/dynamic-avatar.component\";\nimport { SelectableAvatarComponent } from \"../components/selectable-avatar.component\";\nimport { FrontendLayoutComponent } from \"../layouts/frontend-layout.component\";\nimport { HeaderModule } from \"../layouts/header/header.module\";\nimport { ProductSwitcherModule } from \"../layouts/product-switcher/product-switcher.module\";\nimport { UserLayoutComponent } from \"../layouts/user-layout.component\";\nimport { DomainRulesComponent } from \"../settings/domain-rules.component\";\nimport { PreferencesComponent } from \"../settings/preferences.component\";\nimport { GeneratorComponent } from \"../tools/generator.component\";\nimport { PasswordGeneratorHistoryComponent } from \"../tools/password-generator-history.component\";\nimport { AddEditComponent as SendAddEditComponent } from \"../tools/send/add-edit.component\";\nimport { PremiumBadgeComponent } from \"../vault/components/premium-badge.component\";\nimport { AddEditCustomFieldsComponent } from \"../vault/individual-vault/add-edit-custom-fields.component\";\nimport { AddEditComponent } from \"../vault/individual-vault/add-edit.component\";\nimport { AttachmentsComponent } from \"../vault/individual-vault/attachments.component\";\nimport { CollectionsComponent } from \"../vault/individual-vault/collections.component\";\nimport { FolderAddEditComponent } from \"../vault/individual-vault/folder-add-edit.component\";\nimport { OrganizationBadgeModule } from \"../vault/individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../vault/individual-vault/pipes/pipes.module\";\nimport { ShareComponent } from \"../vault/individual-vault/share.component\";\nimport { AddEditComponent as OrgAddEditComponent } from \"../vault/org-vault/add-edit.component\";\nimport { AttachmentsComponent as OrgAttachmentsComponent } from \"../vault/org-vault/attachments.component\";\nimport { CollectionsComponent as OrgCollectionsComponent } from \"../vault/org-vault/collections.component\";\nimport { PurgeVaultComponent } from \"../vault/settings/purge-vault.component\";\n\nimport { EnvironmentSelectorModule } from \"./../components/environment-selector/environment-selector.module\";\nimport { AccountFingerprintComponent } from \"./components/account-fingerprint/account-fingerprint.component\";\nimport { SharedModule } from \"./shared.module\";\n\n// Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left.\n// If you are building new functionality, please create or extend a feature module instead.\n@NgModule({\n imports: [\n SharedModule,\n RegisterFormModule,\n ProductSwitcherModule,\n UserVerificationModule,\n ChangeKdfModule,\n DynamicAvatarComponent,\n EnvironmentSelectorModule,\n AccountFingerprintComponent,\n OrganizationBadgeModule,\n PipesModule,\n PasswordCalloutComponent,\n UserVerificationFormInputComponent,\n DangerZoneComponent,\n LayoutComponent,\n NavigationModule,\n HeaderModule,\n OrganizationLayoutComponent,\n UserLayoutComponent,\n PaymentMethodWarningsModule,\n VerifyRecoverDeleteOrgComponent,\n VaultTimeoutInputComponent,\n ],\n declarations: [\n AcceptFamilySponsorshipComponent,\n AccountComponent,\n AddEditComponent,\n AddEditCustomFieldsComponent,\n AddEditCustomFieldsComponent,\n ApiKeyComponent,\n AttachmentsComponent,\n ChangeEmailComponent,\n CollectionsComponent,\n DeauthorizeSessionsComponent,\n DeleteAccountDialogComponent,\n DomainRulesComponent,\n EmergencyAccessAddEditComponent,\n EmergencyAccessAttachmentsComponent,\n EmergencyAccessComponent,\n EmergencyAccessConfirmComponent,\n EmergencyAccessTakeoverComponent,\n EmergencyAccessViewComponent,\n EmergencyAddEditCipherComponent,\n FolderAddEditComponent,\n FrontendLayoutComponent,\n HintComponent,\n OrgAddEditComponent,\n OrgAttachmentsComponent,\n OrgCollectionsComponent,\n OrgEventsComponent,\n OrgExposedPasswordsReportComponent,\n OrgInactiveTwoFactorReportComponent,\n OrgReusedPasswordsReportComponent,\n OrgUnsecuredWebsitesReportComponent,\n OrgUserConfirmComponent,\n OrgWeakPasswordsReportComponent,\n GeneratorComponent,\n PasswordGeneratorHistoryComponent,\n PreferencesComponent,\n PremiumBadgeComponent,\n ProfileComponent,\n ChangeAvatarDialogComponent,\n ProvidersComponent,\n PurgeVaultComponent,\n RecoverDeleteComponent,\n RecoverTwoFactorComponent,\n RemovePasswordComponent,\n SecurityComponent,\n SecurityKeysComponent,\n SelectableAvatarComponent,\n SendAddEditComponent,\n SetPasswordComponent,\n ShareComponent,\n SponsoredFamiliesComponent,\n SponsoringOrgRowComponent,\n SsoComponent,\n TwoFactorAuthenticatorComponent,\n TwoFactorComponent,\n TwoFactorDuoComponent,\n TwoFactorEmailComponent,\n TwoFactorOptionsComponent,\n TwoFactorRecoveryComponent,\n TwoFactorSetupComponent,\n TwoFactorVerifyComponent,\n TwoFactorWebAuthnComponent,\n TwoFactorYubiKeyComponent,\n UpdatePasswordComponent,\n UpdateTempPasswordComponent,\n VerifyEmailTokenComponent,\n VerifyRecoverDeleteComponent,\n VerifyRecoverDeleteProviderComponent,\n ],\n exports: [\n UserVerificationModule,\n PremiumBadgeComponent,\n AccountComponent,\n AddEditComponent,\n AddEditCustomFieldsComponent,\n AddEditCustomFieldsComponent,\n ApiKeyComponent,\n AttachmentsComponent,\n ChangeEmailComponent,\n CollectionsComponent,\n DeauthorizeSessionsComponent,\n DeleteAccountDialogComponent,\n DomainRulesComponent,\n DynamicAvatarComponent,\n EmergencyAccessAddEditComponent,\n EmergencyAccessAttachmentsComponent,\n EmergencyAccessComponent,\n EmergencyAccessConfirmComponent,\n EmergencyAccessTakeoverComponent,\n EmergencyAccessViewComponent,\n EmergencyAddEditCipherComponent,\n FolderAddEditComponent,\n FrontendLayoutComponent,\n HintComponent,\n OrgAddEditComponent,\n OrganizationLayoutComponent,\n OrgAttachmentsComponent,\n OrgCollectionsComponent,\n OrgEventsComponent,\n OrgExposedPasswordsReportComponent,\n OrgInactiveTwoFactorReportComponent,\n OrgReusedPasswordsReportComponent,\n OrgUnsecuredWebsitesReportComponent,\n OrgUserConfirmComponent,\n OrgWeakPasswordsReportComponent,\n GeneratorComponent,\n PasswordGeneratorHistoryComponent,\n PreferencesComponent,\n PremiumBadgeComponent,\n ProfileComponent,\n ChangeAvatarDialogComponent,\n ProvidersComponent,\n PurgeVaultComponent,\n RecoverDeleteComponent,\n RecoverTwoFactorComponent,\n RemovePasswordComponent,\n SecurityComponent,\n SecurityKeysComponent,\n SelectableAvatarComponent,\n SendAddEditComponent,\n SetPasswordComponent,\n ShareComponent,\n SponsoredFamiliesComponent,\n SponsoringOrgRowComponent,\n SsoComponent,\n TwoFactorAuthenticatorComponent,\n TwoFactorComponent,\n TwoFactorDuoComponent,\n TwoFactorEmailComponent,\n TwoFactorOptionsComponent,\n TwoFactorRecoveryComponent,\n TwoFactorSetupComponent,\n TwoFactorVerifyComponent,\n TwoFactorWebAuthnComponent,\n TwoFactorYubiKeyComponent,\n UpdatePasswordComponent,\n UpdateTempPasswordComponent,\n UserLayoutComponent,\n VerifyEmailTokenComponent,\n VerifyRecoverDeleteComponent,\n VerifyRecoverDeleteProviderComponent,\n HeaderModule,\n DangerZoneComponent,\n ],\n})\nexport class LooseComponentsModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { AvatarComponent } from \"./avatar.component\";\n\n@NgModule({\n imports: [CommonModule],\n exports: [AvatarComponent],\n declarations: [AvatarComponent],\n})\nexport class AvatarModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { BadgeModule } from \"../badge\";\nimport { SharedModule } from \"../shared\";\n\nimport { BadgeListComponent } from \"./badge-list.component\";\n\n@NgModule({\n imports: [SharedModule, BadgeModule],\n exports: [BadgeListComponent],\n declarations: [BadgeListComponent],\n})\nexport class BadgeListModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ColorPasswordComponent } from \"./color-password.component\";\n\n@NgModule({\n imports: [CommonModule],\n exports: [ColorPasswordComponent],\n declarations: [ColorPasswordComponent],\n})\nexport class ColorPasswordModule {}\n","import { PortalModule } from \"@angular/cdk/portal\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { TabHeaderComponent } from \"./shared/tab-header.component\";\nimport { TabListContainerDirective } from \"./shared/tab-list-container.directive\";\nimport { TabListItemDirective } from \"./shared/tab-list-item.directive\";\nimport { TabBodyComponent } from \"./tab-group/tab-body.component\";\nimport { TabGroupComponent } from \"./tab-group/tab-group.component\";\nimport { TabLabelDirective } from \"./tab-group/tab-label.directive\";\nimport { TabComponent } from \"./tab-group/tab.component\";\nimport { TabLinkComponent } from \"./tab-nav-bar/tab-link.component\";\nimport { TabNavBarComponent } from \"./tab-nav-bar/tab-nav-bar.component\";\n\n@NgModule({\n imports: [CommonModule, RouterModule, PortalModule],\n exports: [\n TabGroupComponent,\n TabComponent,\n TabLabelDirective,\n TabNavBarComponent,\n TabLinkComponent,\n ],\n declarations: [\n TabGroupComponent,\n TabComponent,\n TabLabelDirective,\n TabListContainerDirective,\n TabListItemDirective,\n TabHeaderComponent,\n TabNavBarComponent,\n TabLinkComponent,\n TabBodyComponent,\n ],\n})\nexport class TabsModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { BadgeModule } from \"../badge\";\n\nimport { ToggleGroupComponent } from \"./toggle-group.component\";\nimport { ToggleComponent } from \"./toggle.component\";\n\n@NgModule({\n imports: [CommonModule, BadgeModule],\n exports: [ToggleGroupComponent, ToggleComponent],\n declarations: [ToggleGroupComponent, ToggleComponent],\n})\nexport class ToggleGroupModule {}\n","import { registerLocaleData } from \"@angular/common\";\nimport localeAf from \"@angular/common/locales/af\";\nimport localeAr from \"@angular/common/locales/ar\";\nimport localeAz from \"@angular/common/locales/az\";\nimport localeBe from \"@angular/common/locales/be\";\nimport localeBg from \"@angular/common/locales/bg\";\nimport localeBn from \"@angular/common/locales/bn\";\nimport localeBs from \"@angular/common/locales/bs\";\nimport localeCa from \"@angular/common/locales/ca\";\nimport localeCs from \"@angular/common/locales/cs\";\nimport localeCy from \"@angular/common/locales/cy\";\nimport localeDa from \"@angular/common/locales/da\";\nimport localeDe from \"@angular/common/locales/de\";\nimport localeEl from \"@angular/common/locales/el\";\nimport localeEnGb from \"@angular/common/locales/en-GB\";\nimport localeEnIn from \"@angular/common/locales/en-IN\";\nimport localeEo from \"@angular/common/locales/eo\";\nimport localeEs from \"@angular/common/locales/es\";\nimport localeEt from \"@angular/common/locales/et\";\nimport localeEu from \"@angular/common/locales/eu\";\nimport localeFa from \"@angular/common/locales/fa\";\nimport localeFi from \"@angular/common/locales/fi\";\nimport localeFil from \"@angular/common/locales/fil\";\nimport localeFr from \"@angular/common/locales/fr\";\nimport localeGl from \"@angular/common/locales/gl\";\nimport localeHe from \"@angular/common/locales/he\";\nimport localeHi from \"@angular/common/locales/hi\";\nimport localeHr from \"@angular/common/locales/hr\";\nimport localeHu from \"@angular/common/locales/hu\";\nimport localeId from \"@angular/common/locales/id\";\nimport localeIt from \"@angular/common/locales/it\";\nimport localeJa from \"@angular/common/locales/ja\";\nimport localeKa from \"@angular/common/locales/ka\";\nimport localeKm from \"@angular/common/locales/km\";\nimport localeKn from \"@angular/common/locales/kn\";\nimport localeKo from \"@angular/common/locales/ko\";\nimport localeLv from \"@angular/common/locales/lv\";\nimport localeMl from \"@angular/common/locales/ml\";\nimport localeMr from \"@angular/common/locales/mr\";\nimport localeMy from \"@angular/common/locales/my\";\nimport localeNb from \"@angular/common/locales/nb\";\nimport localeNe from \"@angular/common/locales/ne\";\nimport localeNl from \"@angular/common/locales/nl\";\nimport localeNn from \"@angular/common/locales/nn\";\nimport localeOr from \"@angular/common/locales/or\";\nimport localePl from \"@angular/common/locales/pl\";\nimport localePtBr from \"@angular/common/locales/pt\";\nimport localePtPt from \"@angular/common/locales/pt-PT\";\nimport localeRo from \"@angular/common/locales/ro\";\nimport localeRu from \"@angular/common/locales/ru\";\nimport localeSi from \"@angular/common/locales/si\";\nimport localeSk from \"@angular/common/locales/sk\";\nimport localeSl from \"@angular/common/locales/sl\";\nimport localeSr from \"@angular/common/locales/sr\";\nimport localeSv from \"@angular/common/locales/sv\";\nimport localeTe from \"@angular/common/locales/te\";\nimport localeTh from \"@angular/common/locales/th\";\nimport localeTr from \"@angular/common/locales/tr\";\nimport localeUk from \"@angular/common/locales/uk\";\nimport localeVi from \"@angular/common/locales/vi\";\nimport localeZhCn from \"@angular/common/locales/zh-Hans\";\nimport localeZhTw from \"@angular/common/locales/zh-Hant\";\n\nregisterLocaleData(localeAf, \"af\");\nregisterLocaleData(localeAr, \"ar\");\nregisterLocaleData(localeAz, \"az\");\nregisterLocaleData(localeBe, \"be\");\nregisterLocaleData(localeBg, \"bg\");\nregisterLocaleData(localeBn, \"bn\");\nregisterLocaleData(localeBs, \"bs\");\nregisterLocaleData(localeCa, \"ca\");\nregisterLocaleData(localeCs, \"cs\");\nregisterLocaleData(localeCy, \"cy\");\nregisterLocaleData(localeDa, \"da\");\nregisterLocaleData(localeDe, \"de\");\nregisterLocaleData(localeEl, \"el\");\nregisterLocaleData(localeEnGb, \"en-GB\");\nregisterLocaleData(localeEnIn, \"en-IN\");\nregisterLocaleData(localeEo, \"eo\");\nregisterLocaleData(localeEs, \"es\");\nregisterLocaleData(localeEt, \"et\");\nregisterLocaleData(localeEu, \"eu\");\nregisterLocaleData(localeFa, \"fa\");\nregisterLocaleData(localeFi, \"fi\");\nregisterLocaleData(localeFil, \"fil\");\nregisterLocaleData(localeFr, \"fr\");\nregisterLocaleData(localeGl, \"gl\");\nregisterLocaleData(localeHe, \"he\");\nregisterLocaleData(localeHi, \"hi\");\nregisterLocaleData(localeHr, \"hr\");\nregisterLocaleData(localeHu, \"hu\");\nregisterLocaleData(localeId, \"id\");\nregisterLocaleData(localeIt, \"it\");\nregisterLocaleData(localeJa, \"ja\");\nregisterLocaleData(localeKa, \"ka\");\nregisterLocaleData(localeKm, \"km\");\nregisterLocaleData(localeKn, \"kn\");\nregisterLocaleData(localeKo, \"ko\");\nregisterLocaleData(localeLv, \"lv\");\nregisterLocaleData(localeMl, \"ml\");\nregisterLocaleData(localeMr, \"mr\");\nregisterLocaleData(localeMy, \"my\");\nregisterLocaleData(localeNb, \"nb\");\nregisterLocaleData(localeNe, \"ne\");\nregisterLocaleData(localeNl, \"nl\");\nregisterLocaleData(localeNn, \"nn\");\nregisterLocaleData(localeOr, \"or\");\nregisterLocaleData(localePl, \"pl\");\nregisterLocaleData(localePtBr, \"pt-BR\");\nregisterLocaleData(localePtPt, \"pt-PT\");\nregisterLocaleData(localeRo, \"ro\");\nregisterLocaleData(localeRu, \"ru\");\nregisterLocaleData(localeSi, \"si\");\nregisterLocaleData(localeSk, \"sk\");\nregisterLocaleData(localeSl, \"sl\");\nregisterLocaleData(localeSr, \"sr\");\nregisterLocaleData(localeSv, \"sv\");\nregisterLocaleData(localeTe, \"te\");\nregisterLocaleData(localeTh, \"th\");\nregisterLocaleData(localeTr, \"tr\");\nregisterLocaleData(localeUk, \"uk\");\nregisterLocaleData(localeVi, \"vi\");\nregisterLocaleData(localeZhCn, \"zh-CN\");\nregisterLocaleData(localeZhTw, \"zh-TW\");\n","import { DragDropModule } from \"@angular/cdk/drag-drop\";\nimport { CommonModule, DatePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { RouterModule } from \"@angular/router\";\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n AsyncActionsModule,\n AvatarModule,\n BadgeListModule,\n BadgeModule,\n ButtonModule,\n CalloutModule,\n CheckboxModule,\n ColorPasswordModule,\n ContainerComponent,\n DialogModule,\n FormFieldModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n MenuModule,\n MultiSelectModule,\n ProgressModule,\n RadioButtonModule,\n SectionComponent,\n SelectModule,\n TableModule,\n TabsModule,\n ToggleGroupModule,\n TypographyModule,\n} from \"@bitwarden/components\";\n\n// Register the locales for the application\nimport \"./locales\";\n\n/**\n * This NgModule should contain the most basic shared directives, pipes, and components. They\n * should be widely used by other modules to be considered for adding to this module. If in doubt\n * do not add to this module.\n *\n * See: https://angular.io/guide/module-types#shared-ngmodules\n */\n@NgModule({\n imports: [\n CommonModule,\n DragDropModule,\n FormsModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n RouterModule,\n JslibModule,\n\n // Component library modules\n // Only add components that are used almost everywhere in the application\n AsyncActionsModule,\n AvatarModule,\n BadgeListModule,\n BadgeModule,\n ButtonModule,\n CalloutModule,\n CheckboxModule,\n ColorPasswordModule,\n ContainerComponent,\n DialogModule,\n FormFieldModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n MenuModule,\n MultiSelectModule,\n ProgressModule,\n RadioButtonModule,\n SectionComponent,\n TableModule,\n TabsModule,\n ToggleGroupModule,\n TypographyModule,\n\n // Web specific\n ],\n exports: [\n CommonModule,\n DragDropModule,\n FormsModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n RouterModule,\n JslibModule,\n\n // Component library\n AsyncActionsModule,\n AvatarModule,\n BadgeListModule,\n BadgeModule,\n ButtonModule,\n CalloutModule,\n CheckboxModule,\n ColorPasswordModule,\n ContainerComponent,\n DialogModule,\n FormFieldModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n MenuModule,\n MultiSelectModule,\n ProgressModule,\n RadioButtonModule,\n SectionComponent,\n SelectModule,\n TableModule,\n TabsModule,\n ToggleGroupModule,\n TypographyModule,\n\n // Web specific\n ],\n providers: [DatePipe],\n bootstrap: [],\n})\nexport class SharedModule {}\n","import { EventType } from \"@bitwarden/common/enums\";\nimport { EventView } from \"@bitwarden/common/models/view/event.view\";\n\nexport class EventExport {\n message: string;\n appIcon: string;\n appName: string;\n userId: string;\n userName: string;\n userEmail: string;\n date: string;\n ip: string;\n type: string;\n installationId: string;\n\n constructor(event: EventView) {\n this.message = event.humanReadableMessage;\n this.appIcon = event.appIcon;\n this.appName = event.appName;\n this.userId = event.userId;\n this.userName = event.userName;\n this.userEmail = event.userEmail;\n this.date = event.date;\n this.ip = event.ip;\n this.type = EventType[event.type];\n this.installationId = event.installationId;\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport * as papa from \"papaparse\";\n\nimport { EventView } from \"@bitwarden/common/models/view/event.view\";\n\nimport { EventExport } from \"./event.export\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class EventExportService {\n async getEventExport(events: EventView[]): Promise {\n return papa.unparse(events.map((e) => new EventExport(e)));\n }\n\n getFileName(prefix: string = null, extension = \"csv\"): string {\n const now = new Date();\n const dateString =\n now.getFullYear() +\n \"\" +\n this.padNumber(now.getMonth() + 1, 2) +\n \"\" +\n this.padNumber(now.getDate(), 2) +\n this.padNumber(now.getHours(), 2) +\n \"\" +\n this.padNumber(now.getMinutes(), 2) +\n this.padNumber(now.getSeconds(), 2);\n\n return \"bitwarden\" + (prefix ? \"_\" + prefix : \"\") + \"_export_\" + dateString + \".\" + extension;\n }\n\n private padNumber(num: number, width: number, padCharacter = \"0\"): string {\n const numString = num.toString();\n return numString.length >= width\n ? numString\n : new Array(width - numString.length + 1).join(padCharacter) + numString;\n }\n}\n","import { inject } from \"@angular/core\";\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n Router,\n CanActivateFn,\n UrlTree,\n} from \"@angular/router\";\nimport { Observable } from \"rxjs\";\nimport { tap } from \"rxjs/operators\";\n\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\n/**\n * CanActivate guard that checks if the user has premium and otherwise triggers the \"premiumRequired\"\n * message and blocks navigation.\n */\nexport function hasPremiumGuard(): CanActivateFn {\n return (\n _route: ActivatedRouteSnapshot,\n _state: RouterStateSnapshot,\n ): Observable => {\n const router = inject(Router);\n const messagingService = inject(MessagingService);\n const billingAccountProfileStateService = inject(BillingAccountProfileStateService);\n\n return billingAccountProfileStateService.hasPremiumFromAnySource$.pipe(\n tap((userHasPremium: boolean) => {\n if (!userHasPremium) {\n messagingService.send(\"premiumRequired\");\n }\n }),\n // Prevent trapping the user on the login page, since that's an awful UX flow\n tap((userHasPremium: boolean) => {\n if (!userHasPremium && router.url === \"/login\") {\n return router.createUrlTree([\"/\"]);\n }\n }),\n );\n };\n}\n","\n\n\n

    {{ \"breachDesc\" | i18n }}

    \n
    \n
    \n
    \n \n \n {{ \"breachCheckUsernameEmail\" | i18n }}\n
    \n
    \n \n
    \n
    \n

    {{ \"reportError\" | i18n }}...

    \n \n \n {{ \"breachUsernameNotFound\" | i18n: checkedUsername }}\n \n \n {{ \"breachUsernameFound\" | i18n: checkedUsername : breachedAccounts.length }}\n \n
      \n
    • \n
      \n
      \n \"\"\n
      \n
      \n

      {{ a.title }}

      \n

      \n

      {{ \"compromisedData\" | i18n }}:

      \n
        \n
      • {{ d }}
      • \n
      \n
      \n
      \n
      \n
      {{ \"website\" | i18n }}
      \n
      {{ a.domain }}
      \n
      {{ \"affectedUsers\" | i18n }}
      \n
      {{ a.pwnCount | number }}
      \n
      {{ \"breachOccurred\" | i18n }}
      \n
      {{ a.breachDate | date: \"mediumDate\" }}
      \n
      {{ \"breachReported\" | i18n }}
      \n
      {{ a.addedDate | date: \"mediumDate\" }}
      \n
      \n
      \n
      \n
    • \n
    \n
    \n
    \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BreachAccountResponse } from \"@bitwarden/common/models/response/breach-account.response\";\n\n@Component({\n selector: \"app-breach-report\",\n templateUrl: \"breach-report.component.html\",\n})\nexport class BreachReportComponent implements OnInit {\n error = false;\n username: string;\n checkedUsername: string;\n breachedAccounts: BreachAccountResponse[] = [];\n formPromise: Promise;\n\n constructor(\n private auditService: AuditService,\n private accountService: AccountService,\n ) {}\n\n async ngOnInit() {\n this.username = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n }\n\n async submit() {\n this.error = false;\n this.username = this.username.toLowerCase();\n try {\n this.formPromise = this.auditService.breachedAccounts(this.username);\n this.breachedAccounts = await this.formPromise;\n } catch {\n this.error = true;\n }\n this.checkedUsername = this.username;\n }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportBreach = svgIcon`\n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportExposedPasswords = svgIcon`\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportInactiveTwoFactor = svgIcon`\n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const MemberAccess = svgIcon`\n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportReusedPasswords = svgIcon`\n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportUnsecuredWebsites = svgIcon`\n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportWeakPasswords = svgIcon`\n \n \n \n \n \n \n`;\n","import { ReportBreach } from \"./icons/report-breach.icon\";\nimport { ReportExposedPasswords } from \"./icons/report-exposed-passwords.icon\";\nimport { ReportInactiveTwoFactor } from \"./icons/report-inactive-two-factor.icon\";\nimport { MemberAccess } from \"./icons/report-member-access.icon\";\nimport { ReportReusedPasswords } from \"./icons/report-reused-passwords.icon\";\nimport { ReportUnsecuredWebsites } from \"./icons/report-unsecured-websites.icon\";\nimport { ReportWeakPasswords } from \"./icons/report-weak-passwords.icon\";\nimport { ReportEntry } from \"./shared\";\n\nexport enum ReportType {\n ExposedPasswords = \"exposedPasswords\",\n ReusedPasswords = \"reusedPasswords\",\n WeakPasswords = \"weakPasswords\",\n UnsecuredWebsites = \"unsecuredWebsites\",\n Inactive2fa = \"inactive2fa\",\n DataBreach = \"dataBreach\",\n MemberAccessReport = \"memberAccessReport\",\n}\n\ntype ReportWithoutVariant = Omit;\n\nexport const reports: Record = {\n [ReportType.ExposedPasswords]: {\n title: \"exposedPasswordsReport\",\n description: \"exposedPasswordsReportDesc\",\n route: \"exposed-passwords-report\",\n icon: ReportExposedPasswords,\n },\n [ReportType.ReusedPasswords]: {\n title: \"reusedPasswordsReport\",\n description: \"reusedPasswordsReportDesc\",\n route: \"reused-passwords-report\",\n icon: ReportReusedPasswords,\n },\n [ReportType.WeakPasswords]: {\n title: \"weakPasswordsReport\",\n description: \"weakPasswordsReportDesc\",\n route: \"weak-passwords-report\",\n icon: ReportWeakPasswords,\n },\n [ReportType.UnsecuredWebsites]: {\n title: \"unsecuredWebsitesReport\",\n description: \"unsecuredWebsitesReportDesc\",\n route: \"unsecured-websites-report\",\n icon: ReportUnsecuredWebsites,\n },\n [ReportType.Inactive2fa]: {\n title: \"inactive2faReport\",\n description: \"inactive2faReportDesc\",\n route: \"inactive-two-factor-report\",\n icon: ReportInactiveTwoFactor,\n },\n [ReportType.DataBreach]: {\n title: \"dataBreachReport\",\n description: \"breachDesc\",\n route: \"breach-report\",\n icon: ReportBreach,\n },\n [ReportType.MemberAccessReport]: {\n title: \"memberAccessReport\",\n description: \"memberAccessReportDesc\",\n route: \"member-access-report\",\n icon: MemberAccess,\n },\n};\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\nimport { ReportCardComponent } from \"./report-card/report-card.component\";\nimport { ReportListComponent } from \"./report-list/report-list.component\";\n\n@NgModule({\n imports: [CommonModule, SharedModule],\n declarations: [ReportCardComponent, ReportListComponent],\n exports: [ReportCardComponent, ReportListComponent],\n})\nexport class ReportsSharedModule {}\n","import { Component, OnInit } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\n\nimport { reports, ReportType } from \"../reports\";\nimport { ReportEntry, ReportVariant } from \"../shared\";\n\n@Component({\n selector: \"app-reports-home\",\n templateUrl: \"reports-home.component.html\",\n})\nexport class ReportsHomeComponent implements OnInit {\n reports: ReportEntry[];\n\n constructor(private billingAccountProfileStateService: BillingAccountProfileStateService) {}\n\n async ngOnInit(): Promise {\n const userHasPremium = await firstValueFrom(\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n );\n const reportRequiresPremium = userHasPremium\n ? ReportVariant.Enabled\n : ReportVariant.RequiresPremium;\n\n this.reports = [\n {\n ...reports[ReportType.ExposedPasswords],\n variant: reportRequiresPremium,\n },\n {\n ...reports[ReportType.ReusedPasswords],\n variant: reportRequiresPremium,\n },\n {\n ...reports[ReportType.WeakPasswords],\n variant: reportRequiresPremium,\n },\n {\n ...reports[ReportType.UnsecuredWebsites],\n variant: reportRequiresPremium,\n },\n {\n ...reports[ReportType.Inactive2fa],\n variant: reportRequiresPremium,\n },\n {\n ...reports[ReportType.DataBreach],\n variant: ReportVariant.Enabled,\n },\n ];\n }\n}\n","\n\n\n

    {{ \"reportsDesc\" | i18n }}

    \n\n \n
    \n","\n\n\n","import { Component, OnDestroy } from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport { Subscription } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\n@Component({\n selector: \"app-reports-layout\",\n templateUrl: \"reports-layout.component.html\",\n})\nexport class ReportsLayoutComponent implements OnDestroy {\n homepage = true;\n subscription: Subscription;\n\n constructor(router: Router) {\n this.subscription = router.events\n .pipe(filter((event) => event instanceof NavigationEnd))\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n .subscribe((event) => {\n this.homepage = (event as NavigationEnd).url == \"/reports\";\n });\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { AuthGuard } from \"@bitwarden/angular/auth/guards\";\n\nimport { hasPremiumGuard } from \"../../core/guards/has-premium.guard\";\n\nimport { BreachReportComponent } from \"./pages/breach-report.component\";\nimport { ExposedPasswordsReportComponent } from \"./pages/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent } from \"./pages/inactive-two-factor-report.component\";\nimport { ReportsHomeComponent } from \"./pages/reports-home.component\";\nimport { ReusedPasswordsReportComponent } from \"./pages/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent } from \"./pages/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent } from \"./pages/weak-passwords-report.component\";\nimport { ReportsLayoutComponent } from \"./reports-layout.component\";\n\nconst routes: Routes = [\n {\n path: \"\",\n component: ReportsLayoutComponent,\n canActivate: [AuthGuard],\n children: [\n {\n path: \"\",\n pathMatch: \"full\",\n component: ReportsHomeComponent,\n data: { titleId: \"reports\", homepage: true },\n },\n {\n path: \"breach-report\",\n component: BreachReportComponent,\n data: { titleId: \"dataBreachReport\" },\n },\n {\n path: \"reused-passwords-report\",\n component: ReusedPasswordsReportComponent,\n data: { titleId: \"reusedPasswordsReport\" },\n canActivate: [hasPremiumGuard()],\n },\n {\n path: \"unsecured-websites-report\",\n component: UnsecuredWebsitesReportComponent,\n data: { titleId: \"unsecuredWebsitesReport\" },\n canActivate: [hasPremiumGuard()],\n },\n {\n path: \"weak-passwords-report\",\n component: WeakPasswordsReportComponent,\n data: { titleId: \"weakPasswordsReport\" },\n canActivate: [hasPremiumGuard()],\n },\n {\n path: \"exposed-passwords-report\",\n component: ExposedPasswordsReportComponent,\n data: { titleId: \"exposedPasswordsReport\" },\n canActivate: [hasPremiumGuard()],\n },\n {\n path: \"inactive-two-factor-report\",\n component: InactiveTwoFactorReportComponent,\n data: { titleId: \"inactive2faReport\" },\n canActivate: [hasPremiumGuard()],\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class ReportsRoutingModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\nimport { OrganizationBadgeModule } from \"../../vault/individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../../vault/individual-vault/pipes/pipes.module\";\n\nimport { BreachReportComponent } from \"./pages/breach-report.component\";\nimport { ExposedPasswordsReportComponent } from \"./pages/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent } from \"./pages/inactive-two-factor-report.component\";\nimport { ReportsHomeComponent } from \"./pages/reports-home.component\";\nimport { ReusedPasswordsReportComponent } from \"./pages/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent } from \"./pages/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent } from \"./pages/weak-passwords-report.component\";\nimport { ReportsLayoutComponent } from \"./reports-layout.component\";\nimport { ReportsRoutingModule } from \"./reports-routing.module\";\nimport { ReportsSharedModule } from \"./shared\";\n\n@NgModule({\n imports: [\n CommonModule,\n SharedModule,\n ReportsSharedModule,\n ReportsRoutingModule,\n OrganizationBadgeModule,\n PipesModule,\n HeaderModule,\n ],\n declarations: [\n BreachReportComponent,\n ExposedPasswordsReportComponent,\n InactiveTwoFactorReportComponent,\n ReportsLayoutComponent,\n ReportsHomeComponent,\n ReusedPasswordsReportComponent,\n UnsecuredWebsitesReportComponent,\n WeakPasswordsReportComponent,\n ],\n})\nexport class ReportsModule {}\n","import { Directive, ViewChild, ViewContainerRef, OnDestroy } from \"@angular/core\";\nimport { BehaviorSubject, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { TableDataSource } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent } from \"../../../vault/individual-vault/add-edit.component\";\nimport { AddEditComponent as OrgAddEditComponent } from \"../../../vault/org-vault/add-edit.component\";\n\n@Directive()\nexport class CipherReportComponent implements OnDestroy {\n @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n cipherAddEditModalRef: ViewContainerRef;\n isAdminConsoleActive = false;\n\n loading = false;\n hasLoaded = false;\n ciphers: CipherView[] = [];\n allCiphers: CipherView[] = [];\n dataSource = new TableDataSource();\n organization: Organization;\n organizations: Organization[];\n organizations$: Observable;\n\n filterStatus: any = [0];\n showFilterToggle: boolean = false;\n vaultMsg: string = \"vault\";\n currentFilterStatus: number | string;\n protected filterOrgStatus$ = new BehaviorSubject(0);\n private destroyed$: Subject = new Subject();\n\n constructor(\n protected cipherService: CipherService,\n private modalService: ModalService,\n protected passwordRepromptService: PasswordRepromptService,\n protected organizationService: OrganizationService,\n protected i18nService: I18nService,\n private syncService: SyncService,\n ) {\n this.organizations$ = this.organizationService.organizations$;\n this.organizations$.pipe(takeUntil(this.destroyed$)).subscribe((orgs) => {\n this.organizations = orgs;\n });\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n getName(filterId: string | number) {\n let orgName: any;\n\n if (filterId === 0) {\n orgName = this.i18nService.t(\"all\");\n } else if (filterId === 1) {\n orgName = this.i18nService.t(\"me\");\n } else {\n this.organizations.filter((org: Organization) => {\n if (org.id === filterId) {\n orgName = org.name;\n return org;\n }\n });\n }\n return orgName;\n }\n\n getCount(filterId: string | number) {\n let orgFilterStatus: any;\n let cipherCount;\n\n if (filterId === 0) {\n cipherCount = this.allCiphers.length;\n } else if (filterId === 1) {\n cipherCount = this.allCiphers.filter((c: any) => c.orgFilterStatus === null).length;\n } else {\n this.organizations.filter((org: Organization) => {\n if (org.id === filterId) {\n orgFilterStatus = org.id;\n return org;\n }\n });\n cipherCount = this.allCiphers.filter(\n (c: any) => c.orgFilterStatus === orgFilterStatus,\n ).length;\n }\n return cipherCount;\n }\n\n async filterOrgToggle(status: any) {\n this.currentFilterStatus = status;\n await this.setCiphers();\n if (status === 0) {\n return;\n } else if (status === 1) {\n this.ciphers = this.ciphers.filter((c: any) => c.orgFilterStatus == null);\n } else {\n this.ciphers = this.ciphers.filter((c: any) => c.orgFilterStatus === status);\n }\n this.dataSource.data = this.ciphers;\n }\n\n async load() {\n this.loading = true;\n await this.syncService.fullSync(false);\n // when a user fixes an item in a report we want to persist the filter they had\n // if they fix the last item of that filter we will go back to the \"All\" filter\n if (this.currentFilterStatus) {\n if (this.ciphers.length > 2) {\n this.filterOrgStatus$.next(this.currentFilterStatus);\n await this.filterOrgToggle(this.currentFilterStatus);\n } else {\n this.filterOrgStatus$.next(0);\n await this.filterOrgToggle(0);\n }\n } else {\n await this.setCiphers();\n }\n this.loading = false;\n this.hasLoaded = true;\n }\n\n async selectCipher(cipher: CipherView) {\n if (!(await this.repromptCipher(cipher))) {\n return;\n }\n\n const type = this.organization != null ? OrgAddEditComponent : AddEditComponent;\n\n const [modal, childComponent] = await this.modalService.openViewRef(\n type,\n this.cipherAddEditModalRef,\n (comp: OrgAddEditComponent | AddEditComponent) => {\n if (this.organization != null) {\n (comp as OrgAddEditComponent).organization = this.organization;\n comp.organizationId = this.organization.id;\n }\n\n comp.cipherId = cipher == null ? null : cipher.id;\n // eslint-disable-next-line rxjs/no-async-subscribe\n comp.onSavedCipher.subscribe(async () => {\n modal.close();\n await this.load();\n });\n // eslint-disable-next-line rxjs/no-async-subscribe\n comp.onDeletedCipher.subscribe(async () => {\n modal.close();\n await this.load();\n });\n // eslint-disable-next-line rxjs/no-async-subscribe\n comp.onRestoredCipher.subscribe(async () => {\n modal.close();\n await this.load();\n });\n },\n );\n\n return childComponent;\n }\n\n protected async setCiphers() {\n this.allCiphers = [];\n }\n\n protected async repromptCipher(c: CipherView) {\n return (\n c.reprompt === CipherRepromptType.None ||\n (await this.passwordRepromptService.showPasswordPrompt())\n );\n }\n\n protected async getAllCiphers(): Promise {\n return await this.cipherService.getAllDecrypted();\n }\n\n protected filterCiphersByOrg(ciphersList: CipherView[]) {\n this.allCiphers = [...ciphersList];\n\n this.ciphers = ciphersList.map((ciph: any) => {\n ciph.orgFilterStatus = ciph.organizationId;\n\n if (this.filterStatus.indexOf(ciph.organizationId) === -1 && ciph.organizationId != null) {\n this.filterStatus.push(ciph.organizationId);\n } else if (this.filterStatus.indexOf(1) === -1 && ciph.organizationId == null) {\n this.filterStatus.splice(1, 0, 1);\n }\n return ciph;\n });\n\n this.dataSource.data = this.ciphers;\n\n if (this.filterStatus.length > 2) {\n this.showFilterToggle = true;\n this.vaultMsg = \"vaults\";\n } else {\n // If a user fixes an item and there is only one item left remove the filter toggle and change the vault message to singular\n this.showFilterToggle = false;\n this.vaultMsg = \"vault\";\n }\n }\n}\n","\n\n\n

    {{ \"exposedPasswordsReportDesc\" | i18n }}

    \n \n
    \n \n {{ \"noExposedPasswords\" | i18n }}\n \n \n \n {{ \"exposedPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n \n \n \n \n {{ getName(status) }}\n {{ getCount(status) }} \n \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"owner\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ r.name }}\n \n \n {{ r.name }}\n \n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ r.subTitle }}\n \n \n \n \n \n \n \n {{ \"exposedXTimes\" | i18n: (exposedPasswordMap.get(r.id) | number) }}\n \n \n \n \n \n \n
    \n \n\n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n@Component({\n selector: \"app-exposed-passwords-report\",\n templateUrl: \"exposed-passwords-report.component.html\",\n})\nexport class ExposedPasswordsReportComponent extends CipherReportComponent implements OnInit {\n exposedPasswordMap = new Map();\n disabled = true;\n\n constructor(\n protected cipherService: CipherService,\n protected auditService: AuditService,\n protected organizationService: OrganizationService,\n modalService: ModalService,\n passwordRepromptService: PasswordRepromptService,\n i18nService: I18nService,\n syncService: SyncService,\n ) {\n super(\n cipherService,\n modalService,\n passwordRepromptService,\n organizationService,\n i18nService,\n syncService,\n );\n }\n\n async ngOnInit() {\n await super.load();\n }\n\n async setCiphers() {\n const allCiphers = await this.getAllCiphers();\n const exposedPasswordCiphers: CipherView[] = [];\n const promises: Promise[] = [];\n this.filterStatus = [0];\n\n allCiphers.forEach((ciph: any) => {\n const { type, login, isDeleted, edit, viewPassword, id } = ciph;\n if (\n type !== CipherType.Login ||\n login.password == null ||\n login.password === \"\" ||\n isDeleted ||\n (!this.organization && !edit) ||\n !viewPassword\n ) {\n return;\n }\n\n const promise = this.auditService.passwordLeaked(login.password).then((exposedCount) => {\n if (exposedCount > 0) {\n exposedPasswordCiphers.push(ciph);\n this.exposedPasswordMap.set(id, exposedCount);\n }\n });\n promises.push(promise);\n });\n await Promise.all(promises);\n\n this.filterCiphersByOrg(exposedPasswordCiphers);\n }\n\n protected canManageCipher(c: CipherView): boolean {\n // this will only ever be false from the org view;\n return true;\n }\n}\n","\n\n\n

    {{ \"inactive2faReportDesc\" | i18n }}

    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n {{ \"noInactive2fa\" | i18n }}\n \n \n \n {{ \"inactive2faFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n \n \n \n \n {{ getName(status) }}\n {{ getCount(status) }} \n \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"owner\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ r.name }}\n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ r.subTitle }}\n \n \n \n \n \n \n \n {{ \"instructions\" | i18n }}\n \n \n
    \n \n
    \n
    \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n selector: \"app-inactive-two-factor-report\",\n templateUrl: \"inactive-two-factor-report.component.html\",\n})\nexport class InactiveTwoFactorReportComponent extends CipherReportComponent implements OnInit {\n services = new Map();\n cipherDocs = new Map();\n disabled = true;\n\n constructor(\n protected cipherService: CipherService,\n protected organizationService: OrganizationService,\n modalService: ModalService,\n private logService: LogService,\n passwordRepromptService: PasswordRepromptService,\n i18nService: I18nService,\n syncService: SyncService,\n ) {\n super(\n cipherService,\n modalService,\n passwordRepromptService,\n organizationService,\n i18nService,\n syncService,\n );\n }\n\n async ngOnInit() {\n await super.load();\n }\n\n async setCiphers() {\n try {\n await this.load2fa();\n } catch (e) {\n this.logService.error(e);\n }\n\n if (this.services.size > 0) {\n const allCiphers = await this.getAllCiphers();\n const inactive2faCiphers: CipherView[] = [];\n const docs = new Map();\n this.filterStatus = [0];\n\n allCiphers.forEach((ciph) => {\n const { type, login, isDeleted, edit, id, viewPassword } = ciph;\n if (\n type !== CipherType.Login ||\n (login.totp != null && login.totp !== \"\") ||\n !login.hasUris ||\n isDeleted ||\n (!this.organization && !edit) ||\n !viewPassword\n ) {\n return;\n }\n\n for (let i = 0; i < login.uris.length; i++) {\n const u = login.uris[i];\n if (u.uri != null && u.uri !== \"\") {\n const uri = u.uri.replace(\"www.\", \"\");\n const domain = Utils.getDomain(uri);\n if (domain != null && this.services.has(domain)) {\n if (this.services.get(domain) != null) {\n docs.set(id, this.services.get(domain));\n }\n // If the uri is in the 2fa list. Add the cipher to the inactive\n // collection. No need to check any additional uris for the cipher.\n inactive2faCiphers.push(ciph);\n return;\n }\n }\n }\n });\n\n this.filterCiphersByOrg(inactive2faCiphers);\n this.cipherDocs = docs;\n }\n }\n\n private async load2fa() {\n if (this.services.size > 0) {\n return;\n }\n const response = await fetch(new Request(\"https://api.2fa.directory/v3/totp.json\"));\n if (response.status !== 200) {\n throw new Error();\n }\n const responseJson = await response.json();\n for (const service of responseJson) {\n const serviceData = service[1];\n if (serviceData.domain == null) {\n continue;\n }\n if (serviceData.documentation == null) {\n continue;\n }\n if (serviceData[\"additional-domains\"] != null) {\n for (const additionalDomain of serviceData[\"additional-domains\"]) {\n this.services.set(additionalDomain, serviceData.documentation);\n }\n }\n this.services.set(serviceData.domain, serviceData.documentation);\n }\n }\n}\n","\n\n\n

    {{ \"reusedPasswordsReportDesc\" | i18n }}

    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n {{ \"noReusedPasswords\" | i18n }}\n \n \n \n {{ \"reusedPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n \n\n \n \n \n {{ getName(status) }}\n {{ getCount(status) }} \n \n \n \n\n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"owner\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ r.name }}\n \n \n {{ r.name }}\n \n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ r.subTitle }}\n \n \n \n \n \n \n \n {{ \"reusedXTimes\" | i18n: passwordUseMap.get(r.login.password) }}\n \n \n \n
    \n
    \n
    \n
    \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n selector: \"app-reused-passwords-report\",\n templateUrl: \"reused-passwords-report.component.html\",\n})\nexport class ReusedPasswordsReportComponent extends CipherReportComponent implements OnInit {\n passwordUseMap: Map;\n disabled = true;\n\n constructor(\n protected cipherService: CipherService,\n protected organizationService: OrganizationService,\n modalService: ModalService,\n passwordRepromptService: PasswordRepromptService,\n i18nService: I18nService,\n syncService: SyncService,\n ) {\n super(\n cipherService,\n modalService,\n passwordRepromptService,\n organizationService,\n i18nService,\n syncService,\n );\n }\n\n async ngOnInit() {\n await super.load();\n }\n\n async setCiphers() {\n const allCiphers = await this.getAllCiphers();\n const ciphersWithPasswords: CipherView[] = [];\n this.passwordUseMap = new Map();\n this.filterStatus = [0];\n\n allCiphers.forEach((ciph) => {\n const { type, login, isDeleted, edit, viewPassword } = ciph;\n if (\n type !== CipherType.Login ||\n login.password == null ||\n login.password === \"\" ||\n isDeleted ||\n (!this.organization && !edit) ||\n !viewPassword\n ) {\n return;\n }\n\n ciphersWithPasswords.push(ciph);\n if (this.passwordUseMap.has(login.password)) {\n this.passwordUseMap.set(login.password, this.passwordUseMap.get(login.password) + 1);\n } else {\n this.passwordUseMap.set(login.password, 1);\n }\n });\n const reusedPasswordCiphers = ciphersWithPasswords.filter(\n (c) =>\n this.passwordUseMap.has(c.login.password) && this.passwordUseMap.get(c.login.password) > 1,\n );\n\n this.filterCiphersByOrg(reusedPasswordCiphers);\n }\n\n protected canManageCipher(c: CipherView): boolean {\n // this will only ever be false from an organization view\n return true;\n }\n}\n","\n\n\n

    {{ \"unsecuredWebsitesReportDesc\" | i18n }}

    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n {{ \"noUnsecuredWebsites\" | i18n }}\n \n \n \n {{ \"unsecuredWebsitesFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n \n\n \n \n \n {{ getName(status) }}\n {{ getCount(status) }} \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{ \"name\" | i18n }}{{ \"owner\" | i18n }}
    \n \n \n {{\n c.name\n }}\n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ c.subTitle }}\n
    \n \n \n
    \n
    \n
    \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n selector: \"app-unsecured-websites-report\",\n templateUrl: \"unsecured-websites-report.component.html\",\n})\nexport class UnsecuredWebsitesReportComponent extends CipherReportComponent implements OnInit {\n disabled = true;\n\n constructor(\n protected cipherService: CipherService,\n protected organizationService: OrganizationService,\n modalService: ModalService,\n passwordRepromptService: PasswordRepromptService,\n i18nService: I18nService,\n syncService: SyncService,\n ) {\n super(\n cipherService,\n modalService,\n passwordRepromptService,\n organizationService,\n i18nService,\n syncService,\n );\n }\n\n async ngOnInit() {\n await super.load();\n }\n\n async setCiphers() {\n const allCiphers = await this.getAllCiphers();\n this.filterStatus = [0];\n const unsecuredCiphers = allCiphers.filter((c) => {\n if (c.type !== CipherType.Login || !c.login.hasUris || c.isDeleted) {\n return false;\n }\n\n return c.login.uris.some((u: any) => u.uri != null && u.uri.indexOf(\"http://\") === 0);\n });\n\n this.filterCiphersByOrg(unsecuredCiphers);\n }\n}\n","\n\n\n

    {{ \"weakPasswordsReportDesc\" | i18n }}

    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n {{ \"noWeakPasswords\" | i18n }}\n \n \n \n {{ \"weakPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n \n \n \n \n {{ getName(status) }}\n {{ getCount(status) }} \n \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"owner\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ r.name }}\n \n \n {{ r.name }}\n \n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ r.subTitle }}\n \n \n \n \n \n \n \n {{ passwordStrengthMap.get(r.id)[0] | i18n }}\n \n \n \n
    \n
    \n
    \n
    \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { BadgeVariant } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n selector: \"app-weak-passwords-report\",\n templateUrl: \"weak-passwords-report.component.html\",\n})\nexport class WeakPasswordsReportComponent extends CipherReportComponent implements OnInit {\n passwordStrengthMap = new Map();\n disabled = true;\n\n private passwordStrengthCache = new Map();\n weakPasswordCiphers: CipherView[] = [];\n\n constructor(\n protected cipherService: CipherService,\n protected passwordStrengthService: PasswordStrengthServiceAbstraction,\n protected organizationService: OrganizationService,\n modalService: ModalService,\n passwordRepromptService: PasswordRepromptService,\n i18nService: I18nService,\n syncService: SyncService,\n ) {\n super(\n cipherService,\n modalService,\n passwordRepromptService,\n organizationService,\n i18nService,\n syncService,\n );\n }\n\n async ngOnInit() {\n await super.load();\n }\n\n async setCiphers() {\n const allCiphers: any = await this.getAllCiphers();\n this.passwordStrengthCache = new Map();\n this.weakPasswordCiphers = [];\n this.filterStatus = [0];\n this.findWeakPasswords(allCiphers);\n }\n\n protected findWeakPasswords(ciphers: any[]): void {\n ciphers.forEach((ciph) => {\n const { type, login, isDeleted, edit, viewPassword, id } = ciph;\n if (\n type !== CipherType.Login ||\n login.password == null ||\n login.password === \"\" ||\n isDeleted ||\n (!this.organization && !edit) ||\n !viewPassword\n ) {\n return;\n }\n\n const hasUserName = this.isUserNameNotEmpty(ciph);\n const cacheKey = this.getCacheKey(ciph);\n if (!this.passwordStrengthCache.has(cacheKey)) {\n let userInput: string[] = [];\n if (hasUserName) {\n const atPosition = login.username.indexOf(\"@\");\n if (atPosition > -1) {\n userInput = userInput\n .concat(\n login.username\n .substr(0, atPosition)\n .trim()\n .toLowerCase()\n .split(/[^A-Za-z0-9]/),\n )\n .filter((i) => i.length >= 3);\n } else {\n userInput = login.username\n .trim()\n .toLowerCase()\n .split(/[^A-Za-z0-9]/)\n .filter((i: any) => i.length >= 3);\n }\n }\n const result = this.passwordStrengthService.getPasswordStrength(\n login.password,\n null,\n userInput.length > 0 ? userInput : null,\n );\n this.passwordStrengthCache.set(cacheKey, result.score);\n }\n const score = this.passwordStrengthCache.get(cacheKey);\n\n if (score != null && score <= 2) {\n this.passwordStrengthMap.set(id, this.scoreKey(score));\n this.weakPasswordCiphers.push(ciph);\n }\n });\n this.weakPasswordCiphers.sort((a, b) => {\n return (\n this.passwordStrengthCache.get(this.getCacheKey(a)) -\n this.passwordStrengthCache.get(this.getCacheKey(b))\n );\n });\n\n this.filterCiphersByOrg(this.weakPasswordCiphers);\n }\n\n protected canManageCipher(c: CipherView): boolean {\n // this will only ever be false from the org view;\n return true;\n }\n\n private isUserNameNotEmpty(c: CipherView): boolean {\n return !Utils.isNullOrWhitespace(c.login.username);\n }\n\n private getCacheKey(c: CipherView): string {\n return c.login.password + \"_____\" + (this.isUserNameNotEmpty(c) ? c.login.username : \"\");\n }\n\n private scoreKey(score: number): [string, BadgeVariant] {\n switch (score) {\n case 4:\n return [\"strong\", \"success\"];\n case 3:\n return [\"good\", \"primary\"];\n case 2:\n return [\"weak\", \"warning\"];\n default:\n return [\"veryWeak\", \"danger\"];\n }\n }\n}\n","export enum ReportVariant {\n Enabled = \"Enabled\",\n RequiresPremium = \"RequiresPremium\",\n RequiresUpgrade = \"RequiresUpgrade\",\n RequiresEnterprise = \"RequiresEnterprise\",\n}\n","\n
    \n \n
    \n
    \n
    \n

    {{ title }}

    \n

    {{ description }}

    \n
    \n \n {{ \"premium\" | i18n }}\n {{ \"upgrade\" | i18n }}\n \n \n\n","import { Component, Input } from \"@angular/core\";\n\nimport { Icon } from \"@bitwarden/components\";\n\nimport { ReportVariant } from \"../models/report-variant\";\n\n@Component({\n selector: \"app-report-card\",\n templateUrl: \"report-card.component.html\",\n})\nexport class ReportCardComponent {\n @Input() title: string;\n @Input() description: string;\n @Input() route: string;\n @Input() icon: Icon;\n @Input() variant: ReportVariant;\n\n protected get disabled() {\n return this.variant != ReportVariant.Enabled;\n }\n\n protected get requiresPremium() {\n return this.variant == ReportVariant.RequiresPremium;\n }\n}\n","
    \n
    \n \n
    \n
    \n","import { Component, Input } from \"@angular/core\";\n\nimport { ReportEntry } from \"../models/report-entry\";\n\n@Component({\n selector: \"app-report-list\",\n templateUrl: \"report-list.component.html\",\n})\nexport class ReportListComponent {\n @Input() reports: ReportEntry[];\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { PluralizePipe } from \"@bitwarden/angular/pipes/pluralize.pipe\";\nimport { DialogService } from \"@bitwarden/components\";\nimport {\n AssignCollectionsComponent,\n CollectionAssignmentParams,\n CollectionAssignmentResult,\n} from \"@bitwarden/vault\";\n\nimport { SharedModule } from \"../../../shared\";\n\n@Component({\n imports: [SharedModule, AssignCollectionsComponent, PluralizePipe],\n templateUrl: \"./assign-collections-web.component.html\",\n standalone: true,\n})\nexport class AssignCollectionsWebComponent {\n protected loading = false;\n protected disabled = false;\n protected editableItemCount: number;\n\n constructor(\n @Inject(DIALOG_DATA) public params: CollectionAssignmentParams,\n private dialogRef: DialogRef,\n ) {}\n\n protected async onCollectionAssign(result: CollectionAssignmentResult) {\n this.dialogRef.close(result);\n }\n\n static open(dialogService: DialogService, config: DialogConfig) {\n return dialogService.open(\n AssignCollectionsWebComponent,\n config,\n );\n }\n}\n","\n \n {{ \"assignToCollections\" | i18n }}\n \n {{ editableItemCount | pluralize: (\"item\" | i18n) : (\"items\" | i18n) }}\n \n \n\n
    \n \n
    \n\n \n \n {{ \"assign\" | i18n }}\n \n \n \n
    \n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { AbstractControl, FormBuilder, Validators } from \"@angular/forms\";\nimport {\n combineLatest,\n map,\n Observable,\n of,\n shareReplay,\n Subject,\n switchMap,\n takeUntil,\n} from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserUserDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses/organization-user.response\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CollectionResponse } from \"@bitwarden/common/vault/models/response/collection.response\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { BitValidators, DialogService } from \"@bitwarden/components\";\n\nimport {\n CollectionAccessSelectionView,\n GroupService,\n GroupView,\n} from \"../../../admin-console/organizations/core\";\nimport { PermissionMode } from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.component\";\nimport {\n AccessItemType,\n AccessItemValue,\n AccessItemView,\n CollectionPermission,\n convertToPermission,\n convertToSelectionView,\n} from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\nimport { CollectionAdminService } from \"../../core/collection-admin.service\";\nimport { CollectionAdminView } from \"../../core/views/collection-admin.view\";\n\nexport enum CollectionDialogTabType {\n Info = 0,\n Access = 1,\n}\n\nexport interface CollectionDialogParams {\n collectionId?: string;\n organizationId: string;\n initialTab?: CollectionDialogTabType;\n parentCollectionId?: string;\n showOrgSelector?: boolean;\n /**\n * Flag to limit the nested collections to only those the user has explicit CanManage access too.\n */\n limitNestedCollections?: boolean;\n readonly?: boolean;\n isAddAccessCollection?: boolean;\n}\n\nexport interface CollectionDialogResult {\n action: CollectionDialogAction;\n collection: CollectionResponse | CollectionView;\n}\n\nexport enum CollectionDialogAction {\n Saved = \"saved\",\n Canceled = \"canceled\",\n Deleted = \"deleted\",\n}\n\n@Component({\n templateUrl: \"collection-dialog.component.html\",\n})\nexport class CollectionDialogComponent implements OnInit, OnDestroy {\n protected flexibleCollectionsV1Enabled$ = this.configService\n .getFeatureFlag$(FeatureFlag.FlexibleCollectionsV1)\n .pipe(first());\n\n private destroy$ = new Subject();\n protected organizations$: Observable;\n\n protected tabIndex: CollectionDialogTabType;\n protected loading = true;\n protected organization?: Organization;\n protected collection?: CollectionAdminView;\n protected nestOptions: CollectionView[] = [];\n protected accessItems: AccessItemView[] = [];\n protected deletedParentName: string | undefined;\n protected showOrgSelector = false;\n protected formGroup = this.formBuilder.group({\n name: [\"\", [Validators.required, BitValidators.forbiddenCharacters([\"/\"])]],\n externalId: \"\",\n parent: undefined as string | undefined,\n access: [[] as AccessItemValue[]],\n selectedOrg: \"\",\n });\n protected PermissionMode = PermissionMode;\n protected showDeleteButton = false;\n protected showAddAccessWarning = false;\n\n constructor(\n @Inject(DIALOG_DATA) private params: CollectionDialogParams,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n private organizationService: OrganizationService,\n private groupService: GroupService,\n private collectionAdminService: CollectionAdminService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private organizationUserService: OrganizationUserService,\n private configService: ConfigService,\n private dialogService: DialogService,\n private changeDetectorRef: ChangeDetectorRef,\n ) {\n this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;\n }\n\n async ngOnInit() {\n // Opened from the individual vault\n if (this.params.showOrgSelector) {\n this.showOrgSelector = true;\n this.formGroup.controls.selectedOrg.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((id) => this.loadOrg(id));\n this.organizations$ = this.organizationService.organizations$.pipe(\n first(),\n map((orgs) =>\n orgs\n .filter((o) => o.canCreateNewCollections && !o.isProviderUser)\n .sort(Utils.getSortFunction(this.i18nService, \"name\")),\n ),\n );\n // patchValue will trigger a call to loadOrg() in this case, so no need to call it again here\n this.formGroup.patchValue({ selectedOrg: this.params.organizationId });\n } else {\n // Opened from the org vault\n this.formGroup.patchValue({ selectedOrg: this.params.organizationId });\n await this.loadOrg(this.params.organizationId);\n }\n }\n\n async loadOrg(orgId: string) {\n const organization$ = this.organizationService\n .get$(orgId)\n .pipe(shareReplay({ refCount: true, bufferSize: 1 }));\n const groups$ = organization$.pipe(\n switchMap((organization) => {\n if (!organization.useGroups) {\n return of([] as GroupView[]);\n }\n\n return this.groupService.getAll(orgId);\n }),\n );\n combineLatest({\n organization: organization$,\n collections: this.collectionAdminService.getAll(orgId),\n groups: groups$,\n // Collection(s) needed to map readonlypermission for (potential) access selector disabled state\n users: this.organizationUserService.getAllUsers(orgId, { includeCollections: true }),\n flexibleCollectionsV1: this.flexibleCollectionsV1Enabled$,\n })\n .pipe(takeUntil(this.formGroup.controls.selectedOrg.valueChanges), takeUntil(this.destroy$))\n .subscribe(\n ({ organization, collections: allCollections, groups, users, flexibleCollectionsV1 }) => {\n this.organization = organization;\n this.accessItems = [].concat(\n groups.map((group) => mapGroupToAccessItemView(group, this.collectionId)),\n users.data.map((user) => mapUserToAccessItemView(user, this.collectionId)),\n );\n\n // Force change detection to update the access selector's items\n this.changeDetectorRef.detectChanges();\n\n this.nestOptions = this.params.limitNestedCollections\n ? allCollections.filter((c) => c.manage)\n : allCollections;\n\n if (this.params.collectionId) {\n this.collection = allCollections.find((c) => c.id === this.collectionId);\n // Ensure we don't allow nesting the current collection within itself\n this.nestOptions = this.nestOptions.filter((c) => c.id !== this.collectionId);\n\n if (!this.collection) {\n throw new Error(\"Could not find collection to edit.\");\n }\n\n // Parse the name to find its parent name\n const { name, parent: parentName } = parseName(this.collection);\n\n // Determine if the user can see/select the parent collection\n if (parentName !== undefined) {\n if (\n this.organization.canViewAllCollections &&\n !allCollections.find((c) => c.name === parentName)\n ) {\n // The user can view all collections, but the parent was not found -> assume it has been deleted\n this.deletedParentName = parentName;\n } else if (!this.nestOptions.find((c) => c.name === parentName)) {\n // We cannot find the current parent collection in our list of options, so add a placeholder\n this.nestOptions.unshift({ name: parentName } as CollectionView);\n }\n }\n\n const accessSelections = mapToAccessSelections(this.collection);\n this.formGroup.patchValue({\n name,\n externalId: this.collection.externalId,\n parent: parentName,\n access: accessSelections,\n });\n this.showDeleteButton =\n !this.dialogReadonly &&\n this.collection.canDelete(organization, flexibleCollectionsV1);\n } else {\n const parent = this.nestOptions.find((c) => c.id === this.params.parentCollectionId);\n const currentOrgUserId = users.data.find(\n (u) => u.userId === this.organization?.userId,\n )?.id;\n const initialSelection: AccessItemValue[] =\n currentOrgUserId !== undefined\n ? [\n {\n id: currentOrgUserId,\n type: AccessItemType.Member,\n permission: CollectionPermission.Manage,\n },\n ]\n : [];\n\n this.formGroup.patchValue({\n parent: parent?.name ?? undefined,\n access: initialSelection,\n });\n }\n\n if (flexibleCollectionsV1 && !organization.allowAdminAccessToAllCollectionItems) {\n this.formGroup.controls.access.addValidators(validateCanManagePermission);\n } else {\n this.formGroup.controls.access.removeValidators(validateCanManagePermission);\n }\n this.formGroup.controls.access.updateValueAndValidity();\n\n this.handleFormGroupReadonly(this.dialogReadonly);\n\n this.loading = false;\n this.showAddAccessWarning = this.handleAddAccessWarning(flexibleCollectionsV1);\n },\n );\n }\n\n protected get collectionId() {\n return this.params.collectionId;\n }\n\n protected get editMode() {\n return this.params.collectionId != undefined;\n }\n\n protected get dialogReadonly() {\n return this.params.readonly === true;\n }\n\n protected async cancel() {\n this.close(CollectionDialogAction.Canceled);\n }\n\n protected submit = async () => {\n // Saving a collection is prohibited while in read only mode\n if (this.dialogReadonly) {\n return;\n }\n\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n const accessTabError = this.formGroup.controls.access.hasError(\"managePermissionRequired\");\n\n if (this.tabIndex === CollectionDialogTabType.Access && !accessTabError) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"fieldOnTabRequiresAttention\", this.i18nService.t(\"collectionInfo\")),\n );\n } else if (this.tabIndex === CollectionDialogTabType.Info && accessTabError) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"fieldOnTabRequiresAttention\", this.i18nService.t(\"access\")),\n );\n }\n return;\n }\n\n const collectionView = new CollectionAdminView();\n collectionView.id = this.params.collectionId;\n collectionView.organizationId = this.formGroup.controls.selectedOrg.value;\n collectionView.externalId = this.formGroup.controls.externalId.value;\n collectionView.groups = this.formGroup.controls.access.value\n .filter((v) => v.type === AccessItemType.Group)\n .map(convertToSelectionView);\n collectionView.users = this.formGroup.controls.access.value\n .filter((v) => v.type === AccessItemType.Member)\n .map(convertToSelectionView);\n\n const parent = this.formGroup.controls.parent.value;\n if (parent) {\n collectionView.name = `${parent}/${this.formGroup.controls.name.value}`;\n } else {\n collectionView.name = this.formGroup.controls.name.value;\n }\n\n const savedCollection = await this.collectionAdminService.save(collectionView);\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\n this.editMode ? \"editedCollectionId\" : \"createdCollectionId\",\n collectionView.name,\n ),\n );\n\n this.close(CollectionDialogAction.Saved, savedCollection);\n };\n\n protected delete = async () => {\n // Deleting a collection is prohibited while in read only mode\n if (this.dialogReadonly) {\n return;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.collection?.name,\n content: { key: \"deleteCollectionConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed && this.params.collectionId) {\n return false;\n }\n\n await this.collectionAdminService.delete(this.params.organizationId, this.params.collectionId);\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"deletedCollectionId\", this.collection?.name),\n );\n\n this.close(CollectionDialogAction.Deleted, this.collection);\n };\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private handleAddAccessWarning(flexibleCollectionsV1: boolean): boolean {\n if (\n flexibleCollectionsV1 &&\n !this.organization?.allowAdminAccessToAllCollectionItems &&\n this.params.isAddAccessCollection\n ) {\n return true;\n }\n\n return false;\n }\n\n private handleFormGroupReadonly(readonly: boolean) {\n if (readonly) {\n this.formGroup.controls.name.disable();\n this.formGroup.controls.externalId.disable();\n this.formGroup.controls.parent.disable();\n this.formGroup.controls.access.disable();\n } else {\n this.formGroup.controls.name.enable();\n this.formGroup.controls.externalId.enable();\n this.formGroup.controls.parent.enable();\n this.formGroup.controls.access.enable();\n }\n }\n\n private close(action: CollectionDialogAction, collection?: CollectionResponse | CollectionView) {\n this.dialogRef.close({ action, collection } as CollectionDialogResult);\n }\n}\n\nfunction parseName(collection: CollectionView) {\n const nameParts = collection.name?.split(\"/\");\n const name = nameParts[nameParts.length - 1];\n const parent = nameParts.length > 1 ? nameParts.slice(0, -1).join(\"/\") : undefined;\n\n return { name, parent };\n}\n\nfunction mapToAccessSelections(collectionDetails: CollectionAdminView): AccessItemValue[] {\n if (collectionDetails == undefined) {\n return [];\n }\n return [].concat(\n collectionDetails.groups.map((selection) => ({\n id: selection.id,\n type: AccessItemType.Group,\n permission: convertToPermission(selection),\n })),\n collectionDetails.users.map((selection) => ({\n id: selection.id,\n type: AccessItemType.Member,\n permission: convertToPermission(selection),\n })),\n );\n}\n\n/**\n * Validator to ensure that at least one access item has Manage permission\n */\nfunction validateCanManagePermission(control: AbstractControl) {\n const access = control.value as AccessItemValue[];\n const hasManagePermission = access.some((a) => a.permission === CollectionPermission.Manage);\n\n return hasManagePermission ? null : { managePermissionRequired: true };\n}\n\n/**\n *\n * @param group Current group being used to translate object into AccessItemView\n * @param collectionId Current collection being viewed/edited\n * @returns AccessItemView customized to set a readonlyPermission to be displayed if the access selector is in a disabled state\n */\nfunction mapGroupToAccessItemView(group: GroupView, collectionId: string): AccessItemView {\n return {\n id: group.id,\n type: AccessItemType.Group,\n listName: group.name,\n labelName: group.name,\n readonly: false,\n readonlyPermission:\n collectionId != null\n ? convertToPermission(group.collections.find((gc) => gc.id == collectionId))\n : undefined,\n };\n}\n\n/**\n *\n * @param user Current user being used to translate object into AccessItemView\n * @param collectionId Current collection being viewed/edited\n * @returns AccessItemView customized to set a readonlyPermission to be displayed if the access selector is in a disabled state\n */\nfunction mapUserToAccessItemView(\n user: OrganizationUserUserDetailsResponse,\n collectionId: string,\n): AccessItemView {\n return {\n id: user.id,\n type: AccessItemType.Member,\n email: user.email,\n role: user.type,\n listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,\n labelName: user.name ?? user.email,\n status: user.status,\n readonly: false,\n readonlyPermission:\n collectionId != null\n ? convertToPermission(\n new CollectionAccessSelectionView(user.collections.find((uc) => uc.id == collectionId)),\n )\n : undefined,\n };\n}\n\n/**\n * Strongly typed helper to open a CollectionDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openCollectionDialog(\n dialogService: DialogService,\n config: DialogConfig,\n) {\n return dialogService.open(\n CollectionDialogComponent,\n config,\n );\n}\n","
    \n \n \n \n {{ \"editCollection\" | i18n }}\n {{\n collection.name\n }}\n \n \n {{ \"newCollection\" | i18n }}\n \n \n
    \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n \n \n\n \n {{ \"organization\" | i18n }}\n \n \n \n \n \n\n \n {{ \"externalId\" | i18n }}\n \n {{ \"externalIdDesc\" | i18n }}\n \n\n \n {{ \"nestCollectionUnder\" | i18n }}\n \n \n \n \n \n \n \n \n \n \n
    \n \n {{ \"readOnlyCollectionAccess\" | i18n }}\n \n \n \n {{ \"grantAddAccessCollectionWarning\" | i18n }}\n \n {{ \"grantCollectionAccess\" | i18n }}\n {{\n \"grantCollectionAccessMembersOnly\" | i18n\n }}\n {{ \" \" + (\"adminCollectionAccess\" | i18n) }}\n \n
    \n \n {{ \"managePermissionRequired\" | i18n }}\n
    \n \n \n \n \n \n \n \n {{ \"save\" | i18n }}\n \n \n {{ \"cancel\" | i18n }}\n \n \n \n
    \n
    \n","import { AbstractControl, FormControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nexport function forbiddenCharacters(characters: string[]): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (!(control instanceof FormControl)) {\n throw new Error(\"forbiddenCharacters only supports validating FormControls\");\n }\n\n if (control.value === null || control.value === undefined) {\n return null;\n }\n\n const value = String(control.value);\n\n for (const char of value) {\n if (characters.includes(char)) {\n return { forbiddenCharacters: { value: control.value, characters } };\n }\n }\n\n return null;\n };\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SelectModule } from \"@bitwarden/components\";\n\nimport { AccessSelectorModule } from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.module\";\nimport { SharedModule } from \"../../../shared\";\n\nimport { CollectionDialogComponent } from \"./collection-dialog.component\";\n@NgModule({\n imports: [SharedModule, AccessSelectorModule, SelectModule],\n declarations: [CollectionDialogComponent],\n exports: [CollectionDialogComponent],\n})\nexport class CollectionDialogModule {}\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\n\n/**\n * Hides the element if the user has premium.\n */\n@Directive({\n selector: \"[appNotPremium]\",\n})\nexport class NotPremiumDirective implements OnInit {\n constructor(\n private templateRef: TemplateRef,\n private viewContainer: ViewContainerRef,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {}\n\n async ngOnInit(): Promise {\n const premium = await firstValueFrom(\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n );\n\n if (premium) {\n this.viewContainer.clear();\n } else {\n this.viewContainer.createEmbeddedView(this.templateRef);\n }\n }\n}\n","import { Component } from \"@angular/core\";\n\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\n@Component({\n selector: \"app-premium-badge\",\n template: `\n \n `,\n})\nexport class PremiumBadgeComponent {\n constructor(private messagingService: MessagingService) {}\n\n premiumRequired() {\n this.messagingService.send(\"premiumRequired\");\n }\n}\n","\n \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n \n {{ \"owner\" | i18n }}\n \n {{ \"collections\" | i18n }}\n {{ \"groups\" | i18n }}\n \n {{ \"permission\" | i18n }}\n \n \n \n \n \n \n \n {{ \"access\" | i18n }}\n \n \n \n {{ \"assignToCollections\" | i18n }}\n \n \n \n {{ \"moveSelectedToOrg\" | i18n }}\n \n \n \n \n \n {{\n (showBulkTrashOptions\n ? \"permanentlyDeleteSelected\"\n : vaultBulkManagementActionEnabled\n ? \"delete\"\n : \"deleteSelected\"\n ) | i18n\n }}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n","import { SelectionModel } from \"@angular/cdk/collections\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { TableDataSource } from \"@bitwarden/components\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\nimport { Unassigned } from \"../../individual-vault/vault-filter/shared/models/routed-vault-filter.model\";\n\nimport { VaultItem } from \"./vault-item\";\nimport { VaultItemEvent } from \"./vault-item-event\";\n\n// Fixed manual row height required due to how cdk-virtual-scroll works\nexport const RowHeight = 65;\nexport const RowHeightClass = `tw-h-[65px]`;\n\nconst MaxSelectionCount = 500;\n\n@Component({\n selector: \"app-vault-items\",\n templateUrl: \"vault-items.component.html\",\n // TODO: Improve change detection, see: https://bitwarden.atlassian.net/browse/TDL-220\n // changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaultItemsComponent {\n protected RowHeight = RowHeight;\n\n @Input() disabled: boolean;\n @Input() showOwner: boolean;\n @Input() showCollections: boolean;\n @Input() showGroups: boolean;\n @Input() useEvents: boolean;\n @Input() showPremiumFeatures: boolean;\n @Input() showBulkMove: boolean;\n @Input() showBulkTrashOptions: boolean;\n // Encompasses functionality only available from the organization vault context\n @Input() showAdminActions = false;\n @Input() allOrganizations: Organization[] = [];\n @Input() allCollections: CollectionView[] = [];\n @Input() allGroups: GroupView[] = [];\n @Input() showBulkEditCollectionAccess = false;\n @Input() showBulkAddToCollections = false;\n @Input() showPermissionsColumn = false;\n @Input() viewingOrgVault: boolean;\n @Input({ required: true }) flexibleCollectionsV1Enabled = false;\n @Input() addAccessStatus: number;\n @Input() addAccessToggle: boolean;\n @Input() restrictProviderAccess: boolean;\n @Input() vaultBulkManagementActionEnabled = false;\n\n private _ciphers?: CipherView[] = [];\n @Input() get ciphers(): CipherView[] {\n return this._ciphers;\n }\n set ciphers(value: CipherView[] | undefined) {\n this._ciphers = value ?? [];\n this.refreshItems();\n }\n\n private _collections?: CollectionView[] = [];\n @Input() get collections(): CollectionView[] {\n return this._collections;\n }\n set collections(value: CollectionView[] | undefined) {\n this._collections = value ?? [];\n this.refreshItems();\n }\n\n @Output() onEvent = new EventEmitter();\n\n protected editableItems: VaultItem[] = [];\n protected dataSource = new TableDataSource();\n protected selection = new SelectionModel(true, [], true);\n\n get showExtraColumn() {\n return this.showCollections || this.showGroups || this.showOwner;\n }\n\n get isAllSelected() {\n return this.editableItems\n .slice(0, MaxSelectionCount)\n .every((item) => this.selection.isSelected(item));\n }\n\n get isEmpty() {\n return this.dataSource.data.length === 0;\n }\n\n get bulkMoveAllowed() {\n return (\n this.showBulkMove && this.selection.selected.filter((item) => item.collection).length === 0\n );\n }\n\n get disableMenu() {\n return (\n this.vaultBulkManagementActionEnabled &&\n !this.bulkMoveAllowed &&\n !this.showAssignToCollections() &&\n !this.showDelete()\n );\n }\n\n get bulkAssignToCollectionsAllowed() {\n return this.showBulkAddToCollections && this.ciphers.length > 0;\n }\n\n // Use new bulk management delete if vaultBulkManagementActionEnabled feature flag is enabled\n get deleteAllowed() {\n return this.vaultBulkManagementActionEnabled ? this.showDelete() : true;\n }\n\n protected canEditCollection(collection: CollectionView): boolean {\n // Only allow allow deletion if collection editing is enabled and not deleting \"Unassigned\"\n if (collection.id === Unassigned) {\n return false;\n }\n\n const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n\n return collection.canEdit(organization, this.flexibleCollectionsV1Enabled);\n }\n\n protected canDeleteCollection(collection: CollectionView): boolean {\n // Only allow allow deletion if collection editing is enabled and not deleting \"Unassigned\"\n if (collection.id === Unassigned) {\n return false;\n }\n\n const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n\n return collection.canDelete(organization, this.flexibleCollectionsV1Enabled);\n }\n\n protected canViewCollectionInfo(collection: CollectionView) {\n const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n return collection.canViewCollectionInfo(organization, this.flexibleCollectionsV1Enabled);\n }\n\n protected toggleAll() {\n this.isAllSelected\n ? this.selection.clear()\n : this.selection.select(...this.editableItems.slice(0, MaxSelectionCount));\n }\n\n protected event(event: VaultItemEvent) {\n this.onEvent.emit(event);\n }\n\n protected bulkMoveToFolder() {\n this.event({\n type: \"moveToFolder\",\n items: this.selection.selected\n .filter((item) => item.cipher !== undefined)\n .map((item) => item.cipher),\n });\n }\n\n protected bulkMoveToOrganization() {\n this.event({\n type: \"moveToOrganization\",\n items: this.selection.selected\n .filter((item) => item.cipher !== undefined)\n .map((item) => item.cipher),\n });\n }\n\n protected bulkRestore() {\n this.event({\n type: \"restore\",\n items: this.selection.selected\n .filter((item) => item.cipher !== undefined)\n .map((item) => item.cipher),\n });\n }\n\n protected bulkDelete() {\n this.event({\n type: \"delete\",\n items: this.selection.selected,\n });\n }\n\n protected canClone(vaultItem: VaultItem) {\n if (vaultItem.cipher.organizationId == null) {\n return true;\n }\n\n const org = this.allOrganizations.find((o) => o.id === vaultItem.cipher.organizationId);\n\n // Admins and custom users can always clone in the Org Vault\n if (this.viewingOrgVault && (org.isAdmin || org.permissions.editAnyCollection)) {\n return true;\n }\n\n // Check if the cipher belongs to a collection with canManage permission\n const orgCollections = this.allCollections.filter((c) => c.organizationId === org.id);\n\n for (const collection of orgCollections) {\n if (vaultItem.cipher.collectionIds.includes(collection.id) && collection.manage) {\n return true;\n }\n }\n\n return false;\n }\n\n protected canEditCipher(cipher: CipherView) {\n if (cipher.organizationId == null) {\n return true;\n }\n\n const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);\n return (\n (organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n ) &&\n this.viewingOrgVault) ||\n cipher.edit\n );\n }\n\n private refreshItems() {\n const collections: VaultItem[] = this.collections.map((collection) => ({ collection }));\n const ciphers: VaultItem[] = this.ciphers.map((cipher) => ({ cipher }));\n const items: VaultItem[] = [].concat(collections).concat(ciphers);\n\n this.selection.clear();\n\n if (this.flexibleCollectionsV1Enabled) {\n // Every item except for the Unassigned collection is selectable, individual bulk actions check the user's permission\n this.editableItems = items.filter(\n (item) =>\n item.cipher !== undefined ||\n (item.collection !== undefined && item.collection.id !== Unassigned),\n );\n } else {\n // only collections the user can delete are selectable\n this.editableItems = items.filter(\n (item) =>\n item.cipher !== undefined ||\n (item.collection !== undefined && this.canDeleteCollection(item.collection)),\n );\n }\n\n this.dataSource.data = items;\n }\n\n protected bulkEditCollectionAccess() {\n this.event({\n type: \"bulkEditCollectionAccess\",\n items: this.selection.selected\n .filter((item) => item.collection !== undefined)\n .map((item) => item.collection),\n });\n }\n\n protected assignToCollections() {\n this.event({\n type: \"assignToCollections\",\n items: this.selection.selected\n .filter((item) => item.cipher !== undefined)\n .map((item) => item.cipher),\n });\n }\n\n protected showAssignToCollections(): boolean {\n if (!this.showBulkMove) {\n return false;\n }\n\n if (this.selection.selected.length === 0) {\n return true;\n }\n\n const hasPersonalItems = this.hasPersonalItems();\n const uniqueCipherOrgIds = this.getUniqueOrganizationIds();\n\n // Return false if items are from different organizations\n if (uniqueCipherOrgIds.size > 1) {\n return false;\n }\n\n // If all items are personal, return based on personal items\n if (uniqueCipherOrgIds.size === 0) {\n return hasPersonalItems;\n }\n\n const [orgId] = uniqueCipherOrgIds;\n const organization = this.allOrganizations.find((o) => o.id === orgId);\n\n const canEditOrManageAllCiphers =\n organization?.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n ) && this.viewingOrgVault;\n\n const collectionNotSelected =\n this.selection.selected.filter((item) => item.collection).length === 0;\n\n return (canEditOrManageAllCiphers || this.allCiphersHaveEditAccess()) && collectionNotSelected;\n }\n\n protected showDelete(): boolean {\n if (this.selection.selected.length === 0) {\n return true;\n }\n\n const hasPersonalItems = this.hasPersonalItems();\n const uniqueCipherOrgIds = this.getUniqueOrganizationIds();\n const organizations = Array.from(uniqueCipherOrgIds, (orgId) =>\n this.allOrganizations.find((o) => o.id === orgId),\n );\n\n const canEditOrManageAllCiphers =\n organizations.length > 0 &&\n organizations.every((org) =>\n org?.canEditAllCiphers(this.flexibleCollectionsV1Enabled, this.restrictProviderAccess),\n );\n\n const canDeleteCollections = this.selection.selected\n .filter((item) => item.collection)\n .every((item) => item.collection && this.canDeleteCollection(item.collection));\n\n const userCanDeleteAccess =\n (canEditOrManageAllCiphers || this.allCiphersHaveEditAccess()) && canDeleteCollections;\n\n if (\n userCanDeleteAccess ||\n (hasPersonalItems && (!uniqueCipherOrgIds.size || userCanDeleteAccess))\n ) {\n return true;\n }\n\n return false;\n }\n\n private hasPersonalItems(): boolean {\n return this.selection.selected.some(({ cipher }) => cipher?.organizationId === null);\n }\n\n private allCiphersHaveEditAccess(): boolean {\n return this.selection.selected\n .filter(({ cipher }) => cipher)\n .every(({ cipher }) => cipher?.edit);\n }\n\n private getUniqueOrganizationIds(): Set {\n return new Set(this.selection.selected.flatMap((i) => i.cipher?.organizationId ?? []));\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\n@Pipe({\n name: \"collectionNameFromId\",\n pure: true,\n})\nexport class GetCollectionNameFromIdPipe implements PipeTransform {\n transform(value: string, collections: CollectionView[]) {\n return collections.find((o) => o.id === value)?.name;\n }\n}\n","\n {{ c | collectionNameFromId: collections }}\n\n\n + {{ xMoreCount }} more\n\n","import { Component, Input } from \"@angular/core\";\n\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\n@Component({\n selector: \"app-collection-badge\",\n templateUrl: \"collection-name-badge.component.html\",\n})\nexport class CollectionNameBadgeComponent {\n @Input() collectionIds: string[];\n @Input() collections: CollectionView[];\n\n get shownCollections(): string[] {\n return this.showXMore ? this.collectionIds.slice(0, 2) : this.collectionIds;\n }\n\n get showXMore(): boolean {\n return this.collectionIds.length > 3;\n }\n\n get xMoreCount(): number {\n return this.collectionIds.length - 2;\n }\n}\n","\n \n\n\n \n\n\n
    \n \n {{ cipher.name }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n \n {{ \"attachmentsNeedFix\" | i18n }}\n \n \n
    \n
    \n {{ cipher.subTitle }}\n\n\n \n \n\n\n \n\n\n\n\n \n \n \n \n \n \n \n \n {{ \"launch\" | i18n }}\n \n \n\n \n \n {{ \"attachments\" | i18n }}\n \n \n \n \n \n {{ \"moveToOrganization\" | i18n }}\n \n \n \n \n {{ \"collections\" | i18n }}\n \n \n \n {{ \"assignToCollections\" | i18n }}\n \n \n \n \n \n \n {{ (cipher.isDeleted ? \"permanentlyDelete\" : \"delete\") | i18n }}\n \n \n \n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\nimport { VaultItemEvent } from \"./vault-item-event\";\nimport { RowHeightClass } from \"./vault-items.component\";\n\n@Component({\n selector: \"tr[appVaultCipherRow]\",\n templateUrl: \"vault-cipher-row.component.html\",\n})\nexport class VaultCipherRowComponent {\n protected RowHeightClass = RowHeightClass;\n\n @Input() disabled: boolean;\n @Input() cipher: CipherView;\n @Input() showOwner: boolean;\n @Input() showCollections: boolean;\n @Input() showGroups: boolean;\n @Input() showPremiumFeatures: boolean;\n @Input() useEvents: boolean;\n @Input() cloneable: boolean;\n @Input() organizations: Organization[];\n @Input() collections: CollectionView[];\n @Input() viewingOrgVault: boolean;\n @Input() canEditCipher: boolean;\n @Input() vaultBulkManagementActionEnabled: boolean;\n\n @Output() onEvent = new EventEmitter();\n\n @Input() checked: boolean;\n @Output() checkedToggled = new EventEmitter();\n\n protected CipherType = CipherType;\n\n protected get showTotpCopyButton() {\n return (\n (this.cipher.login?.hasTotp ?? false) &&\n (this.cipher.organizationUseTotp || this.showPremiumFeatures)\n );\n }\n\n protected get showFixOldAttachments() {\n return this.cipher.hasOldAttachments && this.cipher.organizationId == null;\n }\n\n protected get showAttachments() {\n return this.canEditCipher || this.cipher.attachments?.length > 0;\n }\n\n protected get showAssignToCollections() {\n return this.canEditCipher && !this.cipher.isDeleted;\n }\n\n protected get showClone() {\n return this.cloneable && !this.cipher.isDeleted;\n }\n\n protected get showEventLogs() {\n return this.useEvents && this.cipher.organizationId;\n }\n\n protected get isNotDeletedLoginCipher() {\n return this.cipher.type === this.CipherType.Login && !this.cipher.isDeleted;\n }\n\n protected get showCopyPassword(): boolean {\n return this.isNotDeletedLoginCipher && this.cipher.viewPassword;\n }\n\n protected get showCopyTotp(): boolean {\n return this.isNotDeletedLoginCipher && this.showTotpCopyButton;\n }\n\n protected get showLaunchUri(): boolean {\n return this.isNotDeletedLoginCipher && this.cipher.login.canLaunch;\n }\n\n protected get disableMenu() {\n return (\n !(\n this.isNotDeletedLoginCipher ||\n this.showCopyPassword ||\n this.showCopyTotp ||\n this.showLaunchUri ||\n this.showAttachments ||\n this.showClone ||\n this.canEditCipher ||\n this.cipher.isDeleted\n ) && this.vaultBulkManagementActionEnabled\n );\n }\n\n protected copy(field: \"username\" | \"password\" | \"totp\") {\n this.onEvent.emit({ type: \"copyField\", item: this.cipher, field });\n }\n\n protected clone() {\n this.onEvent.emit({ type: \"clone\", item: this.cipher });\n }\n\n protected moveToOrganization() {\n this.onEvent.emit({ type: \"moveToOrganization\", items: [this.cipher] });\n }\n\n protected editCollections() {\n this.onEvent.emit({ type: \"viewCipherCollections\", item: this.cipher });\n }\n\n protected events() {\n this.onEvent.emit({ type: \"viewEvents\", item: this.cipher });\n }\n\n protected restore() {\n this.onEvent.emit({ type: \"restore\", items: [this.cipher] });\n }\n\n protected deleteCipher() {\n this.onEvent.emit({ type: \"delete\", items: [{ cipher: this.cipher }] });\n }\n\n protected attachments() {\n this.onEvent.emit({ type: \"viewAttachments\", item: this.cipher });\n }\n\n protected assignToCollections() {\n this.onEvent.emit({ type: \"assignToCollections\", items: [this.cipher] });\n }\n}\n","import { Component, Input, OnChanges } from \"@angular/core\";\n\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\n\n@Component({\n selector: \"app-group-badge\",\n templateUrl: \"group-name-badge.component.html\",\n})\nexport class GroupNameBadgeComponent implements OnChanges {\n @Input() selectedGroups: SelectionReadOnlyRequest[];\n @Input() allGroups: GroupView[];\n\n protected groupNames: string[] = [];\n\n constructor(private i18nService: I18nService) {}\n\n ngOnChanges() {\n this.groupNames = this.selectedGroups\n .map((g) => {\n return this.allGroups.find((o) => o.id === g.id)?.name;\n })\n .sort(this.i18nService.collator.compare);\n }\n}\n","\n","\n \n\n\n
    \n \n
    \n\n\n \n {{ collection.name }}\n
    \n {{ \"addAccess\" | i18n }}\n
    \n \n\n\n \n \n\n\n\n \n\n\n

    \n {{ permissionText }}\n

    \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\nimport { CollectionAdminView } from \"../../core/views/collection-admin.view\";\nimport { Unassigned } from \"../../individual-vault/vault-filter/shared/models/routed-vault-filter.model\";\n\nimport {\n convertToPermission,\n getPermissionList,\n} from \"./../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\nimport { VaultItemEvent } from \"./vault-item-event\";\nimport { RowHeightClass } from \"./vault-items.component\";\n\n@Component({\n selector: \"tr[appVaultCollectionRow]\",\n templateUrl: \"vault-collection-row.component.html\",\n})\nexport class VaultCollectionRowComponent {\n protected RowHeightClass = RowHeightClass;\n protected Unassigned = \"unassigned\";\n\n @Input() disabled: boolean;\n @Input() collection: CollectionView;\n @Input() showOwner: boolean;\n @Input() showCollections: boolean;\n @Input() showGroups: boolean;\n @Input() canEditCollection: boolean;\n @Input() canDeleteCollection: boolean;\n @Input() canViewCollectionInfo: boolean;\n @Input() organizations: Organization[];\n @Input() groups: GroupView[];\n @Input() showPermissionsColumn: boolean;\n @Input() flexibleCollectionsV1Enabled: boolean;\n @Input() restrictProviderAccess: boolean;\n\n @Output() onEvent = new EventEmitter();\n\n @Input() checked: boolean;\n @Output() checkedToggled = new EventEmitter();\n\n constructor(private i18nService: I18nService) {}\n\n get collectionGroups() {\n if (!(this.collection instanceof CollectionAdminView)) {\n return [];\n }\n\n return this.collection.groups;\n }\n\n get organization() {\n return this.organizations.find((o) => o.id === this.collection.organizationId);\n }\n\n get showAddAccess() {\n if (!this.flexibleCollectionsV1Enabled) {\n return false;\n }\n\n if (this.collection.id == Unassigned) {\n return false;\n }\n\n // Only show AddAccess when viewing the Org vault (implied by CollectionAdminView)\n if (this.collection instanceof CollectionAdminView) {\n // Only show AddAccess if unmanaged and allowAdminAccessToAllCollectionItems is disabled\n return (\n !this.organization?.allowAdminAccessToAllCollectionItems &&\n this.collection.unmanaged &&\n this.organization?.canEditUnmanagedCollections()\n );\n }\n\n return false;\n }\n\n get permissionText() {\n if (\n this.collection.id == Unassigned &&\n this.organization?.canEditUnassignedCiphers(this.restrictProviderAccess)\n ) {\n return this.i18nService.t(\"canEdit\");\n }\n if ((this.collection as CollectionAdminView).assigned) {\n const permissionList = getPermissionList();\n return this.i18nService.t(\n permissionList.find((p) => p.perm === convertToPermission(this.collection))?.labelId,\n );\n }\n return this.i18nService.t(\"noAccess\");\n }\n\n get permissionTooltip() {\n if (this.collection.id == Unassigned) {\n return this.i18nService.t(\"collectionAdminConsoleManaged\");\n }\n return \"\";\n }\n\n protected edit(readonly: boolean) {\n this.onEvent.next({ type: \"editCollection\", item: this.collection, readonly: readonly });\n }\n\n protected access(readonly: boolean) {\n this.onEvent.next({ type: \"viewCollectionAccess\", item: this.collection, readonly: readonly });\n }\n\n protected deleteCollection() {\n this.onEvent.next({ type: \"delete\", items: [{ collection: this.collection }] });\n }\n\n protected get showCheckbox() {\n if (this.flexibleCollectionsV1Enabled) {\n return this.collection?.id !== Unassigned;\n }\n\n return this.canDeleteCollection;\n }\n}\n","import { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { TableModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { OrganizationBadgeModule } from \"../../individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\nimport { CollectionBadgeModule } from \"../../org-vault/collection-badge/collection-badge.module\";\nimport { GroupBadgeModule } from \"../../org-vault/group-badge/group-badge.module\";\n\nimport { VaultCipherRowComponent } from \"./vault-cipher-row.component\";\nimport { VaultCollectionRowComponent } from \"./vault-collection-row.component\";\nimport { VaultItemsComponent } from \"./vault-items.component\";\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n ScrollingModule,\n SharedModule,\n TableModule,\n OrganizationBadgeModule,\n CollectionBadgeModule,\n GroupBadgeModule,\n PipesModule,\n ],\n declarations: [VaultItemsComponent, VaultCipherRowComponent, VaultCollectionRowComponent],\n exports: [VaultItemsComponent],\n})\nexport class VaultItemsModule {}\n","import { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class BulkCollectionAccessRequest {\n collectionIds: string[];\n users: SelectionReadOnlyRequest[];\n groups: SelectionReadOnlyRequest[];\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CollectionData } from \"@bitwarden/common/vault/models/data/collection.data\";\nimport { CollectionRequest } from \"@bitwarden/common/vault/models/request/collection.request\";\nimport {\n CollectionAccessDetailsResponse,\n CollectionDetailsResponse,\n CollectionResponse,\n} from \"@bitwarden/common/vault/models/response/collection.response\";\n\nimport { CollectionAccessSelectionView } from \"../../admin-console/organizations/core\";\n\nimport { BulkCollectionAccessRequest } from \"./bulk-collection-access.request\";\nimport { CollectionAdminView } from \"./views/collection-admin.view\";\n\n@Injectable()\nexport class CollectionAdminService {\n constructor(\n private apiService: ApiService,\n private cryptoService: CryptoService,\n private collectionService: CollectionService,\n ) {}\n\n async getAll(organizationId: string): Promise {\n const collectionResponse =\n await this.apiService.getManyCollectionsWithAccessDetails(organizationId);\n\n if (collectionResponse?.data == null || collectionResponse.data.length === 0) {\n return [];\n }\n\n return await this.decryptMany(organizationId, collectionResponse.data);\n }\n\n async get(\n organizationId: string,\n collectionId: string,\n ): Promise {\n const collectionResponse = await this.apiService.getCollectionAccessDetails(\n organizationId,\n collectionId,\n );\n\n if (collectionResponse == null) {\n return undefined;\n }\n\n const [view] = await this.decryptMany(organizationId, [collectionResponse]);\n\n return view;\n }\n\n async save(collection: CollectionAdminView): Promise {\n const request = await this.encrypt(collection);\n\n let response: CollectionDetailsResponse;\n if (collection.id == null) {\n response = await this.apiService.postCollection(collection.organizationId, request);\n collection.id = response.id;\n } else {\n response = await this.apiService.putCollection(\n collection.organizationId,\n collection.id,\n request,\n );\n }\n\n if (response.assigned) {\n await this.collectionService.upsert(new CollectionData(response));\n } else {\n await this.collectionService.delete(collection.id);\n }\n\n return response;\n }\n\n async delete(organizationId: string, collectionId: string): Promise {\n await this.apiService.deleteCollection(organizationId, collectionId);\n }\n\n async bulkAssignAccess(\n organizationId: string,\n collectionIds: string[],\n users: CollectionAccessSelectionView[],\n groups: CollectionAccessSelectionView[],\n ): Promise {\n const request = new BulkCollectionAccessRequest();\n request.collectionIds = collectionIds;\n request.users = users.map(\n (u) => new SelectionReadOnlyRequest(u.id, u.readOnly, u.hidePasswords, u.manage),\n );\n request.groups = groups.map(\n (g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords, g.manage),\n );\n\n await this.apiService.send(\n \"POST\",\n `/organizations/${organizationId}/collections/bulk-access`,\n request,\n true,\n false,\n );\n }\n\n private async decryptMany(\n organizationId: string,\n collections: CollectionResponse[] | CollectionAccessDetailsResponse[],\n ): Promise {\n const orgKey = await this.cryptoService.getOrgKey(organizationId);\n\n const promises = collections.map(async (c) => {\n const view = new CollectionAdminView();\n view.id = c.id;\n view.name = await this.cryptoService.decryptToUtf8(new EncString(c.name), orgKey);\n view.externalId = c.externalId;\n view.organizationId = c.organizationId;\n\n if (isCollectionAccessDetailsResponse(c)) {\n view.groups = c.groups;\n view.users = c.users;\n view.assigned = c.assigned;\n view.readOnly = c.readOnly;\n view.hidePasswords = c.hidePasswords;\n view.manage = c.manage;\n view.unmanaged = c.unmanaged;\n }\n\n return view;\n });\n\n return await Promise.all(promises);\n }\n\n private async encrypt(model: CollectionAdminView): Promise {\n if (model.organizationId == null) {\n throw new Error(\"Collection has no organization id.\");\n }\n const key = await this.cryptoService.getOrgKey(model.organizationId);\n if (key == null) {\n throw new Error(\"No key for this collection's organization.\");\n }\n const collection = new CollectionRequest();\n collection.externalId = model.externalId;\n collection.name = (await this.cryptoService.encrypt(model.name, key)).encryptedString;\n collection.groups = model.groups.map(\n (group) =>\n new SelectionReadOnlyRequest(group.id, group.readOnly, group.hidePasswords, group.manage),\n );\n collection.users = model.users.map(\n (user) =>\n new SelectionReadOnlyRequest(user.id, user.readOnly, user.hidePasswords, user.manage),\n );\n return collection;\n }\n}\n\nfunction isCollectionAccessDetailsResponse(\n response: CollectionResponse | CollectionAccessDetailsResponse,\n): response is CollectionAccessDetailsResponse {\n const anyResponse = response as any;\n\n return anyResponse?.groups instanceof Array && anyResponse?.users instanceof Array;\n}\n","import { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CollectionAccessDetailsResponse } from \"@bitwarden/common/src/vault/models/response/collection.response\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\nimport { CollectionAccessSelectionView } from \"../../../admin-console/organizations/core/views/collection-access-selection.view\";\nimport { Unassigned } from \"../../individual-vault/vault-filter/shared/models/routed-vault-filter.model\";\n\nexport class CollectionAdminView extends CollectionView {\n groups: CollectionAccessSelectionView[] = [];\n users: CollectionAccessSelectionView[] = [];\n\n /**\n * Flag indicating the collection has no active user or group assigned to it with CanManage permissions\n * In this case, the collection can be managed by admins/owners or custom users with appropriate permissions\n */\n unmanaged: boolean;\n\n /**\n * Flag indicating the user has been explicitly assigned to this Collection\n */\n assigned: boolean;\n\n constructor(response?: CollectionAccessDetailsResponse) {\n super(response);\n\n if (!response) {\n return;\n }\n\n this.groups = response.groups\n ? response.groups.map((g) => new CollectionAccessSelectionView(g))\n : [];\n\n this.users = response.users\n ? response.users.map((g) => new CollectionAccessSelectionView(g))\n : [];\n\n this.assigned = response.assigned;\n }\n\n /**\n * Returns true if the user can edit a collection (including user and group access) from the Admin Console.\n */\n override canEdit(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {\n return (\n org?.canEditAnyCollection(flexibleCollectionsV1Enabled) ||\n (flexibleCollectionsV1Enabled && this.unmanaged && org?.canEditUnmanagedCollections()) ||\n super.canEdit(org, flexibleCollectionsV1Enabled)\n );\n }\n\n /**\n * Returns true if the user can delete a collection from the Admin Console.\n */\n override canDelete(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {\n return (\n org?.canDeleteAnyCollection(flexibleCollectionsV1Enabled) ||\n super.canDelete(org, flexibleCollectionsV1Enabled)\n );\n }\n\n /**\n * Whether the user can modify user access to this collection\n */\n canEditUserAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {\n const allowAdminAccessToAllCollectionItems =\n !flexibleCollectionsV1Enabled || org.allowAdminAccessToAllCollectionItems;\n\n return (\n (org.permissions.manageUsers && allowAdminAccessToAllCollectionItems) ||\n this.canEdit(org, flexibleCollectionsV1Enabled)\n );\n }\n\n /**\n * Whether the user can modify group access to this collection\n */\n canEditGroupAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {\n const allowAdminAccessToAllCollectionItems =\n !flexibleCollectionsV1Enabled || org.allowAdminAccessToAllCollectionItems;\n\n return (\n (org.permissions.manageGroups && allowAdminAccessToAllCollectionItems) ||\n this.canEdit(org, flexibleCollectionsV1Enabled)\n );\n }\n\n /**\n * Returns true if the user can view collection info and access in a read-only state from the Admin Console\n */\n override canViewCollectionInfo(\n org: Organization | undefined,\n flexibleCollectionsV1Enabled: boolean,\n ): boolean {\n if (!flexibleCollectionsV1Enabled) {\n return false;\n }\n\n if (this.isUnassignedCollection) {\n return false;\n }\n\n return this.manage || org?.isAdmin || org?.permissions.editAnyCollection;\n }\n\n /**\n * True if this collection represents the pseudo \"Unassigned\" collection\n * This is different from the \"unmanaged\" flag, which indicates that no users or groups have access to the collection\n */\n get isUnassignedCollection() {\n return this.id === Unassigned;\n }\n}\n","import { CdkDragDrop, moveItemInArray } from \"@angular/cdk/drag-drop\";\nimport { Directive, Input, OnChanges, SimpleChanges } from \"@angular/core\";\n\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { FieldType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\n\n@Directive()\nexport class AddEditCustomFieldsComponent implements OnChanges {\n @Input() cipher: CipherView;\n @Input() thisCipherType: CipherType;\n @Input() editMode: boolean;\n\n addFieldType: FieldType = FieldType.Text;\n addFieldTypeOptions: any[];\n addFieldLinkedTypeOption: any;\n linkedFieldOptions: any[] = [];\n\n cipherType = CipherType;\n fieldType = FieldType;\n eventType = EventType;\n\n constructor(\n private i18nService: I18nService,\n private eventCollectionService: EventCollectionService,\n ) {\n this.addFieldTypeOptions = [\n { name: i18nService.t(\"cfTypeText\"), value: FieldType.Text },\n { name: i18nService.t(\"cfTypeHidden\"), value: FieldType.Hidden },\n { name: i18nService.t(\"cfTypeBoolean\"), value: FieldType.Boolean },\n ];\n this.addFieldLinkedTypeOption = {\n name: this.i18nService.t(\"cfTypeLinked\"),\n value: FieldType.Linked,\n };\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.thisCipherType != null) {\n this.setLinkedFieldOptions();\n\n if (!changes.thisCipherType.firstChange) {\n this.resetCipherLinkedFields();\n }\n }\n }\n\n addField() {\n if (this.cipher.fields == null) {\n this.cipher.fields = [];\n }\n\n const f = new FieldView();\n f.type = this.addFieldType;\n f.newField = true;\n\n if (f.type === FieldType.Linked) {\n f.linkedId = this.linkedFieldOptions[0].value;\n }\n\n this.cipher.fields.push(f);\n }\n\n removeField(field: FieldView) {\n const i = this.cipher.fields.indexOf(field);\n if (i > -1) {\n this.cipher.fields.splice(i, 1);\n }\n }\n\n toggleFieldValue(field: FieldView) {\n const f = field as any;\n f.showValue = !f.showValue;\n if (this.editMode && f.showValue) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledHiddenFieldVisible,\n this.cipher.id,\n );\n }\n }\n\n trackByFunction(index: number, item: any) {\n return index;\n }\n\n drop(event: CdkDragDrop) {\n moveItemInArray(this.cipher.fields, event.previousIndex, event.currentIndex);\n }\n\n private setLinkedFieldOptions() {\n if (this.cipher.linkedFieldOptions == null) {\n return;\n }\n\n const options: any = [];\n this.cipher.linkedFieldOptions.forEach((linkedFieldOption, id) =>\n options.push({ name: this.i18nService.t(linkedFieldOption.i18nKey), value: id }),\n );\n this.linkedFieldOptions = options.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n }\n\n private resetCipherLinkedFields() {\n if (this.cipher.fields == null || this.cipher.fields.length === 0) {\n return;\n }\n\n // Delete any Linked custom fields if the item type does not support them\n if (this.cipher.linkedFieldOptions == null) {\n this.cipher.fields = this.cipher.fields.filter((f) => f.type !== FieldType.Linked);\n return;\n }\n\n this.cipher.fields\n .filter((f) => f.type === FieldType.Linked)\n .forEach((f) => (f.linkedId = this.linkedFieldOptions[0].value));\n }\n}\n","import { Directive, ElementRef, forwardRef, HostListener, Input, Renderer2 } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n// ref: https://juristr.com/blog/2018/02/ng-true-value-directive/\n@Directive({\n selector: \"input[type=checkbox][appTrueFalseValue]\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TrueFalseValueDirective),\n multi: true,\n },\n ],\n})\nexport class TrueFalseValueDirective implements ControlValueAccessor {\n @Input() trueValue: boolean | string = true;\n @Input() falseValue: boolean | string = false;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n ) {}\n\n @HostListener(\"change\", [\"$event\"])\n onHostChange(ev: any) {\n this.propagateChange(ev.target.checked ? this.trueValue : this.falseValue);\n }\n\n writeValue(obj: any): void {\n if (obj === this.trueValue) {\n this.renderer.setProperty(this.elementRef.nativeElement, \"checked\", true);\n } else {\n this.renderer.setProperty(this.elementRef.nativeElement, \"checked\", false);\n }\n }\n\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n /* nothing */\n }\n\n setDisabledState?(isDisabled: boolean): void {\n /* nothing */\n }\n\n private propagateChange = (_: any) => {\n /* nothing */\n };\n}\n","\n

    {{ \"customFields\" | i18n }}

    \n
    \n \n
    \n
    \n \n \n \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n
    \n
    \n \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n \n \n \n {{ \"newCustomField\" | i18n }}\n \n
    \n
    \n \n \n
    \n
    \n
    \n","import { Component, Input } from \"@angular/core\";\n\nimport { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from \"@bitwarden/angular/vault/components/add-edit-custom-fields.component\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Component({\n selector: \"app-vault-add-edit-custom-fields\",\n templateUrl: \"add-edit-custom-fields.component.html\",\n})\nexport class AddEditCustomFieldsComponent extends BaseAddEditCustomFieldsComponent {\n @Input() viewOnly: boolean;\n @Input() copy: (value: string, typeI18nKey: string, aType: string) => void;\n\n constructor(i18nService: I18nService, eventCollectionService: EventCollectionService) {\n super(i18nService, eventCollectionService);\n }\n}\n","import { DatePipe } from \"@angular/common\";\nimport { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { concatMap, firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport {\n isMember,\n OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { OrganizationUserStatusType, PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { UriMatchStrategy } from \"@bitwarden/common/models/domain/domain-service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType, SecureNoteType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginUriView } from \"@bitwarden/common/vault/models/view/login-uri.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\n@Directive()\nexport class AddEditComponent implements OnInit, OnDestroy {\n @Input() cloneMode = false;\n @Input() folderId: string = null;\n @Input() cipherId: string;\n @Input() type: CipherType;\n @Input() collectionIds: string[];\n @Input() organizationId: string = null;\n @Output() onSavedCipher = new EventEmitter();\n @Output() onDeletedCipher = new EventEmitter();\n @Output() onRestoredCipher = new EventEmitter();\n @Output() onCancelled = new EventEmitter();\n @Output() onEditAttachments = new EventEmitter();\n @Output() onShareCipher = new EventEmitter();\n @Output() onEditCollections = new EventEmitter();\n @Output() onGeneratePassword = new EventEmitter();\n @Output() onGenerateUsername = new EventEmitter();\n\n editMode = false;\n cipher: CipherView;\n folders$: Observable;\n collections: CollectionView[] = [];\n title: string;\n formPromise: Promise;\n deletePromise: Promise;\n restorePromise: Promise;\n checkPasswordPromise: Promise;\n showPassword = false;\n showTotpSeed = false;\n showCardNumber = false;\n showCardCode = false;\n cipherType = CipherType;\n typeOptions: any[];\n cardBrandOptions: any[];\n cardExpMonthOptions: any[];\n identityTitleOptions: any[];\n uriMatchOptions: any[];\n ownershipOptions: any[] = [];\n autofillOnPageLoadOptions: any[];\n currentDate = new Date();\n allowPersonal = true;\n reprompt = false;\n canUseReprompt = true;\n organization: Organization;\n\n protected componentName = \"\";\n protected destroy$ = new Subject();\n protected writeableCollections: CollectionView[];\n private personalOwnershipPolicyAppliesToActiveUser: boolean;\n private previousCipherId: string;\n\n protected flexibleCollectionsV1Enabled = false;\n protected restrictProviderAccess = false;\n\n get fido2CredentialCreationDateValue(): string {\n const dateCreated = this.i18nService.t(\"dateCreated\");\n const creationDate = this.datePipe.transform(\n this.cipher?.login?.fido2Credentials?.[0]?.creationDate,\n \"short\",\n );\n return `${dateCreated} ${creationDate}`;\n }\n\n constructor(\n protected cipherService: CipherService,\n protected folderService: FolderService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected auditService: AuditService,\n protected accountService: AccountService,\n protected collectionService: CollectionService,\n protected messagingService: MessagingService,\n protected eventCollectionService: EventCollectionService,\n protected policyService: PolicyService,\n protected logService: LogService,\n protected passwordRepromptService: PasswordRepromptService,\n private organizationService: OrganizationService,\n protected sendApiService: SendApiService,\n protected dialogService: DialogService,\n protected win: Window,\n protected datePipe: DatePipe,\n protected configService: ConfigService,\n ) {\n this.typeOptions = [\n { name: i18nService.t(\"typeLogin\"), value: CipherType.Login },\n { name: i18nService.t(\"typeCard\"), value: CipherType.Card },\n { name: i18nService.t(\"typeIdentity\"), value: CipherType.Identity },\n { name: i18nService.t(\"typeSecureNote\"), value: CipherType.SecureNote },\n ];\n this.cardBrandOptions = [\n { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n { name: \"Visa\", value: \"Visa\" },\n { name: \"Mastercard\", value: \"Mastercard\" },\n { name: \"American Express\", value: \"Amex\" },\n { name: \"Discover\", value: \"Discover\" },\n { name: \"Diners Club\", value: \"Diners Club\" },\n { name: \"JCB\", value: \"JCB\" },\n { name: \"Maestro\", value: \"Maestro\" },\n { name: \"UnionPay\", value: \"UnionPay\" },\n { name: \"RuPay\", value: \"RuPay\" },\n { name: i18nService.t(\"other\"), value: \"Other\" },\n ];\n this.cardExpMonthOptions = [\n { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n { name: \"01 - \" + i18nService.t(\"january\"), value: \"1\" },\n { name: \"02 - \" + i18nService.t(\"february\"), value: \"2\" },\n { name: \"03 - \" + i18nService.t(\"march\"), value: \"3\" },\n { name: \"04 - \" + i18nService.t(\"april\"), value: \"4\" },\n { name: \"05 - \" + i18nService.t(\"may\"), value: \"5\" },\n { name: \"06 - \" + i18nService.t(\"june\"), value: \"6\" },\n { name: \"07 - \" + i18nService.t(\"july\"), value: \"7\" },\n { name: \"08 - \" + i18nService.t(\"august\"), value: \"8\" },\n { name: \"09 - \" + i18nService.t(\"september\"), value: \"9\" },\n { name: \"10 - \" + i18nService.t(\"october\"), value: \"10\" },\n { name: \"11 - \" + i18nService.t(\"november\"), value: \"11\" },\n { name: \"12 - \" + i18nService.t(\"december\"), value: \"12\" },\n ];\n this.identityTitleOptions = [\n { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n { name: i18nService.t(\"mr\"), value: i18nService.t(\"mr\") },\n { name: i18nService.t(\"mrs\"), value: i18nService.t(\"mrs\") },\n { name: i18nService.t(\"ms\"), value: i18nService.t(\"ms\") },\n { name: i18nService.t(\"mx\"), value: i18nService.t(\"mx\") },\n { name: i18nService.t(\"dr\"), value: i18nService.t(\"dr\") },\n ];\n this.uriMatchOptions = [\n { name: i18nService.t(\"defaultMatchDetection\"), value: null },\n { name: i18nService.t(\"baseDomain\"), value: UriMatchStrategy.Domain },\n { name: i18nService.t(\"host\"), value: UriMatchStrategy.Host },\n { name: i18nService.t(\"startsWith\"), value: UriMatchStrategy.StartsWith },\n { name: i18nService.t(\"regEx\"), value: UriMatchStrategy.RegularExpression },\n { name: i18nService.t(\"exact\"), value: UriMatchStrategy.Exact },\n { name: i18nService.t(\"never\"), value: UriMatchStrategy.Never },\n ];\n this.autofillOnPageLoadOptions = [\n { name: i18nService.t(\"autoFillOnPageLoadUseDefault\"), value: null },\n { name: i18nService.t(\"autoFillOnPageLoadYes\"), value: true },\n { name: i18nService.t(\"autoFillOnPageLoadNo\"), value: false },\n ];\n }\n\n async ngOnInit() {\n this.flexibleCollectionsV1Enabled = await this.configService.getFeatureFlag(\n FeatureFlag.FlexibleCollectionsV1,\n );\n this.restrictProviderAccess = await this.configService.getFeatureFlag(\n FeatureFlag.RestrictProviderAccess,\n );\n\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)\n .pipe(\n concatMap(async (policyAppliesToActiveUser) => {\n this.personalOwnershipPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n await this.init();\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n\n this.writeableCollections = await this.loadCollections();\n this.canUseReprompt = await this.passwordRepromptService.enabled();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async init() {\n if (this.ownershipOptions.length) {\n this.ownershipOptions = [];\n }\n if (this.personalOwnershipPolicyAppliesToActiveUser) {\n this.allowPersonal = false;\n } else {\n const myEmail = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n this.ownershipOptions.push({ name: myEmail, value: null });\n }\n\n const orgs = await this.organizationService.getAll();\n orgs\n .filter(isMember)\n .sort(Utils.getSortFunction(this.i18nService, \"name\"))\n .forEach((o) => {\n if (o.enabled && o.status === OrganizationUserStatusType.Confirmed) {\n this.ownershipOptions.push({ name: o.name, value: o.id });\n }\n });\n if (!this.allowPersonal && this.organizationId == undefined) {\n this.organizationId = this.defaultOwnerId;\n }\n }\n\n async load() {\n this.editMode = this.cipherId != null;\n if (this.editMode) {\n this.editMode = true;\n if (this.cloneMode) {\n this.cloneMode = true;\n this.title = this.i18nService.t(\"addItem\");\n } else {\n this.title = this.i18nService.t(\"editItem\");\n }\n } else {\n this.title = this.i18nService.t(\"addItem\");\n }\n\n const loadedAddEditCipherInfo = await this.loadAddEditCipherInfo();\n\n if (this.cipher == null) {\n if (this.editMode) {\n const cipher = await this.loadCipher();\n this.cipher = await cipher.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(cipher),\n );\n\n // Adjust Cipher Name if Cloning\n if (this.cloneMode) {\n this.cipher.name += \" - \" + this.i18nService.t(\"clone\");\n // If not allowing personal ownership, update cipher's org Id to prompt downstream changes\n if (this.cipher.organizationId == null && !this.allowPersonal) {\n this.cipher.organizationId = this.organizationId;\n }\n }\n } else {\n this.cipher = new CipherView();\n this.cipher.organizationId = this.organizationId == null ? null : this.organizationId;\n this.cipher.folderId = this.folderId;\n this.cipher.type = this.type == null ? CipherType.Login : this.type;\n this.cipher.login = new LoginView();\n this.cipher.login.uris = [new LoginUriView()];\n this.cipher.card = new CardView();\n this.cipher.identity = new IdentityView();\n this.cipher.secureNote = new SecureNoteView();\n this.cipher.secureNote.type = SecureNoteType.Generic;\n this.cipher.reprompt = CipherRepromptType.None;\n }\n }\n\n if (this.cipher != null && (!this.editMode || loadedAddEditCipherInfo || this.cloneMode)) {\n await this.organizationChanged();\n if (\n this.collectionIds != null &&\n this.collectionIds.length > 0 &&\n this.collections.length > 0\n ) {\n this.collections.forEach((c) => {\n if (this.collectionIds.indexOf(c.id) > -1) {\n (c as any).checked = true;\n }\n });\n }\n }\n // Only Admins can clone a cipher to different owner\n if (this.cloneMode && this.cipher.organizationId != null) {\n const cipherOrg = (await firstValueFrom(this.organizationService.memberOrganizations$)).find(\n (o) => o.id === this.cipher.organizationId,\n );\n\n if (cipherOrg != null && !cipherOrg.isAdmin && !cipherOrg.permissions.editAnyCollection) {\n this.ownershipOptions = [{ name: cipherOrg.name, value: cipherOrg.id }];\n }\n }\n\n // We don't want to copy passkeys when we clone a cipher\n if (this.cloneMode && this.cipher?.login?.hasFido2Credentials) {\n this.cipher.login.fido2Credentials = null;\n }\n\n this.folders$ = this.folderService.folderViews$;\n\n if (this.editMode && this.previousCipherId !== this.cipherId) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientViewed, this.cipherId);\n }\n this.previousCipherId = this.cipherId;\n this.reprompt = this.cipher.reprompt !== CipherRepromptType.None;\n if (this.reprompt) {\n this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;\n }\n }\n\n async submit(): Promise {\n if (this.cipher.isDeleted) {\n return this.restore();\n }\n\n if (this.cipher.name == null || this.cipher.name === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"nameRequired\"),\n );\n return false;\n }\n\n if (\n (!this.editMode || this.cloneMode) &&\n !this.allowPersonal &&\n this.cipher.organizationId == null\n ) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"personalOwnershipSubmitError\"),\n );\n return false;\n }\n\n if (\n (!this.editMode || this.cloneMode) &&\n this.cipher.type === CipherType.Login &&\n this.cipher.login.uris != null &&\n this.cipher.login.uris.length === 1 &&\n (this.cipher.login.uris[0].uri == null || this.cipher.login.uris[0].uri === \"\")\n ) {\n this.cipher.login.uris = [];\n }\n\n // Allows saving of selected collections during \"Add\" and \"Clone\" flows\n if ((!this.editMode || this.cloneMode) && this.cipher.organizationId != null) {\n this.cipher.collectionIds =\n this.collections == null\n ? []\n : this.collections.filter((c) => (c as any).checked).map((c) => c.id);\n }\n\n // Clear current Cipher Id if exists to trigger \"Add\" cipher flow\n if (this.cloneMode) {\n this.cipher.id = null;\n }\n\n const cipher = await this.encryptCipher();\n try {\n this.formPromise = this.saveCipher(cipher);\n await this.formPromise;\n this.cipher.id = cipher.id;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.editMode && !this.cloneMode ? \"editedItem\" : \"addedItem\"),\n );\n this.onSavedCipher.emit(this.cipher);\n this.messagingService.send(this.editMode && !this.cloneMode ? \"editedCipher\" : \"addedCipher\");\n return true;\n } catch (e) {\n this.logService.error(e);\n }\n\n return false;\n }\n\n addUri() {\n if (this.cipher.type !== CipherType.Login) {\n return;\n }\n\n if (this.cipher.login.uris == null) {\n this.cipher.login.uris = [];\n }\n\n this.cipher.login.uris.push(new LoginUriView());\n }\n\n removeUri(uri: LoginUriView) {\n if (this.cipher.type !== CipherType.Login || this.cipher.login.uris == null) {\n return;\n }\n\n const i = this.cipher.login.uris.indexOf(uri);\n if (i > -1) {\n this.cipher.login.uris.splice(i, 1);\n }\n }\n\n removePasskey() {\n if (this.cipher.type !== CipherType.Login || this.cipher.login.fido2Credentials == null) {\n return;\n }\n\n this.cipher.login.fido2Credentials = null;\n }\n\n onCardNumberChange(): void {\n this.cipher.card.brand = CardView.getCardBrandByPatterns(this.cipher.card.number);\n }\n\n getCardExpMonthDisplay() {\n return this.cardExpMonthOptions.find((x) => x.value == this.cipher.card.expMonth)?.name;\n }\n\n trackByFunction(index: number, item: any) {\n return index;\n }\n\n cancel() {\n this.onCancelled.emit(this.cipher);\n }\n\n attachments() {\n this.onEditAttachments.emit(this.cipher);\n }\n\n share() {\n this.onShareCipher.emit(this.cipher);\n }\n\n editCollections() {\n this.onEditCollections.emit(this.cipher);\n }\n\n async delete(): Promise {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteItem\" },\n content: {\n key: this.cipher.isDeleted ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\",\n },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.deletePromise = this.deleteCipher();\n await this.deletePromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.cipher.isDeleted ? \"permanentlyDeletedItem\" : \"deletedItem\"),\n );\n this.onDeletedCipher.emit(this.cipher);\n this.messagingService.send(\n this.cipher.isDeleted ? \"permanentlyDeletedCipher\" : \"deletedCipher\",\n );\n } catch (e) {\n this.logService.error(e);\n }\n\n return true;\n }\n\n async restore(): Promise {\n if (!this.cipher.isDeleted) {\n return false;\n }\n\n try {\n this.restorePromise = this.restoreCipher();\n await this.restorePromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"restoredItem\"));\n this.onRestoredCipher.emit(this.cipher);\n this.messagingService.send(\"restoredCipher\");\n } catch (e) {\n this.logService.error(e);\n }\n\n return true;\n }\n\n async generateUsername(): Promise {\n if (this.cipher.login?.username?.length) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"overwriteUsername\" },\n content: { key: \"overwriteUsernameConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n }\n\n this.onGenerateUsername.emit();\n return true;\n }\n\n async generatePassword(): Promise {\n if (this.cipher.login?.password?.length) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"overwritePassword\" },\n content: { key: \"overwritePasswordConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n }\n\n this.onGeneratePassword.emit();\n return true;\n }\n\n togglePassword() {\n this.showPassword = !this.showPassword;\n\n if (this.editMode && this.showPassword) {\n document.getElementById(\"loginPassword\")?.focus();\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledPasswordVisible,\n this.cipherId,\n );\n }\n }\n\n toggleTotpSeed() {\n this.showTotpSeed = !this.showTotpSeed;\n\n if (this.editMode && this.showTotpSeed) {\n document.getElementById(\"loginTotp\")?.focus();\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledTOTPSeedVisible,\n this.cipherId,\n );\n }\n }\n\n async toggleCardNumber() {\n this.showCardNumber = !this.showCardNumber;\n if (this.showCardNumber) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledCardNumberVisible,\n this.cipherId,\n );\n }\n }\n\n toggleCardCode() {\n this.showCardCode = !this.showCardCode;\n document.getElementById(\"cardCode\").focus();\n if (this.editMode && this.showCardCode) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledCardCodeVisible,\n this.cipherId,\n );\n }\n }\n\n toggleUriOptions(uri: LoginUriView) {\n const u = uri as any;\n u.showOptions = u.showOptions == null && uri.match != null ? false : !u.showOptions;\n }\n\n loginUriMatchChanged(uri: LoginUriView) {\n const u = uri as any;\n u.showOptions = u.showOptions == null ? true : u.showOptions;\n }\n\n async organizationChanged() {\n if (this.writeableCollections != null) {\n this.writeableCollections.forEach((c) => ((c as any).checked = false));\n }\n if (this.cipher.organizationId != null) {\n this.collections = this.writeableCollections?.filter(\n (c) => c.organizationId === this.cipher.organizationId,\n );\n const org = await this.organizationService.get(this.cipher.organizationId);\n if (org != null) {\n this.cipher.organizationUseTotp = org.useTotp;\n }\n } else {\n this.collections = [];\n }\n }\n\n async checkPassword() {\n if (this.checkPasswordPromise != null) {\n return;\n }\n\n if (\n this.cipher.login == null ||\n this.cipher.login.password == null ||\n this.cipher.login.password === \"\"\n ) {\n return;\n }\n\n this.checkPasswordPromise = this.auditService.passwordLeaked(this.cipher.login.password);\n const matches = await this.checkPasswordPromise;\n this.checkPasswordPromise = null;\n\n if (matches > 0) {\n this.platformUtilsService.showToast(\n \"warning\",\n null,\n this.i18nService.t(\"passwordExposed\", matches.toString()),\n );\n } else {\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"passwordSafe\"));\n }\n }\n\n repromptChanged() {\n this.reprompt = !this.reprompt;\n if (this.reprompt) {\n this.cipher.reprompt = CipherRepromptType.Password;\n this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;\n } else {\n this.cipher.reprompt = CipherRepromptType.None;\n this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[0].value;\n }\n }\n\n protected async loadCollections() {\n const allCollections = await this.collectionService.getAllDecrypted();\n return allCollections.filter((c) => !c.readOnly);\n }\n\n protected loadCipher() {\n return this.cipherService.get(this.cipherId);\n }\n\n protected encryptCipher() {\n return this.cipherService.encrypt(this.cipher);\n }\n\n protected saveCipher(cipher: Cipher) {\n const isNotClone = this.editMode && !this.cloneMode;\n let orgAdmin = this.organization?.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n );\n\n // if a cipher is unassigned we want to check if they are an admin or have permission to edit any collection\n if (!cipher.collectionIds) {\n orgAdmin = this.organization?.canEditUnassignedCiphers(this.restrictProviderAccess);\n }\n\n return this.cipher.id == null\n ? this.cipherService.createWithServer(cipher, orgAdmin)\n : this.cipherService.updateWithServer(cipher, orgAdmin, isNotClone);\n }\n\n protected deleteCipher() {\n const asAdmin = this.organization?.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n );\n return this.cipher.isDeleted\n ? this.cipherService.deleteWithServer(this.cipher.id, asAdmin)\n : this.cipherService.softDeleteWithServer(this.cipher.id, asAdmin);\n }\n\n protected restoreCipher() {\n const asAdmin = this.organization?.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n );\n return this.cipherService.restoreWithServer(this.cipher.id, asAdmin);\n }\n\n get defaultOwnerId(): string | null {\n return this.ownershipOptions[0].value;\n }\n\n async loadAddEditCipherInfo(): Promise {\n const addEditCipherInfo: any = await firstValueFrom(this.cipherService.addEditCipherInfo$);\n const loadedSavedInfo = addEditCipherInfo != null;\n\n if (loadedSavedInfo) {\n this.cipher = addEditCipherInfo.cipher;\n this.collectionIds = addEditCipherInfo.collectionIds;\n\n if (!this.editMode && !this.allowPersonal && this.cipher.organizationId == null) {\n // This is a new cipher and personal ownership isn't allowed, so we need to set the default owner\n this.cipher.organizationId = this.defaultOwnerId;\n }\n }\n\n await this.cipherService.setAddEditCipherInfo(null);\n\n return loadedSavedInfo;\n }\n\n async copy(value: string, typeI18nKey: string, aType: string): Promise {\n if (value == null) {\n return false;\n }\n\n const copyOptions = this.win != null ? { window: this.win } : null;\n this.platformUtilsService.copyToClipboard(value, copyOptions);\n this.platformUtilsService.showToast(\n \"info\",\n null,\n this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n );\n\n if (typeI18nKey === \"password\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, this.cipherId);\n } else if (typeI18nKey === \"securityCode\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedCardCode, this.cipherId);\n } else if (aType === \"H_Field\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, this.cipherId);\n }\n\n return true;\n }\n}\n","
    \n
    \n \n
    \n

    {{ title }}

    \n \n ×\n \n
    \n
    \n \n {{ \"personalOwnershipPolicyInEffect\" | i18n }}\n \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n 15\n \n \n \n \n \n \n \n --- ---\n \n
    \n
    \n \n \n {{ \"upgrade\" | i18n }}\n \n
    \n \n \n {{ totpSec }}\n \n \n \n \n \n \n \n {{ totpCodeFormatted }}\n \n \n \n
    \n
    \n
    \n \n \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n \n
    \n \n {{ \"newUri\" | i18n }}\n \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n \n \n

    {{ \"ownership\" | i18n }}

    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n \n

    {{ \"collections\" | i18n }}

    \n
    \n {{ \"noCollectionsInList\" | i18n }}\n
    \n \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n {{ \"dateUpdated\" | i18n }}:\n {{ cipher.revisionDate | date: \"medium\" }}\n
    \n
    \n {{ \"dateCreated\" | i18n }}:\n {{ cipher.creationDate | date: \"medium\" }}\n
    \n
    \n {{ \"datePasswordUpdated\" | i18n }}:\n {{ cipher.passwordRevisionDisplayDate | date: \"medium\" }}\n
    \n
    \n {{ \"passwordHistory\" | i18n }}:\n \n {{ cipher.passwordHistory.length }}\n \n
    \n
    \n
    \n {{ ph.lastUsedDate | date: \"short\" }} -\n \n
    \n
    \n
    \n
    \n \n

    {{ \"options\" | i18n }}

    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n \n \n {{ (cipher?.isDeleted ? \"restore\" : \"save\") | i18n }}\n \n \n
    \n \n \n \n \n \n \n \n
    \n
    \n \n \n\n","import { DatePipe } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"@bitwarden/angular/vault/components/add-edit.component\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { Launchable } from \"@bitwarden/common/vault/interfaces/launchable\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\n@Component({\n selector: \"app-vault-add-edit\",\n templateUrl: \"add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent implements OnInit, OnDestroy {\n canAccessPremium: boolean;\n totpCode: string;\n totpCodeFormatted: string;\n totpDash: number;\n totpSec: number;\n totpLow: boolean;\n showRevisionDate = false;\n hasPasswordHistory = false;\n viewingPasswordHistory = false;\n viewOnly = false;\n showPasswordCount = false;\n\n protected totpInterval: number;\n protected override componentName = \"app-vault-add-edit\";\n\n constructor(\n cipherService: CipherService,\n folderService: FolderService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n auditService: AuditService,\n accountService: AccountService,\n collectionService: CollectionService,\n protected totpService: TotpService,\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected messagingService: MessagingService,\n eventCollectionService: EventCollectionService,\n protected policyService: PolicyService,\n organizationService: OrganizationService,\n logService: LogService,\n passwordRepromptService: PasswordRepromptService,\n sendApiService: SendApiService,\n dialogService: DialogService,\n datePipe: DatePipe,\n configService: ConfigService,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n super(\n cipherService,\n folderService,\n i18nService,\n platformUtilsService,\n auditService,\n accountService,\n collectionService,\n messagingService,\n eventCollectionService,\n policyService,\n logService,\n passwordRepromptService,\n organizationService,\n sendApiService,\n dialogService,\n window,\n datePipe,\n configService,\n );\n }\n\n async ngOnInit() {\n await super.ngOnInit();\n await this.load();\n this.viewOnly = !this.cipher.edit && this.editMode;\n // remove when all the title for all clients are updated to New Item\n if (this.cloneMode || !this.editMode) {\n this.title = this.i18nService.t(\"newItem\");\n }\n this.showRevisionDate = this.cipher.passwordRevisionDisplayDate != null;\n this.hasPasswordHistory = this.cipher.hasPasswordHistory;\n this.cleanUp();\n\n this.canAccessPremium = await firstValueFrom(\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n );\n if (this.showTotp()) {\n await this.totpUpdateCode();\n const interval = this.totpService.getTimeInterval(this.cipher.login.totp);\n await this.totpTick(interval);\n\n this.totpInterval = window.setInterval(async () => {\n await this.totpTick(interval);\n }, 1000);\n }\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n toggleFavorite() {\n this.cipher.favorite = !this.cipher.favorite;\n }\n\n togglePassword() {\n super.togglePassword();\n\n // Hide password count when password is hidden to be safe\n if (!this.showPassword && this.showPasswordCount) {\n this.togglePasswordCount();\n }\n }\n\n togglePasswordCount() {\n this.showPasswordCount = !this.showPasswordCount;\n\n if (this.editMode && this.showPasswordCount) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientToggledPasswordVisible,\n this.cipherId,\n );\n }\n }\n\n launch(uri: Launchable) {\n if (!uri.canLaunch) {\n return;\n }\n\n this.platformUtilsService.launchUri(uri.launchUri);\n }\n\n async copy(value: string, typeI18nKey: string, aType: string): Promise {\n if (value == null) {\n return false;\n }\n\n this.platformUtilsService.copyToClipboard(value, { window: window });\n this.platformUtilsService.showToast(\n \"info\",\n null,\n this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n );\n\n if (this.editMode) {\n if (typeI18nKey === \"password\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, this.cipherId);\n } else if (typeI18nKey === \"securityCode\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedCardCode, this.cipherId);\n } else if (aType === \"H_Field\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(\n EventType.Cipher_ClientCopiedHiddenField,\n this.cipherId,\n );\n }\n }\n\n return true;\n }\n\n async generatePassword(): Promise {\n const confirmed = await super.generatePassword();\n if (confirmed) {\n const options = (await this.passwordGenerationService.getOptions())?.[0] ?? {};\n this.cipher.login.password = await this.passwordGenerationService.generatePassword(options);\n }\n return confirmed;\n }\n\n premiumRequired() {\n if (!this.canAccessPremium) {\n this.messagingService.send(\"premiumRequired\");\n return;\n }\n }\n\n upgradeOrganization() {\n this.messagingService.send(\"upgradeOrganization\", {\n organizationId: this.cipher.organizationId,\n });\n }\n\n showGetPremium() {\n if (this.canAccessPremium) {\n return;\n }\n if (this.cipher.organizationUseTotp) {\n this.upgradeOrganization();\n } else {\n this.premiumRequired();\n }\n }\n\n viewHistory() {\n this.viewingPasswordHistory = !this.viewingPasswordHistory;\n }\n\n protected cleanUp() {\n if (this.totpInterval) {\n window.clearInterval(this.totpInterval);\n }\n }\n\n protected async totpUpdateCode() {\n if (\n this.cipher == null ||\n this.cipher.type !== CipherType.Login ||\n this.cipher.login.totp == null\n ) {\n if (this.totpInterval) {\n window.clearInterval(this.totpInterval);\n }\n return;\n }\n\n this.totpCode = await this.totpService.getCode(this.cipher.login.totp);\n if (this.totpCode != null) {\n if (this.totpCode.length > 4) {\n const half = Math.floor(this.totpCode.length / 2);\n this.totpCodeFormatted =\n this.totpCode.substring(0, half) + \" \" + this.totpCode.substring(half);\n } else {\n this.totpCodeFormatted = this.totpCode;\n }\n } else {\n this.totpCodeFormatted = null;\n if (this.totpInterval) {\n window.clearInterval(this.totpInterval);\n }\n }\n }\n\n protected allowOwnershipAssignment() {\n return (\n (!this.editMode || this.cloneMode) &&\n this.ownershipOptions != null &&\n (this.ownershipOptions.length > 1 || !this.allowPersonal)\n );\n }\n\n protected showTotp() {\n return (\n this.cipher.type === CipherType.Login &&\n this.cipher.login.totp &&\n this.organization?.productTierType != ProductTierType.Free &&\n (this.cipher.organizationUseTotp || this.canAccessPremium)\n );\n }\n\n private async totpTick(intervalSeconds: number) {\n const epoch = Math.round(new Date().getTime() / 1000.0);\n const mod = epoch % intervalSeconds;\n\n this.totpSec = intervalSeconds - mod;\n this.totpDash = +(Math.round(((78.6 / intervalSeconds) * mod + \"e+2\") as any) + \"e-2\");\n this.totpLow = this.totpSec <= 7;\n if (mod === 0) {\n await this.totpUpdateCode();\n }\n }\n}\n","
    \n
    \n \n
    \n

    \n {{ \"attachments\" | i18n }}\n {{ cipher.name }}\n

    \n \n ×\n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n \n \n \n
    \n {{ a.fileName }}\n
    \n \n \n {{ \"attachmentFixDescription\" | i18n }}\n \n {{ \"fix\" | i18n }}\n \n
    \n
    \n {{ a.sizeName }}\n
    \n \n \n \n \n
    \n
    \n

    {{ \"newAttachment\" | i18n }}

    \n \n \n {{ \"maxFileSize\" | i18n }}\n
    \n
    \n
    \n \n \n {{ \"save\" | i18n }}\n \n \n
    \n \n
    \n
    \n","import { Component } from \"@angular/core\";\n\nimport { AttachmentsComponent as BaseAttachmentsComponent } from \"@bitwarden/angular/vault/components/attachments.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-vault-attachments\",\n templateUrl: \"attachments.component.html\",\n})\nexport class AttachmentsComponent extends BaseAttachmentsComponent {\n protected override componentName = \"app-vault-attachments\";\n\n constructor(\n cipherService: CipherService,\n i18nService: I18nService,\n cryptoService: CryptoService,\n stateService: StateService,\n platformUtilsService: PlatformUtilsService,\n apiService: ApiService,\n logService: LogService,\n fileDownloadService: FileDownloadService,\n dialogService: DialogService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n super(\n cipherService,\n i18nService,\n cryptoService,\n platformUtilsService,\n apiService,\n window,\n logService,\n stateService,\n fileDownloadService,\n dialogService,\n billingAccountProfileStateService,\n );\n }\n\n protected async reupload(attachment: AttachmentView) {\n if (this.showFixOldAttachments(attachment)) {\n await this.reuploadCipherAttachment(attachment, false);\n }\n }\n\n protected showFixOldAttachments(attachment: AttachmentView) {\n return attachment.key == null && this.cipher.organizationId == null;\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CipherBulkDeleteRequest } from \"@bitwarden/common/vault/models/request/cipher-bulk-delete.request\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface BulkDeleteDialogParams {\n cipherIds?: string[];\n permanent?: boolean;\n organization?: Organization;\n organizations?: Organization[];\n collections?: CollectionView[];\n unassignedCiphers?: string[];\n}\n\nexport enum BulkDeleteDialogResult {\n Deleted = \"deleted\",\n Canceled = \"canceled\",\n}\n\n/**\n * Strongly typed helper to open a BulkDeleteDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openBulkDeleteDialog = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(\n BulkDeleteDialogComponent,\n config,\n );\n};\n\n@Component({\n templateUrl: \"bulk-delete-dialog.component.html\",\n})\nexport class BulkDeleteDialogComponent {\n cipherIds: string[];\n permanent = false;\n organization: Organization;\n organizations: Organization[];\n collections: CollectionView[];\n unassignedCiphers: string[];\n\n private flexibleCollectionsV1Enabled$ = this.configService.getFeatureFlag$(\n FeatureFlag.FlexibleCollectionsV1,\n );\n\n private restrictProviderAccess$ = this.configService.getFeatureFlag$(\n FeatureFlag.RestrictProviderAccess,\n );\n\n constructor(\n @Inject(DIALOG_DATA) params: BulkDeleteDialogParams,\n private dialogRef: DialogRef,\n private cipherService: CipherService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private apiService: ApiService,\n private collectionService: CollectionService,\n private configService: ConfigService,\n ) {\n this.cipherIds = params.cipherIds ?? [];\n this.permanent = params.permanent;\n this.organization = params.organization;\n this.organizations = params.organizations;\n this.collections = params.collections;\n this.unassignedCiphers = params.unassignedCiphers || [];\n }\n\n protected async cancel() {\n this.close(BulkDeleteDialogResult.Canceled);\n }\n\n protected submit = async () => {\n const deletePromises: Promise[] = [];\n const restrictProviderAccess = await firstValueFrom(this.restrictProviderAccess$);\n\n // Unassigned ciphers under an Owner/Admin OR Custom Users With Edit will call the deleteCiphersAdmin method\n if (\n this.unassignedCiphers.length &&\n this.organization.canEditUnassignedCiphers(restrictProviderAccess)\n ) {\n deletePromises.push(this.deleteCiphersAdmin(this.unassignedCiphers));\n }\n if (this.cipherIds.length) {\n const flexibleCollectionsV1Enabled = await firstValueFrom(this.flexibleCollectionsV1Enabled$);\n const restrictProviderAccess = await firstValueFrom(this.restrictProviderAccess$);\n\n if (\n !this.organization ||\n !this.organization.canEditAllCiphers(flexibleCollectionsV1Enabled, restrictProviderAccess)\n ) {\n deletePromises.push(this.deleteCiphers());\n } else {\n deletePromises.push(this.deleteCiphersAdmin(this.cipherIds));\n }\n }\n\n if (this.collections.length) {\n deletePromises.push(this.deleteCollections());\n }\n\n await Promise.all(deletePromises);\n\n if (this.cipherIds.length || this.unassignedCiphers.length) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.permanent ? \"permanentlyDeletedItems\" : \"deletedItems\"),\n );\n }\n if (this.collections.length) {\n await this.collectionService.delete(this.collections.map((c) => c.id));\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"deletedCollections\"),\n );\n }\n this.close(BulkDeleteDialogResult.Deleted);\n };\n\n private async deleteCiphers(): Promise {\n const flexibleCollectionsV1Enabled = await firstValueFrom(this.flexibleCollectionsV1Enabled$);\n const restrictProviderAccess = await firstValueFrom(this.restrictProviderAccess$);\n const asAdmin = this.organization?.canEditAllCiphers(\n flexibleCollectionsV1Enabled,\n restrictProviderAccess,\n );\n if (this.permanent) {\n await this.cipherService.deleteManyWithServer(this.cipherIds, asAdmin);\n } else {\n await this.cipherService.softDeleteManyWithServer(this.cipherIds, asAdmin);\n }\n }\n\n private async deleteCiphersAdmin(ciphers: string[]): Promise {\n const deleteRequest = new CipherBulkDeleteRequest(ciphers, this.organization.id);\n if (this.permanent) {\n return await this.apiService.deleteManyCiphersAdmin(deleteRequest);\n } else {\n return await this.apiService.putDeleteManyCiphersAdmin(deleteRequest);\n }\n }\n\n private async deleteCollections(): Promise {\n const flexibleCollectionsV1Enabled = await firstValueFrom(this.flexibleCollectionsV1Enabled$);\n // From org vault\n if (this.organization) {\n if (\n this.collections.some((c) => !c.canDelete(this.organization, flexibleCollectionsV1Enabled))\n ) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"missingPermissions\"),\n );\n return;\n }\n return await this.apiService.deleteManyCollections(\n this.organization.id,\n this.collections.map((c) => c.id),\n );\n // From individual vault, so there can be multiple organizations\n } else if (this.organizations && this.collections) {\n const deletePromises: Promise[] = [];\n for (const organization of this.organizations) {\n const orgCollections = this.collections.filter((o) => o.organizationId === organization.id);\n if (orgCollections.some((c) => !c.canDelete(organization, flexibleCollectionsV1Enabled))) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"missingPermissions\"),\n );\n return;\n }\n const orgCollectionIds = orgCollections.map((c) => c.id);\n deletePromises.push(\n this.apiService.deleteManyCollections(organization.id, orgCollectionIds),\n );\n }\n return await Promise.all(deletePromises);\n }\n }\n\n private close(result: BulkDeleteDialogResult) {\n this.dialogRef.close(result);\n }\n}\n","\n \n {{ (permanent ? \"permanentlyDeleteSelected\" : \"deleteSelected\") | i18n }}\n \n \n \n \n {{ \"deleteSelectedItemsDesc\" | i18n: cipherIds.length + unassignedCiphers.length }}\n \n \n {{ \"deleteSelectedCollectionsDesc\" | i18n: collections.length }}\n \n {{ \"deleteSelectedConfirmation\" | i18n }}\n \n \n {{ \"permanentlyDeleteSelectedItemsDesc\" | i18n: cipherIds.length + unassignedCiphers.length }}\n \n \n \n \n \n \n\n","import { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\n@Directive()\nexport class CollectionsComponent implements OnInit {\n @Input() cipherId: string;\n @Input() allowSelectNone = false;\n @Output() onSavedCollections = new EventEmitter();\n\n formPromise: Promise;\n cipher: CipherView;\n collectionIds: string[];\n collections: CollectionView[] = [];\n organization: Organization;\n flexibleCollectionsV1Enabled: boolean;\n restrictProviderAccess: boolean;\n\n protected cipherDomain: Cipher;\n\n constructor(\n protected collectionService: CollectionService,\n protected platformUtilsService: PlatformUtilsService,\n protected i18nService: I18nService,\n protected cipherService: CipherService,\n protected organizationService: OrganizationService,\n private logService: LogService,\n private configService: ConfigService,\n ) {}\n\n async ngOnInit() {\n this.flexibleCollectionsV1Enabled = await this.configService.getFeatureFlag(\n FeatureFlag.FlexibleCollectionsV1,\n );\n this.restrictProviderAccess = await this.configService.getFeatureFlag(\n FeatureFlag.RestrictProviderAccess,\n );\n await this.load();\n }\n\n async load() {\n this.cipherDomain = await this.loadCipher();\n this.collectionIds = this.loadCipherCollections();\n this.cipher = await this.cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),\n );\n this.collections = await this.loadCollections();\n\n this.collections.forEach((c) => ((c as any).checked = false));\n if (this.collectionIds != null) {\n this.collections.forEach((c) => {\n (c as any).checked = this.collectionIds != null && this.collectionIds.indexOf(c.id) > -1;\n });\n }\n\n if (this.organization == null) {\n this.organization = await this.organizationService.get(this.cipher.organizationId);\n }\n }\n\n async submit(): Promise {\n const selectedCollectionIds = this.collections\n .filter((c) => {\n if (\n this.organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n )\n ) {\n return !!(c as any).checked;\n } else {\n return !!(c as any).checked && c.readOnly == null;\n }\n })\n .map((c) => c.id);\n if (!this.allowSelectNone && selectedCollectionIds.length === 0) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"selectOneCollection\"),\n );\n return false;\n }\n this.cipherDomain.collectionIds = selectedCollectionIds;\n try {\n this.formPromise = this.saveCollections();\n await this.formPromise;\n this.onSavedCollections.emit();\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"editedItem\"));\n return true;\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), e.message);\n return false;\n }\n }\n\n protected loadCipher() {\n return this.cipherService.get(this.cipherId);\n }\n\n protected loadCipherCollections() {\n return this.cipherDomain.collectionIds;\n }\n\n protected async loadCollections() {\n const allCollections = await this.collectionService.getAllDecrypted();\n return allCollections.filter(\n (c) => !c.readOnly && c.organizationId === this.cipher.organizationId,\n );\n }\n\n protected saveCollections() {\n return this.cipherService.saveCollectionsWithServer(this.cipherDomain);\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy } from \"@angular/core\";\n\nimport { CollectionsComponent as BaseCollectionsComponent } from \"@bitwarden/angular/admin-console/components/collections.component\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-vault-collections\",\n templateUrl: \"collections.component.html\",\n})\nexport class CollectionsComponent extends BaseCollectionsComponent implements OnDestroy {\n constructor(\n collectionService: CollectionService,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n cipherService: CipherService,\n organizationSerivce: OrganizationService,\n logService: LogService,\n configService: ConfigService,\n protected dialogRef: DialogRef,\n @Inject(DIALOG_DATA) params: CollectionsDialogParams,\n ) {\n super(\n collectionService,\n platformUtilsService,\n i18nService,\n cipherService,\n organizationSerivce,\n logService,\n configService,\n );\n this.cipherId = params?.cipherId;\n }\n\n override async submit(): Promise {\n const success = await super.submit();\n if (success) {\n this.dialogRef.close(CollectionsDialogResult.Saved);\n return true;\n }\n return false;\n }\n\n check(c: CollectionView, select?: boolean) {\n if (\n !c.canEditItems(\n this.organization,\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n )\n ) {\n return;\n }\n (c as any).checked = select == null ? !(c as any).checked : select;\n }\n\n selectAll(select: boolean) {\n this.collections.forEach((c) => this.check(c, select));\n }\n\n ngOnDestroy() {\n this.selectAll(false);\n }\n}\n\nexport interface CollectionsDialogParams {\n cipherId: string;\n}\n\nexport enum CollectionsDialogResult {\n Saved = \"saved\",\n}\n\n/**\n * Strongly typed helper to open a Collections dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Optional configuration for the dialog\n */\nexport function openIndividualVaultCollectionsDialog(\n dialogService: DialogService,\n config?: DialogConfig,\n) {\n return dialogService.open(\n CollectionsComponent,\n config,\n );\n}\n","
    \n \n \n {{ \"collections\" | i18n }}\n {{ cipher.name }}\n \n \n

    {{ \"collectionsDesc\" | i18n }}

    \n
    \n \n
    \n \n \n
    \n
    \n
    \n {{ \"noCollectionsInList\" | i18n }}\n
    \n \n \n \n \n \n {{ c.name }}\n \n \n \n \n
    \n \n \n \n \n
    \n
    \n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\nimport { OrganizationNameBadgeComponent } from \"./organization-name-badge.component\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [OrganizationNameBadgeComponent],\n exports: [OrganizationNameBadgeComponent],\n})\nexport class OrganizationBadgeModule {}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n name: \"ellipsis\",\n})\n/**\n * @deprecated Use the tailwind class 'tw-truncate' instead\n */\nexport class EllipsisPipe implements PipeTransform {\n transform(value: string, limit = 25, completeWords = false, ellipsis = \"...\") {\n if (value.length <= limit) {\n return value;\n }\n limit -= ellipsis.length;\n if (completeWords && value.length > limit && value.indexOf(\" \") > 0) {\n limit = value.substring(0, limit).lastIndexOf(\" \");\n }\n return value.substring(0, limit) + ellipsis;\n }\n}\n","import { Component, Input, OnChanges } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { Unassigned } from \"../vault-filter/shared/models/routed-vault-filter.model\";\n\n@Component({\n selector: \"app-org-badge\",\n templateUrl: \"organization-name-badge.component.html\",\n})\nexport class OrganizationNameBadgeComponent implements OnChanges {\n @Input() organizationId?: string;\n @Input() organizationName: string;\n @Input() disabled: boolean;\n\n // Need a separate variable or we get weird behavior when used as part of cdk virtual scrolling\n name: string;\n color: string;\n textColor: string;\n isMe: boolean;\n\n constructor(\n private i18nService: I18nService,\n private avatarService: AvatarService,\n private tokenService: TokenService,\n ) {}\n\n // ngOnChanges is required since this component might be reused as part of\n // cdk virtual scrolling\n async ngOnChanges() {\n this.isMe = this.organizationName == null || this.organizationName === \"\";\n\n if (this.isMe) {\n this.name = this.i18nService.t(\"me\");\n this.color = await firstValueFrom(this.avatarService.avatarColor$);\n if (this.color == null) {\n const userId = await this.tokenService.getUserId();\n if (userId != null) {\n this.color = Utils.stringToColor(userId);\n } else {\n const userName =\n (await this.tokenService.getName()) ?? (await this.tokenService.getEmail());\n this.color = Utils.stringToColor(userName.toUpperCase());\n }\n }\n } else {\n this.name = this.organizationName;\n this.color = Utils.stringToColor(this.organizationName.toUpperCase());\n }\n this.textColor = Utils.pickTextColorBasedOnBgColor(this.color, 135, true) + \"!important\";\n }\n\n get organizationIdLink() {\n return this.organizationId ?? Unassigned;\n }\n}\n","\n {{ name | ellipsis: 13 }}\n\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\n@Pipe({\n name: \"orgNameFromId\",\n pure: true,\n})\nexport class GetOrgNameFromIdPipe implements PipeTransform {\n transform(value: string, organizations: Organization[]) {\n const orgName = organizations?.find((o) => o.id === value)?.name;\n return orgName;\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { GetCollectionNameFromIdPipe } from \"./get-collection-name.pipe\";\nimport { GetGroupNameFromIdPipe } from \"./get-group-name.pipe\";\nimport { GetOrgNameFromIdPipe } from \"./get-organization-name.pipe\";\n\n@NgModule({\n declarations: [GetOrgNameFromIdPipe, GetCollectionNameFromIdPipe, GetGroupNameFromIdPipe],\n exports: [GetOrgNameFromIdPipe, GetCollectionNameFromIdPipe, GetGroupNameFromIdPipe],\n})\nexport class PipesModule {}\n","import { UserVerificationDialogComponent } from \"@bitwarden/auth/angular\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserResetPasswordEnrollmentRequest } from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { OrganizationUserResetPasswordService } from \"../members/services/organization-user-reset-password/organization-user-reset-password.service\";\n\ninterface EnrollMasterPasswordResetData {\n organization: Organization;\n}\n\nexport class EnrollMasterPasswordReset {\n constructor() {}\n\n static async open(\n dialogService: DialogService,\n data: EnrollMasterPasswordResetData,\n resetPasswordService: OrganizationUserResetPasswordService,\n organizationUserService: OrganizationUserService,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n syncService: SyncService,\n logService: LogService,\n userVerificationService: UserVerificationService,\n ) {\n const result = await UserVerificationDialogComponent.open(dialogService, {\n title: \"enrollAccountRecovery\",\n calloutOptions: {\n text: \"resetPasswordEnrollmentWarning\",\n type: \"warning\",\n },\n verificationType: {\n type: \"custom\",\n verificationFn: async (secret: VerificationWithSecret) => {\n const request =\n await userVerificationService.buildRequest(\n secret,\n );\n request.resetPasswordKey = await resetPasswordService.buildRecoveryKey(\n data.organization.id,\n );\n\n // Process the enrollment request, which is an endpoint that is\n // gated by a server-side check of the master password hash\n await organizationUserService.putOrganizationUserResetPasswordEnrollment(\n data.organization.id,\n data.organization.userId,\n request,\n );\n return true;\n },\n },\n });\n\n // User canceled enrollment\n if (result.userAction === \"cancel\") {\n return;\n }\n\n // Enrollment failed\n if (!result.verificationSuccess) {\n return;\n }\n\n // Enrollment succeeded\n try {\n platformUtilsService.showToast(\"success\", null, i18nService.t(\"enrollPasswordResetSuccess\"));\n await syncService.fullSync(true);\n } catch (e) {\n logService.error(e);\n }\n }\n}\n","import { AfterContentInit, Directive, HostListener, Input } from \"@angular/core\";\n\nimport { SsoComponent } from \"@bitwarden/angular/auth/components/sso.component\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\n@Directive({\n selector: \"[app-link-sso]\",\n})\nexport class LinkSsoDirective extends SsoComponent implements AfterContentInit {\n @Input() organization: Organization;\n returnUri = \"/settings/organizations\";\n redirectUri = window.location.origin + \"/sso-connector.html\";\n clientId = \"web\";\n\n @HostListener(\"click\", [\"$event\"])\n async onClick($event: MouseEvent) {\n $event.preventDefault();\n await this.submit(this.returnUri, true);\n }\n\n async ngAfterContentInit() {\n this.identifier = this.organization.identifier;\n }\n}\n","\n \n \n \n \n \n \n {{ \"loading\" | i18n }}\n \n \n \n \n {{ \"enrollAccountRecovery\" | i18n }}\n \n \n \n {{ \"withdrawAccountRecovery\" | i18n }}\n \n \n \n \n {{ \"unlinkSso\" | i18n }}\n \n \n \n \n {{ \"linkSso\" | i18n }}\n \n \n \n \n \n \n\n","import { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { combineLatest, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserResetPasswordEnrollmentRequest } from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { OrganizationUserResetPasswordService } from \"../../../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service\";\nimport { EnrollMasterPasswordReset } from \"../../../../admin-console/organizations/users/enroll-master-password-reset.component\";\nimport { OptionsInput } from \"../shared/components/vault-filter-section.component\";\nimport { OrganizationFilter } from \"../shared/models/vault-filter.type\";\n\n@Component({\n selector: \"app-organization-options\",\n templateUrl: \"organization-options.component.html\",\n})\nexport class OrganizationOptionsComponent implements OnInit, OnDestroy {\n protected actionPromise: Promise;\n protected resetPasswordPolicy?: Policy | undefined;\n protected loaded = false;\n protected hideMenu = false;\n protected showLeaveOrgOption = false;\n protected organization: OrganizationFilter;\n\n private destroy$ = new Subject();\n\n constructor(\n @Inject(OptionsInput) protected organization$: Observable,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private apiService: ApiService,\n private syncService: SyncService,\n private policyService: PolicyService,\n private logService: LogService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private organizationUserService: OrganizationUserService,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n private dialogService: DialogService,\n private resetPasswordService: OrganizationUserResetPasswordService,\n private userVerificationService: UserVerificationService,\n ) {}\n\n async ngOnInit() {\n const resetPasswordPolicies$ = this.policyService.policies$.pipe(\n map((policies) => policies.filter((policy) => policy.type === PolicyType.ResetPassword)),\n );\n\n combineLatest([\n this.organization$,\n resetPasswordPolicies$,\n this.userDecryptionOptionsService.userDecryptionOptions$,\n ])\n .pipe(takeUntil(this.destroy$))\n .subscribe(([organization, resetPasswordPolicies, decryptionOptions]) => {\n this.organization = organization;\n this.resetPasswordPolicy = resetPasswordPolicies.find(\n (p) => p.organizationId === organization.id,\n );\n\n // A user can leave an organization if they are NOT using TDE and Key Connector, or they have a master password.\n this.showLeaveOrgOption =\n (decryptionOptions.trustedDeviceOption == undefined &&\n decryptionOptions.keyConnectorOption == undefined) ||\n decryptionOptions.hasMasterPassword;\n\n // Hide the 3 dot menu if the user has no available actions\n this.hideMenu =\n !this.showLeaveOrgOption &&\n !this.showSsoOptions(this.organization) &&\n !this.allowEnrollmentChanges(this.organization);\n\n this.loaded = true;\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n allowEnrollmentChanges(org: OrganizationFilter): boolean {\n if (org?.usePolicies && org?.useResetPassword && org?.hasPublicAndPrivateKeys) {\n if (this.resetPasswordPolicy != undefined && this.resetPasswordPolicy.enabled) {\n return !(org?.resetPasswordEnrolled && this.resetPasswordPolicy.data.autoEnrollEnabled);\n }\n }\n\n return false;\n }\n\n showSsoOptions(org: OrganizationFilter) {\n return org?.useSso && org?.identifier;\n }\n\n async unlinkSso(org: Organization) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: org.name,\n content: { key: \"unlinkSsoConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.actionPromise = this.apiService.deleteSsoUser(org.id).then(() => {\n return this.syncService.fullSync(true);\n });\n await this.actionPromise;\n this.platformUtilsService.showToast(\"success\", null, \"Unlinked SSO\");\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async leave(org: Organization) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: org.name,\n content: { key: \"leaveOrganizationConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.actionPromise = this.organizationApiService.leave(org.id);\n await this.actionPromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"leftOrganization\"));\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async toggleResetPasswordEnrollment(org: Organization) {\n if (!this.organization.resetPasswordEnrolled) {\n await EnrollMasterPasswordReset.open(\n this.dialogService,\n { organization: org },\n this.resetPasswordService,\n this.organizationUserService,\n this.platformUtilsService,\n this.i18nService,\n this.syncService,\n this.logService,\n this.userVerificationService,\n );\n } else {\n // Remove reset password\n const request = new OrganizationUserResetPasswordEnrollmentRequest();\n request.masterPasswordHash = \"ignored\";\n request.resetPasswordKey = null;\n this.actionPromise = this.organizationUserService.putOrganizationUserResetPasswordEnrollment(\n this.organization.id,\n this.organization.userId,\n request,\n );\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"withdrawPasswordResetSuccess\"),\n );\n await this.syncService.fullSync(true);\n } catch (e) {\n this.logService.error(e);\n }\n }\n }\n}\n","
    \n
    \n \n
    \n
    \n
    \n {{ \"filters\" | i18n }}\n \n \n \n
    \n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom, Subject } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { VaultFilterService } from \"../services/abstractions/vault-filter.service\";\nimport {\n VaultFilterList,\n VaultFilterSection,\n VaultFilterType,\n} from \"../shared/models/vault-filter-section.type\";\nimport { VaultFilter } from \"../shared/models/vault-filter.model\";\nimport {\n CipherStatus,\n CipherTypeFilter,\n CollectionFilter,\n FolderFilter,\n OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { OrganizationOptionsComponent } from \"./organization-options.component\";\n\n@Component({\n selector: \"app-vault-filter\",\n templateUrl: \"vault-filter.component.html\",\n})\nexport class VaultFilterComponent implements OnInit, OnDestroy {\n filters?: VaultFilterList;\n @Input() activeFilter: VaultFilter = new VaultFilter();\n @Output() onEditFolder = new EventEmitter();\n\n @Input() searchText = \"\";\n @Output() searchTextChanged = new EventEmitter();\n\n isLoaded = false;\n\n protected destroy$: Subject = new Subject();\n\n get filtersList() {\n return this.filters ? Object.values(this.filters) : [];\n }\n\n get searchPlaceholder() {\n if (this.activeFilter.isFavorites) {\n return \"searchFavorites\";\n }\n if (this.activeFilter.isDeleted) {\n return \"searchTrash\";\n }\n if (this.activeFilter.cipherType === CipherType.Login) {\n return \"searchLogin\";\n }\n if (this.activeFilter.cipherType === CipherType.Card) {\n return \"searchCard\";\n }\n if (this.activeFilter.cipherType === CipherType.Identity) {\n return \"searchIdentity\";\n }\n if (this.activeFilter.cipherType === CipherType.SecureNote) {\n return \"searchSecureNote\";\n }\n if (this.activeFilter.selectedFolderNode?.node) {\n return \"searchFolder\";\n }\n if (this.activeFilter.selectedCollectionNode?.node) {\n return \"searchCollection\";\n }\n if (this.activeFilter.organizationId === \"MyVault\") {\n return \"searchMyVault\";\n }\n if (this.activeFilter.organizationId) {\n return \"searchOrganization\";\n }\n\n return \"searchVault\";\n }\n\n constructor(\n protected vaultFilterService: VaultFilterService,\n protected policyService: PolicyService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n ) {}\n\n async ngOnInit(): Promise {\n this.filters = await this.buildAllFilters();\n this.activeFilter.selectedCipherTypeNode =\n (await this.getDefaultFilter()) as TreeNode;\n this.isLoaded = true;\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n onSearchTextChanged(t: string) {\n this.searchText = t;\n this.searchTextChanged.emit(t);\n }\n\n applyOrganizationFilter = async (orgNode: TreeNode): Promise => {\n if (!orgNode?.node.enabled) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"disabledOrganizationFilterError\"),\n );\n return;\n }\n const filter = this.activeFilter;\n if (orgNode?.node.id === \"AllVaults\") {\n filter.resetOrganization();\n } else {\n filter.selectedOrganizationNode = orgNode;\n }\n this.vaultFilterService.setOrganizationFilter(orgNode.node);\n await this.vaultFilterService.expandOrgFilter();\n };\n\n applyTypeFilter = async (filterNode: TreeNode): Promise => {\n const filter = this.activeFilter;\n filter.resetFilter();\n filter.selectedCipherTypeNode = filterNode;\n };\n\n applyFolderFilter = async (folderNode: TreeNode): Promise => {\n const filter = this.activeFilter;\n filter.resetFilter();\n filter.selectedFolderNode = folderNode;\n };\n\n applyCollectionFilter = async (collectionNode: TreeNode): Promise => {\n const filter = this.activeFilter;\n filter.resetFilter();\n filter.selectedCollectionNode = collectionNode;\n };\n\n editFolder = async (folder: FolderFilter): Promise => {\n this.onEditFolder.emit(folder);\n };\n\n async getDefaultFilter(): Promise> {\n return await firstValueFrom(this.filters?.typeFilter.data$);\n }\n\n async buildAllFilters(): Promise {\n const builderFilter = {} as VaultFilterList;\n builderFilter.organizationFilter = await this.addOrganizationFilter();\n builderFilter.typeFilter = await this.addTypeFilter();\n builderFilter.folderFilter = await this.addFolderFilter();\n builderFilter.collectionFilter = await this.addCollectionFilter();\n builderFilter.trashFilter = await this.addTrashFilter();\n return builderFilter;\n }\n\n protected async addOrganizationFilter(): Promise {\n const singleOrgPolicy = await this.policyService.policyAppliesToUser(PolicyType.SingleOrg);\n const personalVaultPolicy = await this.policyService.policyAppliesToUser(\n PolicyType.PersonalOwnership,\n );\n\n const addAction = !singleOrgPolicy\n ? { text: \"newOrganization\", route: \"/create-organization\" }\n : null;\n\n const orgFilterSection: VaultFilterSection = {\n data$: this.vaultFilterService.organizationTree$,\n header: {\n showHeader: !(singleOrgPolicy && personalVaultPolicy),\n isSelectable: true,\n },\n action: this.applyOrganizationFilter,\n options: { component: OrganizationOptionsComponent },\n add: addAction,\n divider: true,\n };\n\n return orgFilterSection;\n }\n\n protected async addTypeFilter(excludeTypes: CipherStatus[] = []): Promise {\n const allTypeFilters: CipherTypeFilter[] = [\n {\n id: \"favorites\",\n name: this.i18nService.t(\"favorites\"),\n type: \"favorites\",\n icon: \"bwi-star\",\n },\n {\n id: \"login\",\n name: this.i18nService.t(\"typeLogin\"),\n type: CipherType.Login,\n icon: \"bwi-globe\",\n },\n {\n id: \"card\",\n name: this.i18nService.t(\"typeCard\"),\n type: CipherType.Card,\n icon: \"bwi-credit-card\",\n },\n {\n id: \"identity\",\n name: this.i18nService.t(\"typeIdentity\"),\n type: CipherType.Identity,\n icon: \"bwi-id-card\",\n },\n {\n id: \"note\",\n name: this.i18nService.t(\"typeSecureNote\"),\n type: CipherType.SecureNote,\n icon: \"bwi-sticky-note\",\n },\n ];\n\n const typeFilterSection: VaultFilterSection = {\n data$: this.vaultFilterService.buildTypeTree(\n { id: \"AllItems\", name: \"allItems\", type: \"all\", icon: \"\" },\n allTypeFilters.filter((f) => !excludeTypes.includes(f.type)),\n ),\n header: {\n showHeader: true,\n isSelectable: true,\n },\n action: this.applyTypeFilter,\n };\n return typeFilterSection;\n }\n\n protected async addFolderFilter(): Promise {\n const folderFilterSection: VaultFilterSection = {\n data$: this.vaultFilterService.folderTree$,\n header: {\n showHeader: true,\n isSelectable: false,\n },\n action: this.applyFolderFilter,\n edit: {\n text: \"editFolder\",\n action: this.editFolder,\n },\n };\n return folderFilterSection;\n }\n\n protected async addCollectionFilter(): Promise {\n const collectionFilterSection: VaultFilterSection = {\n data$: this.vaultFilterService.collectionTree$,\n header: {\n showHeader: true,\n isSelectable: true,\n },\n action: this.applyCollectionFilter,\n };\n return collectionFilterSection;\n }\n\n protected async addTrashFilter(): Promise {\n const trashFilterSection: VaultFilterSection = {\n data$: this.vaultFilterService.buildTypeTree(\n {\n id: \"headTrash\",\n name: \"HeadTrash\",\n type: \"trash\",\n icon: \"bwi-trash\",\n },\n [\n {\n id: \"trash\",\n name: this.i18nService.t(\"trash\"),\n type: \"trash\",\n icon: \"bwi-trash\",\n },\n ],\n ),\n header: {\n showHeader: false,\n isSelectable: true,\n },\n action: this.applyTypeFilter,\n };\n return trashFilterSection;\n }\n}\n","import { Observable } from \"rxjs\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CollectionView } from \"@bitwarden/common/src/vault/models/view/collection.view\";\nimport { FolderView } from \"@bitwarden/common/src/vault/models/view/folder.view\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { CollectionAdminView } from \"../../../../core/views/collection-admin.view\";\nimport {\n CipherTypeFilter,\n CollectionFilter,\n FolderFilter,\n OrganizationFilter,\n} from \"../../shared/models/vault-filter.type\";\n\nexport abstract class VaultFilterService {\n collapsedFilterNodes$: Observable>;\n filteredFolders$: Observable;\n filteredCollections$: Observable;\n organizationTree$: Observable>;\n folderTree$: Observable>;\n collectionTree$: Observable>;\n cipherTypeTree$: Observable>;\n getCollectionNodeFromTree: (id: string) => Promise>;\n setCollapsedFilterNodes: (collapsedFilterNodes: Set) => Promise;\n expandOrgFilter: () => Promise;\n getOrganizationFilter: () => Observable;\n setOrganizationFilter: (organization: Organization) => void;\n buildTypeTree: (\n head: CipherTypeFilter,\n array: CipherTypeFilter[],\n ) => Observable>;\n // TODO: Remove this from org vault when collection admin service adopts state management\n reloadCollections?: (collections: CollectionAdminView[]) => void;\n clearOrganizationFilter: () => void;\n}\n","import { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { RoutedVaultFilterBridgeService } from \"../../services/routed-vault-filter-bridge.service\";\n\nimport {\n All,\n isRoutedVaultFilterItemType,\n RoutedVaultFilterItemType,\n RoutedVaultFilterModel,\n Unassigned,\n} from \"./routed-vault-filter.model\";\nimport { VaultFilter, VaultFilterFunction } from \"./vault-filter.model\";\nimport {\n OrganizationFilter,\n CipherTypeFilter,\n FolderFilter,\n CollectionFilter,\n CipherStatus,\n} from \"./vault-filter.type\";\n\n/**\n * This file is part of a layer that is used to temporary bridge between URL filtering and the old state-in-code method.\n * This should be removed after we have refactored the {@link VaultItemsComponent} and introduced vertical navigation\n * (which will refactor the {@link VaultFilterComponent}).\n *\n * This model supplies legacy code with the old state-in-code models saved as tree nodes.\n * It can also receive requests to select a new tree node by using setters.\n * However instead of just replacing the tree node models, it requests a URL navigation,\n * thereby bridging between legacy and URL filtering.\n */\nexport class RoutedVaultFilterBridge implements VaultFilter {\n constructor(\n private routedFilter: RoutedVaultFilterModel,\n private legacyFilter: VaultFilter,\n private bridgeService: RoutedVaultFilterBridgeService,\n ) {}\n get collectionBreadcrumbs(): TreeNode[] {\n return this.legacyFilter.collectionBreadcrumbs;\n }\n get isCollectionSelected(): boolean {\n return this.legacyFilter.isCollectionSelected;\n }\n get isUnassignedCollectionSelected(): boolean {\n return this.legacyFilter.isUnassignedCollectionSelected;\n }\n get isMyVaultSelected(): boolean {\n return this.legacyFilter.isMyVaultSelected;\n }\n get selectedOrganizationNode(): TreeNode {\n return this.legacyFilter.selectedOrganizationNode;\n }\n set selectedOrganizationNode(value: TreeNode) {\n this.bridgeService.navigate({\n ...this.routedFilter,\n organizationId: value?.node.id === \"MyVault\" ? Unassigned : value?.node.id,\n folderId: undefined,\n collectionId: undefined,\n });\n }\n get selectedCipherTypeNode(): TreeNode {\n return this.legacyFilter.selectedCipherTypeNode;\n }\n set selectedCipherTypeNode(value: TreeNode) {\n let type: RoutedVaultFilterItemType | undefined;\n\n if (value?.node.id === \"AllItems\" && this.routedFilter.organizationIdParamType === \"path\") {\n type = \"all\";\n } else if (\n value?.node.id === \"AllItems\" &&\n this.routedFilter.organizationIdParamType === \"query\"\n ) {\n type = undefined;\n } else if (isRoutedVaultFilterItemType(value?.node.id)) {\n type = value?.node.id;\n }\n\n this.bridgeService.navigate({\n ...this.routedFilter,\n type,\n folderId: undefined,\n collectionId: undefined,\n });\n }\n get selectedFolderNode(): TreeNode {\n return this.legacyFilter.selectedFolderNode;\n }\n set selectedFolderNode(value: TreeNode) {\n const folderId = value != null && value.node.id === null ? Unassigned : value?.node.id;\n this.bridgeService.navigate({\n ...this.routedFilter,\n folderId,\n type: undefined,\n collectionId: undefined,\n });\n }\n get selectedCollectionNode(): TreeNode {\n return this.legacyFilter.selectedCollectionNode;\n }\n set selectedCollectionNode(value: TreeNode) {\n let collectionId: string | undefined;\n\n if (value != null && value.node.id === null) {\n collectionId = Unassigned;\n } else if (\n value?.node.id === \"AllCollections\" &&\n this.routedFilter.organizationIdParamType === \"path\"\n ) {\n collectionId = undefined;\n } else if (\n value?.node.id === \"AllCollections\" &&\n this.routedFilter.organizationIdParamType === \"query\"\n ) {\n collectionId = All;\n } else {\n collectionId = value?.node.id;\n }\n\n this.bridgeService.navigate({\n ...this.routedFilter,\n collectionId,\n type: undefined,\n folderId: undefined,\n });\n }\n get isFavorites(): boolean {\n return this.legacyFilter.isFavorites;\n }\n get isDeleted(): boolean {\n return this.legacyFilter.isDeleted;\n }\n get organizationId(): string {\n return this.legacyFilter.organizationId;\n }\n get cipherType(): CipherType {\n return this.legacyFilter.cipherType;\n }\n get cipherStatus(): CipherStatus {\n return this.legacyFilter.cipherStatus;\n }\n get cipherTypeId(): string {\n return this.legacyFilter.cipherTypeId;\n }\n get folderId(): string {\n return this.legacyFilter.folderId;\n }\n get collectionId(): string {\n return this.legacyFilter.collectionId;\n }\n resetFilter(): void {\n this.bridgeService.navigate({\n ...this.routedFilter,\n collectionId: undefined,\n folderId: undefined,\n organizationId:\n this.routedFilter.organizationIdParamType === \"path\"\n ? this.routedFilter.organizationId\n : undefined,\n type: undefined,\n });\n }\n resetOrganization(): void {\n this.bridgeService.navigate({ ...this.routedFilter, organizationId: undefined });\n }\n buildFilter(): VaultFilterFunction {\n return this.legacyFilter.buildFilter();\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { combineLatest, map, Observable } from \"rxjs\";\n\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\n\nimport { RoutedVaultFilterBridge } from \"../shared/models/routed-vault-filter-bridge.model\";\nimport {\n RoutedVaultFilterModel,\n Unassigned,\n All,\n} from \"../shared/models/routed-vault-filter.model\";\nimport { VaultFilter } from \"../shared/models/vault-filter.model\";\nimport {\n CipherTypeFilter,\n CollectionFilter,\n FolderFilter,\n OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { VaultFilterService } from \"./abstractions/vault-filter.service\";\nimport { RoutedVaultFilterService } from \"./routed-vault-filter.service\";\n\n/**\n * This file is part of a layer that is used to temporary bridge between URL filtering and the old state-in-code method.\n * This should be removed after we have refactored the {@link VaultItemsComponent} and introduced vertical navigation\n * (which will refactor the {@link VaultFilterComponent}).\n *\n * This class listens to both the new {@link RoutedVaultFilterService} and the old {@link VaultFilterService}.\n * When a new filter is emitted the service uses the ids to find the corresponding tree nodes needed for\n * the old {@link VaultFilter} model. It then emits a bridge model that contains this information.\n */\n@Injectable()\nexport class RoutedVaultFilterBridgeService {\n readonly activeFilter$: Observable;\n\n constructor(\n private router: Router,\n private routedVaultFilterService: RoutedVaultFilterService,\n legacyVaultFilterService: VaultFilterService,\n ) {\n this.activeFilter$ = combineLatest([\n routedVaultFilterService.filter$,\n legacyVaultFilterService.collectionTree$,\n legacyVaultFilterService.folderTree$,\n legacyVaultFilterService.organizationTree$,\n legacyVaultFilterService.cipherTypeTree$,\n ]).pipe(\n map(([filter, collectionTree, folderTree, organizationTree, cipherTypeTree]) => {\n const legacyFilter = isAdminConsole(filter)\n ? createLegacyFilterForAdminConsole(filter, collectionTree, cipherTypeTree)\n : createLegacyFilterForEndUser(\n filter,\n collectionTree,\n folderTree,\n organizationTree,\n cipherTypeTree,\n );\n\n return new RoutedVaultFilterBridge(filter, legacyFilter, this);\n }),\n );\n }\n\n navigate(filter: RoutedVaultFilterModel) {\n const [commands, extras] = this.routedVaultFilterService.createRoute(filter);\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate(commands, extras);\n }\n}\n\n/**\n * Check if the filtering is being done as part of admin console.\n * Admin console can be identified by checking if the `organizationId`\n * is part of the path.\n *\n * @param filter Model to check if origin is admin console\n * @returns true if filtering being done as part of admin console\n */\nfunction isAdminConsole(filter: RoutedVaultFilterModel) {\n return filter.organizationIdParamType === \"path\";\n}\n\nfunction createLegacyFilterForAdminConsole(\n filter: RoutedVaultFilterModel,\n collectionTree: TreeNode,\n cipherTypeTree: TreeNode,\n): VaultFilter {\n const legacyFilter = new VaultFilter();\n\n if (filter.collectionId === undefined && filter.type === undefined) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n collectionTree,\n \"AllCollections\",\n );\n } else if (filter.collectionId !== undefined && filter.collectionId === Unassigned) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(collectionTree, null);\n } else if (filter.collectionId !== undefined) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n collectionTree,\n filter.collectionId,\n );\n }\n\n if (filter.collectionId === undefined && filter.type === All) {\n legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n cipherTypeTree,\n \"AllItems\",\n );\n } else if (filter.type !== undefined && filter.type === \"trash\") {\n legacyFilter.selectedCipherTypeNode = new TreeNode(\n { id: \"trash\", name: \"\", type: \"trash\", icon: \"\" },\n null,\n );\n } else if (filter.type !== undefined && filter.type !== \"trash\") {\n legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n cipherTypeTree,\n filter.type,\n );\n }\n\n return legacyFilter;\n}\n\nfunction createLegacyFilterForEndUser(\n filter: RoutedVaultFilterModel,\n collectionTree: TreeNode,\n folderTree: TreeNode,\n organizationTree: TreeNode,\n cipherTypeTree: TreeNode,\n): VaultFilter {\n const legacyFilter = new VaultFilter();\n\n if (filter.collectionId !== undefined && filter.collectionId === Unassigned) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(collectionTree, null);\n } else if (filter.collectionId !== undefined && filter.collectionId === All) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n collectionTree,\n \"AllCollections\",\n );\n } else if (filter.collectionId !== undefined) {\n legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n collectionTree,\n filter.collectionId,\n );\n }\n\n if (filter.folderId !== undefined && filter.folderId === Unassigned) {\n legacyFilter.selectedFolderNode = ServiceUtils.getTreeNodeObject(folderTree, null);\n } else if (filter.folderId !== undefined && filter.folderId !== Unassigned) {\n legacyFilter.selectedFolderNode = ServiceUtils.getTreeNodeObject(folderTree, filter.folderId);\n }\n\n if (filter.organizationId !== undefined && filter.organizationId === Unassigned) {\n legacyFilter.selectedOrganizationNode = ServiceUtils.getTreeNodeObject(\n organizationTree,\n \"MyVault\",\n );\n } else if (filter.organizationId !== undefined && filter.organizationId !== Unassigned) {\n legacyFilter.selectedOrganizationNode = ServiceUtils.getTreeNodeObject(\n organizationTree,\n filter.organizationId,\n );\n }\n\n if (filter.type === undefined) {\n legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n cipherTypeTree,\n \"AllItems\",\n );\n } else if (filter.type !== undefined && filter.type === \"trash\") {\n legacyFilter.selectedCipherTypeNode = new TreeNode(\n { id: \"trash\", name: \"\", type: \"trash\", icon: \"\" },\n null,\n );\n } else if (filter.type !== undefined && filter.type !== \"trash\") {\n legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n cipherTypeTree,\n filter.type,\n );\n }\n\n return legacyFilter;\n}\n","import { Injectable, OnDestroy } from \"@angular/core\";\nimport { ActivatedRoute, NavigationExtras } from \"@angular/router\";\nimport { combineLatest, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport {\n isRoutedVaultFilterItemType,\n RoutedVaultFilterModel,\n} from \"../shared/models/routed-vault-filter.model\";\n\n/**\n * This service is an abstraction layer on top of ActivatedRoute that\n * encapsulates the logic of how filters are stored in the URL.\n *\n * The service builds and emits filter models based on URL params and\n * also contains a method for generating routes to corresponding to those params.\n */\n@Injectable()\nexport class RoutedVaultFilterService implements OnDestroy {\n private onDestroy = new Subject();\n\n /**\n * Filter values extracted from the URL.\n * To change the values use {@link RoutedVaultFilterService.createRoute}.\n */\n filter$: Observable;\n\n constructor(activatedRoute: ActivatedRoute) {\n this.filter$ = combineLatest([activatedRoute.paramMap, activatedRoute.queryParamMap]).pipe(\n map(([params, queryParams]) => {\n const unsafeType = queryParams.get(\"type\");\n const type = isRoutedVaultFilterItemType(unsafeType) ? unsafeType : undefined;\n\n return {\n collectionId: queryParams.get(\"collectionId\") ?? undefined,\n folderId: queryParams.get(\"folderId\") ?? undefined,\n organizationId:\n params.get(\"organizationId\") ?? queryParams.get(\"organizationId\") ?? undefined,\n organizationIdParamType:\n params.get(\"organizationId\") != undefined ? (\"path\" as const) : (\"query\" as const),\n type,\n };\n }),\n takeUntil(this.onDestroy),\n );\n }\n\n /**\n * Create a route that can be used to modify filters with Router or RouterLink.\n * This method is specifically built to leave other query parameters untouched,\n * meaning that navigation will only affect filters and not e.g. `cipherId`.\n * To subscribe to changes use {@link RoutedVaultFilterService.filter$}.\n *\n * Note:\n * This method currently only supports changing filters that are stored\n * in query parameters. This means that {@link RoutedVaultFilterModel.organizationId}\n * will be ignored if {@link RoutedVaultFilterModel.organizationIdParamType}\n * is set to `path`.\n *\n * @param filter Filter values that should be applied to the URL.\n * @returns route that can be used with Router or RouterLink\n */\n createRoute(filter: RoutedVaultFilterModel): [commands: any[], extras?: NavigationExtras] {\n const commands: string[] = [];\n const extras: NavigationExtras = {\n queryParams: {\n collectionId: filter.collectionId ?? null,\n folderId: filter.folderId ?? null,\n organizationId:\n filter.organizationIdParamType === \"path\" ? null : filter.organizationId ?? null,\n type: filter.type ?? null,\n },\n queryParamsHandling: \"merge\",\n };\n return [commands, extras];\n }\n\n ngOnDestroy(): void {\n this.onDestroy.next();\n this.onDestroy.complete();\n }\n}\n","import { UserKeyDefinition, VAULT_FILTER_DISK } from \"../../../platform/state\";\n\nexport const COLLAPSED_GROUPINGS = UserKeyDefinition.array(\n VAULT_FILTER_DISK,\n \"collapsedGroupings\",\n {\n deserializer: (obj) => obj,\n clearOn: [\"logout\", \"lock\"],\n },\n);\n","import { Injectable } from \"@angular/core\";\nimport {\n BehaviorSubject,\n combineLatestWith,\n firstValueFrom,\n map,\n Observable,\n of,\n switchMap,\n} from \"rxjs\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ActiveUserState, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\nimport { COLLAPSED_GROUPINGS } from \"@bitwarden/common/vault/services/key-state/collapsed-groupings.state\";\n\nimport { CollectionAdminView } from \"../../../core/views/collection-admin.view\";\nimport {\n CipherTypeFilter,\n CollectionFilter,\n FolderFilter,\n OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { VaultFilterService as VaultFilterServiceAbstraction } from \"./abstractions/vault-filter.service\";\n\nconst NestingDelimiter = \"/\";\n\n@Injectable()\nexport class VaultFilterService implements VaultFilterServiceAbstraction {\n organizationTree$: Observable> =\n this.organizationService.memberOrganizations$.pipe(\n switchMap((orgs) => this.buildOrganizationTree(orgs)),\n );\n\n protected _organizationFilter = new BehaviorSubject(null);\n\n filteredFolders$: Observable = this.folderService.folderViews$.pipe(\n combineLatestWith(this._organizationFilter),\n switchMap(([folders, org]) => {\n return this.filterFolders(folders, org);\n }),\n );\n folderTree$: Observable> = this.filteredFolders$.pipe(\n map((folders) => this.buildFolderTree(folders)),\n );\n\n filteredCollections$: Observable =\n this.collectionService.decryptedCollections$.pipe(\n combineLatestWith(this._organizationFilter),\n switchMap(([collections, org]) => {\n return this.filterCollections(collections, org);\n }),\n );\n\n collectionTree$: Observable> = this.filteredCollections$.pipe(\n map((collections) => this.buildCollectionTree(collections)),\n );\n\n cipherTypeTree$: Observable> = this.buildCipherTypeTree();\n\n private collapsedGroupingsState: ActiveUserState =\n this.stateProvider.getActive(COLLAPSED_GROUPINGS);\n\n readonly collapsedFilterNodes$: Observable> =\n this.collapsedGroupingsState.state$.pipe(map((c) => new Set(c)));\n\n constructor(\n protected organizationService: OrganizationService,\n protected folderService: FolderService,\n protected cipherService: CipherService,\n protected policyService: PolicyService,\n protected i18nService: I18nService,\n protected stateProvider: StateProvider,\n protected collectionService: CollectionService,\n ) {}\n\n async getCollectionNodeFromTree(id: string) {\n const collections = await firstValueFrom(this.collectionTree$);\n return ServiceUtils.getTreeNodeObject(collections, id) as TreeNode;\n }\n\n async setCollapsedFilterNodes(collapsedFilterNodes: Set): Promise {\n await this.collapsedGroupingsState.update(() => Array.from(collapsedFilterNodes));\n }\n\n protected async getCollapsedFilterNodes(): Promise> {\n return await firstValueFrom(this.collapsedFilterNodes$);\n }\n\n getOrganizationFilter() {\n return this._organizationFilter;\n }\n\n clearOrganizationFilter() {\n this._organizationFilter.next(null);\n }\n\n setOrganizationFilter(organization: Organization) {\n if (organization?.id != \"AllVaults\") {\n this._organizationFilter.next(organization);\n } else {\n this._organizationFilter.next(null);\n }\n }\n\n async expandOrgFilter() {\n const collapsedFilterNodes = await firstValueFrom(this.collapsedFilterNodes$);\n if (!collapsedFilterNodes.has(\"AllVaults\")) {\n return;\n }\n collapsedFilterNodes.delete(\"AllVaults\");\n await this.setCollapsedFilterNodes(collapsedFilterNodes);\n }\n\n protected async buildOrganizationTree(\n orgs?: Organization[],\n ): Promise> {\n const headNode = this.getOrganizationFilterHead();\n if (!(await this.policyService.policyAppliesToUser(PolicyType.PersonalOwnership))) {\n const myVaultNode = this.getOrganizationFilterMyVault();\n headNode.children.push(myVaultNode);\n }\n if (await this.policyService.policyAppliesToUser(PolicyType.SingleOrg)) {\n orgs = orgs.slice(0, 1);\n }\n if (orgs) {\n const orgNodes: TreeNode[] = [];\n orgs.forEach((org) => {\n const orgCopy = org as OrganizationFilter;\n orgCopy.icon = \"bwi-business\";\n const node = new TreeNode(orgCopy, headNode, orgCopy.name);\n orgNodes.push(node);\n });\n // Sort organization nodes, then add them to the list after 'My Vault' and 'All Vaults' if present\n orgNodes.sort((a, b) => a.node.name.localeCompare(b.node.name));\n headNode.children.push(...orgNodes);\n }\n return headNode;\n }\n\n protected getOrganizationFilterHead(): TreeNode {\n const head = new Organization() as OrganizationFilter;\n head.enabled = true;\n return new TreeNode(head, null, \"allVaults\", \"AllVaults\");\n }\n\n protected getOrganizationFilterMyVault(): TreeNode {\n const myVault = new Organization() as OrganizationFilter;\n myVault.id = \"MyVault\";\n myVault.icon = \"bwi-user\";\n myVault.enabled = true;\n myVault.hideOptions = true;\n return new TreeNode(myVault, null, this.i18nService.t(\"myVault\"));\n }\n\n buildTypeTree(\n head: CipherTypeFilter,\n array?: CipherTypeFilter[],\n ): Observable> {\n const headNode = new TreeNode(head, null);\n array?.forEach((filter) => {\n const node = new TreeNode(filter, headNode, filter.name);\n headNode.children.push(node);\n });\n return of(headNode);\n }\n\n protected async filterCollections(\n storedCollections: CollectionView[],\n org?: Organization,\n ): Promise {\n return org?.id != null\n ? storedCollections.filter((c) => c.organizationId === org.id)\n : storedCollections;\n }\n\n protected buildCollectionTree(collections?: CollectionView[]): TreeNode {\n const headNode = this.getCollectionFilterHead();\n if (!collections) {\n return headNode;\n }\n const nodes: TreeNode[] = [];\n collections\n .sort((a, b) => this.i18nService.collator.compare(a.name, b.name))\n .forEach((c) => {\n const collectionCopy = new CollectionView() as CollectionFilter;\n collectionCopy.id = c.id;\n collectionCopy.organizationId = c.organizationId;\n collectionCopy.icon = \"bwi-collection\";\n if (c instanceof CollectionAdminView) {\n collectionCopy.groups = c.groups;\n collectionCopy.assigned = c.assigned;\n }\n const parts =\n c.name != null ? c.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n ServiceUtils.nestedTraverse(nodes, 0, parts, collectionCopy, null, NestingDelimiter);\n });\n nodes.forEach((n) => {\n n.parent = headNode;\n headNode.children.push(n);\n });\n return headNode;\n }\n\n protected getCollectionFilterHead(): TreeNode {\n const head = new CollectionView() as CollectionFilter;\n return new TreeNode(head, null, \"collections\", \"AllCollections\");\n }\n\n protected async filterFolders(\n storedFolders: FolderView[],\n org?: Organization,\n ): Promise {\n // If no org or \"My Vault\" is selected, show all folders\n if (org?.id == null || org?.id == \"MyVault\") {\n return storedFolders;\n }\n\n // Otherwise, show only folders that have ciphers from the selected org and the \"no folder\" folder\n const ciphers = await this.cipherService.getAllDecrypted();\n const orgCiphers = ciphers.filter((c) => c.organizationId == org?.id);\n return storedFolders.filter(\n (f) => orgCiphers.some((oc) => oc.folderId == f.id) || f.id == null,\n );\n }\n\n protected buildFolderTree(folders?: FolderView[]): TreeNode {\n const headNode = this.getFolderFilterHead();\n if (!folders) {\n return headNode;\n }\n const nodes: TreeNode[] = [];\n folders.forEach((f) => {\n const folderCopy = new FolderView() as FolderFilter;\n folderCopy.id = f.id;\n folderCopy.revisionDate = f.revisionDate;\n folderCopy.icon = \"bwi-folder\";\n const parts = f.name != null ? f.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n ServiceUtils.nestedTraverse(nodes, 0, parts, folderCopy, null, NestingDelimiter);\n });\n\n nodes.forEach((n) => {\n n.parent = headNode;\n headNode.children.push(n);\n });\n return headNode;\n }\n\n protected getFolderFilterHead(): TreeNode {\n const head = new FolderView() as FolderFilter;\n return new TreeNode(head, null, \"folders\", \"AllFolders\");\n }\n\n protected buildCipherTypeTree(): Observable> {\n const allTypeFilters: CipherTypeFilter[] = [\n {\n id: \"favorites\",\n name: this.i18nService.t(\"favorites\"),\n type: \"favorites\",\n icon: \"bwi-star\",\n },\n {\n id: \"login\",\n name: this.i18nService.t(\"typeLogin\"),\n type: CipherType.Login,\n icon: \"bwi-globe\",\n },\n {\n id: \"card\",\n name: this.i18nService.t(\"typeCard\"),\n type: CipherType.Card,\n icon: \"bwi-credit-card\",\n },\n {\n id: \"identity\",\n name: this.i18nService.t(\"typeIdentity\"),\n type: CipherType.Identity,\n icon: \"bwi-id-card\",\n },\n {\n id: \"note\",\n name: this.i18nService.t(\"typeSecureNote\"),\n type: CipherType.SecureNote,\n icon: \"bwi-sticky-note\",\n },\n ];\n\n return this.buildTypeTree(\n { id: \"AllItems\", name: \"allItems\", type: \"all\", icon: \"\" },\n allTypeFilters,\n );\n }\n}\n","\n
    \n \n \n \n \n \n  {{ headerNode.node.name | i18n }}\n \n \n

    \n  {{ headerNode.node.name | i18n }}\n

    \n
    \n \n \n \n \n \n \n \n \n \n  {{ f.node.name }}\n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n
  • \n \n \n \n  {{ addInfo.text | i18n }}\n \n \n
  • \n \n
    \n\n","import { Component, InjectionToken, Injector, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { Observable, Subject, takeUntil } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { ITreeNodeObject, TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { VaultFilterService } from \"../../services/abstractions/vault-filter.service\";\nimport { VaultFilterSection, VaultFilterType } from \"../models/vault-filter-section.type\";\nimport { VaultFilter } from \"../models/vault-filter.model\";\n\n@Component({\n selector: \"app-filter-section\",\n templateUrl: \"vault-filter-section.component.html\",\n})\nexport class VaultFilterSectionComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n @Input() activeFilter: VaultFilter;\n @Input() section: VaultFilterSection;\n\n data: TreeNode;\n collapsedFilterNodes: Set = new Set();\n\n private injectors = new Map();\n\n constructor(\n private vaultFilterService: VaultFilterService,\n private injector: Injector,\n ) {\n this.vaultFilterService.collapsedFilterNodes$\n .pipe(takeUntil(this.destroy$))\n .subscribe((nodes) => {\n this.collapsedFilterNodes = nodes;\n });\n }\n\n async ngOnInit() {\n this.section?.data$?.pipe(takeUntil(this.destroy$)).subscribe((data) => {\n this.data = data;\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n get headerNode() {\n return this.data;\n }\n\n get headerInfo() {\n return this.section.header;\n }\n\n get filters() {\n return this.data?.children;\n }\n\n get isOrganizationFilter() {\n return this.data.node instanceof Organization;\n }\n\n get isAllVaultsSelected() {\n return this.isOrganizationFilter && !this.activeFilter.selectedOrganizationNode;\n }\n\n isNodeSelected(filterNode: TreeNode) {\n const { organizationId, cipherTypeId, folderId, collectionId, isCollectionSelected } =\n this.activeFilter;\n\n const collectionStatus =\n filterNode?.node.id === \"AllCollections\" &&\n (isCollectionSelected || collectionId === \"AllCollections\");\n\n return (\n organizationId === filterNode?.node.id ||\n cipherTypeId === filterNode?.node.id ||\n folderId === filterNode?.node.id ||\n collectionStatus\n );\n }\n\n async onFilterSelect(filterNode: TreeNode) {\n await this.section?.action(filterNode);\n }\n\n get editInfo() {\n return this.section?.edit;\n }\n\n onEdit(filterNode: TreeNode) {\n this.section?.edit?.action(filterNode.node);\n }\n\n get addInfo() {\n return this.section.add;\n }\n\n get showAddLink() {\n return this.section.add && this.section.add.route;\n }\n\n async onAdd() {\n this.section?.add?.action();\n }\n\n get optionsInfo() {\n return this.section?.options;\n }\n\n get divider() {\n return this.section?.divider;\n }\n\n isCollapsed(node: ITreeNodeObject) {\n return this.collapsedFilterNodes.has(node.id);\n }\n\n async toggleCollapse(node: ITreeNodeObject) {\n if (this.collapsedFilterNodes.has(node.id)) {\n this.collapsedFilterNodes.delete(node.id);\n } else {\n this.collapsedFilterNodes.add(node.id);\n }\n await this.vaultFilterService.setCollapsedFilterNodes(this.collapsedFilterNodes);\n }\n\n // an injector is necessary to pass data into a dynamic component\n // here we are creating a new injector for each filter that has options\n createInjector(data: VaultFilterType) {\n let inject = this.injectors.get(data.id);\n\n if (!inject) {\n // Pass an observable to the component in order to update the component when the data changes\n // as data binding does not work with dynamic components in Angular 15 (inputs are supported starting Angular 16)\n const data$ = this.section.data$.pipe(\n map((sectionNode) => sectionNode?.children?.find((node) => node.node.id === data.id)?.node),\n );\n inject = Injector.create({\n providers: [{ provide: OptionsInput, useValue: data$ }],\n parent: this.injector,\n });\n this.injectors.set(data.id, inject);\n }\n return inject;\n }\n}\nexport const OptionsInput = new InjectionToken>(\"OptionsInput\");\n","import { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { All, RoutedVaultFilterModel, Unassigned } from \"./routed-vault-filter.model\";\n\nexport type FilterFunction = (cipher: CipherView) => boolean;\n\nexport function createFilterFunction(filter: RoutedVaultFilterModel): FilterFunction {\n return (cipher) => {\n if (filter.type === \"favorites\" && !cipher.favorite) {\n return false;\n }\n if (filter.type === \"card\" && cipher.type !== CipherType.Card) {\n return false;\n }\n if (filter.type === \"identity\" && cipher.type !== CipherType.Identity) {\n return false;\n }\n if (filter.type === \"login\" && cipher.type !== CipherType.Login) {\n return false;\n }\n if (filter.type === \"note\" && cipher.type !== CipherType.SecureNote) {\n return false;\n }\n if (filter.type === \"trash\" && !cipher.isDeleted) {\n return false;\n }\n // Hide trash unless explicitly selected\n if (filter.type !== \"trash\" && cipher.isDeleted) {\n return false;\n }\n // No folder\n if (filter.folderId === Unassigned && cipher.folderId !== null) {\n return false;\n }\n // Folder\n if (\n filter.folderId !== undefined &&\n filter.folderId !== All &&\n filter.folderId !== Unassigned &&\n cipher.folderId !== filter.folderId\n ) {\n return false;\n }\n // All collections (top level)\n if (filter.collectionId === All) {\n return false;\n }\n // Unassigned\n if (\n filter.collectionId === Unassigned &&\n (cipher.organizationId == null ||\n (cipher.collectionIds != null && cipher.collectionIds.length > 0))\n ) {\n return false;\n }\n // Collection\n if (\n filter.collectionId !== undefined &&\n filter.collectionId !== All &&\n filter.collectionId !== Unassigned &&\n (cipher.collectionIds == null || !cipher.collectionIds.includes(filter.collectionId))\n ) {\n return false;\n }\n // My Vault\n if (filter.organizationId === Unassigned && cipher.organizationId != null) {\n return false;\n }\n // Organization\n else if (\n filter.organizationId !== undefined &&\n filter.organizationId !== Unassigned &&\n cipher.organizationId !== filter.organizationId\n ) {\n return false;\n }\n\n return true;\n };\n}\n","export const Unassigned = \"unassigned\";\n\nexport const All = \"all\";\n\n// TODO: Remove `All` when moving to vertical navigation.\nconst itemTypes = [\"favorites\", \"login\", \"card\", \"identity\", \"note\", \"trash\", All] as const;\n\nexport type RoutedVaultFilterItemType = (typeof itemTypes)[number];\n\nexport function isRoutedVaultFilterItemType(value: unknown): value is RoutedVaultFilterItemType {\n return itemTypes.includes(value as any);\n}\n\nexport interface RoutedVaultFilterModel {\n collectionId?: string;\n folderId?: string;\n organizationId?: string;\n type?: RoutedVaultFilterItemType;\n\n organizationIdParamType?: \"path\" | \"query\";\n}\n","import { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport {\n CipherStatus,\n CipherTypeFilter,\n CollectionFilter,\n FolderFilter,\n OrganizationFilter,\n} from \"./vault-filter.type\";\n\nexport type VaultFilterFunction = (cipher: CipherView) => boolean;\n\n// TODO: Replace shared VaultFilter Model with this one and\n// refactor browser and desktop code to use this model.\nexport class VaultFilter {\n selectedOrganizationNode: TreeNode;\n selectedCipherTypeNode: TreeNode;\n selectedFolderNode: TreeNode;\n selectedCollectionNode: TreeNode;\n\n /**\n * A list of collection filters that form a chain from the organization root to currently selected collection.\n * To be used when rendering a breadcrumb UI for navigating the collection hierarchy.\n * Begins from the organization root and excludes the currently selected collection.\n */\n get collectionBreadcrumbs(): TreeNode[] {\n if (!this.isCollectionSelected) {\n return [];\n }\n\n const collections = [this.selectedCollectionNode];\n while (collections[collections.length - 1].parent != undefined) {\n collections.push(collections[collections.length - 1].parent);\n }\n\n return collections.slice(1).reverse();\n }\n\n /**\n * The vault is filtered by a specific collection\n */\n get isCollectionSelected(): boolean {\n return (\n this.selectedCollectionNode != null &&\n this.selectedCollectionNode.node.id !== \"AllCollections\"\n );\n }\n\n /**\n * The vault is filtered by the \"Unassigned\" collection\n */\n get isUnassignedCollectionSelected(): boolean {\n return this.selectedCollectionNode != null && this.selectedCollectionNode.node.id === null;\n }\n\n /**\n * The vault is filtered by the users individual vault\n */\n get isMyVaultSelected(): boolean {\n return this.selectedOrganizationNode?.node.id === \"MyVault\";\n }\n\n get isFavorites(): boolean {\n return this.selectedCipherTypeNode?.node.type === \"favorites\";\n }\n\n get isDeleted(): boolean {\n return this.selectedCipherTypeNode?.node.type === \"trash\" ? true : null;\n }\n\n get organizationId(): string {\n return this.selectedOrganizationNode?.node.id;\n }\n\n get cipherType(): CipherType {\n return this.selectedCipherTypeNode?.node.type in CipherType\n ? (this.selectedCipherTypeNode?.node.type as CipherType)\n : null;\n }\n\n get cipherStatus(): CipherStatus {\n return this.selectedCipherTypeNode?.node.type;\n }\n\n get cipherTypeId(): string {\n return this.selectedCipherTypeNode?.node.id;\n }\n\n get folderId(): string {\n return this.selectedFolderNode?.node.id;\n }\n\n get collectionId(): string {\n return this.selectedCollectionNode?.node.id;\n }\n\n constructor(init?: Partial) {\n Object.assign(this, init);\n }\n\n resetFilter() {\n this.selectedCipherTypeNode = null;\n this.selectedFolderNode = null;\n this.selectedCollectionNode = null;\n }\n\n resetOrganization() {\n this.selectedOrganizationNode = null;\n }\n\n buildFilter(): VaultFilterFunction {\n return (cipher) => {\n let cipherPassesFilter = true;\n if (this.isFavorites && cipherPassesFilter) {\n cipherPassesFilter = cipher.favorite;\n }\n if (this.isDeleted && cipherPassesFilter) {\n cipherPassesFilter = cipher.isDeleted;\n }\n if (this.cipherType && cipherPassesFilter) {\n cipherPassesFilter = cipher.type === this.cipherType;\n }\n if (this.selectedFolderNode) {\n // No folder\n if (this.folderId === null && cipherPassesFilter) {\n cipherPassesFilter = cipher.folderId === null;\n }\n // Folder\n if (this.folderId !== null && cipherPassesFilter) {\n cipherPassesFilter = cipher.folderId === this.folderId;\n }\n }\n if (this.selectedCollectionNode) {\n // All Collections\n if (this.collectionId === \"AllCollections\" && cipherPassesFilter) {\n cipherPassesFilter = false;\n }\n // Unassigned\n if (this.collectionId === null && cipherPassesFilter) {\n cipherPassesFilter =\n cipher.organizationId != null &&\n (cipher.collectionIds == null || cipher.collectionIds.length === 0);\n }\n // Collection\n if (\n this.collectionId !== null &&\n this.collectionId !== \"AllCollections\" &&\n cipherPassesFilter\n ) {\n cipherPassesFilter =\n cipher.collectionIds != null && cipher.collectionIds.includes(this.collectionId);\n }\n }\n if (this.selectedOrganizationNode) {\n // My Vault\n if (this.organizationId === \"MyVault\" && cipherPassesFilter) {\n cipherPassesFilter = cipher.organizationId === null;\n }\n // Organization\n else if (this.organizationId !== null && cipherPassesFilter) {\n cipherPassesFilter = cipher.organizationId === this.organizationId;\n }\n }\n return cipherPassesFilter;\n };\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SearchModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../../shared\";\n\nimport { VaultFilterSectionComponent } from \"./components/vault-filter-section.component\";\n\n@NgModule({\n imports: [SharedModule, SearchModule],\n declarations: [VaultFilterSectionComponent],\n exports: [SharedModule, VaultFilterSectionComponent, SearchModule],\n})\nexport class VaultFilterSharedModule {}\n","import { DatePipe } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherData } from \"@bitwarden/common/vault/models/data/cipher.data\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"../individual-vault/add-edit.component\";\n\n@Component({\n selector: \"app-org-vault-add-edit\",\n templateUrl: \"../individual-vault/add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent {\n originalCipher: Cipher = null;\n protected override componentName = \"app-org-vault-add-edit\";\n\n constructor(\n cipherService: CipherService,\n folderService: FolderService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n auditService: AuditService,\n accountService: AccountService,\n collectionService: CollectionService,\n totpService: TotpService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n private apiService: ApiService,\n messagingService: MessagingService,\n eventCollectionService: EventCollectionService,\n policyService: PolicyService,\n logService: LogService,\n passwordRepromptService: PasswordRepromptService,\n organizationService: OrganizationService,\n sendApiService: SendApiService,\n dialogService: DialogService,\n datePipe: DatePipe,\n configService: ConfigService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n super(\n cipherService,\n folderService,\n i18nService,\n platformUtilsService,\n auditService,\n accountService,\n collectionService,\n totpService,\n passwordGenerationService,\n messagingService,\n eventCollectionService,\n policyService,\n organizationService,\n logService,\n passwordRepromptService,\n sendApiService,\n dialogService,\n datePipe,\n configService,\n billingAccountProfileStateService,\n );\n }\n\n protected loadCollections() {\n if (\n !this.organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n )\n ) {\n return super.loadCollections();\n }\n return Promise.resolve(this.collections);\n }\n\n protected async loadCipher() {\n // Calling loadCipher first to assess if the cipher is unassigned. If null use apiService getCipherAdmin\n const firstCipherCheck = await super.loadCipher();\n\n if (\n !this.organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n ) &&\n firstCipherCheck != null\n ) {\n return firstCipherCheck;\n }\n const response = await this.apiService.getCipherAdmin(this.cipherId);\n const data = new CipherData(response);\n\n data.edit = true;\n const cipher = new Cipher(data);\n this.originalCipher = cipher;\n return cipher;\n }\n\n protected encryptCipher() {\n if (\n !this.organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n )\n ) {\n return super.encryptCipher();\n }\n return this.cipherService.encrypt(this.cipher, null, null, this.originalCipher);\n }\n\n protected async deleteCipher() {\n if (\n !this.organization.canEditAllCiphers(\n this.flexibleCollectionsV1Enabled,\n this.restrictProviderAccess,\n )\n ) {\n return super.deleteCipher();\n }\n return this.cipher.isDeleted\n ? this.apiService.deleteCipherAdmin(this.cipherId)\n : this.apiService.putDeleteCipherAdmin(this.cipherId);\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\n\nimport { CollectionNameBadgeComponent } from \"./collection-name.badge.component\";\n\n@NgModule({\n imports: [SharedModule, PipesModule],\n declarations: [CollectionNameBadgeComponent],\n exports: [CollectionNameBadgeComponent],\n})\nexport class CollectionBadgeModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\n\nimport { GroupNameBadgeComponent } from \"./group-name-badge.component\";\n\n@NgModule({\n imports: [SharedModule, PipesModule],\n declarations: [GroupNameBadgeComponent],\n exports: [GroupNameBadgeComponent],\n})\nexport class GroupBadgeModule {}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface PurgeVaultDialogData {\n organizationId: string;\n}\n\n@Component({\n selector: \"app-purge-vault\",\n templateUrl: \"purge-vault.component.html\",\n})\nexport class PurgeVaultComponent {\n organizationId: string = null;\n\n formGroup = new FormGroup({\n masterPassword: new FormControl(null),\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected data: PurgeVaultDialogData,\n private dialogRef: DialogRef,\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private userVerificationService: UserVerificationService,\n private router: Router,\n private syncService: SyncService,\n ) {\n this.organizationId = data && data.organizationId ? data.organizationId : null;\n }\n\n submit = async () => {\n const response = this.userVerificationService\n .buildRequest(this.formGroup.value.masterPassword)\n .then((request) => this.apiService.postPurgeCiphers(request, this.organizationId));\n await response;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"vaultPurged\"));\n await this.syncService.fullSync(true);\n if (this.organizationId != null) {\n await this.router.navigate([\"organizations\", this.organizationId, \"vault\"]);\n } else {\n await this.router.navigate([\"vault\"]);\n }\n this.dialogRef.close();\n };\n\n static open(dialogService: DialogService, config?: DialogConfig) {\n return dialogService.open(PurgeVaultComponent, config);\n }\n}\n","
    \n \n \n

    \n {{ (organizationId ? \"purgeOrgVaultDesc\" : \"purgeVaultDesc\") | i18n }}\n

    \n {{ \"purgeVaultWarning\" | i18n }}\n \n
    \n \n \n \n \n
    \n
    \n","import { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport {\n CollectionView,\n NestingDelimiter,\n} from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\n\nimport { CollectionAdminView } from \"../../vault/core/views/collection-admin.view\";\n\nexport function getNestedCollectionTree(\n collections: CollectionAdminView[],\n): TreeNode[];\nexport function getNestedCollectionTree(collections: CollectionView[]): TreeNode[];\nexport function getNestedCollectionTree(\n collections: (CollectionView | CollectionAdminView)[],\n): TreeNode[] {\n // Collections need to be cloned because ServiceUtils.nestedTraverse actively\n // modifies the names of collections.\n // These changes risk affecting collections store in StateService.\n const clonedCollections = collections\n .sort((a, b) => a.name.localeCompare(b.name))\n .map(cloneCollection);\n\n const nodes: TreeNode[] = [];\n clonedCollections.forEach((collection) => {\n const parts =\n collection.name != null\n ? collection.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter)\n : [];\n ServiceUtils.nestedTraverse(nodes, 0, parts, collection, null, NestingDelimiter);\n });\n return nodes;\n}\n\nfunction cloneCollection(collection: CollectionView): CollectionView;\nfunction cloneCollection(collection: CollectionAdminView): CollectionAdminView;\nfunction cloneCollection(\n collection: CollectionView | CollectionAdminView,\n): CollectionView | CollectionAdminView {\n let cloned;\n\n if (collection instanceof CollectionAdminView) {\n cloned = new CollectionAdminView();\n cloned.groups = [...collection.groups];\n cloned.users = [...collection.users];\n cloned.assigned = collection.assigned;\n cloned.unmanaged = collection.unmanaged;\n } else {\n cloned = new CollectionView();\n }\n\n cloned.id = collection.id;\n cloned.externalId = collection.externalId;\n cloned.hidePasswords = collection.hidePasswords;\n cloned.name = collection.name;\n cloned.organizationId = collection.organizationId;\n cloned.readOnly = collection.readOnly;\n cloned.manage = collection.manage;\n return cloned;\n}\n","import { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n// Replace this with a type safe lookup of the feature flag values in PM-2282\ntype FlagValue = boolean | number | string;\n\n/**\n * Returns a CanActivateFn that checks if the feature flag is enabled. If not, it shows an \"Access Denied!\"\n * toast and optionally redirects to the specified url.\n * @param featureFlag - The feature flag to check\n * @param requiredFlagValue - Optional value to the feature flag must be equal to, defaults to true\n * @param redirectUrlOnDisabled - Optional url to redirect to if the feature flag is disabled\n */\nexport const canAccessFeature = (\n featureFlag: FeatureFlag,\n requiredFlagValue: FlagValue = true,\n redirectUrlOnDisabled?: string,\n): CanActivateFn => {\n return async () => {\n const configService = inject(ConfigService);\n const platformUtilsService = inject(PlatformUtilsService);\n const router = inject(Router);\n const i18nService = inject(I18nService);\n const logService = inject(LogService);\n\n try {\n const flagValue = await configService.getFeatureFlag(featureFlag);\n\n if (flagValue === requiredFlagValue) {\n return true;\n }\n\n platformUtilsService.showToast(\"error\", null, i18nService.t(\"accessDenied\"));\n\n if (redirectUrlOnDisabled != null) {\n return router.createUrlTree([redirectUrlOnDisabled]);\n }\n return false;\n } catch (e) {\n logService.error(e);\n return false;\n }\n };\n};\n","
    \n
    \n \"Bitwarden\"\n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { Params } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { BaseAcceptComponent } from \"../../../common/base.accept.component\";\n\n@Component({\n selector: \"app-accept-family-sponsorship\",\n templateUrl: \"accept-family-sponsorship.component.html\",\n})\nexport class AcceptFamilySponsorshipComponent extends BaseAcceptComponent {\n failedShortMessage = \"inviteAcceptFailedShort\";\n failedMessage = \"inviteAcceptFailed\";\n\n requiredParameters = [\"email\", \"token\"];\n\n async authedHandler(qParams: Params) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/setup/families-for-enterprise\"], { queryParams: qParams });\n }\n\n async unauthedHandler(qParams: Params) {\n if (!qParams.register) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/login\"], { queryParams: { email: qParams.email } });\n } else {\n // TODO: remove when email verification flag is removed\n const registerRoute = await firstValueFrom(this.registerRoute$);\n await this.router.navigate([registerRoute], { queryParams: { email: qParams.email } });\n }\n }\n}\n","import { PlanSponsorshipType } from \"../../../../billing/enums\";\n\nexport class OrganizationSponsorshipRedeemRequest {\n planSponsorshipType: PlanSponsorshipType;\n sponsoredOrganizationId: string;\n}\n","
    \n

    {{ \"sponsoredFamiliesOffer\" | i18n }}

    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n {{ \"badToken\" | i18n }}\n
    \n
    \n

    {{ \"acceptBitwardenFamiliesHelp\" | i18n }}

    \n \n {{ \"sponsoredFamiliesSelectOffer\" | i18n }}\n \n \n \n \n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { lastValueFrom, Observable, Subject } from \"rxjs\";\nimport { first, map, takeUntil } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { OrganizationSponsorshipRedeemRequest } from \"@bitwarden/common/admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { PlanSponsorshipType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { OrganizationPlansComponent } from \"../../../billing\";\nimport { SharedModule } from \"../../../shared\";\nimport {\n DeleteOrganizationDialogResult,\n openDeleteOrganizationDialog,\n} from \"../settings/components\";\n\n@Component({\n templateUrl: \"families-for-enterprise-setup.component.html\",\n standalone: true,\n imports: [SharedModule, OrganizationPlansComponent],\n})\nexport class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {\n @ViewChild(OrganizationPlansComponent, { static: false })\n set organizationPlansComponent(value: OrganizationPlansComponent) {\n if (!value) {\n return;\n }\n\n value.plan = PlanType.FamiliesAnnually;\n value.productTier = ProductTierType.Families;\n value.acceptingSponsorship = true;\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n value.onSuccess.subscribe(this.onOrganizationCreateSuccess.bind(this));\n }\n\n loading = true;\n badToken = false;\n\n token: string;\n existingFamilyOrganizations: Organization[];\n existingFamilyOrganizations$: Observable;\n\n showNewOrganization = false;\n _organizationPlansComponent: OrganizationPlansComponent;\n _selectedFamilyOrganizationId = \"\";\n\n private _destroy = new Subject();\n formGroup = this.formBuilder.group({\n selectedFamilyOrganizationId: [\"\", Validators.required],\n });\n constructor(\n private router: Router,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private apiService: ApiService,\n private syncService: SyncService,\n private validationService: ValidationService,\n private organizationService: OrganizationService,\n private dialogService: DialogService,\n private formBuilder: FormBuilder,\n ) {}\n\n async ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n const error = qParams.token == null;\n if (error) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"sponsoredFamiliesAcceptFailed\"),\n { timeout: 10000 },\n );\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n return;\n }\n\n this.token = qParams.token;\n\n await this.syncService.fullSync(true);\n this.badToken = !(await this.apiService.postPreValidateSponsorshipToken(this.token));\n this.loading = false;\n });\n\n this.existingFamilyOrganizations$ = this.organizationService.organizations$.pipe(\n map((orgs) =>\n orgs.filter(\n (o) =>\n o.productTierType === ProductTierType.Families && o.type === OrganizationUserType.Owner,\n ),\n ),\n );\n\n this.existingFamilyOrganizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {\n if (orgs.length === 0) {\n this.selectedFamilyOrganizationId = \"createNew\";\n }\n });\n this.formGroup.valueChanges.pipe(takeUntil(this._destroy)).subscribe((val) => {\n this.selectedFamilyOrganizationId = val.selectedFamilyOrganizationId;\n });\n }\n\n ngOnDestroy(): void {\n this._destroy.next();\n this._destroy.complete();\n }\n\n submit = async () => {\n await this.doSubmit(this._selectedFamilyOrganizationId);\n };\n\n get selectedFamilyOrganizationId() {\n return this._selectedFamilyOrganizationId;\n }\n\n set selectedFamilyOrganizationId(value: string) {\n this._selectedFamilyOrganizationId = value;\n this.showNewOrganization = value === \"createNew\";\n }\n\n private async doSubmit(organizationId: string) {\n try {\n const request = new OrganizationSponsorshipRedeemRequest();\n request.planSponsorshipType = PlanSponsorshipType.FamiliesForEnterprise;\n request.sponsoredOrganizationId = organizationId;\n\n await this.apiService.postRedeemSponsorship(this.token, request);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"sponsoredFamiliesOfferRedeemed\"),\n );\n await this.syncService.fullSync(true);\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n } catch (e) {\n if (this.showNewOrganization) {\n const dialog = openDeleteOrganizationDialog(this.dialogService, {\n data: {\n organizationId: organizationId,\n requestType: \"InvalidFamiliesForEnterprise\",\n },\n });\n\n const result = await lastValueFrom(dialog.closed);\n\n if (result === DeleteOrganizationDialogResult.Deleted) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n }\n }\n this.validationService.showError(this.i18nService.t(\"sponsorshipTokenHasExpired\"));\n }\n }\n\n private async onOrganizationCreateSuccess(value: any) {\n // Use newly created organization id\n await this.doSubmit(value.organizationId);\n }\n}\n","export class ProviderVerifyRecoverDeleteRequest {\n token: string;\n\n constructor(token: string) {\n this.token = token;\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderVerifyRecoverDeleteRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-verify-recover-delete.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-verify-recover-delete-provider\",\n templateUrl: \"verify-recover-delete-provider.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class VerifyRecoverDeleteProviderComponent implements OnInit {\n name: string;\n formPromise: Promise;\n\n private providerId: string;\n private token: string;\n\n constructor(\n private router: Router,\n private providerApiService: ProviderApiServiceAbstraction,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private logService: LogService,\n ) {}\n\n async ngOnInit() {\n const qParams = await firstValueFrom(this.route.queryParams);\n if (qParams.providerId != null && qParams.token != null && qParams.name != null) {\n this.providerId = qParams.providerId;\n this.token = qParams.token;\n this.name = qParams.name;\n } else {\n await this.router.navigate([\"/\"]);\n }\n }\n\n async submit() {\n try {\n const request = new ProviderVerifyRecoverDeleteRequest(this.token);\n this.formPromise = this.providerApiService.providerRecoverDeleteToken(\n this.providerId,\n request,\n );\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"providerDeleted\"),\n this.i18nService.t(\"providerDeletedDesc\"),\n );\n await this.router.navigate([\"/\"]);\n } catch (e) {\n this.logService.error(e);\n }\n }\n}\n","
    \n
    \n
    \n

    {{ \"deleteProvider\" | i18n }}

    \n
    \n
    \n {{ \"deleteProviderWarning\" | i18n }}\n

    \n {{ name }}\n

    \n

    {{ \"deleteProviderRecoverConfirmDesc\" | i18n }}

    \n
    \n
    \n \n {{ \"deleteProvider\" | i18n }}\n \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n","import { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\n\nimport { OrganizationPlansComponent } from \"../../billing\";\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n templateUrl: \"create-organization.component.html\",\n standalone: true,\n imports: [SharedModule, OrganizationPlansComponent, HeaderModule],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class CreateOrganizationComponent implements OnInit {\n @ViewChild(OrganizationPlansComponent, { static: true })\n orgPlansComponent: OrganizationPlansComponent;\n\n constructor(private route: ActivatedRoute) {}\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.plan === \"families\") {\n this.orgPlansComponent.plan = PlanType.FamiliesAnnually;\n this.orgPlansComponent.productTier = ProductTierType.Families;\n } else if (qParams.plan === \"teams\") {\n this.orgPlansComponent.plan = PlanType.TeamsAnnually;\n this.orgPlansComponent.productTier = ProductTierType.Teams;\n } else if (qParams.plan === \"teamsStarter\") {\n this.orgPlansComponent.plan = PlanType.TeamsStarter;\n this.orgPlansComponent.productTier = ProductTierType.TeamsStarter;\n } else if (qParams.plan === \"enterprise\") {\n this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;\n this.orgPlansComponent.productTier = ProductTierType.Enterprise;\n }\n });\n }\n}\n","\n\n\n

    {{ \"newOrganizationDesc\" | i18n }}

    \n \n
    \n","export class PasswordHintRequest {\n email: string;\n\n constructor(email: string) {\n this.email = email;\n }\n}\n","import { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { LoginEmailServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PasswordHintRequest } from \"@bitwarden/common/auth/models/request/password-hint.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive()\nexport class HintComponent implements OnInit {\n email = \"\";\n formPromise: Promise;\n\n protected successRoute = \"login\";\n protected onSuccessfulSubmit: () => void;\n\n constructor(\n protected router: Router,\n protected i18nService: I18nService,\n protected apiService: ApiService,\n protected platformUtilsService: PlatformUtilsService,\n private logService: LogService,\n private loginEmailService: LoginEmailServiceAbstraction,\n ) {}\n\n ngOnInit(): void {\n this.email = this.loginEmailService.getEmail() ?? \"\";\n }\n\n async submit() {\n if (this.email == null || this.email === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"emailRequired\"),\n );\n return;\n }\n if (this.email.indexOf(\"@\") === -1) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidEmail\"),\n );\n return;\n }\n\n try {\n this.formPromise = this.apiService.postPasswordHint(new PasswordHintRequest(this.email));\n await this.formPromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"masterPassSent\"));\n if (this.onSuccessfulSubmit != null) {\n this.onSuccessfulSubmit();\n } else if (this.router != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute]);\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n}\n","import { Component } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { HintComponent as BaseHintComponent } from \"@bitwarden/angular/auth/components/hint.component\";\nimport { LoginEmailServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-hint\",\n templateUrl: \"hint.component.html\",\n})\nexport class HintComponent extends BaseHintComponent {\n formGroup = this.formBuilder.group({\n email: [\"\", [Validators.email, Validators.required]],\n });\n\n get emailFormControl() {\n return this.formGroup.controls.email;\n }\n\n constructor(\n router: Router,\n i18nService: I18nService,\n apiService: ApiService,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n loginEmailService: LoginEmailServiceAbstraction,\n private formBuilder: FormBuilder,\n ) {\n super(router, i18nService, apiService, platformUtilsService, logService, loginEmailService);\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n this.emailFormControl.setValue(this.email);\n }\n\n // Wrapper method to call super.submit() since properties (e.g., submit) cannot use super directly\n // This is because properties are assigned per type and generally don't have access to the prototype\n async superSubmit() {\n await super.submit();\n }\n\n submit = async () => {\n this.email = this.emailFormControl.value;\n await this.superSubmit();\n };\n}\n","
    \n \n {{ \"emailAddress\" | i18n }}\n \n {{ \"enterEmailToGetHint\" | i18n }}\n \n
    \n
    \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n","import { Directive, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, Subject } from \"rxjs\";\nimport { concatMap, map, take, takeUntil } from \"rxjs/operators\";\n\nimport { PinServiceAbstraction, PinLockType } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout.service\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport {\n MasterPasswordVerification,\n MasterPasswordVerificationResponse,\n} from \"@bitwarden/common/auth/types/verification\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { BiometricStateService } from \"@bitwarden/common/platform/biometrics/biometric-state.service\";\nimport { KeySuffixOptions } from \"@bitwarden/common/platform/enums\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Directive()\nexport class LockComponent implements OnInit, OnDestroy {\n masterPassword = \"\";\n pin = \"\";\n showPassword = false;\n email: string;\n pinEnabled = false;\n masterPasswordEnabled = false;\n webVaultHostname = \"\";\n formPromise: Promise;\n supportsBiometric: boolean;\n biometricLock: boolean;\n\n private activeUserId: UserId;\n protected successRoute = \"vault\";\n protected forcePasswordResetRoute = \"update-temp-password\";\n protected onSuccessfulSubmit: () => Promise;\n\n private invalidPinAttempts = 0;\n private pinLockType: PinLockType;\n\n private enforcedMasterPasswordOptions: MasterPasswordPolicyOptions = undefined;\n\n private destroy$ = new Subject();\n\n constructor(\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected router: Router,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected messagingService: MessagingService,\n protected cryptoService: CryptoService,\n protected vaultTimeoutService: VaultTimeoutService,\n protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n protected environmentService: EnvironmentService,\n protected stateService: StateService,\n protected apiService: ApiService,\n protected logService: LogService,\n protected ngZone: NgZone,\n protected policyApiService: PolicyApiServiceAbstraction,\n protected policyService: InternalPolicyService,\n protected passwordStrengthService: PasswordStrengthServiceAbstraction,\n protected dialogService: DialogService,\n protected deviceTrustService: DeviceTrustServiceAbstraction,\n protected userVerificationService: UserVerificationService,\n protected pinService: PinServiceAbstraction,\n protected biometricStateService: BiometricStateService,\n protected accountService: AccountService,\n protected authService: AuthService,\n protected kdfConfigService: KdfConfigService,\n protected syncService: SyncService,\n ) {}\n\n async ngOnInit() {\n this.accountService.activeAccount$\n .pipe(\n concatMap(async (account) => {\n this.activeUserId = account?.id;\n await this.load(account?.id);\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async submit() {\n if (this.pinEnabled) {\n return await this.handlePinRequiredUnlock();\n }\n\n await this.handleMasterPasswordRequiredUnlock();\n }\n\n async logOut() {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"logOut\" },\n content: { key: \"logOutConfirmation\" },\n acceptButtonText: { key: \"logOut\" },\n type: \"warning\",\n });\n\n if (confirmed) {\n this.messagingService.send(\"logout\", { userId: this.activeUserId });\n }\n }\n\n async unlockBiometric(): Promise {\n if (!this.biometricLock) {\n return;\n }\n\n await this.biometricStateService.setUserPromptCancelled();\n const userKey = await this.cryptoService.getUserKeyFromStorage(KeySuffixOptions.Biometric);\n\n if (userKey) {\n await this.setUserKeyAndContinue(userKey, false);\n }\n\n return !!userKey;\n }\n\n togglePassword() {\n this.showPassword = !this.showPassword;\n const input = document.getElementById(this.pinEnabled ? \"pin\" : \"masterPassword\");\n if (this.ngZone.isStable) {\n input.focus();\n } else {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => input.focus());\n }\n }\n\n private async handlePinRequiredUnlock() {\n if (this.pin == null || this.pin === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"pinRequired\"),\n );\n return;\n }\n\n return await this.doUnlockWithPin();\n }\n\n private async doUnlockWithPin() {\n const MAX_INVALID_PIN_ENTRY_ATTEMPTS = 5;\n\n try {\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n const userKey = await this.pinService.decryptUserKeyWithPin(this.pin, userId);\n\n if (userKey) {\n await this.setUserKeyAndContinue(userKey);\n return; // successfully unlocked\n }\n\n // Failure state: invalid PIN or failed decryption\n this.invalidPinAttempts++;\n\n // Log user out if they have entered an invalid PIN too many times\n if (this.invalidPinAttempts >= MAX_INVALID_PIN_ENTRY_ATTEMPTS) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"tooManyInvalidPinEntryAttemptsLoggingOut\"),\n );\n this.messagingService.send(\"logout\");\n return;\n }\n\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidPin\"),\n );\n } catch {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"unexpectedError\"),\n );\n }\n }\n\n private async handleMasterPasswordRequiredUnlock() {\n if (this.masterPassword == null || this.masterPassword === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordRequired\"),\n );\n return;\n }\n await this.doUnlockWithMasterPassword();\n }\n\n private async doUnlockWithMasterPassword() {\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n const verification = {\n type: VerificationType.MasterPassword,\n secret: this.masterPassword,\n } as MasterPasswordVerification;\n\n let passwordValid = false;\n let response: MasterPasswordVerificationResponse;\n try {\n this.formPromise = this.userVerificationService.verifyUserByMasterPassword(\n verification,\n userId,\n this.email,\n );\n response = await this.formPromise;\n this.enforcedMasterPasswordOptions = MasterPasswordPolicyOptions.fromResponse(\n response.policyOptions,\n );\n passwordValid = true;\n } catch (e) {\n this.logService.error(e);\n } finally {\n this.formPromise = null;\n }\n\n if (!passwordValid) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidMasterPassword\"),\n );\n return;\n }\n\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n response.masterKey,\n );\n await this.setUserKeyAndContinue(userKey, true);\n }\n\n private async setUserKeyAndContinue(key: UserKey, evaluatePasswordAfterUnlock = false) {\n await this.cryptoService.setUserKey(key);\n\n // Now that we have a decrypted user key in memory, we can check if we\n // need to establish trust on the current device\n const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n await this.deviceTrustService.trustDeviceIfRequired(activeAccount.id);\n\n await this.doContinue(evaluatePasswordAfterUnlock);\n }\n\n private async doContinue(evaluatePasswordAfterUnlock: boolean) {\n await this.biometricStateService.resetUserPromptCancelled();\n this.messagingService.send(\"unlocked\");\n\n if (evaluatePasswordAfterUnlock) {\n try {\n // If we do not have any saved policies, attempt to load them from the service\n if (this.enforcedMasterPasswordOptions == undefined) {\n this.enforcedMasterPasswordOptions = await firstValueFrom(\n this.policyService.masterPasswordPolicyOptions$(),\n );\n }\n\n if (this.requirePasswordChange()) {\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.WeakMasterPassword,\n userId,\n );\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.forcePasswordResetRoute]);\n return;\n }\n } catch (e) {\n // Do not prevent unlock if there is an error evaluating policies\n this.logService.error(e);\n }\n }\n\n // Vault can be de-synced since notifications get ignored while locked. Need to check whether sync is required using the sync service.\n await this.syncService.fullSync(false);\n\n if (this.onSuccessfulSubmit != null) {\n await this.onSuccessfulSubmit();\n } else if (this.router != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute]);\n }\n }\n\n private async load(userId: UserId) {\n // TODO: Investigate PM-3515\n\n // The loading of the lock component works as follows:\n // 1. If the user is unlocked, we're here in error so we navigate to the home page\n // 2. First, is locking a valid timeout action? If not, we will log the user out.\n // 3. If locking IS a valid timeout action, we proceed to show the user the lock screen.\n // The user will be able to unlock as follows:\n // - If they have a PIN set, they will be presented with the PIN input\n // - If they have a master password and no PIN, they will be presented with the master password input\n // - If they have biometrics enabled, they will be presented with the biometric prompt\n\n const isUnlocked = await firstValueFrom(\n this.authService\n .authStatusFor$(userId)\n .pipe(map((status) => status === AuthenticationStatus.Unlocked)),\n );\n if (isUnlocked) {\n // navigate to home\n await this.router.navigate([\"/\"]);\n return;\n }\n\n const availableVaultTimeoutActions = await firstValueFrom(\n this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(userId),\n );\n const supportsLock = availableVaultTimeoutActions.includes(VaultTimeoutAction.Lock);\n if (!supportsLock) {\n return await this.vaultTimeoutService.logOut(userId);\n }\n\n this.pinLockType = await this.pinService.getPinLockType(userId);\n\n const ephemeralPinSet = await this.pinService.getPinKeyEncryptedUserKeyEphemeral(userId);\n\n this.pinEnabled =\n (this.pinLockType === \"EPHEMERAL\" && !!ephemeralPinSet) || this.pinLockType === \"PERSISTENT\";\n\n this.masterPasswordEnabled = await this.userVerificationService.hasMasterPassword();\n\n this.supportsBiometric = await this.platformUtilsService.supportsBiometric();\n this.biometricLock =\n (await this.vaultTimeoutSettingsService.isBiometricLockSet()) &&\n ((await this.cryptoService.hasUserKeyStored(KeySuffixOptions.Biometric)) ||\n !this.platformUtilsService.supportsSecureStorage());\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n\n this.webVaultHostname = (await this.environmentService.getEnvironment()).getHostname();\n }\n\n /**\n * Checks if the master password meets the enforced policy requirements\n * If not, returns false\n */\n private requirePasswordChange(): boolean {\n if (\n this.enforcedMasterPasswordOptions == undefined ||\n !this.enforcedMasterPasswordOptions.enforceOnLogin\n ) {\n return false;\n }\n\n const passwordStrength = this.passwordStrengthService.getPasswordStrength(\n this.masterPassword,\n this.email,\n )?.score;\n\n return !this.policyService.evaluateMasterPassword(\n passwordStrength,\n this.masterPassword,\n this.enforcedMasterPasswordOptions,\n );\n }\n}\n","import { Component, inject } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { LockComponent as BaseLockComponent } from \"@bitwarden/angular/auth/components/lock.component\";\n\nimport { SharedModule } from \"../shared\";\n\n@Component({\n selector: \"app-lock\",\n templateUrl: \"lock.component.html\",\n standalone: true,\n imports: [SharedModule],\n})\nexport class LockComponent extends BaseLockComponent {\n formBuilder = inject(FormBuilder);\n\n formGroup = this.formBuilder.group({\n masterPassword: [\"\", { validators: Validators.required, updateOn: \"submit\" }],\n });\n\n get masterPasswordFormControl() {\n return this.formGroup.controls.masterPassword;\n }\n\n async ngOnInit() {\n await super.ngOnInit();\n\n this.masterPasswordFormControl.setValue(this.masterPassword);\n\n this.onSuccessfulSubmit = async () => {\n await this.router.navigateByUrl(this.successRoute);\n };\n }\n\n async superSubmit() {\n await super.submit();\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n this.masterPassword = this.masterPasswordFormControl.value;\n await this.superSubmit();\n };\n}\n","
    \n \n {{ \"masterPass\" | i18n }}\n \n \n {{ \"loggedInAsEmailOn\" | i18n: email : webVaultHostname }}\n \n\n
    \n\n
    \n \n \n
    \n
    \n","import { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport {\n firstValueFrom,\n switchMap,\n Subject,\n catchError,\n from,\n of,\n finalize,\n takeUntil,\n defer,\n throwError,\n map,\n Observable,\n take,\n} from \"rxjs\";\n\nimport {\n LoginEmailServiceAbstraction,\n UserDecryptionOptions,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { DevicesServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices/devices.service.abstraction\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"@bitwarden/common/auth/abstractions/password-reset-enrollment.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nenum State {\n NewUser,\n ExistingUserUntrustedDevice,\n}\n\ntype NewUserData = {\n readonly state: State.NewUser;\n readonly organizationId: string;\n readonly userEmail: string;\n};\n\ntype ExistingUserUntrustedDeviceData = {\n readonly state: State.ExistingUserUntrustedDevice;\n readonly showApproveFromOtherDeviceBtn: boolean;\n readonly showReqAdminApprovalBtn: boolean;\n readonly showApproveWithMasterPasswordBtn: boolean;\n readonly userEmail: string;\n};\n\ntype Data = NewUserData | ExistingUserUntrustedDeviceData;\n\n@Directive()\nexport class BaseLoginDecryptionOptionsComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n protected State = State;\n\n protected data?: Data;\n protected loading = true;\n\n private email$: Observable;\n\n activeAccountId: UserId;\n\n // Remember device means for the user to trust the device\n rememberDeviceForm = this.formBuilder.group({\n rememberDevice: [true],\n });\n\n get rememberDevice(): FormControl {\n return this.rememberDeviceForm?.controls.rememberDevice;\n }\n\n constructor(\n protected formBuilder: FormBuilder,\n protected devicesService: DevicesServiceAbstraction,\n protected stateService: StateService,\n protected router: Router,\n protected activatedRoute: ActivatedRoute,\n protected messagingService: MessagingService,\n protected tokenService: TokenService,\n protected loginEmailService: LoginEmailServiceAbstraction,\n protected organizationApiService: OrganizationApiServiceAbstraction,\n protected cryptoService: CryptoService,\n protected organizationUserService: OrganizationUserService,\n protected apiService: ApiService,\n protected i18nService: I18nService,\n protected validationService: ValidationService,\n protected deviceTrustService: DeviceTrustServiceAbstraction,\n protected platformUtilsService: PlatformUtilsService,\n protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n protected passwordResetEnrollmentService: PasswordResetEnrollmentServiceAbstraction,\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected accountService: AccountService,\n ) {}\n\n async ngOnInit() {\n this.loading = true;\n this.activeAccountId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n this.email$ = this.accountService.activeAccount$.pipe(\n map((a) => a?.email),\n catchError((err: unknown) => {\n this.validationService.showError(err);\n return of(undefined);\n }),\n takeUntil(this.destroy$),\n );\n\n this.setupRememberDeviceValueChanges();\n\n // Persist user choice from state if it exists\n await this.setRememberDeviceDefaultValue();\n\n try {\n const userDecryptionOptions = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptions$,\n );\n\n // see sso-login.strategy - to determine if a user is new or not it just checks if there is a key on the token response..\n // can we check if they have a user key or master key in crypto service? Would that be sufficient?\n if (\n !userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval &&\n !userDecryptionOptions?.hasMasterPassword\n ) {\n // We are dealing with a new account if:\n // - User does not have admin approval (i.e. has not enrolled into admin reset)\n // - AND does not have a master password\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.loadNewUserData();\n } else {\n this.loadUntrustedDeviceData(userDecryptionOptions);\n }\n\n // Note: this is probably not a comprehensive write up of all scenarios:\n\n // If the TDE feature flag is enabled and TDE is configured for the org that the user is a member of,\n // then new and existing users can be redirected here after completing the SSO flow (and 2FA if enabled).\n\n // First we must determine user type (new or existing):\n\n // New User\n // - present user with option to remember the device or not (trust the device)\n // - present a continue button to proceed to the vault\n // - loadNewUserData() --> will need to load enrollment status and user email address.\n\n // Existing User\n // - Determine if user is an admin with access to account recovery in admin console\n // - Determine if user has a MP or not, if not, they must be redirected to set one (see PM-1035)\n // - Determine if device is trusted or not via device crypto service (method not yet written)\n // - If not trusted, present user with login decryption options (approve from other device, approve with master password, request admin approval)\n // - loadUntrustedDeviceData()\n } catch (err) {\n this.validationService.showError(err);\n }\n }\n\n private async setRememberDeviceDefaultValue() {\n const rememberDeviceFromState = await this.deviceTrustService.getShouldTrustDevice(\n this.activeAccountId,\n );\n\n const rememberDevice = rememberDeviceFromState ?? true;\n\n this.rememberDevice.setValue(rememberDevice);\n }\n\n private setupRememberDeviceValueChanges() {\n this.rememberDevice.valueChanges\n .pipe(\n switchMap((value) =>\n defer(() => this.deviceTrustService.setShouldTrustDevice(this.activeAccountId, value)),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n async loadNewUserData() {\n const autoEnrollStatus$ = defer(() =>\n this.ssoLoginService.getActiveUserOrganizationSsoIdentifier(),\n ).pipe(\n switchMap((organizationIdentifier) => {\n if (organizationIdentifier == undefined) {\n return throwError(() => new Error(this.i18nService.t(\"ssoIdentifierRequired\")));\n }\n\n return from(this.organizationApiService.getAutoEnrollStatus(organizationIdentifier));\n }),\n catchError((err: unknown) => {\n this.validationService.showError(err);\n return of(undefined);\n }),\n );\n\n const autoEnrollStatus = await firstValueFrom(autoEnrollStatus$);\n const email = await firstValueFrom(this.email$);\n\n this.data = { state: State.NewUser, organizationId: autoEnrollStatus.id, userEmail: email };\n this.loading = false;\n }\n\n loadUntrustedDeviceData(userDecryptionOptions: UserDecryptionOptions) {\n this.loading = true;\n\n this.email$\n .pipe(\n take(1),\n finalize(() => {\n this.loading = false;\n }),\n )\n .subscribe((email) => {\n const showApproveFromOtherDeviceBtn =\n userDecryptionOptions?.trustedDeviceOption?.hasLoginApprovingDevice || false;\n\n const showReqAdminApprovalBtn =\n !!userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval || false;\n\n const showApproveWithMasterPasswordBtn = userDecryptionOptions?.hasMasterPassword || false;\n\n const userEmail = email;\n\n this.data = {\n state: State.ExistingUserUntrustedDevice,\n showApproveFromOtherDeviceBtn,\n showReqAdminApprovalBtn,\n showApproveWithMasterPasswordBtn,\n userEmail,\n };\n });\n }\n\n async approveFromOtherDevice() {\n if (this.data.state !== State.ExistingUserUntrustedDevice) {\n return;\n }\n\n this.loginEmailService.setEmail(this.data.userEmail);\n await this.router.navigate([\"/login-with-device\"]);\n }\n\n async requestAdminApproval() {\n this.loginEmailService.setEmail(this.data.userEmail);\n await this.router.navigate([\"/admin-approval-requested\"]);\n }\n\n async approveWithMasterPassword() {\n await this.router.navigate([\"/lock\"], { queryParams: { from: \"login-initiated\" } });\n }\n\n async createUser() {\n if (this.data.state !== State.NewUser) {\n return;\n }\n\n // this.loading to support clients without async-actions-support\n this.loading = true;\n // errors must be caught in child components to prevent navigation\n try {\n const { publicKey, privateKey } = await this.cryptoService.initAccount();\n const keysRequest = new KeysRequest(publicKey, privateKey.encryptedString);\n await this.apiService.postAccountKeys(keysRequest);\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"accountSuccessfullyCreated\"),\n );\n\n await this.passwordResetEnrollmentService.enroll(this.data.organizationId);\n\n if (this.rememberDeviceForm.value.rememberDevice) {\n await this.deviceTrustService.trustDevice(this.activeAccountId);\n }\n } finally {\n this.loading = false;\n }\n }\n\n logOut() {\n this.loading = true; // to avoid an awkward delay in browser extension\n this.messagingService.send(\"logout\");\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","
    \n \n
    \n \n
    \n\n \n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n\n \n \n

    {{ \"loginInitiated\" | i18n }}

    \n\n

    \n {{ \"deviceApprovalRequired\" | i18n }}\n

    \n\n
    \n \n \n {{ \"rememberThisDevice\" | i18n }} \n {{ \"uncheckIfPublicDevice\" | i18n }}\n \n
    \n\n
    \n \n {{ \"approveFromYourOtherDevice\" | i18n }}\n \n\n \n {{ \"requestAdminApproval\" | i18n }}\n \n\n \n {{ \"approveWithMasterPassword\" | i18n }}\n \n
    \n
    \n\n \n

    {{ \"loggedInExclamation\" | i18n }}

    \n\n
    \n \n \n {{ \"rememberThisDevice\" | i18n }} \n {{ \"uncheckIfPublicDevice\" | i18n }}\n \n
    \n\n \n {{ \"continue\" | i18n }}\n \n
    \n\n
    \n\n
    \n

    {{ \"loggingInAs\" | i18n }} {{ data.userEmail }}

    \n {{ \"notYou\" | i18n }}\n
    \n
    \n \n\n","import { Component, inject } from \"@angular/core\";\n\nimport { BaseLoginDecryptionOptionsComponent } from \"@bitwarden/angular/auth/components/base-login-decryption-options.component\";\n\nimport { RouterService } from \"../../../core\";\nimport { AcceptOrganizationInviteService } from \"../../organization-invite/accept-organization.service\";\n@Component({\n selector: \"web-login-decryption-options\",\n templateUrl: \"login-decryption-options.component.html\",\n})\nexport class LoginDecryptionOptionsComponent extends BaseLoginDecryptionOptionsComponent {\n protected routerService = inject(RouterService);\n protected acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n override async createUser(): Promise {\n try {\n await super.createUser();\n\n // Invites from TDE orgs go through here, but the invite is\n // accepted while being enrolled in admin recovery. So we need to clear\n // the redirect and stored org invite.\n await this.routerService.getAndClearLoginRedirectUrl();\n await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n\n await this.router.navigate([\"/vault\"]);\n } catch (error) {\n this.validationService.showError(error);\n }\n }\n\n createUserAction = async (): Promise => {\n return this.createUser();\n };\n}\n","export enum AuthRequestType {\n AuthenticateAndUnlock = 0,\n Unlock = 1,\n AdminApproval = 2,\n}\n","import { AuthRequestType } from \"../../enums/auth-request-type\";\n\nexport class CreateAuthRequest {\n constructor(\n readonly email: string,\n readonly deviceIdentifier: string,\n readonly publicKey: string,\n readonly type: AuthRequestType,\n readonly accessCode: string,\n ) {}\n}\n","export abstract class IFrameComponent {\n iframe: HTMLIFrameElement;\n private connectorLink: HTMLAnchorElement;\n private parseFunction = this.parseMessage.bind(this);\n\n constructor(\n private win: Window,\n protected webVaultUrl: string,\n private path: string,\n private iframeId: string,\n public successCallback?: (message: string) => any,\n public errorCallback?: (message: string) => any,\n public infoCallback?: (message: string) => any,\n ) {\n this.connectorLink = win.document.createElement(\"a\");\n }\n\n stop() {\n this.sendMessage(\"stop\");\n }\n\n start() {\n this.sendMessage(\"start\");\n }\n\n sendMessage(message: any) {\n if (!this.iframe || !this.iframe.src || !this.iframe.contentWindow) {\n return;\n }\n\n this.iframe.contentWindow.postMessage(message, this.iframe.src);\n }\n\n base64Encode(str: string): string {\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {\n return String.fromCharCode((\"0x\" + p1) as any);\n }),\n );\n }\n\n cleanup() {\n this.win.removeEventListener(\"message\", this.parseFunction, false);\n }\n\n protected createParams(data: any, version: number) {\n return new URLSearchParams({\n data: this.base64Encode(JSON.stringify(data)),\n parent: encodeURIComponent(this.win.document.location.href),\n v: version.toString(),\n });\n }\n\n protected initComponent(params: URLSearchParams): void {\n this.connectorLink.href = `${this.webVaultUrl}/${this.path}?${params}`;\n this.iframe = this.win.document.getElementById(this.iframeId) as HTMLIFrameElement;\n this.iframe.src = this.connectorLink.href;\n\n this.win.addEventListener(\"message\", this.parseFunction, false);\n }\n\n private parseMessage(event: MessageEvent) {\n if (!this.validMessage(event)) {\n return;\n }\n\n const parts: string[] = event.data.split(\"|\");\n if (parts[0] === \"success\" && this.successCallback) {\n this.successCallback(parts[1]);\n } else if (parts[0] === \"error\" && this.errorCallback) {\n this.errorCallback(parts[1]);\n } else if (parts[0] === \"info\" && this.infoCallback) {\n this.infoCallback(parts[1]);\n }\n }\n\n private validMessage(event: MessageEvent) {\n if (\n event.origin == null ||\n event.origin === \"\" ||\n event.origin !== (this.connectorLink as any).origin ||\n event.data == null ||\n typeof event.data !== \"string\"\n ) {\n return false;\n }\n\n return (\n event.data.indexOf(\"success|\") === 0 ||\n event.data.indexOf(\"error|\") === 0 ||\n event.data.indexOf(\"info|\") === 0\n );\n }\n}\n","import { I18nService } from \"../platform/abstractions/i18n.service\";\n\nimport { IFrameComponent } from \"./iframe-component\";\n\nexport class CaptchaIFrame extends IFrameComponent {\n constructor(\n win: Window,\n webVaultUrl: string,\n private i18nService: I18nService,\n successCallback: (message: string) => any,\n errorCallback: (message: string) => any,\n infoCallback: (message: string) => any,\n ) {\n super(\n win,\n webVaultUrl,\n \"captcha-connector.html\",\n \"hcaptcha_iframe\",\n successCallback,\n errorCallback,\n (message: string) => {\n const parsedMessage = JSON.parse(message);\n if (typeof parsedMessage !== \"string\") {\n this.iframe.height = parsedMessage.height.toString();\n this.iframe.width = parsedMessage.width.toString();\n } else {\n infoCallback(parsedMessage);\n }\n },\n );\n }\n\n init(siteKey: string): void {\n super.initComponent(\n this.createParams({ siteKey: siteKey, locale: this.i18nService.translationLocale }, 1),\n );\n }\n}\n","import { Directive, Input } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { CaptchaIFrame } from \"@bitwarden/common/auth/captcha-iframe\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Directive()\nexport abstract class CaptchaProtectedComponent {\n @Input() captchaSiteKey: string = null;\n captchaToken: string = null;\n captcha: CaptchaIFrame;\n\n constructor(\n protected environmentService: EnvironmentService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n ) {}\n\n async setupCaptcha() {\n const env = await firstValueFrom(this.environmentService.environment$);\n const webVaultUrl = env.getWebVaultUrl();\n\n this.captcha = new CaptchaIFrame(\n window,\n webVaultUrl,\n this.i18nService,\n (token: string) => {\n this.captchaToken = token;\n },\n (error: string) => {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), error);\n },\n (info: string) => {\n this.platformUtilsService.showToast(\"info\", this.i18nService.t(\"info\"), info);\n },\n );\n }\n\n showCaptcha() {\n return !Utils.isNullOrWhitespace(this.captchaSiteKey);\n }\n\n protected handleCaptchaRequired(response: { captchaSiteKey: string }): boolean {\n if (Utils.isNullOrWhitespace(response.captchaSiteKey)) {\n return false;\n }\n\n this.captchaSiteKey = response.captchaSiteKey;\n this.captcha.init(response.captchaSiteKey);\n return true;\n }\n}\n","import { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { IsActiveMatchOptions, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom, map, takeUntil } from \"rxjs\";\n\nimport {\n AuthRequestLoginCredentials,\n AuthRequestServiceAbstraction,\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AnonymousHubService } from \"@bitwarden/common/auth/abstractions/anonymous-hub.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthRequestType } from \"@bitwarden/common/auth/enums/auth-request-type\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { CreateAuthRequest } from \"@bitwarden/common/auth/models/request/create-auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums/http-status-code.enum\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\nenum State {\n StandardAuthRequest,\n AdminAuthRequest,\n}\n\n@Directive()\nexport class LoginViaAuthRequestComponent\n extends CaptchaProtectedComponent\n implements OnInit, OnDestroy\n{\n private destroy$ = new Subject();\n userAuthNStatus: AuthenticationStatus;\n email: string;\n showResendNotification = false;\n authRequest: CreateAuthRequest;\n fingerprintPhrase: string;\n onSuccessfulLoginTwoFactorNavigate: () => Promise;\n onSuccessfulLogin: () => Promise;\n onSuccessfulLoginNavigate: () => Promise;\n onSuccessfulLoginForceResetNavigate: () => Promise;\n\n protected adminApprovalRoute = \"admin-approval-requested\";\n\n protected StateEnum = State;\n protected state = State.StandardAuthRequest;\n\n protected twoFactorRoute = \"2fa\";\n protected successRoute = \"vault\";\n protected forcePasswordResetRoute = \"update-temp-password\";\n private resendTimeout = 12000;\n\n private authRequestKeyPair: { publicKey: Uint8Array; privateKey: Uint8Array };\n\n constructor(\n protected router: Router,\n private cryptoService: CryptoService,\n private cryptoFunctionService: CryptoFunctionService,\n private appIdService: AppIdService,\n private passwordGenerationService: PasswordGenerationServiceAbstraction,\n private apiService: ApiService,\n private authService: AuthService,\n private logService: LogService,\n environmentService: EnvironmentService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n private anonymousHubService: AnonymousHubService,\n private validationService: ValidationService,\n private accountService: AccountService,\n private loginEmailService: LoginEmailServiceAbstraction,\n private deviceTrustService: DeviceTrustServiceAbstraction,\n private authRequestService: AuthRequestServiceAbstraction,\n private loginStrategyService: LoginStrategyServiceAbstraction,\n ) {\n super(environmentService, i18nService, platformUtilsService);\n\n // TODO: I don't know why this is necessary.\n // Why would the existence of the email depend on the navigation?\n const navigation = this.router.getCurrentNavigation();\n if (navigation) {\n this.email = this.loginEmailService.getEmail();\n }\n\n // Gets signalR push notification\n // Only fires on approval to prevent enumeration\n this.authRequestService.authRequestPushNotification$\n .pipe(takeUntil(this.destroy$))\n .subscribe((id) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.verifyAndHandleApprovedAuthReq(id).catch((e: Error) => {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"error\"), e.message);\n this.logService.error(\"Failed to use approved auth request: \" + e.message);\n });\n });\n }\n\n async ngOnInit() {\n this.userAuthNStatus = await this.authService.getAuthStatus();\n\n const matchOptions: IsActiveMatchOptions = {\n paths: \"exact\",\n queryParams: \"ignored\",\n fragment: \"ignored\",\n matrixParams: \"ignored\",\n };\n\n if (this.router.isActive(this.adminApprovalRoute, matchOptions)) {\n this.state = State.AdminAuthRequest;\n }\n\n if (this.state === State.AdminAuthRequest) {\n // Pull email from state for admin auth reqs b/c it is available\n // This also prevents it from being lost on refresh as the\n // login service email does not persist.\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n\n if (!this.email) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"userEmailMissing\"));\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/login-initiated\"]);\n return;\n }\n\n // We only allow a single admin approval request to be active at a time\n // so must check state to see if we have an existing one or not\n const adminAuthReqStorable = await this.authRequestService.getAdminAuthRequest(userId);\n\n if (adminAuthReqStorable) {\n await this.handleExistingAdminAuthRequest(adminAuthReqStorable, userId);\n } else {\n // No existing admin auth request; so we need to create one\n await this.startAuthRequestLogin();\n }\n } else {\n // Standard auth request\n // TODO: evaluate if we can remove the setting of this.email in the constructor\n this.email = this.loginEmailService.getEmail();\n\n if (!this.email) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"userEmailMissing\"));\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/login\"]);\n return;\n }\n\n await this.startAuthRequestLogin();\n }\n }\n\n async ngOnDestroy() {\n await this.anonymousHubService.stopHubConnection();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private async handleExistingAdminAuthRequest(\n adminAuthReqStorable: AdminAuthRequestStorable,\n userId: UserId,\n ) {\n // Note: on login, the SSOLoginStrategy will also call to see an existing admin auth req\n // has been approved and handle it if so.\n\n // Regardless, we always retrieve the auth request from the server verify and handle status changes here as well\n let adminAuthReqResponse: AuthRequestResponse;\n try {\n adminAuthReqResponse = await this.apiService.getAuthRequest(adminAuthReqStorable.id);\n } catch (error) {\n if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n }\n }\n\n // Request doesn't exist anymore\n if (!adminAuthReqResponse) {\n return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n }\n\n // Re-derive the user's fingerprint phrase\n // It is important to not use the server's public key here as it could have been compromised via MITM\n const derivedPublicKeyArrayBuffer = await this.cryptoFunctionService.rsaExtractPublicKey(\n adminAuthReqStorable.privateKey,\n );\n this.fingerprintPhrase = (\n await this.cryptoService.getFingerprint(this.email, derivedPublicKeyArrayBuffer)\n ).join(\"-\");\n\n // Request denied\n if (adminAuthReqResponse.isAnswered && !adminAuthReqResponse.requestApproved) {\n return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n }\n\n // Request approved\n if (adminAuthReqResponse.requestApproved) {\n return await this.handleApprovedAdminAuthRequest(\n adminAuthReqResponse,\n adminAuthReqStorable.privateKey,\n userId,\n );\n }\n\n // Request still pending response from admin\n // set keypair and create hub connection so that any approvals will be received via push notification\n this.authRequestKeyPair = { privateKey: adminAuthReqStorable.privateKey, publicKey: null };\n await this.anonymousHubService.createHubConnection(adminAuthReqStorable.id);\n }\n\n private async handleExistingAdminAuthReqDeletedOrDenied(userId: UserId) {\n // clear the admin auth request from state\n await this.authRequestService.clearAdminAuthRequest(userId);\n\n // start new auth request\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.startAuthRequestLogin();\n }\n\n private async buildAuthRequest(authRequestType: AuthRequestType) {\n const authRequestKeyPairArray = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n\n this.authRequestKeyPair = {\n publicKey: authRequestKeyPairArray[0],\n privateKey: authRequestKeyPairArray[1],\n };\n\n const deviceIdentifier = await this.appIdService.getAppId();\n const publicKey = Utils.fromBufferToB64(this.authRequestKeyPair.publicKey);\n const accessCode = await this.passwordGenerationService.generatePassword({\n type: \"password\",\n length: 25,\n });\n\n this.fingerprintPhrase = (\n await this.cryptoService.getFingerprint(this.email, this.authRequestKeyPair.publicKey)\n ).join(\"-\");\n\n this.authRequest = new CreateAuthRequest(\n this.email,\n deviceIdentifier,\n publicKey,\n authRequestType,\n accessCode,\n );\n }\n\n async startAuthRequestLogin() {\n this.showResendNotification = false;\n\n try {\n let reqResponse: AuthRequestResponse;\n\n if (this.state === State.AdminAuthRequest) {\n await this.buildAuthRequest(AuthRequestType.AdminApproval);\n reqResponse = await this.apiService.postAdminAuthRequest(this.authRequest);\n\n const adminAuthReqStorable = new AdminAuthRequestStorable({\n id: reqResponse.id,\n privateKey: this.authRequestKeyPair.privateKey,\n });\n\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n await this.authRequestService.setAdminAuthRequest(adminAuthReqStorable, userId);\n } else {\n await this.buildAuthRequest(AuthRequestType.AuthenticateAndUnlock);\n reqResponse = await this.apiService.postAuthRequest(this.authRequest);\n }\n\n if (reqResponse.id) {\n await this.anonymousHubService.createHubConnection(reqResponse.id);\n }\n } catch (e) {\n this.logService.error(e);\n }\n\n setTimeout(() => {\n this.showResendNotification = true;\n }, this.resendTimeout);\n }\n\n private async verifyAndHandleApprovedAuthReq(requestId: string) {\n try {\n // Retrieve the auth request from server and verify it's approved\n let authReqResponse: AuthRequestResponse;\n\n switch (this.state) {\n case State.StandardAuthRequest:\n // Unauthed - access code required for user verification\n authReqResponse = await this.apiService.getAuthResponse(\n requestId,\n this.authRequest.accessCode,\n );\n break;\n\n case State.AdminAuthRequest:\n // Authed - no access code required\n authReqResponse = await this.apiService.getAuthRequest(requestId);\n break;\n\n default:\n break;\n }\n\n if (!authReqResponse.requestApproved) {\n return;\n }\n\n // Approved so proceed:\n\n // 4 Scenarios to handle for approved auth requests:\n // Existing flow 1:\n // - Anon Login with Device > User is not AuthN > receives approval from device with pubKey(masterKey)\n // > decrypt masterKey > must authenticate > gets masterKey(userKey) > decrypt userKey and proceed to vault\n\n // 3 new flows from TDE:\n // Flow 2:\n // - Post SSO > User is AuthN > SSO login strategy success sets masterKey(userKey) > receives approval from device with pubKey(masterKey)\n // > decrypt masterKey > decrypt userKey > establish trust if required > proceed to vault\n // Flow 3:\n // - Post SSO > User is AuthN > Receives approval from device with pubKey(userKey) > decrypt userKey > establish trust if required > proceed to vault\n // Flow 4:\n // - Anon Login with Device > User is not AuthN > receives approval from device with pubKey(userKey)\n // > decrypt userKey > must authenticate > set userKey > proceed to vault\n\n // if user has authenticated via SSO\n if (this.userAuthNStatus === AuthenticationStatus.Locked) {\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n return await this.handleApprovedAdminAuthRequest(\n authReqResponse,\n this.authRequestKeyPair.privateKey,\n userId,\n );\n }\n\n // Flow 1 and 4:\n const loginAuthResult = await this.loginViaAuthRequestStrategy(requestId, authReqResponse);\n await this.handlePostLoginNavigation(loginAuthResult);\n } catch (error) {\n if (error instanceof ErrorResponse) {\n let errorRoute = \"/login\";\n if (this.state === State.AdminAuthRequest) {\n errorRoute = \"/login-initiated\";\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([errorRoute]);\n this.validationService.showError(error);\n return;\n }\n\n this.logService.error(error);\n }\n }\n\n async handleApprovedAdminAuthRequest(\n adminAuthReqResponse: AuthRequestResponse,\n privateKey: ArrayBuffer,\n userId: UserId,\n ) {\n // See verifyAndHandleApprovedAuthReq(...) for flow details\n // it's flow 2 or 3 based on presence of masterPasswordHash\n if (adminAuthReqResponse.masterPasswordHash) {\n // Flow 2: masterPasswordHash is not null\n // key is authRequestPublicKey(masterKey) + we have authRequestPublicKey(masterPasswordHash)\n await this.authRequestService.setKeysAfterDecryptingSharedMasterKeyAndHash(\n adminAuthReqResponse,\n privateKey,\n );\n } else {\n // Flow 3: masterPasswordHash is null\n // we can assume key is authRequestPublicKey(userKey) and we can just decrypt with userKey and proceed to vault\n await this.authRequestService.setUserKeyAfterDecryptingSharedUserKey(\n adminAuthReqResponse,\n privateKey,\n );\n }\n\n // clear the admin auth request from state so it cannot be used again (it's a one time use)\n // TODO: this should eventually be enforced via deleting this on the server once it is used\n await this.authRequestService.clearAdminAuthRequest(userId);\n\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"loginApproved\"));\n\n // Now that we have a decrypted user key in memory, we can check if we\n // need to establish trust on the current device\n const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n await this.deviceTrustService.trustDeviceIfRequired(activeAccount.id);\n\n // TODO: don't forget to use auto enrollment service everywhere we trust device\n\n await this.handleSuccessfulLoginNavigation();\n }\n\n // Authentication helper\n private async buildAuthRequestLoginCredentials(\n requestId: string,\n response: AuthRequestResponse,\n ): Promise {\n // if masterPasswordHash has a value, we will always receive key as authRequestPublicKey(masterKey) + authRequestPublicKey(masterPasswordHash)\n // if masterPasswordHash is null, we will always receive key as authRequestPublicKey(userKey)\n if (response.masterPasswordHash) {\n const { masterKey, masterKeyHash } =\n await this.authRequestService.decryptPubKeyEncryptedMasterKeyAndHash(\n response.key,\n response.masterPasswordHash,\n this.authRequestKeyPair.privateKey,\n );\n\n return new AuthRequestLoginCredentials(\n this.email,\n this.authRequest.accessCode,\n requestId,\n null, // no userKey\n masterKey,\n masterKeyHash,\n );\n } else {\n const userKey = await this.authRequestService.decryptPubKeyEncryptedUserKey(\n response.key,\n this.authRequestKeyPair.privateKey,\n );\n return new AuthRequestLoginCredentials(\n this.email,\n this.authRequest.accessCode,\n requestId,\n userKey,\n null, // no masterKey\n null, // no masterKeyHash\n );\n }\n }\n\n private async loginViaAuthRequestStrategy(\n requestId: string,\n authReqResponse: AuthRequestResponse,\n ): Promise {\n // Note: credentials change based on if the authReqResponse.key is a encryptedMasterKey or UserKey\n const credentials = await this.buildAuthRequestLoginCredentials(requestId, authReqResponse);\n\n // Note: keys are set by AuthRequestLoginStrategy success handling\n return await this.loginStrategyService.logIn(credentials);\n }\n\n // Routing logic\n private async handlePostLoginNavigation(loginResponse: AuthResult) {\n if (loginResponse.requiresTwoFactor) {\n if (this.onSuccessfulLoginTwoFactorNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginTwoFactorNavigate();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.twoFactorRoute]);\n }\n } else if (loginResponse.forcePasswordReset != ForceSetPasswordReason.None) {\n if (this.onSuccessfulLoginForceResetNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginForceResetNavigate();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.forcePasswordResetRoute]);\n }\n } else {\n await this.handleSuccessfulLoginNavigation();\n }\n }\n\n private async handleSuccessfulLoginNavigation() {\n if (this.state === State.StandardAuthRequest) {\n // Only need to set remembered email on standard login with auth req flow\n await this.loginEmailService.saveEmailSettings();\n }\n\n if (this.onSuccessfulLogin != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLogin();\n }\n\n if (this.onSuccessfulLoginNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginNavigate();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute]);\n }\n }\n}\n","\n\n\n
    \n \n\n \n

    \n {{ \"loginOrCreateNewAccount\" | i18n }}\n

    \n\n \n

    {{ \"loginInitiated\" | i18n }}

    \n\n
    \n

    {{ \"notificationSentDevice\" | i18n }}

    \n\n

    \n {{ \"fingerprintMatchInfo\" | i18n }}\n

    \n
    \n\n
    \n

    {{ \"fingerprintPhraseHeader\" | i18n }}

    \n

    \n {{ fingerprintPhrase }}\n

    \n
    \n\n \n\n
    \n\n
    \n {{ \"loginWithDeviceEnabledNote\" | i18n }}\n {{ \"viewAllLoginOptions\" | i18n }}\n
    \n
    \n \n \n \n

    {{ \"adminApprovalRequested\" | i18n }}

    \n\n
    \n

    {{ \"adminApprovalRequestSentToAdmins\" | i18n }}

    \n

    {{ \"youWillBeNotifiedOnceApproved\" | i18n }}

    \n
    \n\n
    \n

    {{ \"fingerprintPhraseHeader\" | i18n }}

    \n

    \n {{ fingerprintPhrase }}\n

    \n
    \n\n
    \n\n
    \n {{ \"troubleLoggingIn\" | i18n }}\n {{ \"viewAllLoginOptions\" | i18n }}\n
    \n \n
    \n \n\n","import { Component } from \"@angular/core\";\n\nimport { LoginViaAuthRequestComponent as BaseLoginWithDeviceComponent } from \"@bitwarden/angular/auth/components/login-via-auth-request.component\";\n\n@Component({\n selector: \"app-login-via-auth-request\",\n templateUrl: \"login-via-auth-request.component.html\",\n})\nexport class LoginViaAuthRequestComponent extends BaseLoginWithDeviceComponent {}\n","import { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { WebAuthnLoginCredentialAssertionView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\n\nexport type State = \"assert\" | \"assertFailed\";\n\n@Directive()\nexport class BaseLoginViaWebAuthnComponent implements OnInit {\n protected currentState: State = \"assert\";\n\n protected successRoute = \"/vault\";\n protected forcePasswordResetRoute = \"/update-temp-password\";\n\n constructor(\n private webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n private router: Router,\n private logService: LogService,\n private validationService: ValidationService,\n private i18nService: I18nService,\n ) {}\n\n ngOnInit(): void {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.authenticate();\n }\n\n protected retry() {\n this.currentState = \"assert\";\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.authenticate();\n }\n\n private async authenticate() {\n let assertion: WebAuthnLoginCredentialAssertionView;\n try {\n const options = await this.webAuthnLoginService.getCredentialAssertionOptions();\n assertion = await this.webAuthnLoginService.assertCredential(options);\n } catch (error) {\n this.validationService.showError(error);\n this.currentState = \"assertFailed\";\n return;\n }\n try {\n const authResult = await this.webAuthnLoginService.logIn(assertion);\n\n if (authResult.requiresTwoFactor) {\n this.validationService.showError(\n this.i18nService.t(\"twoFactorForPasskeysNotSupportedOnClientUpdateToLogIn\"),\n );\n this.currentState = \"assertFailed\";\n } else if (authResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n await this.router.navigate([this.forcePasswordResetRoute]);\n } else {\n await this.router.navigate([this.successRoute]);\n }\n } catch (error) {\n if (error instanceof ErrorResponse) {\n this.validationService.showError(this.i18nService.t(\"invalidPasskeyPleaseTryAgain\"));\n }\n this.logService.error(error);\n this.currentState = \"assertFailed\";\n }\n }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyFailedIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n \n\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n\n`;\n","\n
    \n \n

    \n {{ \"readingPasskeyLoading\" | i18n }}\n

    \n\n \n
    \n \n \n

    {{ \"readingPasskeyLoadingInfo\" | i18n }}

    \n \n {{ \"loading\" | i18n }}\n \n
    \n\n \n \n

    {{ \"readingPasskeyLoadingInfo\" | i18n }}

    \n \n {{ \"tryAgain\" | i18n }}\n \n
    \n
    \n

    \n {{ \"troubleLoggingIn\" | i18n }}
    \n {{ \"useADifferentLogInMethod\" | i18n }}\n

    \n
    \n \n\n","import { Component } from \"@angular/core\";\n\nimport { BaseLoginViaWebAuthnComponent } from \"@bitwarden/angular/auth/components/base-login-via-webauthn.component\";\nimport { CreatePasskeyFailedIcon } from \"@bitwarden/angular/auth/icons/create-passkey-failed.icon\";\nimport { CreatePasskeyIcon } from \"@bitwarden/angular/auth/icons/create-passkey.icon\";\n\n@Component({\n selector: \"app-login-via-webauthn\",\n templateUrl: \"login-via-webauthn.component.html\",\n})\nexport class LoginViaWebAuthnComponent extends BaseLoginViaWebAuthnComponent {\n protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon };\n}\n","import { Directive, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom } from \"rxjs\";\nimport { take, takeUntil } from \"rxjs/operators\";\n\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n PasswordLoginCredentials,\n RegisterRouteService,\n} from \"@bitwarden/auth/common\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport {\n AllValidationErrors,\n FormValidationErrorsService,\n} from \"../../platform/abstractions/form-validation-errors.service\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class LoginComponent extends CaptchaProtectedComponent implements OnInit, OnDestroy {\n @ViewChild(\"masterPasswordInput\", { static: true }) masterPasswordInput: ElementRef;\n\n showPassword = false;\n formPromise: Promise;\n onSuccessfulLogin: () => Promise;\n onSuccessfulLoginNavigate: () => Promise;\n onSuccessfulLoginTwoFactorNavigate: () => Promise;\n onSuccessfulLoginForceResetNavigate: () => Promise;\n showLoginWithDevice: boolean;\n validatedEmail = false;\n paramEmailSet = false;\n\n get emailFormControl() {\n return this.formGroup.controls.email;\n }\n\n formGroup = this.formBuilder.group({\n email: [\"\", [Validators.required, Validators.email]],\n masterPassword: [\n \"\",\n [Validators.required, Validators.minLength(Utils.originalMinimumPasswordLength)],\n ],\n rememberEmail: [false],\n });\n\n protected twoFactorRoute = \"2fa\";\n protected successRoute = \"vault\";\n // TODO: remove when email verification flag is removed\n protected registerRoute$ = this.registerRouteService.registerRoute$();\n protected forcePasswordResetRoute = \"update-temp-password\";\n\n protected destroy$ = new Subject();\n\n get loggedEmail() {\n return this.formGroup.value.email;\n }\n\n constructor(\n protected devicesApiService: DevicesApiServiceAbstraction,\n protected appIdService: AppIdService,\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n protected stateService: StateService,\n environmentService: EnvironmentService,\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected cryptoFunctionService: CryptoFunctionService,\n protected logService: LogService,\n protected ngZone: NgZone,\n protected formBuilder: FormBuilder,\n protected formValidationErrorService: FormValidationErrorsService,\n protected route: ActivatedRoute,\n protected loginEmailService: LoginEmailServiceAbstraction,\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n protected registerRouteService: RegisterRouteService,\n ) {\n super(environmentService, i18nService, platformUtilsService);\n }\n\n async ngOnInit() {\n this.route?.queryParams.pipe(takeUntil(this.destroy$)).subscribe((params) => {\n if (!params) {\n return;\n }\n\n const queryParamsEmail = params.email;\n\n if (queryParamsEmail != null && queryParamsEmail.indexOf(\"@\") > -1) {\n this.formGroup.controls.email.setValue(queryParamsEmail);\n this.paramEmailSet = true;\n }\n });\n\n if (!this.paramEmailSet) {\n await this.loadEmailSettings();\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async submit(showToast = true) {\n const data = this.formGroup.value;\n\n await this.setupCaptcha();\n\n this.formGroup.markAllAsTouched();\n\n //web\n if (this.formGroup.invalid && !showToast) {\n return;\n }\n\n //desktop, browser; This should be removed once all clients use reactive forms\n if (this.formGroup.invalid && showToast) {\n const errorText = this.getErrorToastMessage();\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errorText);\n return;\n }\n\n try {\n const credentials = new PasswordLoginCredentials(\n data.email,\n data.masterPassword,\n this.captchaToken,\n null,\n );\n\n this.formPromise = this.loginStrategyService.logIn(credentials);\n const response = await this.formPromise;\n\n await this.saveEmailSettings();\n\n if (this.handleCaptchaRequired(response)) {\n return;\n } else if (await this.handleMigrateEncryptionKey(response)) {\n return;\n } else if (response.requiresTwoFactor) {\n if (this.onSuccessfulLoginTwoFactorNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginTwoFactorNavigate();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.twoFactorRoute]);\n }\n } else if (response.forcePasswordReset != ForceSetPasswordReason.None) {\n if (this.onSuccessfulLoginForceResetNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginForceResetNavigate();\n } else {\n this.loginEmailService.clearValues();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.forcePasswordResetRoute]);\n }\n } else {\n if (this.onSuccessfulLogin != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLogin();\n }\n if (this.onSuccessfulLoginNavigate != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginNavigate();\n } else {\n this.loginEmailService.clearValues();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute]);\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n togglePassword() {\n this.showPassword = !this.showPassword;\n if (this.ngZone.isStable) {\n document.getElementById(\"masterPassword\").focus();\n } else {\n this.ngZone.onStable\n .pipe(take(1))\n .subscribe(() => document.getElementById(\"masterPassword\").focus());\n }\n }\n\n async startAuthRequestLogin() {\n this.formGroup.get(\"masterPassword\")?.clearValidators();\n this.formGroup.get(\"masterPassword\")?.updateValueAndValidity();\n\n if (!this.formGroup.valid) {\n return;\n }\n\n await this.saveEmailSettings();\n await this.router.navigate([\"/login-with-device\"]);\n }\n\n async launchSsoBrowser(clientId: string, ssoRedirectUri: string) {\n // Save off email for SSO\n await this.ssoLoginService.setSsoEmail(this.formGroup.value.email);\n\n // Generate necessary sso params\n const passwordOptions: any = {\n type: \"password\",\n length: 64,\n uppercase: true,\n lowercase: true,\n numbers: true,\n special: false,\n };\n const state = await this.passwordGenerationService.generatePassword(passwordOptions);\n const ssoCodeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n const codeVerifierHash = await this.cryptoFunctionService.hash(ssoCodeVerifier, \"sha256\");\n const codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n\n // Save sso params\n await this.ssoLoginService.setSsoState(state);\n await this.ssoLoginService.setCodeVerifier(ssoCodeVerifier);\n\n // Build URI\n const env = await firstValueFrom(this.environmentService.environment$);\n const webUrl = env.getWebVaultUrl();\n\n // Launch browser\n this.platformUtilsService.launchUri(\n webUrl +\n \"/#/sso?clientId=\" +\n clientId +\n \"&redirectUri=\" +\n encodeURIComponent(ssoRedirectUri) +\n \"&state=\" +\n state +\n \"&codeChallenge=\" +\n codeChallenge +\n \"&email=\" +\n encodeURIComponent(this.formGroup.controls.email.value),\n );\n }\n\n async validateEmail() {\n this.formGroup.controls.email.markAsTouched();\n const emailValid = this.formGroup.get(\"email\").valid;\n if (emailValid) {\n this.toggleValidateEmail(true);\n await this.getLoginWithDevice(this.loggedEmail);\n }\n }\n\n toggleValidateEmail(value: boolean) {\n this.validatedEmail = value;\n if (!this.validatedEmail) {\n // Reset master password only when going from validated to not validated\n // so that autofill can work properly\n this.formGroup.controls.masterPassword.reset();\n } else {\n // Mark MP as untouched so that, when users enter email and hit enter,\n // the MP field doesn't load with validation errors\n this.formGroup.controls.masterPassword.markAsUntouched();\n\n // When email is validated, focus on master password after\n // waiting for input to be rendered\n if (this.ngZone.isStable) {\n this.masterPasswordInput?.nativeElement?.focus();\n } else {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => {\n this.masterPasswordInput?.nativeElement?.focus();\n });\n }\n }\n }\n\n private async loadEmailSettings() {\n // Try to load from memory first\n const email = this.loginEmailService.getEmail();\n const rememberEmail = this.loginEmailService.getRememberEmail();\n if (email) {\n this.formGroup.controls.email.setValue(email);\n this.formGroup.controls.rememberEmail.setValue(rememberEmail);\n } else {\n // If not in memory, check email on disk\n const storedEmail = await firstValueFrom(this.loginEmailService.storedEmail$);\n if (storedEmail) {\n // If we have a stored email, rememberEmail should default to true\n this.formGroup.controls.email.setValue(storedEmail);\n this.formGroup.controls.rememberEmail.setValue(true);\n }\n }\n }\n\n protected async saveEmailSettings() {\n this.loginEmailService.setEmail(this.formGroup.value.email);\n this.loginEmailService.setRememberEmail(this.formGroup.value.rememberEmail);\n await this.loginEmailService.saveEmailSettings();\n }\n\n // Legacy accounts used the master key to encrypt data. Migration is required\n // but only performed on web\n protected async handleMigrateEncryptionKey(result: AuthResult): Promise {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccured\"),\n this.i18nService.t(\"encryptionKeyMigrationRequired\"),\n );\n return true;\n }\n\n private getErrorToastMessage() {\n const error: AllValidationErrors = this.formValidationErrorService\n .getFormValidationErrors(this.formGroup.controls)\n .shift();\n\n if (error) {\n switch (error.errorName) {\n case \"email\":\n return this.i18nService.t(\"invalidEmail\");\n case \"minlength\":\n return this.i18nService.t(\"masterPasswordMinlength\", Utils.originalMinimumPasswordLength);\n default:\n return this.i18nService.t(this.errorTag(error));\n }\n }\n\n return;\n }\n\n private errorTag(error: AllValidationErrors): string {\n const name = error.errorName.charAt(0).toUpperCase() + error.errorName.slice(1);\n return `${error.controlName}${name}`;\n }\n\n async getLoginWithDevice(email: string) {\n try {\n const deviceIdentifier = await this.appIdService.getAppId();\n this.showLoginWithDevice = await this.devicesApiService.getKnownDevice(\n email,\n deviceIdentifier,\n );\n } catch (e) {\n this.showLoginWithDevice = false;\n }\n }\n}\n","\n \n
    \n \n {{ \"emailAddress\" | i18n }}\n \n \n
    \n\n
    \n \n \n {{ \"rememberEmail\" | i18n }}\n \n
    \n\n
    \n \n {{ \"continue\" | i18n }} \n \n
    \n\n
    \n

    {{ \"or\" | i18n }}

    \n\n \n {{ \"loginWithPasskey\" | i18n }}\n \n
    \n\n
    \n\n

    \n {{ \"newAroundHere\" | i18n }}\n \n {{ \"createAccount\" | i18n }}\n

    \n
    \n\n
    \n
    \n \n {{ \"masterPass\" | i18n }}\n \n \n \n {{ \"getMasterPasswordHint\" | i18n }}\n
    \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n {{ \"loginWithDevice\" | i18n }} \n \n
    \n\n
    \n \n \n {{ \"enterpriseSingleSignOn\" | i18n }}\n \n
    \n\n
    \n\n
    \n

    {{ \"loggingInAs\" | i18n }} {{ loggedEmail }}

    \n {{ \"notYou\" | i18n }}\n
    \n
    \n\n","import { Component, NgZone, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, takeUntil } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { LoginComponent as BaseLoginComponent } from \"@bitwarden/angular/auth/components/login.component\";\nimport { FormValidationErrorsService } from \"@bitwarden/angular/platform/abstractions/form-validation-errors.service\";\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n RegisterRouteService,\n} from \"@bitwarden/auth/common\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyData } from \"@bitwarden/common/admin-console/models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { flagEnabled } from \"../../../utils/flags\";\nimport { RouterService, StateService } from \"../../core\";\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\nimport { OrganizationInvite } from \"../organization-invite/organization-invite\";\n\n@Component({\n selector: \"app-login\",\n templateUrl: \"login.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class LoginComponent extends BaseLoginComponent implements OnInit {\n showResetPasswordAutoEnrollWarning = false;\n enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;\n policies: Policy[];\n showPasswordless = false;\n constructor(\n private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n devicesApiService: DevicesApiServiceAbstraction,\n appIdService: AppIdService,\n loginStrategyService: LoginStrategyServiceAbstraction,\n router: Router,\n i18nService: I18nService,\n route: ActivatedRoute,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n private passwordStrengthService: PasswordStrengthServiceAbstraction,\n cryptoFunctionService: CryptoFunctionService,\n private policyApiService: PolicyApiServiceAbstraction,\n private policyService: InternalPolicyService,\n logService: LogService,\n ngZone: NgZone,\n protected stateService: StateService,\n private routerService: RouterService,\n formBuilder: FormBuilder,\n formValidationErrorService: FormValidationErrorsService,\n loginEmailService: LoginEmailServiceAbstraction,\n ssoLoginService: SsoLoginServiceAbstraction,\n webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n registerRouteService: RegisterRouteService,\n ) {\n super(\n devicesApiService,\n appIdService,\n loginStrategyService,\n router,\n platformUtilsService,\n i18nService,\n stateService,\n environmentService,\n passwordGenerationService,\n cryptoFunctionService,\n logService,\n ngZone,\n formBuilder,\n formValidationErrorService,\n route,\n loginEmailService,\n ssoLoginService,\n webAuthnLoginService,\n registerRouteService,\n );\n this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n this.showPasswordless = flagEnabled(\"showPasswordless\");\n }\n submitForm = async (showToast = true) => {\n return await this.submitFormHelper(showToast);\n };\n\n private async submitFormHelper(showToast: boolean) {\n await super.submit(showToast);\n }\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.org != null) {\n const route = this.router.createUrlTree([\"create-organization\"], {\n queryParams: { plan: qParams.org },\n });\n this.routerService.setPreviousUrl(route.toString());\n }\n\n // Are they coming from an email for sponsoring a families organization\n if (qParams.sponsorshipToken != null) {\n const route = this.router.createUrlTree([\"setup/families-for-enterprise\"], {\n queryParams: { token: qParams.sponsorshipToken },\n });\n this.routerService.setPreviousUrl(route.toString());\n }\n await super.ngOnInit();\n });\n\n // If there's an existing org invite, use it to get the password policies\n const orgInvite = await this.acceptOrganizationInviteService.getOrganizationInvite();\n if (orgInvite != null) {\n await this.initPasswordPolicies(orgInvite);\n }\n }\n\n async goAfterLogIn() {\n const masterPassword = this.formGroup.value.masterPassword;\n\n // Check master password against policy\n if (this.enforcedPasswordPolicyOptions != null) {\n const strengthResult = this.passwordStrengthService.getPasswordStrength(\n masterPassword,\n this.formGroup.value.email,\n );\n const masterPasswordScore = strengthResult == null ? null : strengthResult.score;\n\n // If invalid, save policies and require update\n if (\n !this.policyService.evaluateMasterPassword(\n masterPasswordScore,\n masterPassword,\n this.enforcedPasswordPolicyOptions,\n )\n ) {\n const policiesData: { [id: string]: PolicyData } = {};\n this.policies.map((p) => (policiesData[p.id] = PolicyData.fromPolicy(p)));\n await this.policyService.replace(policiesData);\n await this.router.navigate([\"update-password\"]);\n return;\n }\n }\n\n this.loginEmailService.clearValues();\n await this.router.navigate([this.successRoute]);\n }\n\n async goToHint() {\n await this.saveEmailSettings();\n await this.router.navigateByUrl(\"/hint\");\n }\n\n async goToRegister() {\n // TODO: remove when email verification flag is removed\n const registerRoute = await firstValueFrom(this.registerRoute$);\n\n if (this.emailFormControl.valid) {\n await this.router.navigate([registerRoute], {\n queryParams: { email: this.emailFormControl.value },\n });\n return;\n }\n\n await this.router.navigate([registerRoute]);\n }\n\n protected override async handleMigrateEncryptionKey(result: AuthResult): Promise {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n await this.router.navigate([\"migrate-legacy-encryption\"]);\n return true;\n }\n\n private async initPasswordPolicies(invite: OrganizationInvite): Promise {\n try {\n this.policies = await this.policyApiService.getPoliciesByToken(\n invite.organizationId,\n invite.token,\n invite.email,\n invite.organizationUserId,\n );\n } catch (e) {\n this.logService.error(e);\n }\n\n if (this.policies == null) {\n return;\n }\n const resetPasswordPolicy = this.policyService.getResetPasswordPolicyOptions(\n this.policies,\n invite.organizationId,\n );\n // Set to true if policy enabled and auto-enroll enabled\n this.showResetPasswordAutoEnrollWarning =\n resetPasswordPolicy[1] && resetPasswordPolicy[0].autoEnrollEnabled;\n\n this.policyService\n .masterPasswordPolicyOptions$(this.policies)\n .pipe(takeUntil(this.destroy$))\n .subscribe((enforcedPasswordPolicyOptions) => {\n this.enforcedPasswordPolicyOptions = enforcedPasswordPolicyOptions;\n });\n }\n}\n","import {\n flagEnabled as baseFlagEnabled,\n devFlagEnabled as baseDevFlagEnabled,\n devFlagValue as baseDevFlagValue,\n SharedFlags,\n SharedDevFlags,\n} from \"@bitwarden/common/platform/misc/flags\";\n\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type Flags = {\n showPasswordless?: boolean;\n} & SharedFlags;\n\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type DevFlags = {} & SharedDevFlags;\n\nexport function flagEnabled(flag: keyof Flags): boolean {\n return baseFlagEnabled(flag);\n}\n\nexport function devFlagEnabled(flag: keyof DevFlags) {\n return baseDevFlagEnabled(flag);\n}\n\nexport function devFlagValue(flag: keyof DevFlags) {\n return baseDevFlagValue(flag);\n}\n","
    \n
    \n \"Bitwarden\"\n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n
    \n
    \n
    \n
    \n

    {{ \"joinOrganization\" | i18n }}

    \n
    \n
    \n

    \n {{ orgName$ | async }}\n {{ email }}\n

    \n

    {{ \"joinOrganizationDesc\" | i18n }}

    \n
    \n
    \n \n {{ \"logIn\" | i18n }}\n \n \n {{ \"createAccount\" | i18n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { BaseAcceptComponent } from \"../../common/base.accept.component\";\n\nimport { AcceptOrganizationInviteService } from \"./accept-organization.service\";\nimport { OrganizationInvite } from \"./organization-invite\";\n\n@Component({\n templateUrl: \"accept-organization.component.html\",\n})\nexport class AcceptOrganizationComponent extends BaseAcceptComponent {\n orgName$ = this.acceptOrganizationInviteService.orgName$;\n protected requiredParameters: string[] = [\"organizationId\", \"organizationUserId\", \"token\"];\n\n constructor(\n router: Router,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n route: ActivatedRoute,\n authService: AuthService,\n registerRouteService: RegisterRouteService,\n private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n ) {\n super(router, platformUtilsService, i18nService, route, authService, registerRouteService);\n }\n\n async authedHandler(qParams: Params): Promise {\n const invite = OrganizationInvite.fromParams(qParams);\n const success = await this.acceptOrganizationInviteService.validateAndAcceptInvite(invite);\n\n if (!success) {\n return;\n }\n\n this.platformUtilService.showToast(\n \"success\",\n this.i18nService.t(\"inviteAccepted\"),\n invite.initOrganization\n ? this.i18nService.t(\"inviteInitAcceptedDesc\")\n : this.i18nService.t(\"inviteAcceptedDesc\"),\n { timeout: 10000 },\n );\n\n await this.router.navigate([\"/vault\"]);\n }\n\n async unauthedHandler(qParams: Params): Promise {\n const invite = OrganizationInvite.fromParams(qParams);\n await this.acceptOrganizationInviteService.setOrganizationInvitation(invite);\n await this.accelerateInviteAcceptIfPossible(invite);\n }\n\n /**\n * In certain scenarios, we want to accelerate the user through the accept org invite process\n * For example, if the user has a BW account already, we want them to be taken to login instead of creation.\n */\n private async accelerateInviteAcceptIfPossible(invite: OrganizationInvite): Promise {\n // if orgUserHasExistingUser is null, we can't determine the user's status\n // so we don't want to accelerate the process\n if (invite.orgUserHasExistingUser == null) {\n return;\n }\n\n // if user exists, send user to login\n if (invite.orgUserHasExistingUser) {\n await this.router.navigate([\"/login\"], {\n queryParams: { email: invite.email },\n });\n return;\n }\n\n if (invite.orgSsoIdentifier) {\n // We only send sso org identifier if the org has SSO enabled and the SSO policy required.\n // Will JIT provision the user.\n // Note: If the organization has Admin Recovery enabled, the user will be accepted into the org\n // upon enrollment. The user should not be returned here.\n await this.router.navigate([\"/sso\"], {\n queryParams: { email: invite.email, identifier: invite.orgSsoIdentifier },\n });\n return;\n }\n\n // if SSO is disabled OR if sso is enabled but the SSO login required policy is not enabled\n // then send user to create account\n\n // TODO: update logic when email verification flag is removed\n let queryParams: Params;\n let registerRoute = await firstValueFrom(this.registerRoute$);\n if (registerRoute === \"/register\") {\n queryParams = {\n fromOrgInvite: \"true\",\n email: invite.email,\n };\n } else if (registerRoute === \"/signup\") {\n // We have to override the base component route b/c it is correct for other components\n // that extend the base accept comp. We don't need users to complete email verification\n // if they are coming directly from an emailed org invite.\n registerRoute = \"/finish-signup\";\n queryParams = {\n email: invite.email,\n };\n }\n\n await this.router.navigate([registerRoute], {\n queryParams: queryParams,\n });\n return;\n }\n}\n","export class DeleteRecoverRequest {\n email: string;\n}\n","import { Component } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { DeleteRecoverRequest } from \"@bitwarden/common/models/request/delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-recover-delete\",\n templateUrl: \"recover-delete.component.html\",\n})\nexport class RecoverDeleteComponent {\n protected recoverDeleteForm = new FormGroup({\n email: new FormControl(\"\", [Validators.required]),\n });\n\n get email() {\n return this.recoverDeleteForm.controls.email;\n }\n\n constructor(\n private router: Router,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n ) {}\n\n submit = async () => {\n if (this.recoverDeleteForm.invalid) {\n return;\n }\n\n const request = new DeleteRecoverRequest();\n request.email = this.email.value.trim().toLowerCase();\n await this.apiService.postAccountRecoverDelete(request);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"deleteRecoverEmailSent\"),\n );\n\n await this.router.navigate([\"/\"]);\n };\n}\n","
    \n

    {{ \"deleteRecoverDesc\" | i18n }}

    \n \n {{ \"emailAddress\" | i18n }}\n \n \n
    \n
    \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorRecoveryRequest extends SecretVerificationRequest {\n recoveryCode: string;\n email: string;\n}\n","import { Component } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TwoFactorRecoveryRequest } from \"@bitwarden/common/auth/models/request/two-factor-recovery.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-recover-two-factor\",\n templateUrl: \"recover-two-factor.component.html\",\n})\nexport class RecoverTwoFactorComponent {\n protected formGroup = new FormGroup({\n email: new FormControl(null, [Validators.required]),\n masterPassword: new FormControl(null, [Validators.required]),\n recoveryCode: new FormControl(null, [Validators.required]),\n });\n\n constructor(\n private router: Router,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private cryptoService: CryptoService,\n private loginStrategyService: LoginStrategyServiceAbstraction,\n ) {}\n\n get email(): string {\n return this.formGroup.value.email;\n }\n\n get masterPassword(): string {\n return this.formGroup.value.masterPassword;\n }\n\n get recoveryCode(): string {\n return this.formGroup.value.recoveryCode;\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n\n const request = new TwoFactorRecoveryRequest();\n request.recoveryCode = this.recoveryCode.replace(/\\s/g, \"\").toLowerCase();\n request.email = this.email.trim().toLowerCase();\n const key = await this.loginStrategyService.makePreloginKey(this.masterPassword, request.email);\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(this.masterPassword, key);\n await this.apiService.postTwoFactorRecover(request);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"twoStepRecoverDisabled\"),\n );\n await this.router.navigate([\"/\"]);\n };\n}\n","
    \n

    \n {{ \"recoverAccountTwoStepDesc\" | i18n }}\n {{ \"learnMore\" | i18n }}\n

    \n \n {{ \"emailAddress\" | i18n }}\n \n \n \n {{ \"masterPass\" | i18n }}\n \n \n \n {{ \"recoveryCodeTitle\" | i18n }}\n \n \n
    \n
    \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n","import { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Directive()\nexport class RemovePasswordComponent implements OnInit {\n actionPromise: Promise;\n continuing = false;\n leaving = false;\n\n loading = true;\n organization: Organization;\n email: string;\n\n constructor(\n private router: Router,\n private accountService: AccountService,\n private syncService: SyncService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private keyConnectorService: KeyConnectorService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n this.organization = await this.keyConnectorService.getManagingOrganization();\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n await this.syncService.fullSync(false);\n this.loading = false;\n }\n\n convert = async () => {\n this.continuing = true;\n this.actionPromise = this.keyConnectorService.migrateUser();\n\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"removedMasterPassword\"),\n );\n await this.keyConnectorService.removeConvertAccountRequired();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"\"]);\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), e.message);\n }\n };\n\n leave = async () => {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.organization.name,\n content: { key: \"leaveOrganizationConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.leaving = true;\n this.actionPromise = this.organizationApiService.leave(this.organization.id);\n await this.actionPromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"leftOrganization\"));\n await this.keyConnectorService.removeConvertAccountRequired();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"\"]);\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), e);\n }\n };\n}\n","
    \n \n {{ \"loading\" | i18n }}\n
    \n\n
    \n

    {{ \"convertOrganizationEncryptionDesc\" | i18n: organization.name }}

    \n\n \n {{ \"removeMasterPassword\" | i18n }}\n \n \n {{ \"leaveOrganization\" | i18n }}\n \n
    \n","import { Component } from \"@angular/core\";\n\nimport { RemovePasswordComponent as BaseRemovePasswordComponent } from \"@bitwarden/angular/auth/components/remove-password.component\";\n\n@Component({\n selector: \"app-remove-password\",\n templateUrl: \"remove-password.component.html\",\n})\nexport class RemovePasswordComponent extends BaseRemovePasswordComponent {}\n","import { KeysRequest } from \"../../../models/request/keys.request\";\nimport { KdfType } from \"../../../platform/enums\";\n\nexport class SetPasswordRequest {\n masterPasswordHash: string;\n key: string;\n masterPasswordHint: string;\n keys: KeysRequest | null;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n orgIdentifier: string;\n\n constructor(\n masterPasswordHash: string,\n key: string,\n masterPasswordHint: string,\n orgIdentifier: string,\n keys: KeysRequest | null,\n kdf: KdfType,\n kdfIterations: number,\n kdfMemory?: number,\n kdfParallelism?: number,\n ) {\n this.masterPasswordHash = masterPasswordHash;\n this.key = key;\n this.masterPasswordHint = masterPasswordHint;\n this.kdf = kdf;\n this.kdfIterations = kdfIterations;\n this.kdfMemory = kdfMemory;\n this.kdfParallelism = kdfParallelism;\n this.orgIdentifier = orgIdentifier;\n this.keys = keys;\n }\n}\n","import { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { Subject, firstValueFrom, map, takeUntil } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { PasswordColorText } from \"../../tools/password-strength/password-strength.component\";\n\n@Directive()\nexport class ChangePasswordComponent implements OnInit, OnDestroy {\n masterPassword: string;\n masterPasswordRetype: string;\n formPromise: Promise;\n enforcedPolicyOptions: MasterPasswordPolicyOptions;\n passwordStrengthResult: any;\n color: string;\n text: string;\n leakedPassword: boolean;\n minimumLength = Utils.minimumPasswordLength;\n\n protected email: string;\n protected kdfConfig: KdfConfig;\n\n protected destroy$ = new Subject();\n\n constructor(\n protected i18nService: I18nService,\n protected cryptoService: CryptoService,\n protected messagingService: MessagingService,\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected platformUtilsService: PlatformUtilsService,\n protected policyService: PolicyService,\n protected stateService: StateService,\n protected dialogService: DialogService,\n protected kdfConfigService: KdfConfigService,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected accountService: AccountService,\n ) {}\n\n async ngOnInit() {\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n this.policyService\n .masterPasswordPolicyOptions$()\n .pipe(takeUntil(this.destroy$))\n .subscribe(\n (enforcedPasswordPolicyOptions) =>\n (this.enforcedPolicyOptions ??= enforcedPasswordPolicyOptions),\n );\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async submit() {\n if (!(await this.strongPassword())) {\n return;\n }\n\n if (!(await this.setupSubmitActions())) {\n return;\n }\n\n const email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n if (this.kdfConfig == null) {\n this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n }\n\n // Create new master key\n const newMasterKey = await this.cryptoService.makeMasterKey(\n this.masterPassword,\n email.trim().toLowerCase(),\n this.kdfConfig,\n );\n const newMasterKeyHash = await this.cryptoService.hashMasterKey(\n this.masterPassword,\n newMasterKey,\n );\n\n let newProtectedUserKey: [UserKey, EncString] = null;\n const userKey = await this.cryptoService.getUserKey();\n if (userKey == null) {\n newProtectedUserKey = await this.cryptoService.makeUserKey(newMasterKey);\n } else {\n newProtectedUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(newMasterKey);\n }\n\n await this.performSubmitActions(newMasterKeyHash, newMasterKey, newProtectedUserKey);\n }\n\n async setupSubmitActions(): Promise {\n // Override in sub-class\n // Can be used for additional validation and/or other processes the should occur before changing passwords\n return true;\n }\n\n async performSubmitActions(\n newMasterKeyHash: string,\n newMasterKey: MasterKey,\n newUserKey: [UserKey, EncString],\n ) {\n // Override in sub-class\n }\n\n async strongPassword(): Promise {\n if (this.masterPassword == null || this.masterPassword === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordRequired\"),\n );\n return false;\n }\n if (this.masterPassword.length < this.minimumLength) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordMinimumlength\", this.minimumLength),\n );\n return false;\n }\n if (this.masterPassword !== this.masterPasswordRetype) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPassDoesntMatch\"),\n );\n return false;\n }\n\n const strengthResult = this.passwordStrengthResult;\n\n if (\n this.enforcedPolicyOptions != null &&\n !this.policyService.evaluateMasterPassword(\n strengthResult.score,\n this.masterPassword,\n this.enforcedPolicyOptions,\n )\n ) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n );\n return false;\n }\n\n const weakPassword = strengthResult != null && strengthResult.score < 3;\n\n if (weakPassword && this.leakedPassword) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"weakAndExposedMasterPassword\" },\n content: { key: \"weakAndBreachedMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return false;\n }\n } else {\n if (weakPassword) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"weakMasterPassword\" },\n content: { key: \"weakMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return false;\n }\n }\n if (this.leakedPassword) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"exposedMasterPassword\" },\n content: { key: \"exposedMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n async logOut() {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"logOut\" },\n content: { key: \"logOutConfirmation\" },\n acceptButtonText: { key: \"logOut\" },\n type: \"warning\",\n });\n\n if (confirmed) {\n this.messagingService.send(\"logout\");\n }\n }\n\n getStrengthResult(result: any) {\n this.passwordStrengthResult = result;\n }\n\n getPasswordScoreText(event: PasswordColorText) {\n this.color = event.color;\n this.text = event.text;\n }\n}\n","import { Directive } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, of } from \"rxjs\";\nimport { filter, first, switchMap, tap } from \"rxjs/operators\";\n\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationUserService } from \"@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service\";\nimport { OrganizationUserResetPasswordEnrollmentRequest } from \"@bitwarden/common/admin-console/abstractions/organization-user/requests\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { OrganizationAutoEnrollStatusResponse } from \"@bitwarden/common/admin-console/models/response/organization-auto-enroll-status.response\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { DEFAULT_KDF_CONFIG } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { SetPasswordRequest } from \"@bitwarden/common/auth/models/request/set-password.request\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class SetPasswordComponent extends BaseChangePasswordComponent {\n syncLoading = true;\n showPassword = false;\n hint = \"\";\n orgSsoIdentifier: string = null;\n orgId: string;\n resetPasswordAutoEnroll = false;\n onSuccessfulChangePassword: () => Promise;\n successRoute = \"vault\";\n userId: UserId;\n\n forceSetPasswordReason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n ForceSetPasswordReason = ForceSetPasswordReason;\n\n constructor(\n accountService: AccountService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n i18nService: I18nService,\n cryptoService: CryptoService,\n messagingService: MessagingService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n platformUtilsService: PlatformUtilsService,\n private policyApiService: PolicyApiServiceAbstraction,\n policyService: PolicyService,\n protected router: Router,\n private apiService: ApiService,\n private syncService: SyncService,\n private route: ActivatedRoute,\n stateService: StateService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private organizationUserService: OrganizationUserService,\n private userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n private ssoLoginService: SsoLoginServiceAbstraction,\n dialogService: DialogService,\n kdfConfigService: KdfConfigService,\n ) {\n super(\n i18nService,\n cryptoService,\n messagingService,\n passwordGenerationService,\n platformUtilsService,\n policyService,\n stateService,\n dialogService,\n kdfConfigService,\n masterPasswordService,\n accountService,\n );\n }\n\n async ngOnInit() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n super.ngOnInit();\n\n await this.syncService.fullSync(true);\n this.syncLoading = false;\n\n this.userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n this.forceSetPasswordReason = await firstValueFrom(\n this.masterPasswordService.forceSetPasswordReason$(this.userId),\n );\n\n this.route.queryParams\n .pipe(\n first(),\n switchMap((qParams) => {\n if (qParams.identifier != null) {\n return of(qParams.identifier);\n } else {\n // Try to get orgSsoId from state as fallback\n // Note: this is primarily for the TDE user w/out MP obtains admin MP reset permission scenario.\n return this.ssoLoginService.getActiveUserOrganizationSsoIdentifier();\n }\n }),\n filter((orgSsoId) => orgSsoId != null),\n tap((orgSsoId: string) => {\n this.orgSsoIdentifier = orgSsoId;\n }),\n switchMap((orgSsoId: string) => this.organizationApiService.getAutoEnrollStatus(orgSsoId)),\n tap((orgAutoEnrollStatusResponse: OrganizationAutoEnrollStatusResponse) => {\n this.orgId = orgAutoEnrollStatusResponse.id;\n this.resetPasswordAutoEnroll = orgAutoEnrollStatusResponse.resetPasswordEnabled;\n }),\n switchMap((orgAutoEnrollStatusResponse: OrganizationAutoEnrollStatusResponse) =>\n // Must get org id from response to get master password policy options\n this.policyApiService.getMasterPasswordPolicyOptsForOrgUser(\n orgAutoEnrollStatusResponse.id,\n ),\n ),\n tap((masterPasswordPolicyOptions: MasterPasswordPolicyOptions) => {\n this.enforcedPolicyOptions = masterPasswordPolicyOptions;\n }),\n )\n .subscribe({\n error: () => {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n },\n });\n }\n\n async setupSubmitActions() {\n this.kdfConfig = DEFAULT_KDF_CONFIG;\n return true;\n }\n\n async performSubmitActions(\n masterPasswordHash: string,\n masterKey: MasterKey,\n userKey: [UserKey, EncString],\n ) {\n let keysRequest: KeysRequest | null = null;\n let newKeyPair: [string, EncString] | null = null;\n\n if (\n this.forceSetPasswordReason !=\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission\n ) {\n // Existing JIT provisioned user in a MP encryption org setting first password\n // Users in this state will not already have a user asymmetric key pair so must create it for them\n // We don't want to re-create the user key pair if the user already has one (TDE user case)\n newKeyPair = await this.cryptoService.makeKeyPair(userKey[0]);\n keysRequest = new KeysRequest(newKeyPair[0], newKeyPair[1].encryptedString);\n }\n\n const request = new SetPasswordRequest(\n masterPasswordHash,\n userKey[1].encryptedString,\n this.hint,\n this.orgSsoIdentifier,\n keysRequest,\n this.kdfConfig.kdfType, //always PBKDF2 --> see this.setupSubmitActions\n this.kdfConfig.iterations,\n );\n try {\n if (this.resetPasswordAutoEnroll) {\n this.formPromise = this.apiService\n .setPassword(request)\n .then(async () => {\n await this.onSetPasswordSuccess(masterKey, userKey, newKeyPair);\n return this.organizationApiService.getKeys(this.orgId);\n })\n .then(async (response) => {\n if (response == null) {\n throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n }\n const publicKey = Utils.fromB64ToArray(response.publicKey);\n\n // RSA Encrypt user key with organization public key\n const userKey = await this.cryptoService.getUserKey();\n const encryptedUserKey = await this.cryptoService.rsaEncrypt(userKey.key, publicKey);\n\n const resetRequest = new OrganizationUserResetPasswordEnrollmentRequest();\n resetRequest.masterPasswordHash = masterPasswordHash;\n resetRequest.resetPasswordKey = encryptedUserKey.encryptedString;\n\n return this.organizationUserService.putOrganizationUserResetPasswordEnrollment(\n this.orgId,\n this.userId,\n resetRequest,\n );\n });\n } else {\n this.formPromise = this.apiService.setPassword(request).then(async () => {\n await this.onSetPasswordSuccess(masterKey, userKey, newKeyPair);\n });\n }\n\n await this.formPromise;\n\n if (this.onSuccessfulChangePassword != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulChangePassword();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute]);\n }\n } catch {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n }\n }\n\n togglePassword(confirmField: boolean) {\n this.showPassword = !this.showPassword;\n document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n }\n\n protected async onSetPasswordSuccess(\n masterKey: MasterKey,\n userKey: [UserKey, EncString],\n keyPair: [string, EncString] | null,\n ) {\n // Clear force set password reason to allow navigation back to vault.\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.None,\n this.userId,\n );\n\n // User now has a password so update account decryption options in state\n const userDecryptionOpts = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptions$,\n );\n userDecryptionOpts.hasMasterPassword = true;\n await this.userDecryptionOptionsService.setUserDecryptionOptions(userDecryptionOpts);\n await this.kdfConfigService.setKdfConfig(this.userId, this.kdfConfig);\n await this.masterPasswordService.setMasterKey(masterKey, this.userId);\n await this.cryptoService.setUserKey(userKey[0], this.userId);\n\n // Set private key only for new JIT provisioned users in MP encryption orgs\n // Existing TDE users will have private key set on sync or on login\n if (\n keyPair !== null &&\n this.forceSetPasswordReason !=\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission\n ) {\n await this.cryptoService.setPrivateKey(keyPair[1].encryptedString, this.userId);\n }\n\n const localMasterKeyHash = await this.cryptoService.hashMasterKey(\n this.masterPassword,\n masterKey,\n HashPurpose.LocalAuthorization,\n );\n await this.masterPasswordService.setMasterKeyHash(localMasterKeyHash, this.userId);\n }\n}\n","
    \n
    \n
    \n

    {{ \"setMasterPassword\" | i18n }}

    \n
    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n {{ \"orgPermissionsUpdatedMustSetPassword\" | i18n }}\n

    \n\n \n

    {{ \"orgRequiresYouToSetPassword\" | i18n }}

    \n
    \n\n \n {{ \"resetPasswordAutoEnrollInviteWarning\" | i18n }}\n \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n {{ \"masterPassDesc\" | i18n }}\n
    \n
    \n \n
    \n \n \n \n \n
    \n
    \n
    \n \n \n {{ \"masterPassHintDesc\" | i18n }}\n
    \n
    \n
    \n \n \n {{ \"submit\" | i18n }}\n \n \n {{ \"logOut\" | i18n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n","import { Component, inject } from \"@angular/core\";\n\nimport { SetPasswordComponent as BaseSetPasswordComponent } from \"@bitwarden/angular/auth/components/set-password.component\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\n\nimport { RouterService } from \"../core\";\n\nimport { AcceptOrganizationInviteService } from \"./organization-invite/accept-organization.service\";\n\n@Component({\n selector: \"app-set-password\",\n templateUrl: \"set-password.component.html\",\n})\nexport class SetPasswordComponent extends BaseSetPasswordComponent {\n routerService = inject(RouterService);\n acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n protected override async onSetPasswordSuccess(\n masterKey: MasterKey,\n userKey: [UserKey, EncString],\n keyPair: [string, EncString],\n ): Promise {\n await super.onSetPasswordSuccess(masterKey, userKey, keyPair);\n // SSO JIT accepts org invites when setting their MP, meaning\n // we can clear the deep linked url for accepting it.\n await this.routerService.getAndClearLoginRedirectUrl();\n await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n }\n}\n","import { Component } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-deauthorize-sessions\",\n templateUrl: \"deauthorize-sessions.component.html\",\n})\nexport class DeauthorizeSessionsComponent {\n masterPassword: Verification;\n formPromise: Promise;\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private userVerificationService: UserVerificationService,\n private messagingService: MessagingService,\n private logService: LogService,\n ) {}\n\n async submit() {\n try {\n this.formPromise = this.userVerificationService\n .buildRequest(this.masterPassword)\n .then((request) => this.apiService.postSecurityStamp(request));\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"sessionsDeauthorized\"),\n this.i18nService.t(\"logBackIn\"),\n );\n this.messagingService.send(\"logout\");\n } catch (e) {\n this.logService.error(e);\n }\n }\n}\n","
    \n
    \n \n
    \n

    {{ \"deauthorizeSessions\" | i18n }}

    \n \n ×\n \n
    \n
    \n

    {{ \"deauthorizeSessionsDesc\" | i18n }}

    \n {{ \"deauthorizeSessionsWarning\" | i18n }}\n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n templateUrl: \"delete-account-dialog.component.html\",\n})\nexport class DeleteAccountDialogComponent {\n deleteForm = this.formBuilder.group({\n verification: undefined as Verification | undefined,\n });\n invalidSecret: boolean = false;\n\n constructor(\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private formBuilder: FormBuilder,\n private accountApiService: AccountApiService,\n private dialogRef: DialogRef,\n ) {}\n\n submit = async () => {\n try {\n const verification = this.deleteForm.get(\"verification\").value;\n await this.accountApiService.deleteAccount(verification);\n this.dialogRef.close();\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"accountDeleted\"),\n this.i18nService.t(\"accountDeletedDesc\"),\n );\n } catch (e) {\n if (e instanceof ErrorResponse && e.statusCode === 400) {\n this.invalidSecret = true;\n }\n throw e;\n }\n };\n\n static open(dialogService: DialogService) {\n return dialogService.open(DeleteAccountDialogComponent);\n }\n}\n","
    \n \n \n

    {{ \"deleteAccountDesc\" | i18n }}

    \n {{ \"deleteAccountWarning\" | i18n }}\n \n
    \n \n \n \n \n
    \n
    \n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class EmailTokenRequest extends SecretVerificationRequest {\n newEmail: string;\n masterPasswordHash: string;\n}\n","import { EmailTokenRequest } from \"./email-token.request\";\n\nexport class EmailRequest extends EmailTokenRequest {\n newMasterPasswordHash: string;\n token: string;\n key: string;\n}\n","
    \n \n {{ \"changeEmailTwoFactorWarning\" | i18n }}\n \n\n
    \n \n {{ \"masterPass\" | i18n }}\n \n \n \n \n {{ \"newEmail\" | i18n }}\n \n \n
    \n\n \n
    \n

    {{ \"changeEmailDesc\" | i18n: formGroup.controls.step1.value.newEmail }}

    \n {{ \"loggedOutWarning\" | i18n }}\n\n
    \n \n {{ \"code\" | i18n }}\n \n \n
    \n
    \n\n \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EmailTokenRequest } from \"@bitwarden/common/auth/models/request/email-token.request\";\nimport { EmailRequest } from \"@bitwarden/common/auth/models/request/email.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\n\n@Component({\n selector: \"app-change-email\",\n templateUrl: \"change-email.component.html\",\n})\nexport class ChangeEmailComponent implements OnInit {\n tokenSent = false;\n showTwoFactorEmailWarning = false;\n\n protected formGroup = this.formBuilder.group({\n step1: this.formBuilder.group({\n masterPassword: [\"\", [Validators.required]],\n newEmail: [\"\", [Validators.required, Validators.email]],\n }),\n token: [{ value: \"\", disabled: true }, [Validators.required]],\n });\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private cryptoService: CryptoService,\n private messagingService: MessagingService,\n private logService: LogService,\n private stateService: StateService,\n private formBuilder: FormBuilder,\n private kdfConfigService: KdfConfigService,\n ) {}\n\n async ngOnInit() {\n const twoFactorProviders = await this.apiService.getTwoFactorProviders();\n this.showTwoFactorEmailWarning = twoFactorProviders.data.some(\n (p) => p.type === TwoFactorProviderType.Email && p.enabled,\n );\n }\n\n protected submit = async () => {\n // This form has multiple steps, so we need to mark all the groups as touched.\n this.formGroup.controls.step1.markAllAsTouched();\n\n if (this.tokenSent) {\n this.formGroup.controls.token.markAllAsTouched();\n }\n\n // Exit if the form is invalid.\n if (this.formGroup.invalid) {\n return;\n }\n\n const step1Value = this.formGroup.controls.step1.value;\n const newEmail = step1Value.newEmail.trim().toLowerCase();\n\n if (!this.tokenSent) {\n const request = new EmailTokenRequest();\n request.newEmail = newEmail;\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(\n step1Value.masterPassword,\n await this.cryptoService.getOrDeriveMasterKey(step1Value.masterPassword),\n );\n try {\n await this.apiService.postEmailToken(request);\n this.activateStep2();\n } catch (e) {\n this.logService.error(e);\n }\n } else {\n const request = new EmailRequest();\n request.token = this.formGroup.value.token;\n request.newEmail = newEmail;\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(\n step1Value.masterPassword,\n await this.cryptoService.getOrDeriveMasterKey(step1Value.masterPassword),\n );\n const kdfConfig = await this.kdfConfigService.getKdfConfig();\n const newMasterKey = await this.cryptoService.makeMasterKey(\n step1Value.masterPassword,\n newEmail,\n kdfConfig,\n );\n request.newMasterPasswordHash = await this.cryptoService.hashMasterKey(\n step1Value.masterPassword,\n newMasterKey,\n );\n const newUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(newMasterKey);\n request.key = newUserKey[1].encryptedString;\n try {\n await this.apiService.postEmail(request);\n this.reset();\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"emailChanged\"),\n this.i18nService.t(\"logBackIn\"),\n );\n this.messagingService.send(\"logout\");\n } catch (e) {\n this.logService.error(e);\n }\n }\n };\n\n // Disable step1 and enable token\n activateStep2() {\n this.formGroup.controls.step1.disable();\n this.formGroup.controls.token.enable();\n\n this.tokenSent = true;\n }\n\n // Reset form and re-enable step1\n reset() {\n this.formGroup.reset();\n this.formGroup.controls.step1.enable();\n this.formGroup.controls.token.disable();\n\n this.tokenSent = false;\n }\n}\n","\n\n\n \n\n
    \n

    {{ \"changeEmail\" | i18n }}

    \n \n
    \n\n \n \n \n \n \n\n \n \n \n
    \n","import { Component, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PurgeVaultComponent } from \"../../../vault/settings/purge-vault.component\";\n\nimport { DeauthorizeSessionsComponent } from \"./deauthorize-sessions.component\";\nimport { DeleteAccountDialogComponent } from \"./delete-account-dialog.component\";\n\n@Component({\n selector: \"app-account\",\n templateUrl: \"account.component.html\",\n})\nexport class AccountComponent {\n @ViewChild(\"deauthorizeSessionsTemplate\", { read: ViewContainerRef, static: true })\n deauthModalRef: ViewContainerRef;\n\n showChangeEmail = true;\n\n constructor(\n private modalService: ModalService,\n private dialogService: DialogService,\n private userVerificationService: UserVerificationService,\n ) {}\n\n async ngOnInit() {\n this.showChangeEmail = await this.userVerificationService.hasMasterPassword();\n }\n\n async deauthorizeSessions() {\n await this.modalService.openViewRef(DeauthorizeSessionsComponent, this.deauthModalRef);\n }\n\n purgeVault = async () => {\n const dialogRef = PurgeVaultComponent.open(this.dialogService);\n await lastValueFrom(dialogRef.closed);\n };\n\n deleteAccount = async () => {\n const dialogRef = DeleteAccountDialogComponent.open(this.dialogService);\n await lastValueFrom(dialogRef.closed);\n };\n}\n","export enum EmergencyAccessType {\n View = 0,\n Takeover = 1,\n}\n","import { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { CipherResponse } from \"@bitwarden/common/vault/models/response/cipher.response\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class GranteeEmergencyAccess {\n id: string;\n granteeId: string;\n name: string;\n email: string;\n type: EmergencyAccessType;\n status: EmergencyAccessStatusType;\n waitTimeDays: number;\n creationDate: string;\n avatarColor: string;\n}\n\nexport class GrantorEmergencyAccess {\n id: string;\n grantorId: string;\n name: string;\n email: string;\n type: EmergencyAccessType;\n status: EmergencyAccessStatusType;\n waitTimeDays: number;\n creationDate: string;\n avatarColor: string;\n}\n\nexport class TakeoverTypeEmergencyAccess {\n keyEncrypted: string;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n}\n\nexport class ViewTypeEmergencyAccess {\n keyEncrypted: string;\n ciphers: CipherResponse[] = [];\n}\n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, OnInit, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport enum EmergencyAccessConfirmDialogResult {\n Confirmed = \"confirmed\",\n}\ntype EmergencyAccessConfirmDialogData = {\n /** display name of the account requesting emergency access */\n name: string;\n /** identifies the account requesting emergency access */\n userId: string;\n /** traces a unique emergency request */\n emergencyAccessId: string;\n};\n@Component({\n selector: \"emergency-access-confirm\",\n templateUrl: \"emergency-access-confirm.component.html\",\n})\nexport class EmergencyAccessConfirmComponent implements OnInit {\n loading = true;\n fingerprint: string;\n confirmForm = this.formBuilder.group({\n dontAskAgain: [false],\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected params: EmergencyAccessConfirmDialogData,\n private formBuilder: FormBuilder,\n private apiService: ApiService,\n private cryptoService: CryptoService,\n protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n private logService: LogService,\n private dialogRef: DialogRef,\n ) {}\n\n async ngOnInit() {\n try {\n const publicKeyResponse = await this.apiService.getUserPublicKey(this.params.userId);\n if (publicKeyResponse != null) {\n const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n const fingerprint = await this.cryptoService.getFingerprint(this.params.userId, publicKey);\n if (fingerprint != null) {\n this.fingerprint = fingerprint.join(\"-\");\n }\n }\n } catch (e) {\n this.logService.error(e);\n }\n this.loading = false;\n }\n\n submit = async () => {\n if (this.loading) {\n return;\n }\n\n if (this.confirmForm.get(\"dontAskAgain\").value) {\n await this.organizationManagementPreferencesService.autoConfirmFingerPrints.set(true);\n }\n\n try {\n this.dialogRef.close(EmergencyAccessConfirmDialogResult.Confirmed);\n } catch (e) {\n this.logService.error(e);\n }\n };\n /**\n * Strongly typed helper to open a EmergencyAccessConfirmComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open(\n dialogService: DialogService,\n config: DialogConfig,\n ) {\n return dialogService.open(\n EmergencyAccessConfirmComponent,\n config,\n );\n }\n}\n","
    \n \n \n {{ \"confirmUser\" | i18n }}\n {{ params.name }}\n \n
    \n

    \n {{ \"fingerprintEnsureIntegrityVerify\" | i18n }}\n \n {{ \"learnMore\" | i18n }}\n

    \n

    \n {{ fingerprint }}\n

    \n\n \n \n {{ \"dontAskFingerprintAgain\" | i18n }}\n \n
    \n
    \n \n \n
    \n
    \n
    \n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { EmergencyAccessService } from \"../../emergency-access\";\nimport { EmergencyAccessType } from \"../../emergency-access/enums/emergency-access-type\";\n\nexport type EmergencyAccessAddEditDialogData = {\n /** display name of the account requesting emergency access */\n name: string;\n /** traces a unique emergency request */\n emergencyAccessId: string;\n /** A boolean indicating whether the emergency access request is in read-only mode (true for view-only, false for editing). */\n readOnly: boolean;\n};\n\nexport enum EmergencyAccessAddEditDialogResult {\n Saved = \"saved\",\n Canceled = \"canceled\",\n Deleted = \"deleted\",\n}\n@Component({\n selector: \"emergency-access-add-edit\",\n templateUrl: \"emergency-access-add-edit.component.html\",\n})\nexport class EmergencyAccessAddEditComponent implements OnInit {\n loading = true;\n readOnly = false;\n editMode = false;\n title: string;\n type: EmergencyAccessType = EmergencyAccessType.View;\n\n emergencyAccessType = EmergencyAccessType;\n waitTimes: { name: string; value: number }[];\n\n addEditForm = this.formBuilder.group({\n email: [\"\", [Validators.email, Validators.required]],\n emergencyAccessType: [this.emergencyAccessType.View],\n waitTime: [{ value: null, disabled: this.readOnly }, [Validators.required]],\n });\n constructor(\n @Inject(DIALOG_DATA) protected params: EmergencyAccessAddEditDialogData,\n private formBuilder: FormBuilder,\n private emergencyAccessService: EmergencyAccessService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private logService: LogService,\n private dialogRef: DialogRef,\n ) {}\n async ngOnInit() {\n this.editMode = this.loading = this.params.emergencyAccessId != null;\n this.waitTimes = [\n { name: this.i18nService.t(\"oneDay\"), value: 1 },\n { name: this.i18nService.t(\"days\", \"2\"), value: 2 },\n { name: this.i18nService.t(\"days\", \"7\"), value: 7 },\n { name: this.i18nService.t(\"days\", \"14\"), value: 14 },\n { name: this.i18nService.t(\"days\", \"30\"), value: 30 },\n { name: this.i18nService.t(\"days\", \"90\"), value: 90 },\n ];\n\n if (this.editMode) {\n this.title = this.i18nService.t(\"editEmergencyContact\");\n try {\n const emergencyAccess = await this.emergencyAccessService.getEmergencyAccess(\n this.params.emergencyAccessId,\n );\n this.addEditForm.patchValue({\n email: emergencyAccess.email,\n waitTime: emergencyAccess.waitTimeDays,\n emergencyAccessType: emergencyAccess.type,\n });\n } catch (e) {\n this.logService.error(e);\n }\n } else {\n this.title = this.i18nService.t(\"inviteEmergencyContact\");\n this.addEditForm.patchValue({ waitTime: this.waitTimes[2].value });\n }\n\n this.loading = false;\n }\n\n submit = async () => {\n if (this.addEditForm.invalid) {\n this.addEditForm.markAllAsTouched();\n return;\n }\n try {\n if (this.editMode) {\n await this.emergencyAccessService.update(\n this.params.emergencyAccessId,\n this.addEditForm.value.emergencyAccessType,\n this.addEditForm.value.waitTime,\n );\n } else {\n await this.emergencyAccessService.invite(\n this.addEditForm.value.email,\n this.addEditForm.value.emergencyAccessType,\n this.addEditForm.value.waitTime,\n );\n }\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.editMode ? \"editedUserId\" : \"invitedUsers\", this.params.name),\n );\n this.dialogRef.close(EmergencyAccessAddEditDialogResult.Saved);\n } catch (e) {\n this.logService.error(e);\n }\n };\n\n delete = async () => {\n this.dialogRef.close(EmergencyAccessAddEditDialogResult.Deleted);\n };\n /**\n * Strongly typed helper to open a EmergencyAccessAddEditComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open = (\n dialogService: DialogService,\n config: DialogConfig,\n ) => {\n return dialogService.open(\n EmergencyAccessAddEditComponent,\n config,\n );\n };\n}\n","
    \n \n \n \n {{ title }}\n {{ params.name }}\n \n \n \n

    {{ \"inviteEmergencyContactDesc\" | i18n }}

    \n \n {{ \"email\" | i18n }}\n \n \n
    \n \n \n {{ \"userAccess\" | i18n }}\n \n \n \n \n \n {{ \"view\" | i18n }}\n {{ \"viewDesc\" | i18n }}\n \n\n \n {{ \"takeover\" | i18n }}\n {{ \"takeoverDesc\" | i18n }}\n \n \n\n \n {{ \"waitTime\" | i18n }}\n \n \n \n {{ \"waitTimeDesc\" | i18n }}\n \n
    \n \n \n \n \n \n
    \n
    \n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, OnDestroy, OnInit, Inject, Input } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { takeUntil } from \"rxjs\";\n\nimport { ChangePasswordComponent } from \"@bitwarden/angular/auth/components/change-password.component\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { EmergencyAccessService } from \"../../../emergency-access\";\n\nexport enum EmergencyAccessTakeoverResultType {\n Done = \"done\",\n}\ntype EmergencyAccessTakeoverDialogData = {\n /** display name of the account requesting emergency access takeover */\n name: string;\n /** email of the account requesting emergency access takeover */\n email: string;\n /** traces a unique emergency request */\n emergencyAccessId: string;\n};\n@Component({\n selector: \"emergency-access-takeover\",\n templateUrl: \"emergency-access-takeover.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessTakeoverComponent\n extends ChangePasswordComponent\n implements OnInit, OnDestroy\n{\n @Input() kdf: KdfType;\n @Input() kdfIterations: number;\n takeoverForm = this.formBuilder.group({\n masterPassword: [\"\", [Validators.required]],\n masterPasswordRetype: [\"\", [Validators.required]],\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected params: EmergencyAccessTakeoverDialogData,\n private formBuilder: FormBuilder,\n i18nService: I18nService,\n cryptoService: CryptoService,\n messagingService: MessagingService,\n stateService: StateService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n platformUtilsService: PlatformUtilsService,\n policyService: PolicyService,\n private emergencyAccessService: EmergencyAccessService,\n private logService: LogService,\n dialogService: DialogService,\n private dialogRef: DialogRef,\n kdfConfigService: KdfConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n ) {\n super(\n i18nService,\n cryptoService,\n messagingService,\n passwordGenerationService,\n platformUtilsService,\n policyService,\n stateService,\n dialogService,\n kdfConfigService,\n masterPasswordService,\n accountService,\n );\n }\n\n async ngOnInit() {\n const policies = await this.emergencyAccessService.getGrantorPolicies(\n this.params.emergencyAccessId,\n );\n this.policyService\n .masterPasswordPolicyOptions$(policies)\n .pipe(takeUntil(this.destroy$))\n .subscribe((enforcedPolicyOptions) => (this.enforcedPolicyOptions = enforcedPolicyOptions));\n }\n\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n\n submit = async () => {\n if (this.takeoverForm.invalid) {\n this.takeoverForm.markAllAsTouched();\n return;\n }\n this.masterPassword = this.takeoverForm.get(\"masterPassword\").value;\n this.masterPasswordRetype = this.takeoverForm.get(\"masterPasswordRetype\").value;\n if (!(await this.strongPassword())) {\n return;\n }\n\n try {\n await this.emergencyAccessService.takeover(\n this.params.emergencyAccessId,\n this.masterPassword,\n this.params.email,\n );\n } catch (e) {\n this.logService.error(e);\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"unexpectedError\"),\n );\n }\n this.dialogRef.close(EmergencyAccessTakeoverResultType.Done);\n };\n /**\n * Strongly typed helper to open a EmergencyAccessTakeoverComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\n static open = (\n dialogService: DialogService,\n config: DialogConfig,\n ) => {\n return dialogService.open(\n EmergencyAccessTakeoverComponent,\n config,\n );\n };\n}\n","
    \n \n \n {{ \"takeover\" | i18n }}\n {{ params.name }}\n \n
    \n {{ \"loggedOutWarning\" | i18n }}\n \n \n
    \n
    \n \n {{ \"newMasterPass\" | i18n }}\n \n \n \n \n \n
    \n
    \n \n {{ \"confirmNewMasterPass\" | i18n }}\n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n","\n\n \n

    \n {{ \"emergencyAccessDesc\" | i18n }}\n \n {{ \"learnMore\" | i18n }}.\n \n

    \n {{\n \"emergencyAccessOwnerWarning\" | i18n\n }}\n
    \n \n
    \n

    \n {{ \"trustedEmergencyContacts\" | i18n }}\n

    \n \n
    \n \n \n {{ \"addEmergencyContact\" | i18n }}\n \n
    \n
    \n \n \n \n {{ \"name\" | i18n }}\n {{ \"accessLevel\" | i18n }}\n {{ \"options\" | i18n }}\n \n \n \n \n \n \n \n {{ c.email }}\n {{ \"invited\" | i18n }}\n {{ \"needsConfirmation\" | i18n }}\n {{ \"emergencyAccessRecoveryInitiated\" | i18n }}\n {{\n \"emergencyAccessRecoveryApproved\" | i18n\n }}\n\n {{ c.name }}\n \n \n \n {{ \"view\" | i18n }}\n {{\n \"takeover\" | i18n\n }}\n \n \n \n \n \n \n {{ \"resendInvitation\" | i18n }}\n \n \n \n {{ \"confirm\" | i18n }}\n \n \n \n {{ \"approve\" | i18n }}\n \n \n \n {{ \"reject\" | i18n }}\n \n \n \n \n \n \n \n \n

    {{ \"noTrustedContacts\" | i18n }}

    \n \n \n {{ \"loading\" | i18n }}\n \n
    \n
    \n\n \n

    {{ \"designatedEmergencyContacts\" | i18n }}

    \n\n \n \n \n {{ \"name\" | i18n }}\n {{ \"accessLevel\" | i18n }}\n {{ \"options\" | i18n }}\n \n \n \n \n \n \n \n {{ c.email }}\n {{\n \"invited\" | i18n\n }}\n {{ \"needsConfirmation\" | i18n }}\n {{ \"emergencyAccessRecoveryInitiated\" | i18n }}\n {{ \"emergencyAccessRecoveryApproved\" | i18n }}\n\n {{ c.name }}\n \n \n \n {{ \"view\" | i18n }}\n {{\n \"takeover\" | i18n\n }}\n \n \n \n \n \n \n {{ \"requestAccess\" | i18n }}\n \n \n \n {{ \"takeover\" | i18n }}\n \n \n \n {{ \"view\" | i18n }}\n \n \n \n \n \n \n \n \n

    {{ \"noGrantedAccess\" | i18n }}

    \n \n \n {{ \"loading\" | i18n }}\n \n
    \n
    \n
    \n\n\n\n\n","import { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { lastValueFrom, Observable, firstValueFrom } from \"rxjs\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { EmergencyAccessService } from \"../../emergency-access\";\nimport { EmergencyAccessStatusType } from \"../../emergency-access/enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../../emergency-access/enums/emergency-access-type\";\nimport {\n GranteeEmergencyAccess,\n GrantorEmergencyAccess,\n} from \"../../emergency-access/models/emergency-access\";\n\nimport {\n EmergencyAccessConfirmComponent,\n EmergencyAccessConfirmDialogResult,\n} from \"./confirm/emergency-access-confirm.component\";\nimport {\n EmergencyAccessAddEditComponent,\n EmergencyAccessAddEditDialogResult,\n} from \"./emergency-access-add-edit.component\";\nimport {\n EmergencyAccessTakeoverComponent,\n EmergencyAccessTakeoverResultType,\n} from \"./takeover/emergency-access-takeover.component\";\n\n@Component({\n selector: \"emergency-access\",\n templateUrl: \"emergency-access.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessComponent implements OnInit {\n @ViewChild(\"addEdit\", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;\n @ViewChild(\"takeoverTemplate\", { read: ViewContainerRef, static: true })\n takeoverModalRef: ViewContainerRef;\n @ViewChild(\"confirmTemplate\", { read: ViewContainerRef, static: true })\n confirmModalRef: ViewContainerRef;\n\n loaded = false;\n canAccessPremium$: Observable;\n trustedContacts: GranteeEmergencyAccess[];\n grantedContacts: GrantorEmergencyAccess[];\n emergencyAccessType = EmergencyAccessType;\n emergencyAccessStatusType = EmergencyAccessStatusType;\n actionPromise: Promise;\n isOrganizationOwner: boolean;\n\n constructor(\n private emergencyAccessService: EmergencyAccessService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private messagingService: MessagingService,\n private userNamePipe: UserNamePipe,\n private logService: LogService,\n private stateService: StateService,\n private organizationService: OrganizationService,\n protected dialogService: DialogService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n ) {\n this.canAccessPremium$ = billingAccountProfileStateService.hasPremiumFromAnySource$;\n }\n\n async ngOnInit() {\n const orgs = await this.organizationService.getAll();\n this.isOrganizationOwner = orgs.some((o) => o.isOwner);\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.load();\n }\n\n async load() {\n this.trustedContacts = await this.emergencyAccessService.getEmergencyAccessTrusted();\n this.grantedContacts = await this.emergencyAccessService.getEmergencyAccessGranted();\n this.loaded = true;\n }\n\n async premiumRequired() {\n const canAccessPremium = await firstValueFrom(this.canAccessPremium$);\n\n if (!canAccessPremium) {\n this.messagingService.send(\"premiumRequired\");\n return;\n }\n }\n\n edit = async (details: GranteeEmergencyAccess) => {\n const canAccessPremium = await firstValueFrom(this.canAccessPremium$);\n const dialogRef = EmergencyAccessAddEditComponent.open(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(details),\n emergencyAccessId: details?.id,\n readOnly: !canAccessPremium,\n },\n });\n\n const result = await lastValueFrom(dialogRef.closed);\n if (result === EmergencyAccessAddEditDialogResult.Saved) {\n await this.load();\n } else if (result === EmergencyAccessAddEditDialogResult.Deleted) {\n await this.remove(details);\n }\n };\n\n invite = async () => {\n await this.edit(null);\n };\n\n async reinvite(contact: GranteeEmergencyAccess) {\n if (this.actionPromise != null) {\n return;\n }\n this.actionPromise = this.emergencyAccessService.reinvite(contact.id);\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"hasBeenReinvited\", contact.email),\n );\n this.actionPromise = null;\n }\n\n async confirm(contact: GranteeEmergencyAccess) {\n function updateUser() {\n contact.status = EmergencyAccessStatusType.Confirmed;\n }\n\n if (this.actionPromise != null) {\n return;\n }\n\n const autoConfirm = await firstValueFrom(\n this.organizationManagementPreferencesService.autoConfirmFingerPrints.state$,\n );\n if (autoConfirm == null || !autoConfirm) {\n const dialogRef = EmergencyAccessConfirmComponent.open(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(contact),\n emergencyAccessId: contact.id,\n userId: contact?.granteeId,\n },\n });\n const result = await lastValueFrom(dialogRef.closed);\n if (result === EmergencyAccessConfirmDialogResult.Confirmed) {\n await this.emergencyAccessService.confirm(contact.id, contact.granteeId);\n updateUser();\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(contact)),\n );\n }\n return;\n }\n\n this.actionPromise = this.emergencyAccessService.confirm(contact.id, contact.granteeId);\n await this.actionPromise;\n updateUser();\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(contact)),\n );\n this.actionPromise = null;\n }\n\n async remove(details: GranteeEmergencyAccess | GrantorEmergencyAccess) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.userNamePipe.transform(details),\n content: { key: \"removeUserConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n await this.emergencyAccessService.delete(details.id);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"removedUserId\", this.userNamePipe.transform(details)),\n );\n\n if (details instanceof GranteeEmergencyAccess) {\n this.removeGrantee(details);\n } else {\n this.removeGrantor(details);\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async requestAccess(details: GrantorEmergencyAccess) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.userNamePipe.transform(details),\n content: {\n key: \"requestAccessConfirmation\",\n placeholders: [details.waitTimeDays.toString()],\n },\n acceptButtonText: { key: \"requestAccess\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n await this.emergencyAccessService.requestAccess(details.id);\n\n details.status = EmergencyAccessStatusType.RecoveryInitiated;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"requestSent\", this.userNamePipe.transform(details)),\n );\n }\n\n async approve(details: GranteeEmergencyAccess) {\n const type = this.i18nService.t(\n details.type === EmergencyAccessType.View ? \"view\" : \"takeover\",\n );\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.userNamePipe.transform(details),\n content: {\n key: \"approveAccessConfirmation\",\n placeholders: [this.userNamePipe.transform(details), type],\n },\n acceptButtonText: { key: \"approve\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n await this.emergencyAccessService.approve(details.id);\n details.status = EmergencyAccessStatusType.RecoveryApproved;\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"emergencyApproved\", this.userNamePipe.transform(details)),\n );\n }\n\n async reject(details: GranteeEmergencyAccess) {\n await this.emergencyAccessService.reject(details.id);\n details.status = EmergencyAccessStatusType.Confirmed;\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"emergencyRejected\", this.userNamePipe.transform(details)),\n );\n }\n\n takeover = async (details: GrantorEmergencyAccess) => {\n const dialogRef = EmergencyAccessTakeoverComponent.open(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(details),\n email: details.email,\n emergencyAccessId: details.id ?? null,\n },\n });\n const result = await lastValueFrom(dialogRef.closed);\n if (result === EmergencyAccessTakeoverResultType.Done) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"passwordResetFor\", this.userNamePipe.transform(details)),\n );\n }\n };\n\n private removeGrantee(details: GranteeEmergencyAccess) {\n const index = this.trustedContacts.indexOf(details);\n if (index > -1) {\n this.trustedContacts.splice(index, 1);\n }\n }\n\n private removeGrantor(details: GrantorEmergencyAccess) {\n const index = this.grantedContacts.indexOf(details);\n if (index > -1) {\n this.grantedContacts.splice(index, 1);\n }\n }\n}\n","import { Component } from \"@angular/core\";\n\nimport { AttachmentsComponent as BaseAttachmentsComponent } from \"@bitwarden/angular/vault/components/attachments.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"emergency-access-attachments\",\n templateUrl: \"../../../../vault/individual-vault/attachments.component.html\",\n})\nexport class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponent {\n viewOnly = true;\n canAccessAttachments = true;\n\n constructor(\n cipherService: CipherService,\n i18nService: I18nService,\n cryptoService: CryptoService,\n stateService: StateService,\n platformUtilsService: PlatformUtilsService,\n apiService: ApiService,\n logService: LogService,\n fileDownloadService: FileDownloadService,\n dialogService: DialogService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n super(\n cipherService,\n i18nService,\n cryptoService,\n platformUtilsService,\n apiService,\n window,\n logService,\n stateService,\n fileDownloadService,\n dialogService,\n billingAccountProfileStateService,\n );\n }\n\n protected async init() {\n // Do nothing since cipher is already decoded\n }\n\n protected showFixOldAttachments(attachment: AttachmentView) {\n return false;\n }\n}\n","import { DatePipe } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"../../../../vault/individual-vault/add-edit.component\";\n\n@Component({\n selector: \"app-org-vault-add-edit\",\n templateUrl: \"../../../../vault/individual-vault/add-edit.component.html\",\n})\nexport class EmergencyAddEditCipherComponent extends BaseAddEditComponent {\n originalCipher: Cipher = null;\n viewOnly = true;\n protected override componentName = \"app-org-vault-add-edit\";\n\n constructor(\n cipherService: CipherService,\n folderService: FolderService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n auditService: AuditService,\n accountService: AccountService,\n collectionService: CollectionService,\n totpService: TotpService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n messagingService: MessagingService,\n eventCollectionService: EventCollectionService,\n policyService: PolicyService,\n passwordRepromptService: PasswordRepromptService,\n organizationService: OrganizationService,\n logService: LogService,\n sendApiService: SendApiService,\n dialogService: DialogService,\n datePipe: DatePipe,\n configService: ConfigService,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {\n super(\n cipherService,\n folderService,\n i18nService,\n platformUtilsService,\n auditService,\n accountService,\n collectionService,\n totpService,\n passwordGenerationService,\n messagingService,\n eventCollectionService,\n policyService,\n organizationService,\n logService,\n passwordRepromptService,\n sendApiService,\n dialogService,\n datePipe,\n configService,\n billingAccountProfileStateService,\n );\n }\n\n async load() {\n this.title = this.i18nService.t(\"viewItem\");\n }\n\n protected async loadCipher() {\n return Promise.resolve(this.originalCipher);\n }\n}\n","

    {{ \"vault\" | i18n }}

    \n\n
    \n \n \n \n \n \n \n \n \n {{ currentCipher.name }}\n \n \n {{ \"shared\" | i18n }}\n \n \n \n {{ \"attachments\" | i18n }}\n \n
    \n {{ currentCipher.subTitle }}\n \n \n
    \n \n \n \n \n {{ \"attachments\" | i18n }}\n \n \n
    \n \n \n
    \n
    \n
    \n \n \n {{ \"loading\" | i18n }}\n \n
    \n\n\n","import { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { EmergencyAccessService } from \"../../../emergency-access\";\nimport { EmergencyAccessAttachmentsComponent } from \"../attachments/emergency-access-attachments.component\";\n\nimport { EmergencyAddEditCipherComponent } from \"./emergency-add-edit-cipher.component\";\n\n@Component({\n selector: \"emergency-access-view\",\n templateUrl: \"emergency-access-view.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessViewComponent implements OnInit {\n @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n cipherAddEditModalRef: ViewContainerRef;\n @ViewChild(\"attachments\", { read: ViewContainerRef, static: true })\n attachmentsModalRef: ViewContainerRef;\n\n id: string;\n ciphers: CipherView[] = [];\n loaded = false;\n\n constructor(\n private modalService: ModalService,\n private router: Router,\n private route: ActivatedRoute,\n private emergencyAccessService: EmergencyAccessService,\n ) {}\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n this.route.params.subscribe((qParams) => {\n if (qParams.id == null) {\n return this.router.navigate([\"settings/emergency-access\"]);\n }\n\n this.id = qParams.id;\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.load();\n });\n }\n\n async selectCipher(cipher: CipherView) {\n // eslint-disable-next-line\n const [_, childComponent] = await this.modalService.openViewRef(\n EmergencyAddEditCipherComponent,\n this.cipherAddEditModalRef,\n (comp) => {\n comp.cipherId = cipher == null ? null : cipher.id;\n comp.cipher = cipher;\n },\n );\n\n return childComponent;\n }\n\n async load() {\n this.ciphers = await this.emergencyAccessService.getViewOnlyCiphers(this.id);\n this.loaded = true;\n }\n\n async viewAttachments(cipher: CipherView) {\n await this.modalService.openViewRef(\n EmergencyAccessAttachmentsComponent,\n this.attachmentsModalRef,\n (comp) => {\n comp.cipher = cipher;\n comp.emergencyAccessId = this.id;\n },\n );\n }\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class PasswordRequest extends SecretVerificationRequest {\n newMasterPasswordHash: string;\n masterPasswordHint: string;\n key: string;\n}\n","export enum WebauthnLoginCredentialPrfStatus {\n Enabled = 0,\n Supported = 1,\n Unsupported = 2,\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyFailedIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n \n\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n\n`;\n","import { DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { PrfKeySet } from \"@bitwarden/auth/common\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { WebauthnLoginAdminService } from \"../../../core\";\nimport { CredentialCreateOptionsView } from \"../../../core/views/credential-create-options.view\";\nimport { PendingWebauthnLoginCredentialView } from \"../../../core/views/pending-webauthn-login-credential.view\";\n\nimport { CreatePasskeyFailedIcon } from \"./create-passkey-failed.icon\";\nimport { CreatePasskeyIcon } from \"./create-passkey.icon\";\n\nexport enum CreateCredentialDialogResult {\n Success,\n}\n\ntype Step =\n | \"userVerification\"\n | \"credentialCreation\"\n | \"credentialCreationFailed\"\n | \"credentialNaming\";\n\n@Component({\n templateUrl: \"create-credential-dialog.component.html\",\n})\nexport class CreateCredentialDialogComponent implements OnInit {\n protected readonly NameMaxCharacters = 50;\n protected readonly CreateCredentialDialogResult = CreateCredentialDialogResult;\n protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon };\n\n protected currentStep: Step = \"userVerification\";\n protected invalidSecret = false;\n protected formGroup = this.formBuilder.group({\n userVerification: this.formBuilder.group({\n secret: [null as Verification | null, Validators.required],\n }),\n credentialNaming: this.formBuilder.group({\n name: [\"\", Validators.maxLength(50)],\n useForEncryption: [true],\n }),\n });\n\n protected credentialOptions?: CredentialCreateOptionsView;\n protected pendingCredential?: PendingWebauthnLoginCredentialView;\n protected hasPasskeys$?: Observable;\n protected loading$ = this.webauthnService.loading$;\n\n constructor(\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n private webauthnService: WebauthnLoginAdminService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private logService: LogService,\n ) {}\n\n ngOnInit(): void {\n this.hasPasskeys$ = this.webauthnService\n .getCredentials$()\n .pipe(map((credentials) => credentials.length > 0));\n }\n\n protected submit = async () => {\n this.dialogRef.disableClose = true;\n\n try {\n switch (this.currentStep) {\n case \"userVerification\":\n return await this.submitUserVerification();\n case \"credentialCreationFailed\":\n return await this.submitCredentialCreationFailed();\n case \"credentialCreation\":\n return await this.submitCredentialCreation();\n case \"credentialNaming\":\n return await this.submitCredentialNaming();\n }\n } finally {\n this.dialogRef.disableClose = false;\n }\n };\n\n protected async submitUserVerification() {\n this.formGroup.controls.userVerification.markAllAsTouched();\n if (this.formGroup.controls.userVerification.invalid) {\n return;\n }\n\n try {\n this.credentialOptions = await this.webauthnService.getCredentialAttestationOptions(\n this.formGroup.value.userVerification.secret,\n );\n } catch (error) {\n if (error instanceof ErrorResponse && error.statusCode === 400) {\n this.invalidSecret = true;\n } else {\n this.logService?.error(error);\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"unexpectedError\"),\n error.message,\n );\n }\n return;\n }\n\n this.currentStep = \"credentialCreation\";\n await this.submitCredentialCreation();\n }\n\n protected async submitCredentialCreation() {\n this.pendingCredential = await this.webauthnService.createCredential(this.credentialOptions);\n if (this.pendingCredential === undefined) {\n this.currentStep = \"credentialCreationFailed\";\n return;\n }\n\n this.currentStep = \"credentialNaming\";\n }\n\n protected async submitCredentialCreationFailed() {\n this.currentStep = \"credentialCreation\";\n await this.submitCredentialCreation();\n }\n\n protected async submitCredentialNaming() {\n this.formGroup.controls.credentialNaming.markAllAsTouched();\n if (this.formGroup.controls.credentialNaming.controls.name.invalid) {\n return;\n }\n\n let keySet: PrfKeySet | undefined;\n if (\n this.pendingCredential.supportsPrf &&\n this.formGroup.value.credentialNaming.useForEncryption\n ) {\n keySet = await this.webauthnService.createKeySet(this.pendingCredential);\n\n if (keySet === undefined) {\n this.formGroup.controls.credentialNaming.controls.useForEncryption?.setErrors({\n error: {\n message: this.i18nService.t(\"useForVaultEncryptionErrorReadingPasskey\"),\n },\n });\n return;\n }\n }\n\n const name = this.formGroup.value.credentialNaming.name;\n\n await this.webauthnService.saveCredential(\n this.formGroup.value.credentialNaming.name,\n this.pendingCredential,\n keySet,\n );\n\n if (await firstValueFrom(this.hasPasskeys$)) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"passkeySaved\", name),\n );\n } else {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"loginWithPasskeyEnabled\"),\n );\n }\n\n this.dialogRef.close(CreateCredentialDialogResult.Success);\n }\n}\n\n/**\n * Strongly typed helper to open a CreateCredentialDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openCreateCredentialDialog = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(\n CreateCredentialDialogComponent,\n config,\n );\n};\n","
    \n \n {{ \"loginWithPasskey\" | i18n }}\n {{ \"newPasskey\" | i18n }}\n \n \n \n \n \n \n \n\n
    \n \n

    {{ \"creatingPasskeyLoading\" | i18n }}

    \n

    {{ \"creatingPasskeyLoadingInfo\" | i18n }}

    \n
    \n\n \n \n

    {{ \"errorCreatingPasskey\" | i18n }}

    \n

    {{ \"errorCreatingPasskeyInfo\" | i18n }}

    \n \n\n
    \n

    {{ \"passkeySuccessfullyCreated\" | i18n }}

    \n

    \n {{ \"customPasskeyNameInfo\" | i18n }}\n

    \n \n {{ \"name\" | i18n }}\n \n {{\n \"charactersCurrentAndMaximum\"\n | i18n: formGroup.value.credentialNaming.name.length : NameMaxCharacters\n }}\n \n \n \n {{ \"useForVaultEncryption\" | i18n }}\n {{ \"useForVaultEncryptionInfo\" | i18n }}\n \n
    \n
    \n \n \n \n \n
    \n
    \n","
    \n \n {{ \"removePasskey\" | i18n }}\n {{\n credential.name\n }}\n \n \n \n \n \n\n \n

    {{ \"removePasskeyInfo\" | i18n }}

    \n\n \n
    \n
    \n \n \n \n \n
    \n
    \n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { WebauthnLoginAdminService } from \"../../../core\";\nimport { WebauthnLoginCredentialView } from \"../../../core/views/webauthn-login-credential.view\";\n\nexport interface DeleteCredentialDialogParams {\n credentialId: string;\n}\n\n@Component({\n templateUrl: \"delete-credential-dialog.component.html\",\n})\nexport class DeleteCredentialDialogComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n protected invalidSecret = false;\n protected formGroup = this.formBuilder.group({\n secret: null as Verification | null,\n });\n protected credential?: WebauthnLoginCredentialView;\n protected loading$ = this.webauthnService.loading$;\n\n constructor(\n @Inject(DIALOG_DATA) private params: DeleteCredentialDialogParams,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n private webauthnService: WebauthnLoginAdminService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private logService: LogService,\n ) {}\n\n ngOnInit(): void {\n this.webauthnService\n .getCredential$(this.params.credentialId)\n .pipe(takeUntil(this.destroy$))\n .subscribe((credential) => (this.credential = credential));\n }\n\n submit = async () => {\n if (this.credential === undefined) {\n return;\n }\n\n this.dialogRef.disableClose = true;\n try {\n await this.webauthnService.deleteCredential(this.credential.id, this.formGroup.value.secret);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"passkeyRemoved\"));\n } catch (error) {\n if (error instanceof ErrorResponse && error.statusCode === 400) {\n this.invalidSecret = true;\n } else {\n this.logService?.error(error);\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"unexpectedError\"),\n error.message,\n );\n }\n return false;\n } finally {\n this.dialogRef.disableClose = false;\n }\n\n this.dialogRef.close();\n };\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n\n/**\n * Strongly typed helper to open a DeleteCredentialDialogComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openDeleteCredentialDialogComponent = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(DeleteCredentialDialogComponent, config);\n};\n","
    \n \n {{ \"enablePasskeyEncryption\" | i18n }}\n {{\n credential.name\n }}\n \n \n \n \n \n\n \n

    {{ \"useForVaultEncryptionInfo\" | i18n }}

    \n\n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { DialogService } from \"@bitwarden/components/src/dialog/dialog.service\";\n\nimport { WebauthnLoginAdminService } from \"../../../core/services/webauthn-login/webauthn-login-admin.service\";\nimport { WebauthnLoginCredentialView } from \"../../../core/views/webauthn-login-credential.view\";\n\nexport interface EnableEncryptionDialogParams {\n credentialId: string;\n}\n\n@Component({\n templateUrl: \"enable-encryption-dialog.component.html\",\n})\nexport class EnableEncryptionDialogComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n protected invalidSecret = false;\n protected formGroup = this.formBuilder.group({\n userVerification: this.formBuilder.group({\n secret: [null as Verification | null, Validators.required],\n }),\n });\n\n protected credential?: WebauthnLoginCredentialView;\n protected credentialOptions?: WebAuthnLoginCredentialAssertionOptionsView;\n protected loading$ = this.webauthnService.loading$;\n\n constructor(\n @Inject(DIALOG_DATA) private params: EnableEncryptionDialogParams,\n private formBuilder: FormBuilder,\n private dialogRef: DialogRef,\n private webauthnService: WebauthnLoginAdminService,\n private webauthnLoginService: WebAuthnLoginServiceAbstraction,\n ) {}\n\n ngOnInit(): void {\n this.webauthnService\n .getCredential$(this.params.credentialId)\n .pipe(takeUntil(this.destroy$))\n .subscribe((credential: any) => (this.credential = credential));\n }\n\n submit = async () => {\n if (this.credential === undefined) {\n return;\n }\n\n this.dialogRef.disableClose = true;\n try {\n this.credentialOptions = await this.webauthnService.getCredentialAssertOptions(\n this.formGroup.value.userVerification.secret,\n );\n await this.webauthnService.enableCredentialEncryption(\n await this.webauthnLoginService.assertCredential(this.credentialOptions),\n );\n } catch (error) {\n if (error instanceof ErrorResponse && error.statusCode === 400) {\n this.invalidSecret = true;\n }\n throw error;\n }\n\n this.dialogRef.close();\n };\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n\n/**\n * Strongly typed helper to open a EnableEncryptionDialogComponent\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openEnableCredentialDialogComponent = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(EnableEncryptionDialogComponent, config);\n};\n","

    \n {{ \"loginWithPasskey\" | i18n }}\n \n \n {{ \"off\" | i18n }} - {{ \"ssoLoginIsRequired\" | i18n }}\n \n \n {{\n \"on\" | i18n\n }}\n {{\n \"off\" | i18n\n }}\n \n \n {{ \"beta\" | i18n }}\n \n \n \n

    \n

    \n {{ \"loginWithPasskeyInfo\" | i18n }}\n {{\n \"learnMoreAboutPasswordless\" | i18n\n }}\n

    \n\n\n \n \n \n \n \n
    {{ credential.name }}\n \n \n {{ \"usedForEncryption\" | i18n }}\n \n \n \n \n {{ \"enablePasskeyEncryption\" | i18n }}\n \n \n \n {{ \"encryptionNotSupported\" | i18n }}\n \n \n \n {{ \"remove\" | i18n }}\n \n
    \n\n

    {{ \"passkeyLimitReachedInfo\" | i18n }}

    \n\n\n \n {{ \"newPasskey\" | i18n }}\n \n\n \n {{ \"enable\" | i18n }}\n \n\n","import { Component, HostBinding, OnDestroy, OnInit } from \"@angular/core\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { WebauthnLoginAdminService } from \"../../core\";\nimport { WebauthnLoginCredentialPrfStatus } from \"../../core/enums/webauthn-login-credential-prf-status.enum\";\nimport { WebauthnLoginCredentialView } from \"../../core/views/webauthn-login-credential.view\";\n\nimport { openCreateCredentialDialog } from \"./create-credential-dialog/create-credential-dialog.component\";\nimport { openDeleteCredentialDialogComponent } from \"./delete-credential-dialog/delete-credential-dialog.component\";\nimport { openEnableCredentialDialogComponent } from \"./enable-encryption-dialog/enable-encryption-dialog.component\";\n\n@Component({\n selector: \"app-webauthn-login-settings\",\n templateUrl: \"webauthn-login-settings.component.html\",\n host: {\n \"aria-live\": \"polite\",\n },\n})\nexport class WebauthnLoginSettingsComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n protected readonly MaxCredentialCount = WebauthnLoginAdminService.MaxCredentialCount;\n protected readonly WebauthnLoginCredentialPrfStatus = WebauthnLoginCredentialPrfStatus;\n\n protected credentials?: WebauthnLoginCredentialView[];\n protected loading = true;\n\n constructor(\n private webauthnService: WebauthnLoginAdminService,\n private dialogService: DialogService,\n private policyService: PolicyService,\n ) {}\n\n @HostBinding(\"attr.aria-busy\")\n get ariaBusy() {\n return this.loading ? \"true\" : \"false\";\n }\n\n get hasCredentials() {\n return this.credentials && this.credentials.length > 0;\n }\n\n get hasData() {\n return this.credentials !== undefined;\n }\n\n get limitReached() {\n return this.credentials?.length >= this.MaxCredentialCount;\n }\n\n requireSsoPolicyEnabled = false;\n\n ngOnInit(): void {\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.RequireSso)\n .pipe(takeUntil(this.destroy$))\n .subscribe((enabled) => {\n this.requireSsoPolicyEnabled = enabled;\n });\n\n this.webauthnService\n .getCredentials$()\n .pipe(takeUntil(this.destroy$))\n .subscribe((credentials) => (this.credentials = credentials));\n\n this.webauthnService.loading$\n .pipe(takeUntil(this.destroy$))\n .subscribe((loading) => (this.loading = loading));\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected createCredential() {\n openCreateCredentialDialog(this.dialogService, {});\n }\n\n protected deleteCredential(credentialId: string) {\n openDeleteCredentialDialogComponent(this.dialogService, { data: { credentialId } });\n }\n\n protected enableEncryption(credentialId: string) {\n openEnableCredentialDialogComponent(this.dialogService, { data: { credentialId } });\n }\n}\n","
    \n

    {{ \"changeMasterPassword\" | i18n }}

    \n
    \n\n{{ \"loggedOutWarning\" | i18n }}\n\n\n\n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n {{ \"important\" | i18n }}\n {{ \"masterPassImportant\" | i18n }} {{ characterMinimumMessage }}\n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n \n \n
    \n \n\n\n\n","import { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"@bitwarden/angular/auth/components/change-password.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { UserKeyRotationService } from \"../key-rotation/user-key-rotation.service\";\n\n@Component({\n selector: \"app-change-password\",\n templateUrl: \"change-password.component.html\",\n})\nexport class ChangePasswordComponent extends BaseChangePasswordComponent {\n rotateUserKey = false;\n currentMasterPassword: string;\n masterPasswordHint: string;\n checkForBreaches = true;\n characterMinimumMessage = \"\";\n\n constructor(\n i18nService: I18nService,\n cryptoService: CryptoService,\n messagingService: MessagingService,\n stateService: StateService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n platformUtilsService: PlatformUtilsService,\n policyService: PolicyService,\n private auditService: AuditService,\n private cipherService: CipherService,\n private syncService: SyncService,\n private apiService: ApiService,\n private router: Router,\n dialogService: DialogService,\n private userVerificationService: UserVerificationService,\n private keyRotationService: UserKeyRotationService,\n kdfConfigService: KdfConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n ) {\n super(\n i18nService,\n cryptoService,\n messagingService,\n passwordGenerationService,\n platformUtilsService,\n policyService,\n stateService,\n dialogService,\n kdfConfigService,\n masterPasswordService,\n accountService,\n );\n }\n\n async ngOnInit() {\n if (!(await this.userVerificationService.hasMasterPassword())) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/settings/security/two-factor\"]);\n }\n\n this.masterPasswordHint = (await this.apiService.getProfile()).masterPasswordHint;\n await super.ngOnInit();\n\n this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n }\n\n async rotateUserKeyClicked() {\n if (this.rotateUserKey) {\n const ciphers = await this.cipherService.getAllDecrypted();\n let hasOldAttachments = false;\n if (ciphers != null) {\n for (let i = 0; i < ciphers.length; i++) {\n if (ciphers[i].organizationId == null && ciphers[i].hasOldAttachments) {\n hasOldAttachments = true;\n break;\n }\n }\n }\n\n if (hasOldAttachments) {\n const learnMore = await this.dialogService.openSimpleDialog({\n title: { key: \"warning\" },\n content: { key: \"oldAttachmentsNeedFixDesc\" },\n acceptButtonText: { key: \"learnMore\" },\n cancelButtonText: { key: \"close\" },\n type: \"warning\",\n });\n\n if (learnMore) {\n this.platformUtilsService.launchUri(\n \"https://bitwarden.com/help/attachments/#add-storage-space\",\n );\n }\n this.rotateUserKey = false;\n return;\n }\n\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"rotateEncKeyTitle\" },\n content:\n this.i18nService.t(\"updateEncryptionKeyWarning\") +\n \" \" +\n this.i18nService.t(\"updateEncryptionKeyExportWarning\") +\n \" \" +\n this.i18nService.t(\"rotateEncKeyConfirmation\"),\n type: \"warning\",\n });\n\n if (!result) {\n this.rotateUserKey = false;\n }\n }\n }\n\n async submit() {\n if (this.masterPasswordHint != null && this.masterPasswordHint == this.masterPassword) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"hintEqualsPassword\"),\n );\n return;\n }\n\n this.leakedPassword = false;\n if (this.checkForBreaches) {\n this.leakedPassword = (await this.auditService.passwordLeaked(this.masterPassword)) > 0;\n }\n\n await super.submit();\n }\n\n async setupSubmitActions() {\n if (this.currentMasterPassword == null || this.currentMasterPassword === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordRequired\"),\n );\n return false;\n }\n\n if (this.rotateUserKey) {\n await this.syncService.fullSync(true);\n }\n\n return super.setupSubmitActions();\n }\n\n async performSubmitActions(\n newMasterPasswordHash: string,\n newMasterKey: MasterKey,\n newUserKey: [UserKey, EncString],\n ) {\n const masterKey = await this.cryptoService.makeMasterKey(\n this.currentMasterPassword,\n await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email))),\n await this.kdfConfigService.getKdfConfig(),\n );\n\n const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n const newLocalKeyHash = await this.cryptoService.hashMasterKey(\n this.masterPassword,\n newMasterKey,\n HashPurpose.LocalAuthorization,\n );\n\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n if (userKey == null) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"invalidMasterPassword\"),\n );\n return;\n }\n\n const request = new PasswordRequest();\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(\n this.currentMasterPassword,\n masterKey,\n );\n request.masterPasswordHint = this.masterPasswordHint;\n request.newMasterPasswordHash = newMasterPasswordHash;\n request.key = newUserKey[1].encryptedString;\n\n try {\n if (this.rotateUserKey) {\n this.formPromise = this.apiService.postPassword(request).then(async () => {\n // we need to save this for local masterkey verification during rotation\n await this.masterPasswordService.setMasterKeyHash(newLocalKeyHash, userId as UserId);\n await this.masterPasswordService.setMasterKey(newMasterKey, userId as UserId);\n return this.updateKey();\n });\n } else {\n this.formPromise = this.apiService.postPassword(request);\n }\n\n await this.formPromise;\n\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"masterPasswordChanged\"),\n this.i18nService.t(\"logBackIn\"),\n );\n this.messagingService.send(\"logout\");\n } catch {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n }\n }\n\n private async updateKey() {\n const user = await firstValueFrom(this.accountService.activeAccount$);\n await this.keyRotationService.rotateUserKeyAndEncryptedData(this.masterPassword, user);\n }\n}\n","import { PasswordRequest } from \"../../auth/models/request/password.request\";\nimport { KdfType } from \"../../platform/enums\";\n\nexport class KdfRequest extends PasswordRequest {\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n}\n","import { DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { KdfRequest } from \"@bitwarden/common/models/request/kdf.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\n\n@Component({\n selector: \"app-change-kdf-confirmation\",\n templateUrl: \"change-kdf-confirmation.component.html\",\n})\nexport class ChangeKdfConfirmationComponent {\n kdfConfig: KdfConfig;\n\n form = new FormGroup({\n masterPassword: new FormControl(null, Validators.required),\n });\n showPassword = false;\n masterPassword: string;\n loading = false;\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private cryptoService: CryptoService,\n private messagingService: MessagingService,\n @Inject(DIALOG_DATA) params: { kdf: KdfType; kdfConfig: KdfConfig },\n private accountService: AccountService,\n ) {\n this.kdfConfig = params.kdfConfig;\n this.masterPassword = null;\n }\n\n submit = async () => {\n if (this.form.invalid) {\n return;\n }\n this.loading = true;\n await this.makeKeyAndSaveAsync();\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"encKeySettingsChanged\"),\n this.i18nService.t(\"logBackIn\"),\n );\n this.messagingService.send(\"logout\");\n this.loading = false;\n };\n\n private async makeKeyAndSaveAsync() {\n const masterPassword = this.form.value.masterPassword;\n\n // Ensure the KDF config is valid.\n this.kdfConfig.validateKdfConfig();\n\n const request = new KdfRequest();\n request.kdf = this.kdfConfig.kdfType;\n request.kdfIterations = this.kdfConfig.iterations;\n if (this.kdfConfig.kdfType === KdfType.Argon2id) {\n request.kdfMemory = this.kdfConfig.memory;\n request.kdfParallelism = this.kdfConfig.parallelism;\n }\n const masterKey = await this.cryptoService.getOrDeriveMasterKey(masterPassword);\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(masterPassword, masterKey);\n const email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n\n const newMasterKey = await this.cryptoService.makeMasterKey(\n masterPassword,\n email,\n this.kdfConfig,\n );\n request.newMasterPasswordHash = await this.cryptoService.hashMasterKey(\n masterPassword,\n newMasterKey,\n );\n const newUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(newMasterKey);\n request.key = newUserKey[1].encryptedString;\n\n await this.apiService.postAccountKdf(request);\n }\n}\n","
    \n \n \n {{ \"changeKdf\" | i18n }}\n \n\n \n {{ \"kdfSettingsChangeLogoutWarning\" | i18n }}\n \n {{ \"masterPass\" | i18n }}\n \n \n \n {{ \"confirmIdentity\" | i18n }}\n \n \n \n \n \n \n \n
    \n","

    {{ \"encKeySettings\" | i18n }}

    \n{{ \"kdfSettingsChangeLogoutWarning\" | i18n }}\n

    \n {{ \"higherKDFIterations\" | i18n }}\n

    \n

    \n {{\n \"kdfToHighWarningIncreaseInIncrements\"\n | i18n: (isPBKDF2(kdfConfig) ? (\"incrementsOf100,000\" | i18n) : (\"smallIncrements\" | i18n))\n }}\n

    \n
    \n
    \n
    \n \n {{ \"kdfAlgorithm\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ \"kdfMemory\" | i18n }}\n \n \n
    \n
    \n
    \n \n \n {{ \"kdfIterations\" | i18n }}\n \n \n \n \n \n {{ \"kdfIterationRecommends\" | i18n }}\n \n \n \n \n {{ \"kdfIterations\" | i18n }}\n \n \n \n \n \n {{ \"kdfParallelism\" | i18n }}\n \n \n \n \n
    \n
    \n
    \n \n {{ \"changeKdf\" | i18n }}\n \n\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, ValidatorFn, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport {\n Argon2KdfConfig,\n DEFAULT_KDF_CONFIG,\n KdfConfig,\n PBKDF2KdfConfig,\n} from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { ChangeKdfConfirmationComponent } from \"./change-kdf-confirmation.component\";\n\n@Component({\n selector: \"app-change-kdf\",\n templateUrl: \"change-kdf.component.html\",\n})\nexport class ChangeKdfComponent implements OnInit {\n kdfConfig: KdfConfig = DEFAULT_KDF_CONFIG;\n kdfOptions: any[] = [];\n private destroy$ = new Subject();\n\n protected formGroup = this.formBuilder.group({\n kdf: new FormControl(KdfType.PBKDF2_SHA256, [Validators.required]),\n kdfConfig: this.formBuilder.group({\n iterations: [this.kdfConfig.iterations],\n memory: [null as number],\n parallelism: [null as number],\n }),\n });\n\n // Default values for template\n protected PBKDF2_ITERATIONS = PBKDF2KdfConfig.ITERATIONS;\n protected ARGON2_ITERATIONS = Argon2KdfConfig.ITERATIONS;\n protected ARGON2_MEMORY = Argon2KdfConfig.MEMORY;\n protected ARGON2_PARALLELISM = Argon2KdfConfig.PARALLELISM;\n\n constructor(\n private dialogService: DialogService,\n private kdfConfigService: KdfConfigService,\n private formBuilder: FormBuilder,\n ) {\n this.kdfOptions = [\n { name: \"PBKDF2 SHA-256\", value: KdfType.PBKDF2_SHA256 },\n { name: \"Argon2id\", value: KdfType.Argon2id },\n ];\n }\n\n async ngOnInit() {\n this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n this.formGroup.get(\"kdf\").setValue(this.kdfConfig.kdfType);\n this.setFormControlValues(this.kdfConfig);\n\n this.formGroup\n .get(\"kdf\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((newValue) => {\n this.updateKdfConfig(newValue);\n });\n }\n private updateKdfConfig(newValue: KdfType) {\n let config: KdfConfig;\n const validators: { [key: string]: ValidatorFn[] } = {\n iterations: [],\n memory: [],\n parallelism: [],\n };\n\n switch (newValue) {\n case KdfType.PBKDF2_SHA256:\n config = new PBKDF2KdfConfig();\n validators.iterations = [\n Validators.required,\n Validators.min(PBKDF2KdfConfig.ITERATIONS.min),\n Validators.max(PBKDF2KdfConfig.ITERATIONS.max),\n ];\n break;\n case KdfType.Argon2id:\n config = new Argon2KdfConfig();\n validators.iterations = [\n Validators.required,\n Validators.min(Argon2KdfConfig.ITERATIONS.min),\n Validators.max(Argon2KdfConfig.ITERATIONS.max),\n ];\n validators.memory = [\n Validators.required,\n Validators.min(Argon2KdfConfig.MEMORY.min),\n Validators.max(Argon2KdfConfig.MEMORY.max),\n ];\n validators.parallelism = [\n Validators.required,\n Validators.min(Argon2KdfConfig.PARALLELISM.min),\n Validators.max(Argon2KdfConfig.PARALLELISM.max),\n ];\n break;\n default:\n throw new Error(\"Unknown KDF type.\");\n }\n\n this.kdfConfig = config;\n this.setFormValidators(validators);\n this.setFormControlValues(this.kdfConfig);\n }\n\n private setFormValidators(validators: { [key: string]: ValidatorFn[] }) {\n this.setValidators(\"kdfConfig.iterations\", validators.iterations);\n this.setValidators(\"kdfConfig.memory\", validators.memory);\n this.setValidators(\"kdfConfig.parallelism\", validators.parallelism);\n }\n private setValidators(controlName: string, validators: ValidatorFn[]) {\n const control = this.formGroup.get(controlName);\n if (control) {\n control.setValidators(validators);\n control.updateValueAndValidity();\n }\n }\n private setFormControlValues(kdfConfig: KdfConfig) {\n this.formGroup.get(\"kdfConfig\").reset();\n if (kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n this.formGroup.get(\"kdfConfig.iterations\").setValue(kdfConfig.iterations);\n } else if (kdfConfig.kdfType === KdfType.Argon2id) {\n this.formGroup.get(\"kdfConfig.iterations\").setValue(kdfConfig.iterations);\n this.formGroup.get(\"kdfConfig.memory\").setValue(kdfConfig.memory);\n this.formGroup.get(\"kdfConfig.parallelism\").setValue(kdfConfig.parallelism);\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n isPBKDF2(t: KdfConfig): t is PBKDF2KdfConfig {\n return t instanceof PBKDF2KdfConfig;\n }\n\n isArgon2(t: KdfConfig): t is Argon2KdfConfig {\n return t instanceof Argon2KdfConfig;\n }\n\n async openConfirmationModal() {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n if (this.kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n this.kdfConfig.iterations = this.formGroup.get(\"kdfConfig.iterations\").value;\n } else if (this.kdfConfig.kdfType === KdfType.Argon2id) {\n this.kdfConfig.iterations = this.formGroup.get(\"kdfConfig.iterations\").value;\n this.kdfConfig.memory = this.formGroup.get(\"kdfConfig.memory\").value;\n this.kdfConfig.parallelism = this.formGroup.get(\"kdfConfig.parallelism\").value;\n }\n this.dialogService.open(ChangeKdfConfirmationComponent, {\n data: {\n kdfConfig: this.kdfConfig,\n },\n });\n }\n}\n","\n\n

    {{ \"apiKey\" | i18n }}

    \n\n

    \n {{ \"userApiKeyDesc\" | i18n }}\n

    \n\n\n\n\n","import { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { ApiKeyComponent } from \"./api-key.component\";\n\n@Component({\n selector: \"app-security-keys\",\n templateUrl: \"security-keys.component.html\",\n})\nexport class SecurityKeysComponent implements OnInit {\n @ViewChild(\"viewUserApiKeyTemplate\", { read: ViewContainerRef, static: true })\n viewUserApiKeyModalRef: ViewContainerRef;\n @ViewChild(\"rotateUserApiKeyTemplate\", { read: ViewContainerRef, static: true })\n rotateUserApiKeyModalRef: ViewContainerRef;\n\n showChangeKdf = true;\n\n constructor(\n private userVerificationService: UserVerificationService,\n private stateService: StateService,\n private apiService: ApiService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n this.showChangeKdf = await this.userVerificationService.hasMasterPassword();\n }\n\n async viewUserApiKey() {\n const entityId = await this.stateService.getUserId();\n await ApiKeyComponent.open(this.dialogService, {\n data: {\n keyType: \"user\",\n entityId: entityId,\n postKey: this.apiService.postUserApiKey.bind(this.apiService),\n scope: \"api\",\n grantType: \"client_credentials\",\n apiKeyTitle: \"apiKey\",\n apiKeyWarning: \"userApiKeyWarning\",\n apiKeyDescription: \"userApiKeyDesc\",\n },\n });\n }\n\n async rotateUserApiKey() {\n const entityId = await this.stateService.getUserId();\n await ApiKeyComponent.open(this.dialogService, {\n data: {\n keyType: \"user\",\n isRotation: true,\n entityId: entityId,\n postKey: this.apiService.postUserRotateApiKey.bind(this.apiService),\n scope: \"api\",\n grantType: \"client_credentials\",\n apiKeyTitle: \"apiKey\",\n apiKeyWarning: \"userApiKeyWarning\",\n apiKeyDescription: \"apiKeyRotateDesc\",\n },\n });\n }\n}\n","\n \n \n {{ \"masterPassword\" | i18n }}\n \n {{ \"twoStepLogin\" | i18n }}\n {{ \"keys\" | i18n }}\n \n\n\n\n \n\n","import { Component } from \"@angular/core\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\n\n@Component({\n selector: \"app-security\",\n templateUrl: \"security.component.html\",\n})\nexport class SecurityComponent {\n showChangePassword = true;\n\n constructor(private userVerificationService: UserVerificationService) {}\n\n async ngOnInit() {\n this.showChangePassword = await this.userVerificationService.hasMasterPassword();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { ChangePasswordComponent } from \"../change-password.component\";\nimport { TwoFactorSetupComponent } from \"../two-factor-setup.component\";\n\nimport { SecurityKeysComponent } from \"./security-keys.component\";\nimport { SecurityComponent } from \"./security.component\";\n\nconst routes: Routes = [\n {\n path: \"\",\n component: SecurityComponent,\n data: { titleId: \"security\" },\n children: [\n { path: \"\", pathMatch: \"full\", redirectTo: \"change-password\" },\n {\n path: \"change-password\",\n component: ChangePasswordComponent,\n data: { titleId: \"masterPassword\" },\n },\n {\n path: \"two-factor\",\n component: TwoFactorSetupComponent,\n data: { titleId: \"twoStepLogin\" },\n },\n {\n path: \"security-keys\",\n component: SecurityKeysComponent,\n data: { titleId: \"keys\" },\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class SecurityRoutingModule {}\n","
    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n

    {{ \"ssoLogInWithOrgIdentifier\" | i18n }}

    \n \n {{ \"ssoIdentifier\" | i18n }}\n \n \n
    \n
    \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { SsoComponent as BaseSsoComponent } from \"@bitwarden/angular/auth/components/sso.component\";\nimport {\n LoginStrategyServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrganizationDomainSsoDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain-sso-details.response\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Component({\n selector: \"app-sso\",\n templateUrl: \"sso.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class SsoComponent extends BaseSsoComponent {\n protected formGroup = new FormGroup({\n identifier: new FormControl(null, [Validators.required]),\n });\n\n get identifierFormControl() {\n return this.formGroup.controls.identifier;\n }\n\n constructor(\n ssoLoginService: SsoLoginServiceAbstraction,\n loginStrategyService: LoginStrategyServiceAbstraction,\n router: Router,\n i18nService: I18nService,\n route: ActivatedRoute,\n stateService: StateService,\n platformUtilsService: PlatformUtilsService,\n apiService: ApiService,\n cryptoFunctionService: CryptoFunctionService,\n environmentService: EnvironmentService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n logService: LogService,\n private orgDomainApiService: OrgDomainApiServiceAbstraction,\n private validationService: ValidationService,\n userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n configService: ConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n ) {\n super(\n ssoLoginService,\n loginStrategyService,\n router,\n i18nService,\n route,\n stateService,\n platformUtilsService,\n apiService,\n cryptoFunctionService,\n environmentService,\n passwordGenerationService,\n logService,\n userDecryptionOptionsService,\n configService,\n masterPasswordService,\n accountService,\n );\n this.redirectUri = window.location.origin + \"/sso-connector.html\";\n this.clientId = \"web\";\n }\n\n async ngOnInit() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n super.ngOnInit();\n\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.identifier != null) {\n // SSO Org Identifier in query params takes precedence over claimed domains\n this.identifierFormControl.setValue(qParams.identifier);\n this.loggingIn = true;\n await this.submit();\n } else {\n // Note: this flow is written for web but both browser and desktop\n // redirect here on SSO button click.\n\n // Check if email matches any claimed domains\n if (qParams.email) {\n // show loading spinner\n this.loggingIn = true;\n try {\n const response: OrganizationDomainSsoDetailsResponse =\n await this.orgDomainApiService.getClaimedOrgDomainByEmail(qParams.email);\n\n if (response?.ssoAvailable) {\n this.identifierFormControl.setValue(response.organizationIdentifier);\n await this.submit();\n return;\n }\n } catch (error) {\n this.handleGetClaimedDomainByEmailError(error);\n }\n\n this.loggingIn = false;\n }\n\n // Fallback to state svc if domain is unclaimed\n const storedIdentifier = await this.ssoLoginService.getOrganizationSsoIdentifier();\n if (storedIdentifier != null) {\n this.identifierFormControl.setValue(storedIdentifier);\n }\n }\n });\n }\n\n private handleGetClaimedDomainByEmailError(error: any): void {\n if (error instanceof ErrorResponse) {\n const errorResponse: ErrorResponse = error as ErrorResponse;\n switch (errorResponse.statusCode) {\n case HttpStatusCode.NotFound:\n //this is a valid case for a domain not found\n return;\n\n default:\n this.validationService.showError(errorResponse);\n break;\n }\n }\n }\n\n submit = async () => {\n if (this.formGroup.invalid) {\n return;\n }\n\n const autoSubmit = (await firstValueFrom(this.route.queryParams)).identifier != null;\n\n this.identifier = this.identifierFormControl.value;\n await this.ssoLoginService.setOrganizationSsoIdentifier(this.identifier);\n if (this.clientId === \"browser\") {\n document.cookie = `ssoHandOffMessage=${this.i18nService.t(\"ssoHandOff\")};SameSite=strict`;\n }\n try {\n await Object.getPrototypeOf(this).submit.call(this);\n } catch (error) {\n if (autoSubmit) {\n await this.router.navigate([\"/login\"]);\n } else {\n this.validationService.showError(error);\n }\n }\n };\n}\n","export type InitiationPath =\n | \"Registration form\"\n | \"Password Manager trial from marketing website\"\n | \"Secrets Manager trial from marketing website\"\n | \"New organization creation in-product\"\n | \"Upgrade in-product\";\n\nexport class ReferenceEventRequest {\n id: string;\n session: string;\n layout: string;\n flow: string;\n initiationPath: InitiationPath;\n}\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport {\n BillingInformation,\n OrganizationBillingServiceAbstraction as OrganizationBillingService,\n OrganizationInformation,\n PaymentInformation,\n PlanInformation,\n} from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PaymentMethodType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { BillingSharedModule, PaymentComponent, TaxInfoComponent } from \"../../shared\";\n\nexport type TrialOrganizationType = Exclude;\n\nexport interface OrganizationInfo {\n name: string;\n email: string;\n type: TrialOrganizationType;\n}\n\nexport interface OrganizationCreatedEvent {\n organizationId: string;\n planDescription: string;\n}\n\nenum SubscriptionCadence {\n Annual,\n Monthly,\n}\n\nexport enum SubscriptionProduct {\n PasswordManager,\n SecretsManager,\n}\n\n@Component({\n selector: \"app-trial-billing-step\",\n templateUrl: \"trial-billing-step.component.html\",\n imports: [BillingSharedModule],\n standalone: true,\n})\nexport class TrialBillingStepComponent implements OnInit {\n @ViewChild(PaymentComponent) paymentComponent: PaymentComponent;\n @ViewChild(TaxInfoComponent) taxInfoComponent: TaxInfoComponent;\n @Input() organizationInfo: OrganizationInfo;\n @Input() subscriptionProduct: SubscriptionProduct = SubscriptionProduct.PasswordManager;\n @Output() steppedBack = new EventEmitter();\n @Output() organizationCreated = new EventEmitter();\n\n loading = true;\n\n annualCadence = SubscriptionCadence.Annual;\n monthlyCadence = SubscriptionCadence.Monthly;\n\n formGroup = this.formBuilder.group({\n cadence: [SubscriptionCadence.Annual, Validators.required],\n });\n formPromise: Promise;\n\n applicablePlans: PlanResponse[];\n annualPlan?: PlanResponse;\n monthlyPlan?: PlanResponse;\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private formBuilder: FormBuilder,\n private messagingService: MessagingService,\n private organizationBillingService: OrganizationBillingService,\n private platformUtilsService: PlatformUtilsService,\n ) {}\n\n async ngOnInit(): Promise {\n const plans = await this.apiService.getPlans();\n this.applicablePlans = plans.data.filter(this.isApplicable);\n this.annualPlan = this.findPlanFor(SubscriptionCadence.Annual);\n this.monthlyPlan = this.findPlanFor(SubscriptionCadence.Monthly);\n this.loading = false;\n }\n\n async submit(): Promise {\n if (!this.taxInfoComponent.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) {\n this.taxInfoComponent.taxFormGroup.markAllAsTouched();\n return;\n }\n\n this.formPromise = this.createOrganization();\n\n const organizationId = await this.formPromise;\n const planDescription = this.getPlanDescription();\n\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"organizationCreated\"),\n this.i18nService.t(\"organizationReadyToGo\"),\n );\n\n this.organizationCreated.emit({\n organizationId,\n planDescription,\n });\n\n // TODO: No one actually listening to this?\n this.messagingService.send(\"organizationCreated\", { organizationId });\n }\n\n protected changedCountry() {\n this.paymentComponent.hideBank = this.taxInfoComponent.taxFormGroup.value.country !== \"US\";\n if (\n this.paymentComponent.hideBank &&\n this.paymentComponent.method === PaymentMethodType.BankAccount\n ) {\n this.paymentComponent.method = PaymentMethodType.Card;\n this.paymentComponent.changeMethod();\n }\n }\n\n protected getPriceFor(cadence: SubscriptionCadence): number {\n const plan = this.findPlanFor(cadence);\n return this.subscriptionProduct === SubscriptionProduct.PasswordManager\n ? plan.PasswordManager.basePrice === 0\n ? plan.PasswordManager.seatPrice\n : plan.PasswordManager.basePrice\n : plan.SecretsManager.basePrice === 0\n ? plan.SecretsManager.seatPrice\n : plan.SecretsManager.basePrice;\n }\n\n protected stepBack() {\n this.steppedBack.emit();\n }\n\n private async createOrganization(): Promise {\n const planResponse = this.findPlanFor(this.formGroup.value.cadence);\n const paymentMethod = await this.paymentComponent.createPaymentToken();\n\n const organization: OrganizationInformation = {\n name: this.organizationInfo.name,\n billingEmail: this.organizationInfo.email,\n initiationPath:\n this.subscriptionProduct === SubscriptionProduct.PasswordManager\n ? \"Password Manager trial from marketing website\"\n : \"Secrets Manager trial from marketing website\",\n };\n\n const plan: PlanInformation = {\n type: planResponse.type,\n passwordManagerSeats: 1,\n };\n\n if (this.subscriptionProduct === SubscriptionProduct.SecretsManager) {\n plan.subscribeToSecretsManager = true;\n plan.isFromSecretsManagerTrial = true;\n plan.secretsManagerSeats = 1;\n }\n\n const payment: PaymentInformation = {\n paymentMethod,\n billing: this.getBillingInformationFromTaxInfoComponent(),\n };\n\n const response = await this.organizationBillingService.purchaseSubscription({\n organization,\n plan,\n payment,\n });\n\n return response.id;\n }\n\n private productTypeToPlanTypeMap: {\n [productType in TrialOrganizationType]: {\n [cadence in SubscriptionCadence]?: PlanType;\n };\n } = {\n [ProductTierType.Enterprise]: {\n [SubscriptionCadence.Annual]: PlanType.EnterpriseAnnually,\n [SubscriptionCadence.Monthly]: PlanType.EnterpriseMonthly,\n },\n [ProductTierType.Families]: {\n [SubscriptionCadence.Annual]: PlanType.FamiliesAnnually,\n // No monthly option for Families plan\n },\n [ProductTierType.Teams]: {\n [SubscriptionCadence.Annual]: PlanType.TeamsAnnually,\n [SubscriptionCadence.Monthly]: PlanType.TeamsMonthly,\n },\n [ProductTierType.TeamsStarter]: {\n // No annual option for Teams Starter plan\n [SubscriptionCadence.Monthly]: PlanType.TeamsStarter,\n },\n };\n\n private findPlanFor(cadence: SubscriptionCadence): PlanResponse | null {\n const productType = this.organizationInfo.type;\n const planType = this.productTypeToPlanTypeMap[productType]?.[cadence];\n return planType ? this.applicablePlans.find((plan) => plan.type === planType) : null;\n }\n\n private getBillingInformationFromTaxInfoComponent(): BillingInformation {\n return {\n postalCode: this.taxInfoComponent.taxFormGroup?.value.postalCode,\n country: this.taxInfoComponent.taxFormGroup?.value.country,\n taxId: this.taxInfoComponent.taxFormGroup?.value.taxId,\n addressLine1: this.taxInfoComponent.taxFormGroup?.value.line1,\n addressLine2: this.taxInfoComponent.taxFormGroup?.value.line2,\n city: this.taxInfoComponent.taxFormGroup?.value.city,\n state: this.taxInfoComponent.taxFormGroup?.value.state,\n };\n }\n\n private getPlanDescription(): string {\n const plan = this.findPlanFor(this.formGroup.value.cadence);\n const price =\n this.subscriptionProduct === SubscriptionProduct.PasswordManager\n ? plan.PasswordManager.basePrice === 0\n ? plan.PasswordManager.seatPrice\n : plan.PasswordManager.basePrice\n : plan.SecretsManager.basePrice === 0\n ? plan.SecretsManager.seatPrice\n : plan.SecretsManager.basePrice;\n\n switch (this.formGroup.value.cadence) {\n case SubscriptionCadence.Annual:\n return `${this.i18nService.t(\"annual\")} ($${price}/${this.i18nService.t(\"yr\")})`;\n case SubscriptionCadence.Monthly:\n return `${this.i18nService.t(\"monthly\")} ($${price}/${this.i18nService.t(\"monthAbbr\")})`;\n }\n }\n\n private isApplicable(plan: PlanResponse): boolean {\n const hasCorrectProductType =\n plan.productTier === ProductTierType.Enterprise ||\n plan.productTier === ProductTierType.Families ||\n plan.productTier === ProductTierType.Teams ||\n plan.productTier === ProductTierType.TeamsStarter;\n const notDisabledOrLegacy = !plan.disabled && !plan.legacyYear;\n return hasCorrectProductType && notDisabledOrLegacy;\n }\n}\n","\n \n {{ \"loading\" | i18n }}\n\n\n
    \n
    \n

    {{ \"billingPlanLabel\" | i18n }}

    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n

    {{ \"paymentType\" | i18n }}

    \n \n \n
    \n
    \n \n \n
    \n
    \n\n","\n \n \n \n\n","import { CdkStep } from \"@angular/cdk/stepper\";\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-vertical-step\",\n templateUrl: \"vertical-step.component.html\",\n providers: [{ provide: CdkStep, useExisting: VerticalStep }],\n})\nexport class VerticalStep extends CdkStep {\n @Input() subLabel = \"\";\n @Input() applyBorder = true;\n @Input() addSubLabelSpacing = false;\n}\n","\n
    \n \n \n {{ stepNumber }}\n \n \n \n \n \n \n {{ step.label }}\n

    \n

    {{ step.subLabel }}

    \n
    \n \n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { VerticalStep } from \"./vertical-step.component\";\n\n@Component({\n selector: \"app-vertical-step-content\",\n templateUrl: \"vertical-step-content.component.html\",\n})\nexport class VerticalStepContentComponent {\n @Output() onSelectStep = new EventEmitter();\n\n @Input() disabled = false;\n @Input() selected = false;\n @Input() step: VerticalStep;\n @Input() stepNumber: number;\n\n selectStep() {\n this.onSelectStep.emit();\n }\n}\n","
    \n
      \n
    • \n \n
    \n \n \n \n\n","import { CdkStepper } from \"@angular/cdk/stepper\";\nimport { Component, Input, QueryList } from \"@angular/core\";\n\nimport { VerticalStep } from \"./vertical-step.component\";\n\n@Component({\n selector: \"app-vertical-stepper\",\n templateUrl: \"vertical-stepper.component.html\",\n providers: [{ provide: CdkStepper, useExisting: VerticalStepperComponent }],\n})\nexport class VerticalStepperComponent extends CdkStepper {\n readonly steps: QueryList;\n\n @Input()\n activeClass = \"active\";\n\n isNextButtonHidden() {\n return !(this.steps.length === this.selectedIndex + 1);\n }\n\n isStepDisabled(index: number) {\n if (this.selectedIndex !== index) {\n return this.selectedIndex === index - 1\n ? !this.steps.find((_, i) => i == index - 1)?.completed\n : true;\n }\n return false;\n }\n\n selectStepByIndex(index: number): void {\n this.selectedIndex = index;\n }\n}\n","import { CaptchaProtectedRequest } from \"../../auth/models/request/captcha-protected.request\";\nimport { KdfType } from \"../../platform/enums\";\n\nimport { KeysRequest } from \"./keys.request\";\nimport { ReferenceEventRequest } from \"./reference-event.request\";\n\nexport class RegisterRequest implements CaptchaProtectedRequest {\n masterPasswordHint: string;\n keys: KeysRequest;\n token: string;\n organizationUserId: string;\n\n constructor(\n public email: string,\n public name: string,\n public masterPasswordHash: string,\n masterPasswordHint: string,\n public key: string,\n public referenceData: ReferenceEventRequest,\n public captchaResponse: string,\n public kdf: KdfType,\n public kdfIterations: number,\n public kdfMemory?: number,\n public kdfParallelism?: number,\n ) {\n this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;\n }\n}\n","import { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { AbstractControl, UntypedFormBuilder, ValidatorFn, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { LoginStrategyServiceAbstraction, PasswordLoginCredentials } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { DEFAULT_KDF_CONFIG } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { RegisterResponse } from \"@bitwarden/common/auth/models/response/register.response\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { RegisterRequest } from \"@bitwarden/common/models/request/register.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport {\n AllValidationErrors,\n FormValidationErrorsService,\n} from \"../../platform/abstractions/form-validation-errors.service\";\nimport { PasswordColorText } from \"../../tools/password-strength/password-strength.component\";\nimport { InputsFieldMatch } from \"../validators/inputs-field-match.validator\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class RegisterComponent extends CaptchaProtectedComponent implements OnInit {\n @Input() isInTrialFlow = false;\n @Output() createdAccount = new EventEmitter();\n\n showPassword = false;\n formPromise: Promise;\n referenceData: ReferenceEventRequest;\n showTerms = true;\n showErrorSummary = false;\n passwordStrengthResult: any;\n characterMinimumMessage: string;\n minimumLength = Utils.minimumPasswordLength;\n color: string;\n text: string;\n\n formGroup = this.formBuilder.group(\n {\n email: [\"\", [Validators.required, Validators.email]],\n name: [\"\"],\n masterPassword: [\"\", [Validators.required, Validators.minLength(this.minimumLength)]],\n confirmMasterPassword: [\"\", [Validators.required, Validators.minLength(this.minimumLength)]],\n hint: [\n null,\n [\n InputsFieldMatch.validateInputsDoesntMatch(\n \"masterPassword\",\n this.i18nService.t(\"hintEqualsPassword\"),\n ),\n ],\n ],\n checkForBreaches: [true],\n acceptPolicies: [false, [this.acceptPoliciesValidation()]],\n },\n {\n validator: InputsFieldMatch.validateFormInputsMatch(\n \"masterPassword\",\n \"confirmMasterPassword\",\n this.i18nService.t(\"masterPassDoesntMatch\"),\n ),\n },\n );\n\n protected successRoute = \"login\";\n\n protected accountCreated = false;\n\n protected captchaBypassToken: string = null;\n\n // allows for extending classes to modify the register request before sending\n // currently used by web to add organization invitation details\n protected modifyRegisterRequest: (request: RegisterRequest) => Promise;\n\n constructor(\n protected formValidationErrorService: FormValidationErrorsService,\n protected formBuilder: UntypedFormBuilder,\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n i18nService: I18nService,\n protected cryptoService: CryptoService,\n protected apiService: ApiService,\n protected stateService: StateService,\n platformUtilsService: PlatformUtilsService,\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n environmentService: EnvironmentService,\n protected logService: LogService,\n protected auditService: AuditService,\n protected dialogService: DialogService,\n ) {\n super(environmentService, i18nService, platformUtilsService);\n this.showTerms = !platformUtilsService.isSelfHost();\n this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n }\n\n async ngOnInit() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.setupCaptcha();\n }\n\n async submit(showToast = true) {\n let email = this.formGroup.value.email;\n email = email.trim().toLowerCase();\n let name = this.formGroup.value.name;\n name = name === \"\" ? null : name; // Why do we do this?\n const masterPassword = this.formGroup.value.masterPassword;\n try {\n if (!this.accountCreated) {\n const registerResponse = await this.registerAccount(\n await this.buildRegisterRequest(email, masterPassword, name),\n showToast,\n );\n if (!registerResponse.successful) {\n return;\n }\n this.captchaBypassToken = registerResponse.captchaBypassToken;\n this.accountCreated = true;\n }\n if (this.isInTrialFlow) {\n if (!this.accountCreated) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"trialAccountCreated\"),\n );\n }\n const loginResponse = await this.logIn(email, masterPassword, this.captchaBypassToken);\n if (loginResponse.captchaRequired) {\n return;\n }\n this.createdAccount.emit(this.formGroup.value.email);\n } else {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"newAccountCreated\"),\n );\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute], { queryParams: { email: email } });\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n togglePassword() {\n this.showPassword = !this.showPassword;\n }\n\n getStrengthResult(result: any) {\n this.passwordStrengthResult = result;\n }\n\n getPasswordScoreText(event: PasswordColorText) {\n this.color = event.color;\n this.text = event.text;\n }\n\n private getErrorToastMessage() {\n const error: AllValidationErrors = this.formValidationErrorService\n .getFormValidationErrors(this.formGroup.controls)\n .shift();\n\n if (error) {\n switch (error.errorName) {\n case \"email\":\n return this.i18nService.t(\"invalidEmail\");\n case \"inputsDoesntMatchError\":\n return this.i18nService.t(\"masterPassDoesntMatch\");\n case \"inputsMatchError\":\n return this.i18nService.t(\"hintEqualsPassword\");\n case \"minlength\":\n return this.i18nService.t(\"masterPasswordMinlength\", Utils.minimumPasswordLength);\n default:\n return this.i18nService.t(this.errorTag(error));\n }\n }\n\n return;\n }\n\n private errorTag(error: AllValidationErrors): string {\n const name = error.errorName.charAt(0).toUpperCase() + error.errorName.slice(1);\n return `${error.controlName}${name}`;\n }\n\n //validation would be ignored on selfhosted\n private acceptPoliciesValidation(): ValidatorFn {\n return (control: AbstractControl) => {\n const ctrlValue = control.value;\n\n return !ctrlValue && this.showTerms ? { required: true } : null;\n };\n }\n\n private async validateRegistration(showToast: boolean): Promise<{ isValid: boolean }> {\n this.formGroup.markAllAsTouched();\n this.showErrorSummary = true;\n\n if (this.formGroup.get(\"acceptPolicies\").hasError(\"required\")) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"acceptPoliciesRequired\"),\n );\n return { isValid: false };\n }\n\n //web\n if (this.formGroup.invalid && !showToast) {\n return { isValid: false };\n }\n\n //desktop, browser\n if (this.formGroup.invalid && showToast) {\n const errorText = this.getErrorToastMessage();\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errorText);\n return { isValid: false };\n }\n\n const passwordWeak =\n this.passwordStrengthResult != null && this.passwordStrengthResult.score < 3;\n const passwordLeak =\n this.formGroup.controls.checkForBreaches.value &&\n (await this.auditService.passwordLeaked(this.formGroup.controls.masterPassword.value)) > 0;\n\n if (passwordWeak && passwordLeak) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"weakAndExposedMasterPassword\" },\n content: { key: \"weakAndBreachedMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return { isValid: false };\n }\n } else if (passwordWeak) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"weakMasterPassword\" },\n content: { key: \"weakMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return { isValid: false };\n }\n } else if (passwordLeak) {\n const result = await this.dialogService.openSimpleDialog({\n title: { key: \"exposedMasterPassword\" },\n content: { key: \"exposedMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!result) {\n return { isValid: false };\n }\n }\n\n return { isValid: true };\n }\n\n private async buildRegisterRequest(\n email: string,\n masterPassword: string,\n name: string,\n ): Promise {\n const hint = this.formGroup.value.hint;\n const kdfConfig = DEFAULT_KDF_CONFIG;\n const key = await this.cryptoService.makeMasterKey(masterPassword, email, kdfConfig);\n const newUserKey = await this.cryptoService.makeUserKey(key);\n const masterKeyHash = await this.cryptoService.hashMasterKey(masterPassword, key);\n const keys = await this.cryptoService.makeKeyPair(newUserKey[0]);\n const request = new RegisterRequest(\n email,\n name,\n masterKeyHash,\n hint,\n newUserKey[1].encryptedString,\n this.referenceData,\n this.captchaToken,\n kdfConfig.kdfType,\n kdfConfig.iterations,\n );\n request.keys = new KeysRequest(keys[0], keys[1].encryptedString);\n if (this.modifyRegisterRequest) {\n await this.modifyRegisterRequest(request);\n }\n return request;\n }\n\n private async registerAccount(\n request: RegisterRequest,\n showToast: boolean,\n ): Promise<{ successful: boolean; captchaBypassToken?: string }> {\n if (!(await this.validateRegistration(showToast)).isValid) {\n return { successful: false };\n }\n this.formPromise = this.apiService.postRegister(request);\n try {\n const response = await this.formPromise;\n return { successful: true, captchaBypassToken: response.captchaBypassToken };\n } catch (e) {\n if (this.handleCaptchaRequired(e)) {\n return { successful: false };\n } else {\n throw e;\n }\n }\n }\n\n private async logIn(\n email: string,\n masterPassword: string,\n captchaBypassToken: string,\n ): Promise<{ captchaRequired: boolean }> {\n const credentials = new PasswordLoginCredentials(\n email,\n masterPassword,\n captchaBypassToken,\n null,\n );\n const loginResponse = await this.loginStrategyService.logIn(credentials);\n if (this.handleCaptchaRequired(loginResponse)) {\n return { captchaRequired: true };\n }\n return { captchaRequired: false };\n }\n}\n","\n\n\n
    \n
    \n \n {{ \"emailAddress\" | i18n }}\n \n {{ \"emailAddressDesc\" | i18n }}\n \n
    \n\n
    \n \n {{ \"name\" | i18n }}\n \n {{ \"yourNameDesc\" | i18n }}\n \n
    \n\n
    \n \n \n \n {{ \"masterPass\" | i18n }}\n \n \n \n {{ \"important\" | i18n }}\n {{ \"masterPassImportant\" | i18n }} {{ characterMinimumMessage }}\n \n \n \n \n
    \n\n
    \n \n {{ \"reTypeMasterPass\" | i18n }}\n \n \n \n
    \n\n
    \n \n {{ \"masterPassHintLabel\" | i18n }}\n \n {{ \"masterPassHintDesc\" | i18n }}\n \n
    \n\n
    \n \n
    \n
    \n \n {{ \"checkForBreaches\" | i18n }}\n
    \n
    \n \n\n \n {{ \"acceptPolicies\" | i18n }}
    \n {{\n \"termsOfService\" | i18n\n }},\n {{\n \"privacyPolicy\" | i18n\n }}\n
    \n
    \n\n
    \n \n \n {{ \"createAccount\" | i18n }}\n \n \n \n \n {{ \"logIn\" | i18n }}\n \n \n
    \n

    \n {{ \"alreadyHaveAccount\" | i18n }}\n {{ \"logIn\" | i18n }}\n

    \n \n
    \n\n","import { Component, Input } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { RegisterComponent as BaseRegisterComponent } from \"@bitwarden/angular/auth/components/register.component\";\nimport { FormValidationErrorsService } from \"@bitwarden/angular/platform/abstractions/form-validation-errors.service\";\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { RegisterRequest } from \"@bitwarden/common/models/request/register.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\n\n@Component({\n selector: \"app-register-form\",\n templateUrl: \"./register-form.component.html\",\n})\nexport class RegisterFormComponent extends BaseRegisterComponent {\n @Input() queryParamEmail: string;\n @Input() queryParamFromOrgInvite: boolean;\n @Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;\n @Input() referenceDataValue: ReferenceEventRequest;\n\n showErrorSummary = false;\n characterMinimumMessage: string;\n\n constructor(\n formValidationErrorService: FormValidationErrorsService,\n formBuilder: UntypedFormBuilder,\n loginStrategyService: LoginStrategyServiceAbstraction,\n router: Router,\n i18nService: I18nService,\n cryptoService: CryptoService,\n apiService: ApiService,\n stateService: StateService,\n platformUtilsService: PlatformUtilsService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n private policyService: PolicyService,\n environmentService: EnvironmentService,\n logService: LogService,\n auditService: AuditService,\n dialogService: DialogService,\n acceptOrgInviteService: AcceptOrganizationInviteService,\n ) {\n super(\n formValidationErrorService,\n formBuilder,\n loginStrategyService,\n router,\n i18nService,\n cryptoService,\n apiService,\n stateService,\n platformUtilsService,\n passwordGenerationService,\n environmentService,\n logService,\n auditService,\n dialogService,\n );\n super.modifyRegisterRequest = async (request: RegisterRequest) => {\n // Org invites are deep linked. Non-existent accounts are redirected to the register page.\n // Org user id and token are included here only for validation and two factor purposes.\n const orgInvite = await acceptOrgInviteService.getOrganizationInvite();\n if (orgInvite != null) {\n request.organizationUserId = orgInvite.organizationUserId;\n request.token = orgInvite.token;\n }\n // Invite is accepted after login (on deep link redirect).\n };\n }\n\n async ngOnInit() {\n await super.ngOnInit();\n this.referenceData = this.referenceDataValue;\n if (this.queryParamEmail) {\n this.formGroup.get(\"email\")?.setValue(this.queryParamEmail);\n }\n\n if (this.enforcedPolicyOptions != null && this.enforcedPolicyOptions.minLength > 0) {\n this.characterMinimumMessage = \"\";\n } else {\n this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n }\n }\n\n async submit() {\n if (\n this.enforcedPolicyOptions != null &&\n !this.policyService.evaluateMasterPassword(\n this.passwordStrengthResult.score,\n this.formGroup.value.masterPassword,\n this.enforcedPolicyOptions,\n )\n ) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n );\n return;\n }\n\n await super.submit(false);\n }\n}\n","
    \n \n \n \n {{ region.domain }}\n \n \n
    \n {{ \"server\" | i18n }}:\n \n {{ currentRegion?.domain }}\n \n
    \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport {\n EnvironmentService,\n RegionConfig,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Component({\n selector: \"environment-selector\",\n templateUrl: \"environment-selector.component.html\",\n})\nexport class EnvironmentSelectorComponent implements OnInit {\n constructor(\n private platformUtilsService: PlatformUtilsService,\n private environmentService: EnvironmentService,\n private router: Router,\n ) {}\n\n protected availableRegions = this.environmentService.availableRegions();\n protected currentRegion?: RegionConfig;\n\n protected showRegionSelector = false;\n protected routeAndParams: string;\n\n async ngOnInit() {\n this.showRegionSelector = !this.platformUtilsService.isSelfHost();\n this.routeAndParams = `/#${this.router.url}`;\n\n const host = Utils.getHost(window.location.href);\n this.currentRegion = this.availableRegions.find((r) => Utils.getHost(r.urls.webVault) === host);\n }\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-logo-badges\",\n templateUrl: \"logo-badges.component.html\",\n})\nexport class LogoBadgesComponent {}\n","
    \n
    \n \n \n \n
    \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-enterprise-content\",\n templateUrl: \"enterprise-content.component.html\",\n})\nexport class EnterpriseContentComponent {}\n","

    Start your 7-day Enterprise free trial

    \n
    \n

    \n Bitwarden is the most trusted password manager designed for seamless administration and employee\n usability.\n

    \n
    \n
      \n
    • \n Instantly and securely share credentials with the groups and individuals who need them\n
    • \n
    • \n Strengthen company-wide security through centralized administrative control and\n policies\n
    • \n
    • \n Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n integrations\n
    • \n
    • \n Migrate to Bitwarden in minutes with comprehensive import options\n
    • \n
    • \n Give all Enterprise users the gift of 360º security with a free Families plan\n
    • \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-logo-forbes\",\n templateUrl: \"logo-forbes.component.html\",\n})\nexport class LogoForbesComponent {}\n","
    \n
    \n \n \n \n
    \n
    \n “Bitwarden boasts the backing of some of the world's best security experts and an attractive,\n easy-to-use interface”\n
    \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-logo-us-news\",\n templateUrl: \"logo-us-news.component.html\",\n})\nexport class LogoUSNewsComponent {}\n","\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-teams-content\",\n templateUrl: \"teams-content.component.html\",\n})\nexport class TeamsContentComponent {}\n","

    The Bitwarden Password Manager

    \n
    \n

    \n Trusted by millions of individuals, teams, and organizations worldwide for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Store logins, secure notes, and more
    • \n
    • Collaborate and share securely
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-trial-confirmation-details\",\n templateUrl: \"confirmation-details.component.html\",\n})\nexport class ConfirmationDetailsComponent {\n @Input() email: string;\n @Input() orgLabel: string;\n}\n","
    \n

    {{ \"trialThankYou\" | i18n: orgLabel }}

    \n
      \n
    • \n

      \n {{ \"trialConfirmationEmail\" | i18n }}\n {{ email }}.\n

      \n
    • \n
    • \n

      \n {{ \"trialPaidInfoMessage\" | i18n: orgLabel }}\n

      \n
    • \n
    \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-default-content\",\n templateUrl: \"default-content.component.html\",\n})\nexport class DefaultContentComponent {}\n","

    The Bitwarden Password Manager

    \n
    \n

    \n Trusted by millions of individuals, teams, and organizations worldwide for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Store logins, secure notes, and more
    • \n
    • Collaborate and share securely
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-enterprise1-content\",\n templateUrl: \"enterprise1-content.component.html\",\n})\nexport class Enterprise1ContentComponent {}\n","

    Start your 7-day Enterprise free trial

    \n
    \n

    \n Bitwarden is the most trusted password manager designed for seamless administration and employee\n usability.\n

    \n
    \n
      \n
    • \n Instantly and securely share credentials with the groups and individuals who need them\n
    • \n
    • \n Strengthen company-wide security through centralized administrative control and\n policies\n
    • \n
    • \n Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n integrations\n
    • \n
    • \n Migrate to Bitwarden in minutes with comprehensive import options\n
    • \n
    • \n Give all Enterprise users the gift of 360º security with a free Families plan\n
    • \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-enterprise2-content\",\n templateUrl: \"enterprise2-content.component.html\",\n})\nexport class Enterprise2ContentComponent {}\n","

    Start your 7-day Enterprise free trial

    \n
    \n

    \n Bitwarden is the most trusted password manager designed for seamless administration and employee\n usability.\n

    \n
    \n
      \n
    • \n Instantly and securely share credentials with the groups and individuals who need them\n
    • \n
    • \n Strengthen company-wide security through centralized administrative control and\n policies\n
    • \n
    • \n Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n integrations\n
    • \n
    • \n Migrate to Bitwarden in minutes with comprehensive import options\n
    • \n
    • \n Give all Enterprise users the gift of 360º security with a free Families plan\n
    • \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-teams1-content\",\n templateUrl: \"teams1-content.component.html\",\n})\nexport class Teams1ContentComponent {}\n","

    Start your 7-day free trial for Teams

    \n
    \n

    \n Strengthen business security with an easy-to-use password manager your team will love.\n

    \n
    \n
      \n
    • \n Instantly and securely share credentials with the groups and individuals who need them\n
    • \n
    • \n Migrate to Bitwarden in minutes with comprehensive import options\n
    • \n
    • \n Save time and increase productivity with autofill and instant device syncing\n
    • \n
    • \n Enhance security practices across your team with easy user management\n
    • \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-teams2-content\",\n templateUrl: \"teams2-content.component.html\",\n})\nexport class Teams2ContentComponent {}\n","

    Start your 7-day free trial for Teams

    \n
    \n

    \n Strengthen business security with an easy-to-use password manager your team will love.\n

    \n
    \n
      \n
    • \n Instantly and securely share credentials with the groups and individuals who need them\n
    • \n
    • \n Migrate to Bitwarden in minutes with comprehensive import options\n
    • \n
    • \n Save time and increase productivity with autofill and instant device syncing\n
    • \n
    • \n Enhance security practices across your team with easy user management\n
    • \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-teams3-content\",\n templateUrl: \"teams3-content.component.html\",\n})\nexport class Teams3ContentComponent {}\n","

    Begin Teams Starter Free Trial Now

    \n
    \n

    \n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n storage and sharing.\n

    \n
    \n\n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-logo-cnet\",\n templateUrl: \"logo-cnet.component.html\",\n})\nexport class LogoCnetComponent {}\n","
    \n
    \n \n \n \n
    \n
    \n \"No more excuses; start using Bitwarden today. The identity you save could be your own. The\n money definitely will be.\"\n
    \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-cnet-enterprise-content\",\n templateUrl: \"cnet-enterprise-content.component.html\",\n})\nexport class CnetEnterpriseContentComponent {}\n","

    Start Your Enterprise Free Trial Now

    \n
    \n

    \n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Collaborate and share securely
    • \n
    • Deploy and manage quickly and easily
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-cnet-individual-content\",\n templateUrl: \"cnet-individual-content.component.html\",\n})\nexport class CnetIndividualContentComponent {}\n","

    Start Your Premium Account Now

    \n
    \n

    \n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Store logins, secure notes, and more
    • \n
    • Secure your account with advanced two-step login
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-cnet-teams-content\",\n templateUrl: \"cnet-teams-content.component.html\",\n})\nexport class CnetTeamsContentComponent {}\n","

    Start Your Teams Free Trial Now

    \n
    \n

    \n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Collaborate and share securely
    • \n
    • Deploy and manage quickly and easily
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-abm-enterprise-content\",\n templateUrl: \"abm-enterprise-content.component.html\",\n})\nexport class AbmEnterpriseContentComponent {}\n","

    The Bitwarden Password Manager

    \n
    \n

    \n Trusted by millions of individuals, teams, and organizations worldwide for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Store logins, secure notes, and more
    • \n
    • Collaborate and share securely
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-abm-teams-content\",\n templateUrl: \"abm-teams-content.component.html\",\n})\nexport class AbmTeamsContentComponent {}\n","

    The Bitwarden Password Manager

    \n
    \n

    \n Trusted by millions of individuals, teams, and organizations worldwide for secure password\n storage and sharing.\n

    \n
    \n
      \n
    • Store logins, secure notes, and more
    • \n
    • Collaborate and share securely
    • \n
    • Access anywhere on any device
    • \n
    • Create your account to get started
    • \n
    \n
    \n \n \n
    \n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-review-blurb\",\n templateUrl: \"review-blurb.component.html\",\n})\nexport class ReviewBlurbComponent {\n @Input() header: string;\n @Input() quote: string;\n @Input() source: string;\n}\n","

    {{ header }}

    \n
    \n

    \n {{ headline }}\n

    \n
    \n
      \n
    • \n {{ primaryPoint }}\n
    • \n
    \n
    \n
    \n
    \n

    {{ calloutHeadline }}

    \n
      \n
    • \n {{ callout }}\n
    • \n
    \n
    \n
    \n
    \n
    \n \n
    \n","
    \n

    \n {{ header }}\n

    \n
    \n \"{{ quote }}\"\n
    \n
    \n \n

    {{ source }}

    \n
    \n
    \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\n@Component({\n selector: \"app-secrets-manager-content\",\n templateUrl: \"secrets-manager-content.component.html\",\n})\nexport class SecretsManagerContentComponent implements OnInit, OnDestroy {\n header: string;\n headline =\n \"A simpler, faster way to secure and automate secrets across code and infrastructure deployments\";\n primaryPoints: string[];\n calloutHeadline: string;\n callouts: string[];\n\n private paidPrimaryPoints = [\n \"Unlimited secrets, users, and projects\",\n \"Simple and transparent pricing\",\n \"Zero-knowledge, end-to-end encryption\",\n ];\n\n private paidCalloutHeadline = \"Limited time offer\";\n\n private paidCallouts = [\n \"Sign up today and receive a complimentary 12-month subscription to Bitwarden Password Manager\",\n \"Experience complete security across your organization\",\n \"Secure all your sensitive credentials, from user applications to machine secrets\",\n ];\n\n private freePrimaryPoints = [\n \"Unlimited secrets\",\n \"Simple and transparent pricing\",\n \"Zero-knowledge, end-to-end encryption\",\n ];\n\n private freeCalloutHeadline = \"Go beyond developer security!\";\n\n private freeCallouts = [\n \"Your Bitwarden account will also grant complimentary access to Bitwarden Password Manager\",\n \"Extend end-to-end encryption to your personal passwords, addresses, credit cards and notes\",\n ];\n\n private destroy$ = new Subject();\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngOnInit(): void {\n this.activatedRoute.queryParams.pipe(takeUntil(this.destroy$)).subscribe((queryParameters) => {\n switch (queryParameters.org) {\n case \"enterprise\":\n this.header = \"Secrets Manager for Enterprise\";\n this.primaryPoints = this.paidPrimaryPoints;\n this.calloutHeadline = this.paidCalloutHeadline;\n this.callouts = this.paidCallouts;\n break;\n case \"free\":\n this.header = \"Bitwarden Secrets Manager\";\n this.primaryPoints = this.freePrimaryPoints;\n this.calloutHeadline = this.freeCalloutHeadline;\n this.callouts = this.freeCallouts;\n break;\n case \"teams\":\n case \"teamsStarter\":\n this.header = \"Secrets Manager for Teams\";\n this.primaryPoints = this.paidPrimaryPoints;\n this.calloutHeadline = this.paidCalloutHeadline;\n this.callouts = this.paidCallouts;\n break;\n }\n });\n }\n}\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { OrganizationBillingServiceAbstraction as OrganizationBillingService } from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PlanType } from \"@bitwarden/common/billing/enums\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { VerticalStepperComponent } from \"../../trial-initiation/vertical-stepper/vertical-stepper.component\";\n\n@Component({\n selector: \"app-secrets-manager-trial-free-stepper\",\n templateUrl: \"secrets-manager-trial-free-stepper.component.html\",\n})\nexport class SecretsManagerTrialFreeStepperComponent implements OnInit {\n @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n\n formGroup = this.formBuilder.group({\n name: [\n \"\",\n {\n validators: [Validators.required, Validators.maxLength(50)],\n updateOn: \"change\",\n },\n ],\n email: [\n \"\",\n {\n validators: [Validators.email],\n },\n ],\n });\n\n subLabels = {\n createAccount:\n \"Before creating your free organization, you first need to log in or create a personal account.\",\n organizationInfo: \"Enter your organization information\",\n };\n\n organizationId: string;\n\n referenceEventRequest: ReferenceEventRequest;\n\n constructor(\n protected formBuilder: UntypedFormBuilder,\n protected i18nService: I18nService,\n protected organizationBillingService: OrganizationBillingService,\n private router: Router,\n ) {}\n\n ngOnInit(): void {\n this.referenceEventRequest = new ReferenceEventRequest();\n this.referenceEventRequest.initiationPath = \"Secrets Manager trial from marketing website\";\n }\n\n accountCreated(email: string): void {\n this.formGroup.get(\"email\")?.setValue(email);\n this.subLabels.createAccount = email;\n this.verticalStepper.next();\n }\n\n async createOrganization(): Promise {\n const response = await this.organizationBillingService.startFree({\n organization: {\n name: this.formGroup.get(\"name\").value,\n billingEmail: this.formGroup.get(\"email\").value,\n },\n plan: {\n type: PlanType.Free,\n subscribeToSecretsManager: true,\n isFromSecretsManagerTrial: true,\n },\n });\n\n this.organizationId = response.id;\n this.subLabels.organizationInfo = response.name;\n this.verticalStepper.next();\n }\n\n async navigateToMembers(): Promise {\n await this.router.navigate([\"organizations\", this.organizationId, \"members\"]);\n }\n\n async navigateToSecretsManager(): Promise {\n await this.router.navigate([\"sm\", this.organizationId]);\n }\n}\n","\n \n \n \n \n \n \n \n {{ \"next\" | i18n }}\n \n \n \n
    \n

    {{ \"smFreeTrialThankYou\" | i18n }}

    \n
      \n
    • \n

      \n {{ \"smFreeTrialConfirmationEmail\" | i18n }}\n {{ formGroup.get(\"email\").value }}.\n

      \n
    • \n
    \n
    \n
    \n \n \n {{ \"inviteUsers\" | i18n }}\n \n
    \n
    \n
    \n","\n \n \n \n \n \n \n \n {{ \"next\" | i18n }}\n \n \n \n \n \n \n \n
    \n \n \n {{ \"inviteUsers\" | i18n }}\n \n
    \n
    \n
    \n","import { Component, Input, ViewChild } from \"@angular/core\";\n\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\n\nimport {\n OrganizationCreatedEvent,\n SubscriptionProduct,\n TrialOrganizationType,\n} from \"../../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { VerticalStepperComponent } from \"../../trial-initiation/vertical-stepper/vertical-stepper.component\";\nimport { SecretsManagerTrialFreeStepperComponent } from \"../secrets-manager/secrets-manager-trial-free-stepper.component\";\n\n@Component({\n selector: \"app-secrets-manager-trial-paid-stepper\",\n templateUrl: \"secrets-manager-trial-paid-stepper.component.html\",\n})\nexport class SecretsManagerTrialPaidStepperComponent extends SecretsManagerTrialFreeStepperComponent {\n @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n @Input() organizationTypeQueryParameter: string;\n\n billingSubLabel = this.i18nService.t(\"billingTrialSubLabel\");\n organizationId: string;\n\n organizationCreated(event: OrganizationCreatedEvent) {\n this.organizationId = event.organizationId;\n this.billingSubLabel = event.planDescription;\n this.verticalStepper.next();\n }\n\n steppedBack() {\n this.verticalStepper.previous();\n }\n\n get createAccountLabel() {\n const organizationType =\n this.productType === ProductTierType.TeamsStarter\n ? \"Teams Starter\"\n : ProductTierType[this.productType];\n return `Before creating your ${organizationType} organization, you first need to log in or create a personal account.`;\n }\n\n get productType(): TrialOrganizationType {\n switch (this.organizationTypeQueryParameter) {\n case \"enterprise\":\n return ProductTierType.Enterprise;\n case \"families\":\n return ProductTierType.Families;\n case \"teams\":\n return ProductTierType.Teams;\n case \"teamsStarter\":\n return ProductTierType.TeamsStarter;\n }\n }\n\n protected readonly SubscriptionProduct = SubscriptionProduct;\n}\n","\n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n

    \n {{\n \"startYour7DayFreeTrialOfBitwardenSecretsManagerFor\"\n | i18n: organizationTypeQueryParameter\n }}\n

    \n \n
    \n \n \n
    \n
    \n
    \n \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\n@Component({\n selector: \"app-secrets-manager-trial\",\n templateUrl: \"secrets-manager-trial.component.html\",\n})\nexport class SecretsManagerTrialComponent implements OnInit, OnDestroy {\n organizationTypeQueryParameter: string;\n\n private destroy$ = new Subject();\n\n constructor(private route: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((queryParameters) => {\n this.organizationTypeQueryParameter = queryParameters.org;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n get freeOrganization() {\n return this.organizationTypeQueryParameter === \"free\";\n }\n}\n","\n\n\n
    \n

    {{ \"createAccount\" | i18n }}

    \n \n \n
    \n \n
    \n
    \n
    \n
    \n \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n

    \n {{ freeTrialText }}\n

    \n \n
    \n \n \n \n \n \n \n \n {{ \"next\" | i18n }}\n \n \n \n \n \n \n \n \n
    \n \n {{ \"getStarted\" | i18n | titlecase }}\n \n \n {{ \"inviteUsers\" | i18n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n","import { StepperSelectionEvent } from \"@angular/cdk/stepper\";\nimport { TitleCasePipe } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport {\n OrganizationCreatedEvent,\n SubscriptionProduct,\n TrialOrganizationType,\n} from \"../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\nimport { OrganizationInvite } from \"../organization-invite/organization-invite\";\n\nimport { RouterService } from \"./../../core/router.service\";\nimport { VerticalStepperComponent } from \"./vertical-stepper/vertical-stepper.component\";\n\nenum ValidOrgParams {\n families = \"families\",\n enterprise = \"enterprise\",\n teams = \"teams\",\n teamsStarter = \"teamsStarter\",\n individual = \"individual\",\n premium = \"premium\",\n free = \"free\",\n}\n\nenum ValidLayoutParams {\n default = \"default\",\n teams = \"teams\",\n teams1 = \"teams1\",\n teams2 = \"teams2\",\n teams3 = \"teams3\",\n enterprise = \"enterprise\",\n enterprise1 = \"enterprise1\",\n enterprise2 = \"enterprise2\",\n cnetcmpgnent = \"cnetcmpgnent\",\n cnetcmpgnind = \"cnetcmpgnind\",\n cnetcmpgnteams = \"cnetcmpgnteams\",\n abmenterprise = \"abmenterprise\",\n abmteams = \"abmteams\",\n secretsManager = \"secretsManager\",\n}\n\n@Component({\n selector: \"app-trial\",\n templateUrl: \"trial-initiation.component.html\",\n})\nexport class TrialInitiationComponent implements OnInit, OnDestroy {\n email = \"\";\n fromOrgInvite = false;\n org = \"\";\n orgInfoSubLabel = \"\";\n orgId = \"\";\n orgLabel = \"\";\n billingSubLabel = \"\";\n layout = \"default\";\n plan: PlanType;\n productTier: ProductTierType;\n accountCreateOnly = true;\n useTrialStepper = false;\n policies: Policy[];\n enforcedPolicyOptions: MasterPasswordPolicyOptions;\n trialFlowOrgs: string[] = [\n ValidOrgParams.teams,\n ValidOrgParams.teamsStarter,\n ValidOrgParams.enterprise,\n ValidOrgParams.families,\n ];\n routeFlowOrgs: string[] = [\n ValidOrgParams.free,\n ValidOrgParams.premium,\n ValidOrgParams.individual,\n ];\n layouts = ValidLayoutParams;\n referenceData: ReferenceEventRequest;\n @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n\n orgInfoFormGroup = this.formBuilder.group({\n name: [\"\", { validators: [Validators.required, Validators.maxLength(50)], updateOn: \"change\" }],\n email: [\"\"],\n });\n\n private set referenceDataId(referenceId: string) {\n if (referenceId != null) {\n this.referenceData.id = referenceId;\n } else {\n this.referenceData.id = (\"; \" + document.cookie)\n .split(\"; reference=\")\n .pop()\n .split(\";\")\n .shift();\n }\n\n if (this.referenceData.id === \"\") {\n this.referenceData.id = null;\n } else {\n // Matches \"_ga_QBRN562QQQ=value1.value2.session\" and captures values and session.\n const regex = /_ga_QBRN562QQQ=([^.]+)\\.([^.]+)\\.(\\d+)/;\n const match = document.cookie.match(regex);\n if (match) {\n this.referenceData.session = match[3];\n }\n }\n }\n\n private destroy$ = new Subject();\n\n constructor(\n private route: ActivatedRoute,\n protected router: Router,\n private formBuilder: UntypedFormBuilder,\n private titleCasePipe: TitleCasePipe,\n private logService: LogService,\n private policyApiService: PolicyApiServiceAbstraction,\n private policyService: PolicyService,\n private i18nService: I18nService,\n private routerService: RouterService,\n private acceptOrgInviteService: AcceptOrganizationInviteService,\n ) {}\n\n async ngOnInit(): Promise {\n this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n this.referenceData = new ReferenceEventRequest();\n if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n this.email = qParams.email;\n this.fromOrgInvite = qParams.fromOrgInvite === \"true\";\n }\n\n this.referenceDataId = qParams.reference;\n\n if (Object.values(ValidLayoutParams).includes(qParams.layout)) {\n this.layout = qParams.layout;\n this.accountCreateOnly = false;\n }\n\n if (this.trialFlowOrgs.includes(qParams.org)) {\n this.org = qParams.org;\n this.orgLabel = this.titleCasePipe.transform(this.orgDisplayName);\n this.useTrialStepper = true;\n this.referenceData.flow = qParams.org;\n\n if (this.org === ValidOrgParams.families) {\n this.plan = PlanType.FamiliesAnnually;\n this.productTier = ProductTierType.Families;\n } else if (this.org === ValidOrgParams.teamsStarter) {\n this.plan = PlanType.TeamsStarter;\n this.productTier = ProductTierType.TeamsStarter;\n } else if (this.org === ValidOrgParams.teams) {\n this.plan = PlanType.TeamsAnnually;\n this.productTier = ProductTierType.Teams;\n } else if (this.org === ValidOrgParams.enterprise) {\n this.plan = PlanType.EnterpriseAnnually;\n this.productTier = ProductTierType.Enterprise;\n }\n } else if (this.routeFlowOrgs.includes(qParams.org)) {\n this.referenceData.flow = qParams.org;\n const route = this.router.createUrlTree([\"create-organization\"], {\n queryParams: { plan: qParams.org },\n });\n this.routerService.setPreviousUrl(route.toString());\n }\n\n // Are they coming from an email for sponsoring a families organization\n // After logging in redirect them to setup the families sponsorship\n this.setupFamilySponsorship(qParams.sponsorshipToken);\n\n this.referenceData.initiationPath = this.accountCreateOnly\n ? \"Registration form\"\n : \"Password Manager trial from marketing website\";\n });\n\n // If there's a deep linked org invite, use it to get the password policies\n const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n if (orgInvite != null) {\n await this.initPasswordPolicies(orgInvite);\n }\n\n this.orgInfoFormGroup.controls.name.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.orgInfoFormGroup.controls.name.markAsTouched();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n stepSelectionChange(event: StepperSelectionEvent) {\n // Set org info sub label\n if (event.selectedIndex === 1 && this.orgInfoFormGroup.controls.name.value === \"\") {\n this.orgInfoSubLabel =\n \"Enter your \" +\n this.titleCasePipe.transform(this.orgDisplayName) +\n \" organization information\";\n } else if (event.previouslySelectedIndex === 1) {\n this.orgInfoSubLabel = this.orgInfoFormGroup.controls.name.value;\n }\n\n //set billing sub label\n if (event.selectedIndex === 2) {\n this.billingSubLabel = this.i18nService.t(\"billingTrialSubLabel\");\n }\n }\n\n createdAccount(email: string) {\n this.email = email;\n this.orgInfoFormGroup.get(\"email\")?.setValue(email);\n this.verticalStepper.next();\n }\n\n billingSuccess(event: any) {\n this.orgId = event?.orgId;\n this.billingSubLabel = event?.subLabelText;\n this.verticalStepper.next();\n }\n\n createdOrganization(event: OrganizationCreatedEvent) {\n this.orgId = event.organizationId;\n this.billingSubLabel = event.planDescription;\n this.verticalStepper.next();\n }\n\n navigateToOrgVault() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"organizations\", this.orgId, \"vault\"]);\n }\n\n navigateToOrgInvite() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"organizations\", this.orgId, \"members\"]);\n }\n\n previousStep() {\n this.verticalStepper.previous();\n }\n\n get orgDisplayName() {\n if (this.org === \"teamsStarter\") {\n return \"Teams Starter\";\n }\n\n return this.org;\n }\n\n get freeTrialText() {\n const translationKey =\n this.layout === this.layouts.secretsManager\n ? \"startYour7DayFreeTrialOfBitwardenSecretsManagerFor\"\n : \"startYour7DayFreeTrialOfBitwardenFor\";\n\n return this.i18nService.t(translationKey, this.org);\n }\n\n get trialOrganizationType(): TrialOrganizationType {\n switch (this.productTier) {\n case ProductTierType.Free:\n return null;\n default:\n return this.productTier;\n }\n }\n\n private setupFamilySponsorship(sponsorshipToken: string) {\n if (sponsorshipToken != null) {\n const route = this.router.createUrlTree([\"setup/families-for-enterprise\"], {\n queryParams: { plan: sponsorshipToken },\n });\n this.routerService.setPreviousUrl(route.toString());\n }\n }\n\n private async initPasswordPolicies(invite: OrganizationInvite): Promise {\n if (invite == null) {\n return;\n }\n\n try {\n this.policies = await this.policyApiService.getPoliciesByToken(\n invite.organizationId,\n invite.token,\n invite.email,\n invite.organizationUserId,\n );\n } catch (e) {\n this.logService.error(e);\n }\n\n if (this.policies != null) {\n this.policyService\n .masterPasswordPolicyOptions$(this.policies)\n .pipe(takeUntil(this.destroy$))\n .subscribe((enforcedPasswordPolicyOptions) => {\n this.enforcedPolicyOptions = enforcedPasswordPolicyOptions;\n });\n }\n }\n\n protected readonly SubscriptionProduct = SubscriptionProduct;\n}\n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n ButtonModule,\n LinkModule,\n TypographyModule,\n FormFieldModule,\n AsyncActionsModule,\n} from \"@bitwarden/components\";\n\n@Component({\n standalone: true,\n selector: \"app-two-factor-auth-authenticator\",\n templateUrl: \"two-factor-auth-authenticator.component.html\",\n imports: [\n CommonModule,\n JslibModule,\n DialogModule,\n ButtonModule,\n LinkModule,\n TypographyModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n FormsModule,\n ],\n providers: [I18nPipe],\n})\nexport class TwoFactorAuthAuthenticatorComponent {\n tokenValue: string;\n @Output() token = new EventEmitter();\n}\n","\n

    \n {{ \"enterVerificationCodeApp\" | i18n }}\n

    \n \n {{ \"verificationCode\" | i18n }}\n \n \n
    \n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n ButtonModule,\n LinkModule,\n TypographyModule,\n FormFieldModule,\n AsyncActionsModule,\n} from \"@bitwarden/components\";\n\n@Component({\n standalone: true,\n selector: \"app-two-factor-auth-email\",\n templateUrl: \"two-factor-auth-email.component.html\",\n imports: [\n CommonModule,\n JslibModule,\n DialogModule,\n ButtonModule,\n LinkModule,\n TypographyModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n FormsModule,\n ],\n providers: [I18nPipe],\n})\nexport class TwoFactorAuthEmailComponent {\n @Output() token = new EventEmitter();\n\n twoFactorEmail: string = null;\n emailPromise: Promise;\n tokenValue: string = \"\";\n\n constructor(\n protected i18nService: I18nService,\n protected twoFactorService: TwoFactorService,\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected platformUtilsService: PlatformUtilsService,\n protected logService: LogService,\n protected apiService: ApiService,\n protected appIdService: AppIdService,\n ) {}\n\n async ngOnInit(): Promise {\n const providerData = await this.twoFactorService.getProviders().then((providers) => {\n return providers.get(TwoFactorProviderType.Email);\n });\n this.twoFactorEmail = providerData.Email;\n\n if ((await this.twoFactorService.getProviders()).size > 1) {\n await this.sendEmail(false);\n }\n }\n\n async sendEmail(doToast: boolean) {\n if (this.emailPromise != null) {\n return;\n }\n\n if ((await this.loginStrategyService.getEmail()) == null) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"sessionTimeout\"),\n );\n return;\n }\n\n try {\n const request = new TwoFactorEmailRequest();\n request.email = await this.loginStrategyService.getEmail();\n request.masterPasswordHash = await this.loginStrategyService.getMasterPasswordHash();\n request.ssoEmail2FaSessionToken =\n await this.loginStrategyService.getSsoEmail2FaSessionToken();\n request.deviceIdentifier = await this.appIdService.getAppId();\n request.authRequestAccessCode = await this.loginStrategyService.getAccessCode();\n request.authRequestId = await this.loginStrategyService.getAuthRequestId();\n this.emailPromise = this.apiService.postTwoFactorEmail(request);\n await this.emailPromise;\n if (doToast) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"verificationCodeEmailSent\", this.twoFactorEmail),\n );\n }\n } catch (e) {\n this.logService.error(e);\n }\n\n this.emailPromise = null;\n }\n}\n","

    \n {{ \"enterVerificationCodeEmail\" | i18n: twoFactorEmail }}\n

    \n\n {{ \"verificationCode\" | i18n }}\n \n \n
    \n {{ \"sendVerificationCodeEmailAgain\" | i18n }}\n \n\n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n ButtonModule,\n LinkModule,\n TypographyModule,\n FormFieldModule,\n AsyncActionsModule,\n} from \"@bitwarden/components\";\n\n@Component({\n standalone: true,\n selector: \"app-two-factor-auth-yubikey\",\n templateUrl: \"two-factor-auth-yubikey.component.html\",\n imports: [\n CommonModule,\n JslibModule,\n DialogModule,\n ButtonModule,\n LinkModule,\n TypographyModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n FormsModule,\n ],\n providers: [I18nPipe],\n})\nexport class TwoFactorAuthYubikeyComponent {\n tokenValue: string = \"\";\n @Output() token = new EventEmitter();\n}\n","

    {{ \"insertYubiKey\" | i18n }}

    \n\n \n \n \"\"\n\n\n {{ \"verificationCode\" | i18n }}\n \n\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ButtonModule, DialogModule, DialogService, TypographyModule } from \"@bitwarden/components\";\n\nexport enum TwoFactorOptionsDialogResult {\n Provider = \"Provider selected\",\n Recover = \"Recover selected\",\n}\n\nexport type TwoFactorOptionsDialogResultType = {\n result: TwoFactorOptionsDialogResult;\n type: TwoFactorProviderType;\n};\n\n@Component({\n standalone: true,\n selector: \"app-two-factor-options\",\n templateUrl: \"two-factor-options.component.html\",\n imports: [CommonModule, JslibModule, DialogModule, ButtonModule, TypographyModule],\n providers: [I18nPipe],\n})\nexport class TwoFactorOptionsComponent implements OnInit {\n @Output() onProviderSelected = new EventEmitter();\n @Output() onRecoverSelected = new EventEmitter();\n\n providers: any[] = [];\n\n // todo: remove after porting to two-factor-options-v2\n // icons cause the layout to break on browser extensions\n areIconsDisabled = false;\n\n constructor(\n private twoFactorService: TwoFactorService,\n private environmentService: EnvironmentService,\n private dialogRef: DialogRef,\n private platformUtilsService: PlatformUtilsService,\n ) {\n // todo: remove after porting to two-factor-options-v2\n if (this.platformUtilsService.getClientType() == ClientType.Browser) {\n this.areIconsDisabled = true;\n }\n }\n\n async ngOnInit() {\n this.providers = await this.twoFactorService.getSupportedProviders(window);\n }\n\n async choose(p: any) {\n this.onProviderSelected.emit(p.type);\n this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Provider, type: p.type });\n }\n\n async recover() {\n const env = await firstValueFrom(this.environmentService.environment$);\n const webVault = env.getWebVaultUrl();\n this.platformUtilsService.launchUri(webVault + \"/#/recover-2fa\");\n this.onRecoverSelected.emit();\n this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Recover });\n }\n\n static open(dialogService: DialogService) {\n return dialogService.open(TwoFactorOptionsComponent);\n }\n}\n","\n \n {{ \"twoStepOptions\" | i18n }}\n \n \n
    \n
    \n \n \n
    \n
    \n

    {{ p.name }}

    \n

    {{ p.description }}

    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n \"rc\n
    \n
    \n

    {{ \"recoveryCodeTitle\" | i18n }}

    \n

    {{ \"recoveryCodeDesc\" | i18n }}

    \n
    \n
    \n \n
    \n
    \n \n
    \n \n \n \n
    \n","
    \n
    \n \n \n \n \n {{ \"rememberMe\" | i18n }}\n \n \n \n

    {{ \"noTwoStepProviders\" | i18n }}

    \n

    {{ \"noTwoStepProviders2\" | i18n }}

    \n
    \n
    \n
    \n \n
    \n \n
    \n \n {{ actionButtonText }} \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n \n
    \n
    \n","import { CommonModule } from \"@angular/common\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, NavigationExtras, Router, RouterLink } from \"@angular/router\";\nimport { Subject, takeUntil, lastValueFrom, first, firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n TrustedDeviceUserDecryptionOption,\n UserDecryptionOptions,\n} from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n DialogService,\n FormFieldModule,\n} from \"@bitwarden/components\";\n\nimport { CaptchaProtectedComponent } from \"../captcha-protected.component\";\n\nimport { TwoFactorAuthAuthenticatorComponent } from \"./two-factor-auth-authenticator.component\";\nimport { TwoFactorAuthEmailComponent } from \"./two-factor-auth-email.component\";\nimport { TwoFactorAuthYubikeyComponent } from \"./two-factor-auth-yubikey.component\";\nimport {\n TwoFactorOptionsDialogResult,\n TwoFactorOptionsComponent,\n TwoFactorOptionsDialogResultType,\n} from \"./two-factor-options.component\";\n\n@Component({\n standalone: true,\n selector: \"app-two-factor-auth\",\n templateUrl: \"two-factor-auth.component.html\",\n imports: [\n CommonModule,\n JslibModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n RouterLink,\n ButtonModule,\n TwoFactorOptionsComponent,\n TwoFactorAuthAuthenticatorComponent,\n TwoFactorAuthEmailComponent,\n TwoFactorAuthYubikeyComponent,\n ],\n providers: [I18nPipe],\n})\nexport class TwoFactorAuthComponent extends CaptchaProtectedComponent implements OnInit {\n token = \"\";\n remember = false;\n orgIdentifier: string = null;\n\n providers = TwoFactorProviders;\n providerType = TwoFactorProviderType;\n selectedProviderType: TwoFactorProviderType = TwoFactorProviderType.Authenticator;\n providerData: any;\n\n formGroup = this.formBuilder.group({\n token: [\n \"\",\n {\n validators: [Validators.required],\n updateOn: \"submit\",\n },\n ],\n remember: [false],\n });\n actionButtonText = \"\";\n title = \"\";\n formPromise: Promise;\n\n private destroy$ = new Subject();\n\n onSuccessfulLogin: () => Promise;\n onSuccessfulLoginNavigate: () => Promise;\n\n onSuccessfulLoginTde: () => Promise;\n onSuccessfulLoginTdeNavigate: () => Promise;\n\n submitForm = async () => {\n await this.submit();\n };\n goAfterLogIn = async () => {\n this.loginEmailService.clearValues();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute], {\n queryParams: {\n identifier: this.orgIdentifier,\n },\n });\n };\n\n protected loginRoute = \"login\";\n\n protected trustedDeviceEncRoute = \"login-initiated\";\n protected changePasswordRoute = \"set-password\";\n protected forcePasswordResetRoute = \"update-temp-password\";\n protected successRoute = \"vault\";\n\n constructor(\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n private dialogService: DialogService,\n protected route: ActivatedRoute,\n private logService: LogService,\n protected twoFactorService: TwoFactorService,\n private loginEmailService: LoginEmailServiceAbstraction,\n private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected configService: ConfigService,\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n private accountService: AccountService,\n private formBuilder: FormBuilder,\n @Inject(WINDOW) protected win: Window,\n ) {\n super(environmentService, i18nService, platformUtilsService);\n }\n\n async ngOnInit() {\n if (!(await this.authing()) || (await this.twoFactorService.getProviders()) == null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.loginRoute]);\n return;\n }\n\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n this.route.queryParams.pipe(first()).subscribe((qParams) => {\n if (qParams.identifier != null) {\n this.orgIdentifier = qParams.identifier;\n }\n });\n\n if (await this.needsLock()) {\n this.successRoute = \"lock\";\n }\n\n const webAuthnSupported = this.platformUtilsService.supportsWebAuthn(this.win);\n this.selectedProviderType = await this.twoFactorService.getDefaultProvider(webAuthnSupported);\n const providerData = await this.twoFactorService.getProviders().then((providers) => {\n return providers.get(this.selectedProviderType);\n });\n this.providerData = providerData;\n await this.updateUIToProviderData();\n\n this.actionButtonText = this.i18nService.t(\"continue\");\n this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n this.token = value.token;\n this.remember = value.remember;\n });\n }\n\n async submit() {\n await this.setupCaptcha();\n\n if (this.token == null || this.token === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"verificationCodeRequired\"),\n );\n return;\n }\n\n try {\n this.formPromise = this.loginStrategyService.logInTwoFactor(\n new TokenTwoFactorRequest(this.selectedProviderType, this.token, this.remember),\n this.captchaToken,\n );\n const authResult: AuthResult = await this.formPromise;\n this.logService.info(\"Successfully submitted two factor token\");\n await this.handleLoginResponse(authResult);\n } catch {\n this.logService.error(\"Error submitting two factor token\");\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"invalidVerificationCode\"),\n );\n }\n }\n\n async selectOtherTwofactorMethod() {\n const dialogRef = TwoFactorOptionsComponent.open(this.dialogService);\n const response: TwoFactorOptionsDialogResultType = await lastValueFrom(dialogRef.closed);\n if (response.result === TwoFactorOptionsDialogResult.Provider) {\n const providerData = await this.twoFactorService.getProviders().then((providers) => {\n return providers.get(response.type);\n });\n this.providerData = providerData;\n this.selectedProviderType = response.type;\n await this.updateUIToProviderData();\n }\n }\n\n protected handleMigrateEncryptionKey(result: AuthResult): boolean {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"migrate-legacy-encryption\"]);\n return true;\n }\n\n async updateUIToProviderData() {\n if (this.selectedProviderType == null) {\n this.title = this.i18nService.t(\"loginUnavailable\");\n return;\n }\n\n this.title = (TwoFactorProviders as any)[this.selectedProviderType].name;\n }\n\n private async handleLoginResponse(authResult: AuthResult) {\n if (this.handleCaptchaRequired(authResult)) {\n return;\n } else if (this.handleMigrateEncryptionKey(authResult)) {\n return;\n }\n\n // Save off the OrgSsoIdentifier for use in the TDE flows\n // - TDE login decryption options component\n // - Browser SSO on extension open\n await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(this.orgIdentifier);\n this.loginEmailService.clearValues();\n\n // note: this flow affects both TDE & standard users\n if (this.isForcePasswordResetRequired(authResult)) {\n return await this.handleForcePasswordReset(this.orgIdentifier);\n }\n\n const userDecryptionOpts = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptions$,\n );\n\n const tdeEnabled = await this.isTrustedDeviceEncEnabled(userDecryptionOpts.trustedDeviceOption);\n\n if (tdeEnabled) {\n return await this.handleTrustedDeviceEncryptionEnabled(\n authResult,\n this.orgIdentifier,\n userDecryptionOpts,\n );\n }\n\n // User must set password if they don't have one and they aren't using either TDE or key connector.\n const requireSetPassword =\n !userDecryptionOpts.hasMasterPassword && userDecryptionOpts.keyConnectorOption === undefined;\n\n if (requireSetPassword || authResult.resetMasterPassword) {\n // Change implies going no password -> password in this case\n return await this.handleChangePasswordRequired(this.orgIdentifier);\n }\n\n return await this.handleSuccessfulLogin();\n }\n\n private async isTrustedDeviceEncEnabled(\n trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n ): Promise {\n const ssoTo2faFlowActive = this.route.snapshot.queryParamMap.get(\"sso\") === \"true\";\n\n return ssoTo2faFlowActive && trustedDeviceOption !== undefined;\n }\n\n private async handleTrustedDeviceEncryptionEnabled(\n authResult: AuthResult,\n orgIdentifier: string,\n userDecryptionOpts: UserDecryptionOptions,\n ): Promise {\n // If user doesn't have a MP, but has reset password permission, they must set a MP\n if (\n !userDecryptionOpts.hasMasterPassword &&\n userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n ) {\n // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n // Note: we cannot directly navigate to the set password screen in this scenario as we are in a pre-decryption state, and\n // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n userId,\n );\n }\n\n if (this.onSuccessfulLoginTde != null) {\n // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n // before navigating to the success route.\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginTde();\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginTdeNavigate,\n // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n // their user key, the login-initiated guard will redirect them to the vault)\n [this.trustedDeviceEncRoute],\n );\n }\n\n private async handleChangePasswordRequired(orgIdentifier: string) {\n await this.router.navigate([this.changePasswordRoute], {\n queryParams: {\n identifier: orgIdentifier,\n },\n });\n }\n\n /**\n * Determines if a user needs to reset their password based on certain conditions.\n * Users can be forced to reset their password via an admin or org policy disallowing weak passwords.\n * Note: this is different from the SSO component login flow as a user can\n * login with MP and then have to pass 2FA to finish login and we can actually\n * evaluate if they have a weak password at that time.\n *\n * @param {AuthResult} authResult - The authentication result.\n * @returns {boolean} Returns true if a password reset is required, false otherwise.\n */\n private isForcePasswordResetRequired(authResult: AuthResult): boolean {\n const forceResetReasons = [\n ForceSetPasswordReason.AdminForcePasswordReset,\n ForceSetPasswordReason.WeakMasterPassword,\n ];\n\n return forceResetReasons.includes(authResult.forcePasswordReset);\n }\n\n private async handleForcePasswordReset(orgIdentifier: string) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.forcePasswordResetRoute], {\n queryParams: {\n identifier: orgIdentifier,\n },\n });\n }\n\n private async handleSuccessfulLogin() {\n if (this.onSuccessfulLogin != null) {\n // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n // before navigating to the success route.\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLogin();\n }\n await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n }\n\n private async navigateViaCallbackOrRoute(\n callback: () => Promise,\n commands: unknown[],\n extras?: NavigationExtras,\n ): Promise {\n if (callback) {\n await callback();\n } else {\n await this.router.navigate(commands, extras);\n }\n }\n\n private async authing(): Promise {\n return (await firstValueFrom(this.loginStrategyService.currentAuthType$)) !== null;\n }\n\n private async needsLock(): Promise {\n const authType = await firstValueFrom(this.loginStrategyService.currentAuthType$);\n return authType == AuthenticationType.Sso || authType == AuthenticationType.UserApiKey;\n }\n}\n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { ActivatedRoute, Router, RouterLink } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { LinkModule, TypographyModule, CheckboxModule, DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorAuthAuthenticatorComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component\";\nimport { TwoFactorAuthEmailComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component\";\nimport { TwoFactorAuthYubikeyComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component\";\nimport { TwoFactorAuthComponent as BaseTwoFactorAuthComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component\";\nimport { TwoFactorOptionsComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component\";\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n} from \"../../../../../libs/auth/src/common/abstractions\";\nimport { AsyncActionsModule } from \"../../../../../libs/components/src/async-actions\";\nimport { ButtonModule } from \"../../../../../libs/components/src/button\";\nimport { FormFieldModule } from \"../../../../../libs/components/src/form-field\";\n\n@Component({\n standalone: true,\n templateUrl:\n \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.html\",\n selector: \"app-two-factor-auth\",\n imports: [\n CommonModule,\n JslibModule,\n DialogModule,\n ButtonModule,\n LinkModule,\n TypographyModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n RouterLink,\n CheckboxModule,\n TwoFactorOptionsComponent,\n TwoFactorAuthEmailComponent,\n TwoFactorAuthAuthenticatorComponent,\n TwoFactorAuthYubikeyComponent,\n ],\n providers: [I18nPipe],\n})\nexport class TwoFactorAuthComponent extends BaseTwoFactorAuthComponent {\n constructor(\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n dialogService: DialogService,\n protected route: ActivatedRoute,\n logService: LogService,\n protected twoFactorService: TwoFactorService,\n loginEmailService: LoginEmailServiceAbstraction,\n userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected configService: ConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n formBuilder: FormBuilder,\n @Inject(WINDOW) protected win: Window,\n ) {\n super(\n loginStrategyService,\n router,\n i18nService,\n platformUtilsService,\n environmentService,\n dialogService,\n route,\n logService,\n twoFactorService,\n loginEmailService,\n userDecryptionOptionsService,\n ssoLoginService,\n configService,\n masterPasswordService,\n accountService,\n formBuilder,\n win,\n );\n this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n }\n\n protected override handleMigrateEncryptionKey(result: AuthResult): boolean {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"migrate-legacy-encryption\"]);\n return true;\n }\n}\n","import { I18nService } from \"../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../platform/abstractions/platform-utils.service\";\n\nexport class WebAuthnIFrame {\n private iframe: HTMLIFrameElement = null;\n private connectorLink: HTMLAnchorElement;\n private parseFunction = this.parseMessage.bind(this);\n\n constructor(\n private win: Window,\n private webVaultUrl: string,\n private webAuthnNewTab: boolean,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private successCallback: Function, // eslint-disable-line\n private errorCallback: Function, // eslint-disable-line\n private infoCallback: Function, // eslint-disable-line\n ) {\n this.connectorLink = win.document.createElement(\"a\");\n }\n\n init(data: any): void {\n const params = new URLSearchParams({\n data: this.base64Encode(JSON.stringify(data)),\n parent: encodeURIComponent(this.win.document.location.href),\n btnText: encodeURIComponent(this.i18nService.t(\"webAuthnAuthenticate\")),\n v: \"1\",\n });\n\n if (this.webAuthnNewTab) {\n // Firefox fallback which opens the webauthn page in a new tab\n params.append(\"locale\", this.i18nService.translationLocale);\n this.platformUtilsService.launchUri(\n `${this.webVaultUrl}/webauthn-fallback-connector.html?${params}`,\n );\n } else {\n this.connectorLink.href = `${this.webVaultUrl}/webauthn-connector.html?${params}`;\n this.iframe = this.win.document.getElementById(\"webauthn_iframe\") as HTMLIFrameElement;\n this.iframe.allow = \"publickey-credentials-get \" + new URL(this.webVaultUrl).origin;\n this.iframe.src = this.connectorLink.href;\n\n this.win.addEventListener(\"message\", this.parseFunction, false);\n }\n }\n\n stop() {\n this.sendMessage(\"stop\");\n }\n\n start() {\n this.sendMessage(\"start\");\n }\n\n sendMessage(message: any) {\n if (!this.iframe || !this.iframe.src || !this.iframe.contentWindow) {\n return;\n }\n\n this.iframe.contentWindow.postMessage(message, this.iframe.src);\n }\n\n base64Encode(str: string): string {\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {\n return String.fromCharCode((\"0x\" + p1) as any);\n }),\n );\n }\n\n cleanup() {\n this.win.removeEventListener(\"message\", this.parseFunction, false);\n }\n\n private parseMessage(event: MessageEvent) {\n if (!this.validMessage(event)) {\n return;\n }\n\n const parts: string[] = event.data.split(\"|\");\n if (parts[0] === \"success\" && this.successCallback) {\n this.successCallback(parts[1]);\n } else if (parts[0] === \"error\" && this.errorCallback) {\n this.errorCallback(parts[1]);\n } else if (parts[0] === \"info\" && this.infoCallback) {\n this.infoCallback(parts[1]);\n }\n }\n\n private validMessage(event: MessageEvent) {\n if (\n event.origin == null ||\n event.origin === \"\" ||\n event.origin !== (this.connectorLink as any).origin ||\n event.data == null ||\n typeof event.data !== \"string\"\n ) {\n return false;\n }\n\n return (\n event.data.indexOf(\"success|\") === 0 ||\n event.data.indexOf(\"error|\") === 0 ||\n event.data.indexOf(\"info|\") === 0\n );\n }\n}\n","import { Directive, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, NavigationExtras, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\n// eslint-disable-next-line no-restricted-imports\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n TrustedDeviceUserDecryptionOption,\n UserDecryptionOptions,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { WebAuthnIFrame } from \"@bitwarden/common/auth/webauthn-iframe\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class TwoFactorComponent extends CaptchaProtectedComponent implements OnInit, OnDestroy {\n token = \"\";\n remember = false;\n webAuthnReady = false;\n webAuthnNewTab = false;\n providers = TwoFactorProviders;\n providerType = TwoFactorProviderType;\n selectedProviderType: TwoFactorProviderType = TwoFactorProviderType.Authenticator;\n webAuthnSupported = false;\n webAuthn: WebAuthnIFrame = null;\n title = \"\";\n twoFactorEmail: string = null;\n formPromise: Promise;\n emailPromise: Promise;\n orgIdentifier: string = null;\n\n duoFramelessUrl: string = null;\n duoResultListenerInitialized = false;\n\n onSuccessfulLogin: () => Promise;\n onSuccessfulLoginNavigate: () => Promise;\n\n onSuccessfulLoginTde: () => Promise;\n onSuccessfulLoginTdeNavigate: () => Promise;\n\n protected loginRoute = \"login\";\n\n protected trustedDeviceEncRoute = \"login-initiated\";\n protected changePasswordRoute = \"set-password\";\n protected forcePasswordResetRoute = \"update-temp-password\";\n protected successRoute = \"vault\";\n\n get isDuoProvider(): boolean {\n return (\n this.selectedProviderType === TwoFactorProviderType.Duo ||\n this.selectedProviderType === TwoFactorProviderType.OrganizationDuo\n );\n }\n\n constructor(\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n protected i18nService: I18nService,\n protected apiService: ApiService,\n protected platformUtilsService: PlatformUtilsService,\n @Inject(WINDOW) protected win: Window,\n protected environmentService: EnvironmentService,\n protected stateService: StateService,\n protected route: ActivatedRoute,\n protected logService: LogService,\n protected twoFactorService: TwoFactorService,\n protected appIdService: AppIdService,\n protected loginEmailService: LoginEmailServiceAbstraction,\n protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected configService: ConfigService,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected accountService: AccountService,\n protected toastService: ToastService,\n ) {\n super(environmentService, i18nService, platformUtilsService);\n this.webAuthnSupported = this.platformUtilsService.supportsWebAuthn(win);\n }\n\n async ngOnInit() {\n if (!(await this.authing()) || (await this.twoFactorService.getProviders()) == null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.loginRoute]);\n return;\n }\n\n this.route.queryParams.pipe(first()).subscribe((qParams) => {\n if (qParams.identifier != null) {\n this.orgIdentifier = qParams.identifier;\n }\n });\n\n if (await this.needsLock()) {\n this.successRoute = \"lock\";\n }\n\n if (this.win != null && this.webAuthnSupported) {\n const env = await firstValueFrom(this.environmentService.environment$);\n const webVaultUrl = env.getWebVaultUrl();\n this.webAuthn = new WebAuthnIFrame(\n this.win,\n webVaultUrl,\n this.webAuthnNewTab,\n this.platformUtilsService,\n this.i18nService,\n (token: string) => {\n this.token = token;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.submit();\n },\n (error: string) => {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), error);\n },\n (info: string) => {\n if (info === \"ready\") {\n this.webAuthnReady = true;\n }\n },\n );\n }\n\n this.selectedProviderType = await this.twoFactorService.getDefaultProvider(\n this.webAuthnSupported,\n );\n await this.init();\n }\n\n ngOnDestroy(): void {\n this.cleanupWebAuthn();\n this.webAuthn = null;\n }\n\n async init() {\n if (this.selectedProviderType == null) {\n this.title = this.i18nService.t(\"loginUnavailable\");\n return;\n }\n\n this.cleanupWebAuthn();\n this.title = (TwoFactorProviders as any)[this.selectedProviderType].name;\n const providerData = await this.twoFactorService.getProviders().then((providers) => {\n return providers.get(this.selectedProviderType);\n });\n switch (this.selectedProviderType) {\n case TwoFactorProviderType.WebAuthn:\n if (!this.webAuthnNewTab) {\n setTimeout(async () => {\n await this.authWebAuthn();\n }, 500);\n }\n break;\n case TwoFactorProviderType.Duo:\n case TwoFactorProviderType.OrganizationDuo:\n // Setup listener for duo-redirect.ts connector to send back the code\n if (!this.duoResultListenerInitialized) {\n // setup client specific duo result listener\n this.setupDuoResultListener();\n this.duoResultListenerInitialized = true;\n }\n // flow must be launched by user so they can choose to remember the device or not.\n this.duoFramelessUrl = providerData.AuthUrl;\n break;\n case TwoFactorProviderType.Email:\n this.twoFactorEmail = providerData.Email;\n if ((await this.twoFactorService.getProviders()).size > 1) {\n await this.sendEmail(false);\n }\n break;\n default:\n break;\n }\n }\n\n async submit() {\n await this.setupCaptcha();\n\n if (this.token == null || this.token === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"verificationCodeRequired\"),\n );\n return;\n }\n\n if (this.selectedProviderType === TwoFactorProviderType.WebAuthn) {\n if (this.webAuthn != null) {\n this.webAuthn.stop();\n } else {\n return;\n }\n } else if (\n this.selectedProviderType === TwoFactorProviderType.Email ||\n this.selectedProviderType === TwoFactorProviderType.Authenticator\n ) {\n this.token = this.token.replace(\" \", \"\").trim();\n }\n\n await this.doSubmit();\n if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {\n this.webAuthn.start();\n }\n }\n\n async doSubmit() {\n this.formPromise = this.loginStrategyService.logInTwoFactor(\n new TokenTwoFactorRequest(this.selectedProviderType, this.token, this.remember),\n this.captchaToken,\n );\n const authResult: AuthResult = await this.formPromise;\n\n await this.handleLoginResponse(authResult);\n }\n\n protected handleMigrateEncryptionKey(result: AuthResult): boolean {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccured\"),\n this.i18nService.t(\"encryptionKeyMigrationRequired\"),\n );\n return true;\n }\n\n // Each client will have own implementation\n protected setupDuoResultListener(): void {}\n\n private async handleLoginResponse(authResult: AuthResult) {\n if (this.handleCaptchaRequired(authResult)) {\n return;\n } else if (this.handleMigrateEncryptionKey(authResult)) {\n return;\n }\n\n // Save off the OrgSsoIdentifier for use in the TDE flows\n // - TDE login decryption options component\n // - Browser SSO on extension open\n await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(this.orgIdentifier);\n this.loginEmailService.clearValues();\n\n // note: this flow affects both TDE & standard users\n if (this.isForcePasswordResetRequired(authResult)) {\n return await this.handleForcePasswordReset(this.orgIdentifier);\n }\n\n const userDecryptionOpts = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptions$,\n );\n\n const tdeEnabled = await this.isTrustedDeviceEncEnabled(userDecryptionOpts.trustedDeviceOption);\n\n if (tdeEnabled) {\n return await this.handleTrustedDeviceEncryptionEnabled(\n authResult,\n this.orgIdentifier,\n userDecryptionOpts,\n );\n }\n\n // User must set password if they don't have one and they aren't using either TDE or key connector.\n const requireSetPassword =\n !userDecryptionOpts.hasMasterPassword && userDecryptionOpts.keyConnectorOption === undefined;\n\n if (requireSetPassword || authResult.resetMasterPassword) {\n // Change implies going no password -> password in this case\n return await this.handleChangePasswordRequired(this.orgIdentifier);\n }\n\n return await this.handleSuccessfulLogin();\n }\n\n private async isTrustedDeviceEncEnabled(\n trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n ): Promise {\n const ssoTo2faFlowActive = this.route.snapshot.queryParamMap.get(\"sso\") === \"true\";\n\n return ssoTo2faFlowActive && trustedDeviceOption !== undefined;\n }\n\n private async handleTrustedDeviceEncryptionEnabled(\n authResult: AuthResult,\n orgIdentifier: string,\n userDecryptionOpts: UserDecryptionOptions,\n ): Promise {\n // If user doesn't have a MP, but has reset password permission, they must set a MP\n if (\n !userDecryptionOpts.hasMasterPassword &&\n userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n ) {\n // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n // Note: we cannot directly navigate to the set password screen in this scenario as we are in a pre-decryption state, and\n // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n userId,\n );\n }\n\n if (this.onSuccessfulLoginTde != null) {\n // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n // before navigating to the success route.\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginTde();\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginTdeNavigate,\n // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n // their user key, the login-initiated guard will redirect them to the vault)\n [this.trustedDeviceEncRoute],\n );\n }\n\n private async handleChangePasswordRequired(orgIdentifier: string) {\n await this.router.navigate([this.changePasswordRoute], {\n queryParams: {\n identifier: orgIdentifier,\n },\n });\n }\n\n /**\n * Determines if a user needs to reset their password based on certain conditions.\n * Users can be forced to reset their password via an admin or org policy disallowing weak passwords.\n * Note: this is different from the SSO component login flow as a user can\n * login with MP and then have to pass 2FA to finish login and we can actually\n * evaluate if they have a weak password at that time.\n *\n * @param {AuthResult} authResult - The authentication result.\n * @returns {boolean} Returns true if a password reset is required, false otherwise.\n */\n private isForcePasswordResetRequired(authResult: AuthResult): boolean {\n const forceResetReasons = [\n ForceSetPasswordReason.AdminForcePasswordReset,\n ForceSetPasswordReason.WeakMasterPassword,\n ];\n\n return forceResetReasons.includes(authResult.forcePasswordReset);\n }\n\n private async handleForcePasswordReset(orgIdentifier: string) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.forcePasswordResetRoute], {\n queryParams: {\n identifier: orgIdentifier,\n },\n });\n }\n\n private async handleSuccessfulLogin() {\n if (this.onSuccessfulLogin != null) {\n // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n // before navigating to the success route.\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLogin();\n }\n await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n }\n\n private async navigateViaCallbackOrRoute(\n callback: () => Promise,\n commands: unknown[],\n extras?: NavigationExtras,\n ): Promise {\n if (callback) {\n await callback();\n } else {\n await this.router.navigate(commands, extras);\n }\n }\n\n async sendEmail(doToast: boolean) {\n if (this.selectedProviderType !== TwoFactorProviderType.Email) {\n return;\n }\n\n if (this.emailPromise != null) {\n return;\n }\n\n if ((await this.loginStrategyService.getEmail()) == null) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"sessionTimeout\"),\n );\n return;\n }\n\n try {\n const request = new TwoFactorEmailRequest();\n request.email = await this.loginStrategyService.getEmail();\n request.masterPasswordHash = await this.loginStrategyService.getMasterPasswordHash();\n request.ssoEmail2FaSessionToken =\n await this.loginStrategyService.getSsoEmail2FaSessionToken();\n request.deviceIdentifier = await this.appIdService.getAppId();\n request.authRequestAccessCode = await this.loginStrategyService.getAccessCode();\n request.authRequestId = await this.loginStrategyService.getAuthRequestId();\n this.emailPromise = this.apiService.postTwoFactorEmail(request);\n await this.emailPromise;\n if (doToast) {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"verificationCodeEmailSent\", this.twoFactorEmail),\n );\n }\n } catch (e) {\n this.logService.error(e);\n }\n\n this.emailPromise = null;\n }\n\n async authWebAuthn() {\n const providerData = await this.twoFactorService.getProviders().then((providers) => {\n return providers.get(this.selectedProviderType);\n });\n\n if (!this.webAuthnSupported || this.webAuthn == null) {\n return;\n }\n\n this.webAuthn.init(providerData);\n }\n\n private cleanupWebAuthn() {\n if (this.webAuthn != null) {\n this.webAuthn.stop();\n this.webAuthn.cleanup();\n }\n }\n\n private async authing(): Promise {\n return (await firstValueFrom(this.loginStrategyService.currentAuthType$)) !== null;\n }\n\n private async needsLock(): Promise {\n const authType = await firstValueFrom(this.loginStrategyService.currentAuthType$);\n return authType == AuthenticationType.Sso || authType == AuthenticationType.UserApiKey;\n }\n\n async launchDuoFrameless() {\n if (this.duoFramelessUrl === null) {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"duoHealthCheckResultsInNullAuthUrlError\"),\n });\n return;\n }\n\n this.platformUtilsService.launchUri(this.duoFramelessUrl);\n }\n}\n","import { Directive, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n TwoFactorProviderDetails,\n TwoFactorService,\n} from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive()\nexport class TwoFactorOptionsComponent implements OnInit {\n @Output() onProviderSelected = new EventEmitter();\n @Output() onRecoverSelected = new EventEmitter();\n\n providers: any[] = [];\n\n constructor(\n protected twoFactorService: TwoFactorService,\n protected router: Router,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected win: Window,\n protected environmentService: EnvironmentService,\n ) {}\n\n async ngOnInit() {\n this.providers = await this.twoFactorService.getSupportedProviders(this.win);\n }\n\n async choose(p: TwoFactorProviderDetails) {\n this.onProviderSelected.emit(p.type);\n }\n\n async recover() {\n const env = await firstValueFrom(this.environmentService.environment$);\n const webVault = env.getWebVaultUrl();\n this.platformUtilsService.launchUri(webVault + \"/#/recover-2fa\");\n this.onRecoverSelected.emit();\n }\n}\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from \"@bitwarden/angular/auth/components/two-factor-options.component\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport enum TwoFactorOptionsDialogResult {\n Provider = \"Provider selected\",\n Recover = \"Recover selected\",\n}\n\nexport type TwoFactorOptionsDialogResultType = {\n result: TwoFactorOptionsDialogResult;\n type: TwoFactorProviderType;\n};\n\n@Component({\n selector: \"app-two-factor-options\",\n templateUrl: \"two-factor-options.component.html\",\n})\nexport class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {\n constructor(\n twoFactorService: TwoFactorService,\n router: Router,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n private dialogRef: DialogRef,\n ) {\n super(twoFactorService, router, i18nService, platformUtilsService, window, environmentService);\n }\n\n async choose(p: any) {\n await super.choose(p);\n this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Provider, type: p.type });\n }\n\n async recover() {\n await super.recover();\n this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Recover });\n }\n\n static open(dialogService: DialogService) {\n return dialogService.open(TwoFactorOptionsComponent);\n }\n}\n","\n \n {{ \"twoStepOptions\" | i18n }}\n \n \n
    \n
    \n
    \n \n
    \n
    \n

    {{ p.name }}

    \n

    {{ p.description }}

    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n

    {{ \"recoveryCodeTitle\" | i18n }}

    \n

    {{ \"recoveryCodeDesc\" | i18n }}

    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n","
    \n
    \n \n

    \n {{ \"enterVerificationCodeApp\" | i18n }}\n

    \n

    \n {{ \"enterVerificationCodeEmail\" | i18n: twoFactorEmail }}\n

    \n \n {{ \"verificationCode\" | i18n }}\n \n \n \n {{ \"sendVerificationCodeEmailAgain\" | i18n }}\n \n \n \n \n

    {{ \"insertYubiKey\" | i18n }}

    \n \n \n \n \"\"\n \n \n {{ \"verificationCode\" | i18n }}\n \n \n
    \n \n
    \n \n
    \n
    \n \n \n \n {{ \"duoRequiredByOrgForAccount\" | i18n }}\n

    \n

    {{ \"launchDuoAndFollowStepsToFinishLoggingIn\" | i18n }}

    \n
    \n \n {{ \"rememberMe\" | i18n }}\n \n \n \n

    {{ \"noTwoStepProviders\" | i18n }}

    \n

    {{ \"noTwoStepProviders2\" | i18n }}

    \n
    \n
    \n
    \n \n
    \n \n
    \n \n {{ \"continue\" | i18n }} \n \n \n {{ \"launchDuo\" | i18n }} \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n \n
    \n
    \n","import { Component, Inject, OnDestroy, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil, lastValueFrom } from \"rxjs\";\n\nimport { TwoFactorComponent as BaseTwoFactorComponent } from \"@bitwarden/angular/auth/components/two-factor.component\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n LoginStrategyServiceAbstraction,\n LoginEmailServiceAbstraction,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport {\n TwoFactorOptionsDialogResult,\n TwoFactorOptionsComponent,\n TwoFactorOptionsDialogResultType,\n} from \"./two-factor-options.component\";\n\n@Component({\n selector: \"app-two-factor\",\n templateUrl: \"two-factor.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class TwoFactorComponent extends BaseTwoFactorComponent implements OnDestroy {\n @ViewChild(\"twoFactorOptions\", { read: ViewContainerRef, static: true })\n twoFactorOptionsModal: ViewContainerRef;\n formGroup = this.formBuilder.group({\n token: [\n \"\",\n {\n validators: [Validators.required],\n updateOn: \"submit\",\n },\n ],\n remember: [false],\n });\n private destroy$ = new Subject();\n constructor(\n loginStrategyService: LoginStrategyServiceAbstraction,\n router: Router,\n i18nService: I18nService,\n apiService: ApiService,\n platformUtilsService: PlatformUtilsService,\n stateService: StateService,\n environmentService: EnvironmentService,\n private dialogService: DialogService,\n route: ActivatedRoute,\n logService: LogService,\n twoFactorService: TwoFactorService,\n appIdService: AppIdService,\n loginEmailService: LoginEmailServiceAbstraction,\n userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n ssoLoginService: SsoLoginServiceAbstraction,\n configService: ConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n toastService: ToastService,\n private formBuilder: FormBuilder,\n @Inject(WINDOW) protected win: Window,\n ) {\n super(\n loginStrategyService,\n router,\n i18nService,\n apiService,\n platformUtilsService,\n win,\n environmentService,\n stateService,\n route,\n logService,\n twoFactorService,\n appIdService,\n loginEmailService,\n userDecryptionOptionsService,\n ssoLoginService,\n configService,\n masterPasswordService,\n accountService,\n toastService,\n );\n this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n }\n async ngOnInit() {\n await super.ngOnInit();\n this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n this.token = value.token;\n this.remember = value.remember;\n });\n }\n submitForm = async () => {\n await this.submit();\n };\n\n async anotherMethod() {\n const dialogRef = TwoFactorOptionsComponent.open(this.dialogService);\n const response: TwoFactorOptionsDialogResultType = await lastValueFrom(dialogRef.closed);\n if (response.result === TwoFactorOptionsDialogResult.Provider) {\n this.selectedProviderType = response.type;\n await this.init();\n }\n }\n\n protected override handleMigrateEncryptionKey(result: AuthResult): boolean {\n if (!result.requiresEncryptionKeyMigration) {\n return false;\n }\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"migrate-legacy-encryption\"]);\n return true;\n }\n\n goAfterLogIn = async () => {\n this.loginEmailService.clearValues();\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([this.successRoute], {\n queryParams: {\n identifier: this.orgIdentifier,\n },\n });\n };\n\n private duoResultChannel: BroadcastChannel;\n\n protected override setupDuoResultListener() {\n if (!this.duoResultChannel) {\n this.duoResultChannel = new BroadcastChannel(\"duoResult\");\n this.duoResultChannel.addEventListener(\"message\", this.handleDuoResultMessage);\n }\n }\n\n private handleDuoResultMessage = async (msg: { data: { code: string; state: string } }) => {\n this.token = msg.data.code + \"|\" + msg.data.state;\n await this.submit();\n };\n\n async ngOnDestroy() {\n super.ngOnDestroy();\n\n if (this.duoResultChannel) {\n // clean up duo listener if it was initialized.\n this.duoResultChannel.removeEventListener(\"message\", this.handleDuoResultMessage);\n this.duoResultChannel.close();\n }\n }\n}\n","import { Directive } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class UpdatePasswordComponent extends BaseChangePasswordComponent {\n hint: string;\n key: string;\n enforcedPolicyOptions: MasterPasswordPolicyOptions;\n showPassword = false;\n currentMasterPassword: string;\n\n onSuccessfulChangePassword: () => Promise;\n\n constructor(\n protected router: Router,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n policyService: PolicyService,\n cryptoService: CryptoService,\n messagingService: MessagingService,\n private apiService: ApiService,\n stateService: StateService,\n private userVerificationService: UserVerificationService,\n private logService: LogService,\n dialogService: DialogService,\n kdfConfigService: KdfConfigService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n accountService: AccountService,\n ) {\n super(\n i18nService,\n cryptoService,\n messagingService,\n passwordGenerationService,\n platformUtilsService,\n policyService,\n stateService,\n dialogService,\n kdfConfigService,\n masterPasswordService,\n accountService,\n );\n }\n\n togglePassword(confirmField: boolean) {\n this.showPassword = !this.showPassword;\n document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n }\n\n async cancel() {\n await this.router.navigate([\"/vault\"]);\n }\n\n async setupSubmitActions(): Promise {\n if (this.currentMasterPassword == null || this.currentMasterPassword === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"masterPasswordRequired\"),\n );\n return false;\n }\n\n const secret: Verification = {\n type: VerificationType.MasterPassword,\n secret: this.currentMasterPassword,\n };\n try {\n await this.userVerificationService.verifyUser(secret);\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), e.message);\n return false;\n }\n\n this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n return true;\n }\n\n async performSubmitActions(\n newMasterKeyHash: string,\n newMasterKey: MasterKey,\n newUserKey: [UserKey, EncString],\n ) {\n try {\n // Create Request\n const request = new PasswordRequest();\n request.masterPasswordHash = await this.cryptoService.hashMasterKey(\n this.currentMasterPassword,\n await this.cryptoService.getOrDeriveMasterKey(this.currentMasterPassword),\n );\n request.newMasterPasswordHash = newMasterKeyHash;\n request.key = newUserKey[1].encryptedString;\n\n // Update user's password\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.apiService.postPassword(request);\n\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"masterPasswordChanged\"),\n this.i18nService.t(\"logBackIn\"),\n );\n\n if (this.onSuccessfulChangePassword != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulChangePassword();\n } else {\n this.messagingService.send(\"logout\");\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n}\n","
    \n
    \n
    \n

    {{ \"updateMasterPassword\" | i18n }}

    \n
    \n
    \n {{ \"masterPasswordInvalidWarning\" | i18n }} \n \n\n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n\n","import { Component, inject } from \"@angular/core\";\n\nimport { UpdatePasswordComponent as BaseUpdatePasswordComponent } from \"@bitwarden/angular/auth/components/update-password.component\";\n\nimport { RouterService } from \"../core\";\n\nimport { AcceptOrganizationInviteService } from \"./organization-invite/accept-organization.service\";\n\n@Component({\n selector: \"app-update-password\",\n templateUrl: \"update-password.component.html\",\n})\nexport class UpdatePasswordComponent extends BaseUpdatePasswordComponent {\n private routerService = inject(RouterService);\n private acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n override async cancel() {\n // clearing the login redirect url so that the user\n // does not join the organization if they cancel\n await this.routerService.getAndClearLoginRedirectUrl();\n await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n await super.cancel();\n }\n}\n","import { OrganizationUserResetPasswordRequest } from \"../../../admin-console/abstractions/organization-user/requests\";\n\nexport class UpdateTempPasswordRequest extends OrganizationUserResetPasswordRequest {\n masterPasswordHint: string;\n}\n","import { Directive } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { UpdateTempPasswordRequest } from \"@bitwarden/common/auth/models/request/update-temp-password.request\";\nimport { MasterPasswordVerification } from \"@bitwarden/common/auth/types/verification\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class UpdateTempPasswordComponent extends BaseChangePasswordComponent {\n hint: string;\n key: string;\n enforcedPolicyOptions: MasterPasswordPolicyOptions;\n showPassword = false;\n reason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n verification: MasterPasswordVerification = {\n type: VerificationType.MasterPassword,\n secret: \"\",\n };\n\n onSuccessfulChangePassword: () => Promise;\n\n get requireCurrentPassword(): boolean {\n return this.reason === ForceSetPasswordReason.WeakMasterPassword;\n }\n\n constructor(\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n policyService: PolicyService,\n cryptoService: CryptoService,\n messagingService: MessagingService,\n private apiService: ApiService,\n stateService: StateService,\n private syncService: SyncService,\n private logService: LogService,\n private userVerificationService: UserVerificationService,\n protected router: Router,\n dialogService: DialogService,\n kdfConfigService: KdfConfigService,\n accountService: AccountService,\n masterPasswordService: InternalMasterPasswordServiceAbstraction,\n ) {\n super(\n i18nService,\n cryptoService,\n messagingService,\n passwordGenerationService,\n platformUtilsService,\n policyService,\n stateService,\n dialogService,\n kdfConfigService,\n masterPasswordService,\n accountService,\n );\n }\n\n async ngOnInit() {\n await this.syncService.fullSync(true);\n\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n this.reason = await firstValueFrom(this.masterPasswordService.forceSetPasswordReason$(userId));\n\n // If we somehow end up here without a reason, go back to the home page\n if (this.reason == ForceSetPasswordReason.None) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n return;\n }\n\n await super.ngOnInit();\n }\n\n get masterPasswordWarningText(): string {\n return this.reason == ForceSetPasswordReason.WeakMasterPassword\n ? this.i18nService.t(\"updateWeakMasterPasswordWarning\")\n : this.i18nService.t(\"updateMasterPasswordWarning\");\n }\n\n togglePassword(confirmField: boolean) {\n this.showPassword = !this.showPassword;\n document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n }\n\n async setupSubmitActions(): Promise {\n this.email = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n );\n this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n return true;\n }\n\n async submit() {\n // Validation\n if (!(await this.strongPassword())) {\n return;\n }\n\n if (!(await this.setupSubmitActions())) {\n return;\n }\n\n try {\n // Create new key and hash new password\n const newMasterKey = await this.cryptoService.makeMasterKey(\n this.masterPassword,\n this.email.trim().toLowerCase(),\n this.kdfConfig,\n );\n const newPasswordHash = await this.cryptoService.hashMasterKey(\n this.masterPassword,\n newMasterKey,\n );\n\n // Grab user key\n const userKey = await this.cryptoService.getUserKey();\n\n // Encrypt user key with new master key\n const newProtectedUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(\n newMasterKey,\n userKey,\n );\n\n await this.performSubmitActions(newPasswordHash, newMasterKey, newProtectedUserKey);\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async performSubmitActions(\n masterPasswordHash: string,\n masterKey: MasterKey,\n userKey: [UserKey, EncString],\n ) {\n try {\n switch (this.reason) {\n case ForceSetPasswordReason.AdminForcePasswordReset:\n this.formPromise = this.updateTempPassword(masterPasswordHash, userKey);\n break;\n case ForceSetPasswordReason.WeakMasterPassword:\n this.formPromise = this.updatePassword(masterPasswordHash, userKey);\n break;\n }\n\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"updatedMasterPassword\"),\n );\n\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.None,\n userId,\n );\n\n if (this.onSuccessfulChangePassword != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulChangePassword();\n } else {\n this.messagingService.send(\"logout\");\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n private async updateTempPassword(masterPasswordHash: string, userKey: [UserKey, EncString]) {\n const request = new UpdateTempPasswordRequest();\n request.key = userKey[1].encryptedString;\n request.newMasterPasswordHash = masterPasswordHash;\n request.masterPasswordHint = this.hint;\n\n return this.apiService.putUpdateTempPassword(request);\n }\n\n private async updatePassword(newMasterPasswordHash: string, userKey: [UserKey, EncString]) {\n const request = await this.userVerificationService.buildRequest(\n this.verification,\n PasswordRequest,\n );\n request.masterPasswordHint = this.hint;\n request.newMasterPasswordHash = newMasterPasswordHash;\n request.key = userKey[1].encryptedString;\n\n return this.apiService.postPassword(request);\n }\n}\n","
    \n
    \n
    \n

    {{ \"updateMasterPassword\" | i18n }}

    \n \n {{ masterPasswordWarningText }} \n \n \n \n {{ \"currentMasterPass\" | i18n }}\n \n \n \n
    \n \n {{ \"newMasterPass\" | i18n }}\n \n \n \n \n \n
    \n \n {{ \"confirmNewMasterPass\" | i18n }}\n \n \n \n \n {{ \"masterPassHint\" | i18n }}\n \n {{ \"masterPassHintDesc\" | i18n }}\n \n
    \n
    \n \n {{ \"submit\" | i18n }}\n \n \n
    \n
    \n
    \n \n
    \n","import { Component } from \"@angular/core\";\n\nimport { UpdateTempPasswordComponent as BaseUpdateTempPasswordComponent } from \"@bitwarden/angular/auth/components/update-temp-password.component\";\n\n@Component({\n selector: \"app-update-temp-password\",\n templateUrl: \"update-temp-password.component.html\",\n})\nexport class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent {}\n","export class VerifyEmailRequest {\n userId: string;\n token: string;\n\n constructor(userId: string, token: string) {\n this.userId = userId;\n this.token = token;\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VerifyEmailRequest } from \"@bitwarden/common/models/request/verify-email.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\n\n@Component({\n selector: \"app-verify-email-token\",\n templateUrl: \"verify-email-token.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class VerifyEmailTokenComponent implements OnInit {\n constructor(\n private router: Router,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private apiService: ApiService,\n private logService: LogService,\n private stateService: StateService,\n ) {}\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.userId != null && qParams.token != null) {\n try {\n await this.apiService.postAccountVerifyEmailToken(\n new VerifyEmailRequest(qParams.userId, qParams.token),\n );\n if (await this.stateService.getIsAuthenticated()) {\n await this.apiService.refreshIdentityToken();\n }\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"emailVerified\"));\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n return;\n } catch (e) {\n this.logService.error(e);\n }\n }\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"emailVerifiedFailed\"));\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n });\n }\n}\n","
    \n
    \n \"Bitwarden\"\n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n
    \n","export class VerifyDeleteRecoverRequest {\n userId: string;\n token: string;\n\n constructor(userId: string, token: string) {\n this.userId = userId;\n this.token = token;\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VerifyDeleteRecoverRequest } from \"@bitwarden/common/models/request/verify-delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-verify-recover-delete\",\n templateUrl: \"verify-recover-delete.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class VerifyRecoverDeleteComponent implements OnInit {\n email: string;\n\n private userId: string;\n private token: string;\n protected formGroup = new FormGroup({});\n\n constructor(\n private router: Router,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n ) {}\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.userId != null && qParams.token != null && qParams.email != null) {\n this.userId = qParams.userId;\n this.token = qParams.token;\n this.email = qParams.email;\n } else {\n await this.router.navigate([\"/\"]);\n }\n });\n }\n\n submit = async () => {\n const request = new VerifyDeleteRecoverRequest(this.userId, this.token);\n await this.apiService.postAccountRecoverDeleteToken(request);\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"accountDeleted\"),\n this.i18nService.t(\"accountDeletedDesc\"),\n );\n await this.router.navigate([\"/\"]);\n };\n}\n","
    \n {{ \"deleteAccountWarning\" | i18n }}\n

    \n {{ email }}\n

    \n

    {{ \"deleteRecoverConfirmDesc\" | i18n }}

    \n
    \n
    \n \n \n {{ \"cancel\" | i18n }}\n \n
    \n
    \n","import { Directive, ElementRef, HostListener, Self } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\n\n@Directive({\n selector: \"input[appInputStripSpaces]\",\n})\nexport class InputStripSpacesDirective {\n constructor(\n private el: ElementRef,\n @Self() private ngControl: NgControl,\n ) {}\n\n @HostListener(\"input\") onInput() {\n const value = this.el.nativeElement.value.replace(/\\s+/g, \"\");\n this.ngControl.control.setValue(value);\n }\n}\n","\n {{ sponsoringOrg.familySponsorshipFriendlyName }}\n\n{{ sponsoringOrg.name }}\n\n {{ statusMessage }}\n\n\n \n \n \n {{ \"resendEmail\" | i18n }}\n \n \n {{ \"remove\" | i18n }}\n \n \n\n","import { formatDate } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output, OnInit } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"[sponsoring-org-row]\",\n templateUrl: \"sponsoring-org-row.component.html\",\n})\nexport class SponsoringOrgRowComponent implements OnInit {\n @Input() sponsoringOrg: Organization = null;\n @Input() isSelfHosted = false;\n\n @Output() sponsorshipRemoved = new EventEmitter();\n\n statusMessage = \"loading\";\n statusClass: \"tw-text-success\" | \"tw-text-danger\" = \"tw-text-success\";\n\n private locale = \"\";\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private logService: LogService,\n private platformUtilsService: PlatformUtilsService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n this.locale = await firstValueFrom(this.i18nService.locale$);\n\n this.setStatus(\n this.isSelfHosted,\n this.sponsoringOrg.familySponsorshipToDelete,\n this.sponsoringOrg.familySponsorshipValidUntil,\n this.sponsoringOrg.familySponsorshipLastSyncDate,\n );\n }\n\n async revokeSponsorship() {\n try {\n await this.doRevokeSponsorship();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async resendEmail() {\n await this.apiService.postResendSponsorshipOffer(this.sponsoringOrg.id);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"emailSent\"));\n }\n\n get isSentAwaitingSync() {\n return this.isSelfHosted && !this.sponsoringOrg.familySponsorshipLastSyncDate;\n }\n\n private async doRevokeSponsorship() {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: `${this.i18nService.t(\"remove\")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,\n content: { key: \"revokeSponsorshipConfirmation\" },\n acceptButtonText: { key: \"remove\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n await this.apiService.deleteRevokeSponsorship(this.sponsoringOrg.id);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"reclaimedFreePlan\"));\n this.sponsorshipRemoved.emit();\n }\n\n private setStatus(\n selfHosted: boolean,\n toDelete?: boolean,\n validUntil?: Date,\n lastSyncDate?: Date,\n ) {\n /*\n * Possible Statuses:\n * Requested (self-hosted only)\n * Sent\n * Active\n * RequestRevoke\n * RevokeWhenExpired\n */\n\n if (toDelete && validUntil) {\n // They want to delete but there is a valid until date which means there is an active sponsorship\n this.statusMessage = this.i18nService.t(\n \"revokeWhenExpired\",\n formatDate(validUntil, \"MM/dd/yyyy\", this.locale),\n );\n this.statusClass = \"tw-text-danger\";\n } else if (toDelete) {\n // They want to delete and we don't have a valid until date so we can\n // this should only happen on a self-hosted install\n this.statusMessage = this.i18nService.t(\"requestRemoved\");\n this.statusClass = \"tw-text-danger\";\n } else if (validUntil) {\n // They don't want to delete and they have a valid until date\n // that means they are actively sponsoring someone\n this.statusMessage = this.i18nService.t(\"active\");\n this.statusClass = \"tw-text-success\";\n } else if (selfHosted && lastSyncDate) {\n // We are on a self-hosted install and it has been synced but we have not gotten\n // a valid until date so we can't know if they are actively sponsoring someone\n this.statusMessage = this.i18nService.t(\"sent\");\n this.statusClass = \"tw-text-success\";\n } else if (!selfHosted) {\n // We are in cloud and all other status checks have been false therefore we have\n // sent the request but it hasn't been accepted yet\n this.statusMessage = this.i18nService.t(\"sent\");\n this.statusClass = \"tw-text-success\";\n } else {\n // We are on a self-hosted install and we have not synced yet\n this.statusMessage = this.i18nService.t(\"requested\");\n this.statusClass = \"tw-text-success\";\n }\n }\n}\n","\n\n\n \n \n {{ \"loading\" | i18n }}\n \n \n

    \n {{ \"sponsoredFamiliesEligible\" | i18n }}\n

    \n
    \n {{ \"sponsoredFamiliesInclude\" | i18n }}:\n
      \n
    • {{ \"sponsoredFamiliesPremiumAccess\" | i18n }}
    • \n
    • {{ \"sponsoredFamiliesSharedCollections\" | i18n }}
    • \n
    \n
    \n
    \n
    \n
    \n \n {{ \"familiesSponsoringOrgSelect\" | i18n }}\n \n \n \n \n \n
    \n
    \n \n {{ \"sponsoredFamiliesEmail\" | i18n }}:\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n {{ \"recipient\" | i18n }}\n {{ \"sponsoringOrg\" | i18n }}\n {{ \"status\" | i18n }}\n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n

    {{ \"sponsoredFamiliesLeaveCopy\" | i18n }}

    \n
    \n
    \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n AbstractControl,\n AsyncValidatorFn,\n ValidationErrors,\n} from \"@angular/forms\";\nimport { firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PlanSponsorshipType } from \"@bitwarden/common/billing/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\ninterface RequestSponsorshipForm {\n selectedSponsorshipOrgId: FormControl;\n sponsorshipEmail: FormControl;\n}\n\n@Component({\n selector: \"app-sponsored-families\",\n templateUrl: \"sponsored-families.component.html\",\n})\nexport class SponsoredFamiliesComponent implements OnInit, OnDestroy {\n loading = false;\n\n availableSponsorshipOrgs$: Observable;\n activeSponsorshipOrgs$: Observable;\n anyOrgsAvailable$: Observable;\n anyActiveSponsorships$: Observable;\n\n // Conditional display properties\n formPromise: Promise;\n\n sponsorshipForm: FormGroup;\n\n private _destroy = new Subject();\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private syncService: SyncService,\n private organizationService: OrganizationService,\n private formBuilder: FormBuilder,\n private accountService: AccountService,\n ) {\n this.sponsorshipForm = this.formBuilder.group({\n selectedSponsorshipOrgId: new FormControl(\"\", {\n validators: [Validators.required],\n }),\n sponsorshipEmail: new FormControl(\"\", {\n validators: [Validators.email, Validators.required],\n asyncValidators: [\n this.notAllowedValueAsync(\n () => firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email))),\n true,\n ),\n ],\n updateOn: \"change\",\n }),\n });\n }\n\n async ngOnInit() {\n this.availableSponsorshipOrgs$ = this.organizationService.organizations$.pipe(\n map((orgs) => orgs.filter((o) => o.familySponsorshipAvailable)),\n );\n\n this.availableSponsorshipOrgs$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {\n if (orgs.length === 1) {\n this.sponsorshipForm.patchValue({\n selectedSponsorshipOrgId: orgs[0].id,\n });\n }\n });\n\n this.anyOrgsAvailable$ = this.availableSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));\n\n this.activeSponsorshipOrgs$ = this.organizationService.organizations$.pipe(\n map((orgs) => orgs.filter((o) => o.familySponsorshipFriendlyName !== null)),\n );\n\n this.anyActiveSponsorships$ = this.activeSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));\n\n this.loading = false;\n\n this.sponsorshipForm\n .get(\"sponsorshipEmail\")\n .valueChanges.pipe(takeUntil(this._destroy))\n .subscribe((val) => {\n if (this.sponsorshipEmailControl.hasError(\"email\")) {\n this.sponsorshipEmailControl.setErrors([{ message: this.i18nService.t(\"invalidEmail\") }]);\n }\n });\n }\n\n ngOnDestroy(): void {\n this._destroy.next();\n this._destroy.complete();\n }\n\n submit = async () => {\n this.formPromise = this.apiService.postCreateSponsorship(\n this.sponsorshipForm.value.selectedSponsorshipOrgId,\n {\n sponsoredEmail: this.sponsorshipForm.value.sponsorshipEmail,\n planSponsorshipType: PlanSponsorshipType.FamiliesForEnterprise,\n friendlyName: this.sponsorshipForm.value.sponsorshipEmail,\n },\n );\n\n await this.formPromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"sponsorshipCreated\"));\n this.formPromise = null;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.resetForm();\n await this.forceReload();\n };\n\n async forceReload() {\n this.loading = true;\n await this.syncService.fullSync(true);\n this.loading = false;\n }\n\n get sponsorshipEmailControl() {\n return this.sponsorshipForm.controls.sponsorshipEmail;\n }\n\n private async resetForm() {\n this.sponsorshipForm.reset();\n }\n\n get isSelfHosted(): boolean {\n return this.platformUtilsService.isSelfHost();\n }\n\n notAllowedValueAsync(\n valueGetter: () => Promise,\n caseInsensitive = false,\n ): AsyncValidatorFn {\n return async (control: AbstractControl): Promise => {\n let notAllowedValue = await valueGetter();\n let controlValue = control.value;\n if (caseInsensitive) {\n notAllowedValue = notAllowedValue.toLowerCase();\n controlValue = controlValue.toLowerCase();\n }\n\n if (controlValue === notAllowedValue) {\n return {\n errors: {\n message: this.i18nService.t(\"cannotSponsorSelf\"),\n },\n };\n }\n };\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-frontend-layout\",\n templateUrl: \"frontend-layout.component.html\",\n})\nexport class FrontendLayoutComponent implements OnInit, OnDestroy {\n version: string;\n year = \"2015\";\n\n constructor(private platformUtilsService: PlatformUtilsService) {}\n\n async ngOnInit() {\n this.year = new Date().getFullYear().toString();\n this.version = await this.platformUtilsService.getApplicationVersion();\n\n document.body.classList.add(\"layout_frontend\");\n }\n\n ngOnDestroy() {\n document.body.classList.remove(\"layout_frontend\");\n }\n}\n","\n
    \n \n © {{ year }} Bitwarden Inc.
    \n {{ \"versionNumber\" | i18n: version }}\n
    \n","export class UpdateDomainsRequest {\n equivalentDomains: string[][];\n excludedGlobalEquivalentDomains: number[];\n}\n","\n\n\n

    {{ \"domainRulesDesc\" | i18n }}

    \n
    \n

    {{ \"customEqDomains\" | i18n }}

    \n

    \n \n {{ \"loading\" | i18n }}\n

    \n \n \n \n {{ \"customDomainX\" | i18n: i + 1 }} \n \n \n \n \n \n {{ \"newCustomDomainDesc\" | i18n }}\n \n \n

    {{ \"globalEqDomains\" | i18n }}

    \n

    \n \n {{ \"loading\" | i18n }}\n

    \n 0\">\n \n \n {{ d.domains }}\n \n \n \n \n \n {{ \"exclude\" | i18n }}\n \n \n \n {{ \"include\" | i18n }}\n \n \n \n {{ \"customize\" | i18n }}\n \n \n \n \n \n \n \n
    \n\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormArray, FormBuilder, FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UpdateDomainsRequest } from \"@bitwarden/common/models/request/update-domains.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n selector: \"app-domain-rules\",\n templateUrl: \"domain-rules.component.html\",\n})\nexport class DomainRulesComponent implements OnInit {\n loading = true;\n custom: string[] = [];\n global: any[] = [];\n formPromise: Promise;\n formGroup: FormGroup<{ customDomain: FormArray> }> = this.formBuilder.group({\n customDomain: this.formBuilder.array([]),\n });\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private logService: LogService,\n private formBuilder: FormBuilder,\n ) {}\n\n async ngOnInit() {\n const response = await this.apiService.getSettingsDomains();\n this.loading = false;\n if (response.equivalentDomains != null) {\n this.custom = response.equivalentDomains.map((d) => d.join(\", \"));\n }\n if (response.globalEquivalentDomains != null) {\n this.global = response.globalEquivalentDomains.map((d) => {\n return {\n domains: d.domains.join(\", \"),\n excluded: d.excluded,\n key: d.type,\n };\n });\n }\n this.patch();\n }\n patch() {\n const control = this.formGroup.get(\"customDomain\");\n control.clear();\n this.custom.forEach((val, index) => {\n control.insert(index, this.patchValues(val));\n });\n this.formGroup.updateValueAndValidity();\n }\n patchValues(customDomain: string) {\n return this.formBuilder.group({\n domain: [customDomain],\n });\n }\n toggleExcluded(globalDomain: any) {\n globalDomain.excluded = !globalDomain.excluded;\n }\n\n customize(globalDomain: any) {\n globalDomain.excluded = true;\n this.custom.push(globalDomain.domains);\n this.patch();\n }\n\n remove(index: number) {\n this.custom.splice(index, 1);\n this.patch();\n }\n\n add() {\n this.custom.push(\"\");\n this.patch();\n }\n\n submit = async () => {\n const customDomainValues = this.formGroup.get(\"customDomain\").value;\n this.custom = customDomainValues.map((d) => d.domain);\n const request = new UpdateDomainsRequest();\n request.excludedGlobalEquivalentDomains = this.global\n .filter((d) => d.excluded)\n .map((d) => d.key);\n if (request.excludedGlobalEquivalentDomains.length === 0) {\n request.excludedGlobalEquivalentDomains = null;\n }\n request.equivalentDomains = this.custom\n .filter((d) => d != null && d.trim() !== \"\")\n .map((d) => d.split(\",\").map((d2) => d2.trim()));\n if (request.equivalentDomains.length === 0) {\n request.equivalentDomains = null;\n }\n\n await this.apiService.putSettingsDomains(request);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainsUpdated\"));\n };\n\n indexTrackBy(index: number, obj: any): any {\n return index;\n }\n}\n","\n\n\n

    {{ \"preferencesDesc\" | i18n }}

    \n
    \n \n \n {{\n \"vaultTimeoutPolicyWithActionInEffect\"\n | i18n: policy.timeout.hours : policy.timeout.minutes : (policy.action | i18n)\n }}\n \n \n {{ \"vaultTimeoutPolicyInEffect\" | i18n: policy.timeout.hours : policy.timeout.minutes }}\n \n \n {{ \"vaultTimeoutActionPolicyInEffect\" | i18n: (policy.action | i18n) }}\n \n \n \n \n \n 1\"\n >\n {{ \"vaultTimeoutAction\" | i18n }}\n \n {{ \"lock\" | i18n }}\n {{ \"vaultTimeoutActionLockDesc\" | i18n }}\n \n \n {{ \"logOut\" | i18n }}\n {{ \"vaultTimeoutActionLogOutDesc\" | i18n }}\n \n \n \n \n {{ \"language\" | i18n }}\n \n \n \n \n \n \n \n {{ \"languageDesc\" | i18n }}\n \n \n \n {{ \"enableFavicon\" | i18n }}\n \n \n \n \n {{ \"faviconDesc\" | i18n }}\n \n \n {{ \"theme\" | i18n }}\n \n \n \n {{ \"themeDesc\" | i18n }}\n \n \n \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { concatMap, filter, firstValueFrom, map, Observable, Subject, takeUntil, tap } from \"rxjs\";\n\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DomainSettingsService } from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { ThemeStateService } from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport {\n VaultTimeout,\n VaultTimeoutOption,\n VaultTimeoutStringType,\n} from \"@bitwarden/common/types/vault-timeout.type\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-preferences\",\n templateUrl: \"preferences.component.html\",\n})\nexport class PreferencesComponent implements OnInit {\n // For use in template\n protected readonly VaultTimeoutAction = VaultTimeoutAction;\n\n protected availableVaultTimeoutActions$: Observable;\n\n vaultTimeoutPolicyCallout: Observable<{\n timeout: { hours: number; minutes: number };\n action: VaultTimeoutAction;\n }>;\n vaultTimeoutOptions: VaultTimeoutOption[];\n localeOptions: any[];\n themeOptions: any[];\n\n private startingLocale: string;\n private destroy$ = new Subject();\n\n form = this.formBuilder.group({\n vaultTimeout: [null as VaultTimeout | null],\n vaultTimeoutAction: [VaultTimeoutAction.Lock],\n enableFavicons: true,\n theme: [ThemeType.Light],\n locale: [null as string | null],\n });\n\n constructor(\n private formBuilder: FormBuilder,\n private policyService: PolicyService,\n private i18nService: I18nService,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n private platformUtilsService: PlatformUtilsService,\n private themeStateService: ThemeStateService,\n private domainSettingsService: DomainSettingsService,\n private dialogService: DialogService,\n private accountService: AccountService,\n ) {\n this.vaultTimeoutOptions = [\n { name: i18nService.t(\"oneMinute\"), value: 1 },\n { name: i18nService.t(\"fiveMinutes\"), value: 5 },\n { name: i18nService.t(\"fifteenMinutes\"), value: 15 },\n { name: i18nService.t(\"thirtyMinutes\"), value: 30 },\n { name: i18nService.t(\"oneHour\"), value: 60 },\n { name: i18nService.t(\"fourHours\"), value: 240 },\n { name: i18nService.t(\"onRefresh\"), value: VaultTimeoutStringType.OnRestart },\n ];\n if (this.platformUtilsService.isDev()) {\n this.vaultTimeoutOptions.push({\n name: i18nService.t(\"never\"),\n value: VaultTimeoutStringType.Never,\n });\n }\n\n const localeOptions: any[] = [];\n i18nService.supportedTranslationLocales.forEach((locale) => {\n let name = locale;\n if (i18nService.localeNames.has(locale)) {\n name += \" - \" + i18nService.localeNames.get(locale);\n }\n localeOptions.push({ name: name, value: locale });\n });\n localeOptions.sort(Utils.getSortFunction(i18nService, \"name\"));\n localeOptions.splice(0, 0, { name: i18nService.t(\"default\"), value: null });\n this.localeOptions = localeOptions;\n this.themeOptions = [\n { name: i18nService.t(\"themeLight\"), value: ThemeType.Light },\n { name: i18nService.t(\"themeDark\"), value: ThemeType.Dark },\n { name: i18nService.t(\"themeSystem\"), value: ThemeType.System },\n ];\n }\n\n async ngOnInit() {\n this.availableVaultTimeoutActions$ =\n this.vaultTimeoutSettingsService.availableVaultTimeoutActions$();\n\n this.vaultTimeoutPolicyCallout = this.policyService.get$(PolicyType.MaximumVaultTimeout).pipe(\n filter((policy) => policy != null),\n map((policy) => {\n let timeout;\n if (policy.data?.minutes) {\n timeout = {\n hours: Math.floor(policy.data?.minutes / 60),\n minutes: policy.data?.minutes % 60,\n };\n }\n return { timeout: timeout, action: policy.data?.action };\n }),\n tap((policy) => {\n if (policy.action) {\n this.form.controls.vaultTimeoutAction.disable({ emitEvent: false });\n } else {\n this.form.controls.vaultTimeoutAction.enable({ emitEvent: false });\n }\n }),\n );\n\n this.form.controls.vaultTimeoutAction.valueChanges\n .pipe(\n concatMap(async (action) => {\n if (action === VaultTimeoutAction.LogOut) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"vaultTimeoutLogOutConfirmationTitle\" },\n content: { key: \"vaultTimeoutLogOutConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n this.form.controls.vaultTimeoutAction.patchValue(VaultTimeoutAction.Lock, {\n emitEvent: false,\n });\n return;\n }\n }\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n\n const activeAcct = await firstValueFrom(this.accountService.activeAccount$);\n\n const initialFormValues = {\n vaultTimeout: await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(activeAcct.id),\n ),\n vaultTimeoutAction: await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(activeAcct.id),\n ),\n enableFavicons: await firstValueFrom(this.domainSettingsService.showFavicons$),\n theme: await firstValueFrom(this.themeStateService.selectedTheme$),\n locale: (await firstValueFrom(this.i18nService.userSetLocale$)) ?? null,\n };\n this.startingLocale = initialFormValues.locale;\n this.form.setValue(initialFormValues, { emitEvent: false });\n }\n\n submit = async () => {\n if (!this.form.controls.vaultTimeout.valid) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"vaultTimeoutRangeError\"),\n );\n return;\n }\n const values = this.form.value;\n\n const activeAcct = await firstValueFrom(this.accountService.activeAccount$);\n\n await this.vaultTimeoutSettingsService.setVaultTimeoutOptions(\n activeAcct.id,\n values.vaultTimeout,\n values.vaultTimeoutAction,\n );\n await this.domainSettingsService.setShowFavicons(values.enableFavicons);\n await this.themeStateService.setSelectedTheme(values.theme);\n await this.i18nService.setLocale(values.locale);\n if (values.locale !== this.startingLocale) {\n window.location.reload();\n } else {\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"preferencesUpdated\"),\n );\n }\n };\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { BehaviorSubject, combineLatest, firstValueFrom, Subject } from \"rxjs\";\nimport { debounceTime, first, map, skipWhile, takeUntil } from \"rxjs/operators\";\n\nimport { PasswordGeneratorPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/password-generator-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport {\n GeneratorType,\n DefaultPasswordBoundaries as DefaultBoundaries,\n} from \"@bitwarden/generator-core\";\nimport {\n PasswordGenerationServiceAbstraction,\n UsernameGenerationServiceAbstraction,\n UsernameGeneratorOptions,\n PasswordGeneratorOptions,\n} from \"@bitwarden/generator-legacy\";\n\nexport class EmailForwarderOptions {\n name: string;\n value: string;\n validForSelfHosted: boolean;\n}\n\n@Directive()\nexport class GeneratorComponent implements OnInit, OnDestroy {\n @Input() comingFromAddEdit = false;\n @Input() type: GeneratorType | \"\";\n @Output() onSelected = new EventEmitter();\n\n usernameGeneratingPromise: Promise;\n typeOptions: any[];\n passTypeOptions: any[];\n usernameTypeOptions: any[];\n subaddressOptions: any[];\n catchallOptions: any[];\n forwardOptions: EmailForwarderOptions[];\n usernameOptions: UsernameGeneratorOptions = { website: null };\n passwordOptions: PasswordGeneratorOptions = {};\n username = \"-\";\n password = \"-\";\n showOptions = false;\n avoidAmbiguous = false;\n enforcedPasswordPolicyOptions: PasswordGeneratorPolicyOptions;\n usernameWebsite: string = null;\n\n private destroy$ = new Subject();\n private isInitialized$ = new BehaviorSubject(false);\n\n // update screen reader minimum password length with 500ms debounce\n // so that the user isn't flooded with status updates\n private _passwordOptionsMinLengthForReader = new BehaviorSubject(\n DefaultBoundaries.length.min,\n );\n protected passwordOptionsMinLengthForReader$ = this._passwordOptionsMinLengthForReader.pipe(\n map((val) => val || DefaultBoundaries.length.min),\n debounceTime(500),\n );\n\n private _password = new BehaviorSubject(\"-\");\n\n constructor(\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected usernameGenerationService: UsernameGenerationServiceAbstraction,\n protected platformUtilsService: PlatformUtilsService,\n protected accountService: AccountService,\n protected i18nService: I18nService,\n protected logService: LogService,\n protected route: ActivatedRoute,\n protected ngZone: NgZone,\n private win: Window,\n protected toastService: ToastService,\n ) {\n this.typeOptions = [\n { name: i18nService.t(\"password\"), value: \"password\" },\n { name: i18nService.t(\"username\"), value: \"username\" },\n ];\n this.passTypeOptions = [\n { name: i18nService.t(\"password\"), value: \"password\" },\n { name: i18nService.t(\"passphrase\"), value: \"passphrase\" },\n ];\n this.usernameTypeOptions = [\n {\n name: i18nService.t(\"plusAddressedEmail\"),\n value: \"subaddress\",\n desc: i18nService.t(\"plusAddressedEmailDesc\"),\n },\n {\n name: i18nService.t(\"catchallEmail\"),\n value: \"catchall\",\n desc: i18nService.t(\"catchallEmailDesc\"),\n },\n {\n name: i18nService.t(\"forwardedEmail\"),\n value: \"forwarded\",\n desc: i18nService.t(\"forwardedEmailDesc\"),\n },\n { name: i18nService.t(\"randomWord\"), value: \"word\" },\n ];\n this.subaddressOptions = [{ name: i18nService.t(\"random\"), value: \"random\" }];\n this.catchallOptions = [{ name: i18nService.t(\"random\"), value: \"random\" }];\n\n this.forwardOptions = [\n { name: \"\", value: \"\", validForSelfHosted: false },\n { name: \"addy.io\", value: \"anonaddy\", validForSelfHosted: true },\n { name: \"DuckDuckGo\", value: \"duckduckgo\", validForSelfHosted: false },\n { name: \"Fastmail\", value: \"fastmail\", validForSelfHosted: true },\n { name: \"Firefox Relay\", value: \"firefoxrelay\", validForSelfHosted: false },\n { name: \"SimpleLogin\", value: \"simplelogin\", validForSelfHosted: true },\n { name: \"Forward Email\", value: \"forwardemail\", validForSelfHosted: true },\n ].sort((a, b) => a.name.localeCompare(b.name));\n\n this._password.pipe(debounceTime(250)).subscribe((password) => {\n ngZone.run(() => {\n this.password = password;\n });\n this.passwordGenerationService.addHistory(this.password).catch((e) => {\n this.logService.error(e);\n });\n });\n }\n\n cascadeOptions(navigationType: GeneratorType = undefined, accountEmail: string) {\n this.avoidAmbiguous = !this.passwordOptions.ambiguous;\n\n if (!this.type) {\n if (navigationType) {\n this.type = navigationType;\n } else {\n this.type = this.passwordOptions.type === \"username\" ? \"username\" : \"password\";\n }\n }\n\n this.passwordOptions.type =\n this.passwordOptions.type === \"passphrase\" ? \"passphrase\" : \"password\";\n\n if (this.usernameOptions.type == null) {\n this.usernameOptions.type = \"word\";\n }\n if (\n this.usernameOptions.subaddressEmail == null ||\n this.usernameOptions.subaddressEmail === \"\"\n ) {\n this.usernameOptions.subaddressEmail = accountEmail;\n }\n if (this.usernameWebsite == null) {\n this.usernameOptions.subaddressType = this.usernameOptions.catchallType = \"random\";\n } else {\n this.usernameOptions.website = this.usernameWebsite;\n const websiteOption = { name: this.i18nService.t(\"websiteName\"), value: \"website-name\" };\n this.subaddressOptions.push(websiteOption);\n this.catchallOptions.push(websiteOption);\n }\n }\n\n async ngOnInit() {\n combineLatest([\n this.route.queryParams.pipe(first()),\n this.accountService.activeAccount$.pipe(first()),\n this.passwordGenerationService.getOptions$(),\n this.usernameGenerationService.getOptions$(),\n ])\n .pipe(\n map(([qParams, account, [passwordOptions, passwordPolicy], usernameOptions]) => ({\n navigationType: qParams.type as GeneratorType,\n accountEmail: account.email,\n passwordOptions,\n passwordPolicy,\n usernameOptions,\n })),\n takeUntil(this.destroy$),\n )\n .subscribe((options) => {\n this.passwordOptions = options.passwordOptions;\n this.enforcedPasswordPolicyOptions = options.passwordPolicy;\n this.usernameOptions = options.usernameOptions;\n\n this.cascadeOptions(options.navigationType, options.accountEmail);\n this._passwordOptionsMinLengthForReader.next(this.passwordOptions.minLength);\n\n if (this.regenerateWithoutButtonPress()) {\n this.regenerate().catch((e) => {\n this.logService.error(e);\n });\n }\n\n this.isInitialized$.next(true);\n });\n\n // once initialization is complete, `ngOnInit` should return.\n //\n // FIXME(#6944): if a sync is in progress, wait to complete until after\n // the sync completes.\n await firstValueFrom(\n this.isInitialized$.pipe(\n skipWhile((initialized) => !initialized),\n takeUntil(this.destroy$),\n ),\n );\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n this.isInitialized$.complete();\n this._passwordOptionsMinLengthForReader.complete();\n }\n\n async typeChanged() {\n await this.savePasswordOptions();\n }\n\n async regenerate() {\n if (this.type === \"password\") {\n await this.regeneratePassword();\n } else if (this.type === \"username\") {\n await this.regenerateUsername();\n }\n }\n\n async sliderChanged() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.savePasswordOptions();\n await this.passwordGenerationService.addHistory(this.password);\n }\n\n async onPasswordOptionsMinNumberInput($event: Event) {\n // `savePasswordOptions()` replaces the null\n this.passwordOptions.number = null;\n\n await this.savePasswordOptions();\n\n // fixes UI desync that occurs when minNumber has a fixed value\n // that is reset through normalization\n ($event.target as HTMLInputElement).value = `${this.passwordOptions.minNumber}`;\n }\n\n async setPasswordOptionsNumber($event: boolean) {\n this.passwordOptions.number = $event;\n // `savePasswordOptions()` replaces the null\n this.passwordOptions.minNumber = null;\n\n await this.savePasswordOptions();\n }\n\n async onPasswordOptionsMinSpecialInput($event: Event) {\n // `savePasswordOptions()` replaces the null\n this.passwordOptions.special = null;\n\n await this.savePasswordOptions();\n\n // fixes UI desync that occurs when minSpecial has a fixed value\n // that is reset through normalization\n ($event.target as HTMLInputElement).value = `${this.passwordOptions.minSpecial}`;\n }\n\n async setPasswordOptionsSpecial($event: boolean) {\n this.passwordOptions.special = $event;\n // `savePasswordOptions()` replaces the null\n this.passwordOptions.minSpecial = null;\n\n await this.savePasswordOptions();\n }\n\n async sliderInput() {\n await this.normalizePasswordOptions();\n }\n\n async savePasswordOptions() {\n // map navigation state into generator type\n const restoreType = this.passwordOptions.type;\n if (this.type === \"username\") {\n this.passwordOptions.type = this.type;\n }\n\n // save options\n await this.normalizePasswordOptions();\n await this.passwordGenerationService.saveOptions(this.passwordOptions);\n\n // restore the original format\n this.passwordOptions.type = restoreType;\n }\n\n async saveUsernameOptions() {\n await this.usernameGenerationService.saveOptions(this.usernameOptions);\n if (this.usernameOptions.type === \"forwarded\") {\n this.username = \"-\";\n }\n }\n\n async regeneratePassword() {\n this._password.next(\n await this.passwordGenerationService.generatePassword(this.passwordOptions),\n );\n }\n\n regenerateUsername() {\n return this.generateUsername();\n }\n\n async generateUsername() {\n try {\n this.usernameGeneratingPromise = this.usernameGenerationService.generateUsername(\n this.usernameOptions,\n );\n this.username = await this.usernameGeneratingPromise;\n if (this.username === \"\" || this.username === null) {\n this.username = \"-\";\n }\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n copy() {\n const password = this.type === \"password\";\n const copyOptions = this.win != null ? { window: this.win } : null;\n this.platformUtilsService.copyToClipboard(\n password ? this.password : this.username,\n copyOptions,\n );\n this.toastService.showToast({\n variant: \"info\",\n title: null,\n message: this.i18nService.t(\n \"valueCopied\",\n this.i18nService.t(password ? \"password\" : \"username\"),\n ),\n });\n }\n\n select() {\n this.onSelected.emit(this.type === \"password\" ? this.password : this.username);\n }\n\n toggleOptions() {\n this.showOptions = !this.showOptions;\n }\n\n regenerateWithoutButtonPress() {\n return this.type !== \"username\" || this.usernameOptions.type !== \"forwarded\";\n }\n\n private async normalizePasswordOptions() {\n // Application level normalize options dependent on class variables\n this.passwordOptions.ambiguous = !this.avoidAmbiguous;\n\n if (\n !this.passwordOptions.uppercase &&\n !this.passwordOptions.lowercase &&\n !this.passwordOptions.number &&\n !this.passwordOptions.special\n ) {\n this.passwordOptions.lowercase = true;\n if (this.win != null) {\n const lowercase = this.win.document.querySelector(\"#lowercase\") as HTMLInputElement;\n if (lowercase) {\n lowercase.checked = true;\n }\n }\n }\n\n await this.passwordGenerationService.enforcePasswordGeneratorPoliciesOnOptions(\n this.passwordOptions,\n );\n }\n}\n","import { Directive, OnInit } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { GeneratedPasswordHistory } from \"@bitwarden/generator-history\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Directive()\nexport class PasswordGeneratorHistoryComponent implements OnInit {\n history: GeneratedPasswordHistory[] = [];\n\n constructor(\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected platformUtilsService: PlatformUtilsService,\n protected i18nService: I18nService,\n private win: Window,\n protected toastService: ToastService,\n ) {}\n\n async ngOnInit() {\n this.history = await this.passwordGenerationService.getHistory();\n }\n\n clear = async () => {\n this.history = await this.passwordGenerationService.clear();\n };\n\n copy(password: string) {\n const copyOptions = this.win != null ? { window: this.win } : null;\n this.platformUtilsService.copyToClipboard(password, copyOptions);\n this.toastService.showToast({\n variant: \"info\",\n title: null,\n message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"password\")),\n });\n }\n}\n","import { Directive, ElementRef, HostListener, Input } from \"@angular/core\";\n\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive({\n selector: \"[appCopyText]\",\n})\nexport class CopyTextDirective {\n constructor(\n private el: ElementRef,\n private platformUtilsService: PlatformUtilsService,\n ) {}\n\n @Input(\"appCopyText\") copyText: string;\n\n @HostListener(\"copy\") onCopy() {\n if (window == null) {\n return;\n }\n\n const timeout = this.platformUtilsService.getClientType() === ClientType.Desktop ? 100 : 0;\n setTimeout(() => {\n this.platformUtilsService.copyToClipboard(this.copyText, { window: window });\n }, timeout);\n }\n}\n","\n \n {{ \"passwordHistory\" | i18n }}\n \n \n \n \n \n \n \n \n {{ h.date | date: \"medium\" }}\n \n \n \n \n \n \n \n \n
    \n {{ \"noPasswordsInList\" | i18n }}\n
    \n
    \n \n \n \n \n
    \n","import { Component } from \"@angular/core\";\n\nimport { PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent } from \"@bitwarden/angular/tools/generator/components/password-generator-history.component\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Component({\n selector: \"app-password-generator-history\",\n templateUrl: \"password-generator-history.component.html\",\n})\nexport class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHistoryComponent {\n constructor(\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n toastService: ToastService,\n ) {\n super(passwordGenerationService, platformUtilsService, i18nService, window, toastService);\n }\n}\n","\n\n\n \n {{ \"passwordGeneratorPolicyInEffect\" | i18n }}\n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    \n \n
    \n \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n \n {{ passwordOptionsMinLengthForReader$ | async }}\n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n \n \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n {{ \"regenerateUsername\" | i18n }}\n \n \n
    \n
    \n \n
    \n","import { Component, NgZone } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\n\nimport { GeneratorComponent as BaseGeneratorComponent } from \"@bitwarden/angular/tools/generator/components/generator.component\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport {\n PasswordGenerationServiceAbstraction,\n UsernameGenerationServiceAbstraction,\n} from \"@bitwarden/generator-legacy\";\n\nimport { PasswordGeneratorHistoryComponent } from \"./password-generator-history.component\";\n\n@Component({\n selector: \"app-generator\",\n templateUrl: \"generator.component.html\",\n})\nexport class GeneratorComponent extends BaseGeneratorComponent {\n constructor(\n passwordGenerationService: PasswordGenerationServiceAbstraction,\n usernameGenerationService: UsernameGenerationServiceAbstraction,\n accountService: AccountService,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n logService: LogService,\n route: ActivatedRoute,\n ngZone: NgZone,\n private dialogService: DialogService,\n toastService: ToastService,\n ) {\n super(\n passwordGenerationService,\n usernameGenerationService,\n platformUtilsService,\n accountService,\n i18nService,\n logService,\n route,\n ngZone,\n window,\n toastService,\n );\n if (platformUtilsService.isSelfHost()) {\n // Allow only valid email forwarders for self host\n this.forwardOptions = this.forwardOptions.filter((forwarder) => forwarder.validForSelfHosted);\n }\n }\n\n get isSelfHosted(): boolean {\n return this.platformUtilsService.isSelfHost();\n }\n\n async history() {\n this.dialogService.open(PasswordGeneratorHistoryComponent);\n }\n\n lengthChanged() {\n document.getElementById(\"length\").focus();\n }\n\n minNumberChanged() {\n document.getElementById(\"min-number\").focus();\n }\n\n minSpecialChanged() {\n document.getElementById(\"min-special\").focus();\n }\n}\n","import { View } from \"../../../../models/view/view\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendAccess } from \"../domain/send-access\";\n\nimport { SendFileView } from \"./send-file.view\";\nimport { SendTextView } from \"./send-text.view\";\n\nexport class SendAccessView implements View {\n id: string = null;\n name: string = null;\n type: SendType = null;\n text = new SendTextView();\n file = new SendFileView();\n expirationDate: Date = null;\n creatorIdentifier: string = null;\n\n constructor(s?: SendAccess) {\n if (!s) {\n return;\n }\n\n this.id = s.id;\n this.type = s.type;\n this.expirationDate = s.expirationDate;\n this.creatorIdentifier = s.creatorIdentifier;\n }\n}\n","import Domain from \"../../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../../platform/models/domain/symmetric-crypto-key\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendAccessResponse } from \"../response/send-access.response\";\nimport { SendAccessView } from \"../view/send-access.view\";\n\nimport { SendFile } from \"./send-file\";\nimport { SendText } from \"./send-text\";\n\nexport class SendAccess extends Domain {\n id: string;\n type: SendType;\n name: EncString;\n file: SendFile;\n text: SendText;\n expirationDate: Date;\n creatorIdentifier: string;\n\n constructor(obj?: SendAccessResponse) {\n super();\n if (obj == null) {\n return;\n }\n\n this.buildDomainModel(\n this,\n obj,\n {\n id: null,\n name: null,\n expirationDate: null,\n creatorIdentifier: null,\n },\n [\"id\", \"expirationDate\", \"creatorIdentifier\"],\n );\n\n this.type = obj.type;\n\n switch (this.type) {\n case SendType.Text:\n this.text = new SendText(obj.text);\n break;\n case SendType.File:\n this.file = new SendFile(obj.file);\n break;\n default:\n break;\n }\n }\n\n async decrypt(key: SymmetricCryptoKey): Promise {\n const model = new SendAccessView(this);\n\n await this.decryptObj(\n model,\n {\n name: null,\n },\n null,\n key,\n );\n\n switch (this.type) {\n case SendType.File:\n model.file = await this.file.decrypt(key);\n break;\n case SendType.Text:\n model.text = await this.text.decrypt(key);\n break;\n default:\n break;\n }\n\n return model;\n }\n}\n","export class SendAccessRequest {\n password: string;\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const NoSendsIcon = svgIcon`\n \n \n \n \n \n \n \n \n \n `;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ExpiredSendIcon = svgIcon`\n \n \n \n \n \n \n \n`;\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { Router, RouterLink } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { ButtonModule, MenuModule } from \"@bitwarden/components\";\n\n@Component({\n selector: \"tools-new-send-dropdown\",\n templateUrl: \"new-send-dropdown.component.html\",\n standalone: true,\n imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule],\n})\nexport class NewSendDropdownComponent {\n sendType = SendType;\n\n constructor(private router: Router) {}\n\n newItemNavigate(type: SendType) {\n void this.router.navigate([\"/add-send\"], { queryParams: { type: type, isNew: true } });\n }\n}\n","\n\n \n \n {{ \"sendTypeText\" | i18n }}\n \n \n \n {{ \"sendTypeFile\" | i18n }}\n \n\n","import { Component, Input } from \"@angular/core\";\n\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { SendAccessRequest } from \"@bitwarden/common/tools/send/models/request/send-access.request\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n selector: \"app-send-access-file\",\n templateUrl: \"send-access-file.component.html\",\n imports: [SharedModule],\n standalone: true,\n})\nexport class SendAccessFileComponent {\n @Input() send: SendAccessView;\n @Input() decKey: SymmetricCryptoKey;\n @Input() accessRequest: SendAccessRequest;\n constructor(\n private i18nService: I18nService,\n private toastService: ToastService,\n private cryptoService: CryptoService,\n private fileDownloadService: FileDownloadService,\n private sendApiService: SendApiService,\n ) {}\n\n protected download = async () => {\n if (this.send == null || this.decKey == null) {\n return;\n }\n\n const downloadData = await this.sendApiService.getSendFileDownloadData(\n this.send,\n this.accessRequest,\n );\n\n if (Utils.isNullOrWhitespace(downloadData.url)) {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"missingSendFile\"),\n });\n return;\n }\n\n const response = await fetch(new Request(downloadData.url, { cache: \"no-store\" }));\n if (response.status !== 200) {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"errorOccurred\"),\n });\n return;\n }\n\n try {\n const encBuf = await EncArrayBuffer.fromResponse(response);\n const decBuf = await this.cryptoService.decryptFromBytes(encBuf, this.decKey);\n this.fileDownloadService.download({\n fileName: this.send.file.fileName,\n blobData: decBuf,\n downloadMethod: \"save\",\n });\n } catch (e) {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"errorOccurred\"),\n });\n }\n };\n}\n","

    {{ send.file.fileName }}

    \n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n selector: \"app-send-access-password\",\n templateUrl: \"send-access-password.component.html\",\n imports: [SharedModule],\n standalone: true,\n})\nexport class SendAccessPasswordComponent {\n private destroy$ = new Subject();\n protected formGroup = this.formBuilder.group({\n password: [\"\", [Validators.required]],\n });\n\n @Input() loading: boolean;\n @Output() setPasswordEvent = new EventEmitter();\n\n constructor(private formBuilder: FormBuilder) {}\n\n async ngOnInit() {\n this.formGroup.controls.password.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((val) => {\n this.setPasswordEvent.emit(val);\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","{{ \"sendHiddenByDefault\" | i18n }}\n\n \n\n
    \n \n \n {{ \"toggleVisibility\" | i18n }}\n \n
    \n
    \n \n
    \n","

    {{ \"sendProtectedPassword\" | i18n }}

    \n

    {{ \"sendProtectedPasswordDontKnow\" | i18n }}

    \n
    \n \n {{ \"password\" | i18n }}\n \n \n \n
    \n \n {{ \"continue\" | i18n }} \n \n
    \n
    \n","import { Component, Input } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n selector: \"app-send-access-text\",\n templateUrl: \"send-access-text.component.html\",\n imports: [SharedModule],\n standalone: true,\n})\nexport class SendAccessTextComponent {\n private _send: SendAccessView = null;\n protected showText = false;\n\n protected formGroup = this.formBuilder.group({\n sendText: [\"\"],\n });\n\n constructor(\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private formBuilder: FormBuilder,\n private toastService: ToastService,\n ) {}\n\n get send(): SendAccessView {\n return this._send;\n }\n\n @Input() set send(value: SendAccessView) {\n this._send = value;\n this.showText = this.send.text != null ? !this.send.text.hidden : true;\n\n if (this.send == null || this.send.text == null) {\n return;\n }\n\n this.formGroup.controls.sendText.patchValue(\n this.showText ? this.send.text.text : this.send.text.maskedText,\n );\n }\n\n protected copyText() {\n this.platformUtilsService.copyToClipboard(this.send.text.text);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"sendTypeText\")),\n });\n }\n\n protected toggleText() {\n this.showText = !this.showText;\n this.formGroup.controls.sendText.patchValue(\n this.showText ? this.send.text.text : this.send.text.maskedText,\n );\n }\n}\n","
    \n \n \n
    \n

    View Send

    \n
    \n
    \n

    {{ \"sendAccessCreatorIdentifier\" | i18n: creatorIdentifier }}

    \n
    \n \n {{ \"viewSendHiddenEmailWarning\" | i18n }}\n {{\n \"learnMore\" | i18n\n }}.\n \n \n \n \n \n {{ \"sendAccessUnavailable\" | i18n }}\n \n \n {{ \"unexpectedErrorSend\" | i18n }}\n \n
    \n

    \n {{ send.name }}\n

    \n
    \n \n \n \n \n \n \n \n \n

    \n Expires: {{ expirationDate | date: \"medium\" }}\n

    \n
    \n
    \n \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n
    \n \n\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendAccess } from \"@bitwarden/common/tools/send/models/domain/send-access\";\nimport { SendAccessRequest } from \"@bitwarden/common/tools/send/models/request/send-access.request\";\nimport { SendAccessResponse } from \"@bitwarden/common/tools/send/models/response/send-access.response\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { SEND_KDF_ITERATIONS } from \"@bitwarden/common/tools/send/send-kdf\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { NoItemsModule, ToastService } from \"@bitwarden/components\";\nimport { ExpiredSendIcon } from \"@bitwarden/send-ui\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { SendAccessFileComponent } from \"./send-access-file.component\";\nimport { SendAccessPasswordComponent } from \"./send-access-password.component\";\nimport { SendAccessTextComponent } from \"./send-access-text.component\";\n\n@Component({\n selector: \"app-send-access\",\n templateUrl: \"access.component.html\",\n standalone: true,\n imports: [\n SendAccessFileComponent,\n SendAccessTextComponent,\n SendAccessPasswordComponent,\n SharedModule,\n NoItemsModule,\n ],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class AccessComponent implements OnInit {\n protected send: SendAccessView;\n protected sendType = SendType;\n protected loading = true;\n protected passwordRequired = false;\n protected formPromise: Promise;\n protected password: string;\n protected unavailable = false;\n protected error = false;\n protected hideEmail = false;\n protected decKey: SymmetricCryptoKey;\n protected accessRequest: SendAccessRequest;\n protected expiredSendIcon = ExpiredSendIcon;\n\n protected formGroup = this.formBuilder.group({});\n\n // TODO: remove when email verification flag is removed\n registerRoute$ = this.registerRouteService.registerRoute$();\n\n private id: string;\n private key: string;\n\n constructor(\n private cryptoFunctionService: CryptoFunctionService,\n private route: ActivatedRoute,\n private cryptoService: CryptoService,\n private sendApiService: SendApiService,\n private toastService: ToastService,\n private i18nService: I18nService,\n private configService: ConfigService,\n private registerRouteService: RegisterRouteService,\n protected formBuilder: FormBuilder,\n ) {}\n\n protected get expirationDate() {\n if (this.send == null || this.send.expirationDate == null) {\n return null;\n }\n return this.send.expirationDate;\n }\n\n protected get creatorIdentifier() {\n if (this.send == null || this.send.creatorIdentifier == null) {\n return null;\n }\n return this.send.creatorIdentifier;\n }\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.params.subscribe(async (params) => {\n this.id = params.sendId;\n this.key = params.key;\n if (this.key == null || this.id == null) {\n return;\n }\n await this.load();\n });\n }\n\n protected load = async () => {\n this.unavailable = false;\n this.error = false;\n this.hideEmail = false;\n try {\n const keyArray = Utils.fromUrlB64ToArray(this.key);\n this.accessRequest = new SendAccessRequest();\n if (this.password != null) {\n const passwordHash = await this.cryptoFunctionService.pbkdf2(\n this.password,\n keyArray,\n \"sha256\",\n SEND_KDF_ITERATIONS,\n );\n this.accessRequest.password = Utils.fromBufferToB64(passwordHash);\n }\n let sendResponse: SendAccessResponse = null;\n if (this.loading) {\n sendResponse = await this.sendApiService.postSendAccess(this.id, this.accessRequest);\n } else {\n this.formPromise = this.sendApiService.postSendAccess(this.id, this.accessRequest);\n sendResponse = await this.formPromise;\n }\n this.passwordRequired = false;\n const sendAccess = new SendAccess(sendResponse);\n this.decKey = await this.cryptoService.makeSendKey(keyArray);\n this.send = await sendAccess.decrypt(this.decKey);\n } catch (e) {\n if (e instanceof ErrorResponse) {\n if (e.statusCode === 401) {\n this.passwordRequired = true;\n } else if (e.statusCode === 404) {\n this.unavailable = true;\n } else if (e.statusCode === 400) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: e.message,\n });\n } else {\n this.error = true;\n }\n } else {\n this.error = true;\n }\n }\n this.loading = false;\n this.hideEmail =\n this.creatorIdentifier == null &&\n !this.passwordRequired &&\n !this.loading &&\n !this.unavailable;\n };\n\n protected setPassword(password: string) {\n this.password = password;\n }\n}\n","import { Directive, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n BehaviorSubject,\n Subject,\n firstValueFrom,\n mergeMap,\n from,\n switchMap,\n takeUntil,\n} from \"rxjs\";\n\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Directive()\nexport class SendComponent implements OnInit, OnDestroy {\n disableSend = false;\n sendType = SendType;\n loaded = false;\n loading = true;\n refreshing = false;\n expired = false;\n type: SendType = null;\n sends: SendView[] = [];\n selectedType: SendType;\n selectedAll: boolean;\n filter: (cipher: SendView) => boolean;\n searchPending = false;\n hasSearched = false; // search() function called - returns true if text qualifies for search\n\n actionPromise: any;\n onSuccessfulRemovePassword: () => Promise;\n onSuccessfulDelete: () => Promise;\n onSuccessfulLoad: () => Promise;\n\n private searchTimeout: any;\n private destroy$ = new Subject();\n private _filteredSends: SendView[];\n private _searchText$ = new BehaviorSubject(\"\");\n protected isSearchable: boolean = false;\n\n get filteredSends(): SendView[] {\n return this._filteredSends;\n }\n\n set filteredSends(filteredSends: SendView[]) {\n this._filteredSends = filteredSends;\n }\n\n get searchText() {\n return this._searchText$.value;\n }\n\n set searchText(value: string) {\n this._searchText$.next(value);\n }\n\n constructor(\n protected sendService: SendService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected environmentService: EnvironmentService,\n protected ngZone: NgZone,\n protected searchService: SearchService,\n protected policyService: PolicyService,\n private logService: LogService,\n protected sendApiService: SendApiService,\n protected dialogService: DialogService,\n protected toastService: ToastService,\n ) {}\n\n async ngOnInit() {\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.DisableSend)\n .pipe(takeUntil(this.destroy$))\n .subscribe((policyAppliesToActiveUser) => {\n this.disableSend = policyAppliesToActiveUser;\n });\n\n this._searchText$\n .pipe(\n switchMap((searchText) => from(this.searchService.isSearchable(searchText))),\n takeUntil(this.destroy$),\n )\n .subscribe((isSearchable) => {\n this.isSearchable = isSearchable;\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async load(filter: (send: SendView) => boolean = null) {\n this.loading = true;\n this.sendService.sendViews$\n .pipe(\n mergeMap(async (sends) => {\n this.sends = sends;\n await this.search(null);\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n if (this.onSuccessfulLoad != null) {\n await this.onSuccessfulLoad();\n } else {\n // Default action\n this.selectAll();\n }\n this.loading = false;\n this.loaded = true;\n }\n\n async reload(filter: (send: SendView) => boolean = null) {\n this.loaded = false;\n this.sends = [];\n await this.load(filter);\n }\n\n async refresh() {\n try {\n this.refreshing = true;\n await this.reload(this.filter);\n } finally {\n this.refreshing = false;\n }\n }\n\n async applyFilter(filter: (send: SendView) => boolean = null) {\n this.filter = filter;\n await this.search(null);\n }\n\n async search(timeout: number = null) {\n this.searchPending = false;\n if (this.searchTimeout != null) {\n clearTimeout(this.searchTimeout);\n }\n if (timeout == null) {\n this.hasSearched = this.isSearchable;\n this.filteredSends = this.sends.filter((s) => this.filter == null || this.filter(s));\n this.applyTextSearch();\n return;\n }\n this.searchPending = true;\n this.searchTimeout = setTimeout(async () => {\n this.hasSearched = this.isSearchable;\n this.filteredSends = this.sends.filter((s) => this.filter == null || this.filter(s));\n this.applyTextSearch();\n this.searchPending = false;\n }, timeout);\n }\n\n async removePassword(s: SendView): Promise {\n if (this.actionPromise != null || s.password == null) {\n return;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"removePassword\" },\n content: { key: \"removePasswordConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.actionPromise = this.sendApiService.removePassword(s.id);\n await this.actionPromise;\n if (this.onSuccessfulRemovePassword != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulRemovePassword();\n } else {\n // Default actions\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"removedPassword\"),\n });\n await this.load();\n }\n } catch (e) {\n this.logService.error(e);\n }\n this.actionPromise = null;\n }\n\n async delete(s: SendView): Promise {\n if (this.actionPromise != null) {\n return false;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteSend\" },\n content: { key: \"deleteSendConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.actionPromise = this.sendApiService.delete(s.id);\n await this.actionPromise;\n\n if (this.onSuccessfulDelete != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulDelete();\n } else {\n // Default actions\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"deletedSend\"),\n });\n await this.refresh();\n }\n } catch (e) {\n this.logService.error(e);\n }\n this.actionPromise = null;\n return true;\n }\n\n async copy(s: SendView) {\n const env = await firstValueFrom(this.environmentService.environment$);\n const link = env.getSendUrl() + s.accessId + \"/\" + s.urlB64Key;\n this.platformUtilsService.copyToClipboard(link);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"sendLink\")),\n });\n }\n\n searchTextChanged() {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.search(200);\n }\n\n selectAll() {\n this.clearSelections();\n this.selectedAll = true;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.applyFilter(null);\n }\n\n selectType(type: SendType) {\n this.clearSelections();\n this.selectedType = type;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.applyFilter((s) => s.type === type);\n }\n\n clearSelections() {\n this.selectedAll = false;\n this.selectedType = null;\n }\n\n private applyTextSearch() {\n if (this.searchText != null) {\n this.filteredSends = this.searchService.searchSends(this.filteredSends, this.searchText);\n }\n }\n}\n","import { DatePipe } from \"@angular/common\";\nimport { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject, firstValueFrom, takeUntil, map, BehaviorSubject, concatMap } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { Send } from \"@bitwarden/common/tools/send/models/domain/send\";\nimport { SendFileView } from \"@bitwarden/common/tools/send/models/view/send-file.view\";\nimport { SendTextView } from \"@bitwarden/common/tools/send/models/view/send-text.view\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n// Value = hours\nenum DatePreset {\n OneHour = 1,\n OneDay = 24,\n TwoDays = 48,\n ThreeDays = 72,\n SevenDays = 168,\n ThirtyDays = 720,\n Custom = 0,\n Never = null,\n}\n\ninterface DatePresetSelectOption {\n name: string;\n value: DatePreset;\n}\n\n@Directive()\nexport class AddEditComponent implements OnInit, OnDestroy {\n @Input() sendId: string;\n @Input() type: SendType;\n\n @Output() onSavedSend = new EventEmitter();\n @Output() onDeletedSend = new EventEmitter();\n @Output() onCancelled = new EventEmitter();\n\n deletionDatePresets: DatePresetSelectOption[] = [\n { name: this.i18nService.t(\"oneHour\"), value: DatePreset.OneHour },\n { name: this.i18nService.t(\"oneDay\"), value: DatePreset.OneDay },\n { name: this.i18nService.t(\"days\", \"2\"), value: DatePreset.TwoDays },\n { name: this.i18nService.t(\"days\", \"3\"), value: DatePreset.ThreeDays },\n { name: this.i18nService.t(\"days\", \"7\"), value: DatePreset.SevenDays },\n { name: this.i18nService.t(\"days\", \"30\"), value: DatePreset.ThirtyDays },\n { name: this.i18nService.t(\"custom\"), value: DatePreset.Custom },\n ];\n\n expirationDatePresets: DatePresetSelectOption[] = [\n { name: this.i18nService.t(\"never\"), value: DatePreset.Never },\n ...this.deletionDatePresets,\n ];\n\n copyLink = false;\n disableSend = false;\n disableHideEmail = false;\n send: SendView;\n hasPassword: boolean;\n showPassword = false;\n formPromise: Promise;\n deletePromise: Promise;\n sendType = SendType;\n typeOptions: any[];\n canAccessPremium = true;\n emailVerified = true;\n alertShown = false;\n showOptions = false;\n\n protected componentName = \"\";\n private sendLinkBaseUrl: string;\n private destroy$ = new Subject();\n\n protected formGroup = this.formBuilder.group({\n name: [\"\", Validators.required],\n text: [],\n textHidden: [false],\n fileContents: [],\n file: [null, Validators.required],\n link: [],\n copyLink: false,\n maxAccessCount: [],\n accessCount: [],\n password: [],\n notes: [],\n hideEmail: false,\n disabled: false,\n type: [],\n defaultExpirationDateTime: [],\n defaultDeletionDateTime: [\"\", Validators.required],\n selectedDeletionDatePreset: [DatePreset.SevenDays, Validators.required],\n selectedExpirationDatePreset: [],\n });\n\n constructor(\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected environmentService: EnvironmentService,\n protected datePipe: DatePipe,\n protected sendService: SendService,\n protected messagingService: MessagingService,\n protected policyService: PolicyService,\n protected logService: LogService,\n protected stateService: StateService,\n protected sendApiService: SendApiService,\n protected dialogService: DialogService,\n protected formBuilder: FormBuilder,\n protected billingAccountProfileStateService: BillingAccountProfileStateService,\n protected accountService: AccountService,\n protected toastService: ToastService,\n ) {\n this.typeOptions = [\n { name: i18nService.t(\"sendTypeFile\"), value: SendType.File, premium: true },\n { name: i18nService.t(\"sendTypeText\"), value: SendType.Text, premium: false },\n ];\n }\n\n get link(): string {\n if (this.send != null && this.send.id != null && this.send.accessId != null) {\n return this.sendLinkBaseUrl + this.send.accessId + \"/\" + this.send.urlB64Key;\n }\n return null;\n }\n\n get isSafari() {\n return this.platformUtilsService.isSafari();\n }\n\n get isDateTimeLocalSupported(): boolean {\n return !(this.platformUtilsService.isFirefox() || this.platformUtilsService.isSafari());\n }\n\n async ngOnInit() {\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.DisableSend)\n .pipe(takeUntil(this.destroy$))\n .subscribe((policyAppliesToActiveUser) => {\n this.disableSend = policyAppliesToActiveUser;\n if (this.disableSend) {\n this.formGroup.disable();\n }\n });\n\n this.policyService\n .getAll$(PolicyType.SendOptions)\n .pipe(\n map((policies) => policies?.some((p) => p.data.disableHideEmail)),\n takeUntil(this.destroy$),\n )\n .subscribe((policyAppliesToActiveUser) => {\n if (\n (this.disableHideEmail = policyAppliesToActiveUser) &&\n !this.formGroup.controls.hideEmail.value\n ) {\n this.formGroup.controls.hideEmail.disable();\n } else {\n this.formGroup.controls.hideEmail.enable();\n }\n });\n\n this.formGroup.controls.type.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((val) => {\n this.type = val;\n this.typeChanged();\n });\n\n this.formGroup.controls.selectedDeletionDatePreset.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((datePreset) => {\n datePreset === DatePreset.Custom\n ? this.formGroup.controls.defaultDeletionDateTime.enable()\n : this.formGroup.controls.defaultDeletionDateTime.disable();\n });\n\n this.formGroup.controls.hideEmail.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((val) => {\n if (!val && this.disableHideEmail && this.formGroup.controls.hideEmail.enabled) {\n this.formGroup.controls.hideEmail.disable();\n }\n });\n\n const env = await firstValueFrom(this.environmentService.environment$);\n this.sendLinkBaseUrl = env.getSendUrl();\n\n this.billingAccountProfileStateService.hasPremiumFromAnySource$\n .pipe(takeUntil(this.destroy$))\n .subscribe((hasPremiumFromAnySource) => {\n this.canAccessPremium = hasPremiumFromAnySource;\n });\n\n await this.load();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n get editMode(): boolean {\n return this.sendId != null;\n }\n\n get title(): string {\n return this.i18nService.t(this.editMode ? \"editSend\" : \"createSend\");\n }\n\n async load() {\n this.emailVerified = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.emailVerified ?? false)),\n );\n\n this.type = !this.canAccessPremium || !this.emailVerified ? SendType.Text : SendType.File;\n if (this.send == null) {\n const send = new BehaviorSubject(this.send);\n send.subscribe({\n next: (decryptedSend: SendView | undefined) => {\n if (!(decryptedSend instanceof SendView)) {\n return;\n }\n\n this.send = decryptedSend;\n decryptedSend.type = decryptedSend.type ?? this.type;\n this.type = this.send.type;\n this.updateFormValues();\n this.hasPassword = this.send.password != null && this.send.password.trim() !== \"\";\n },\n error: (error: unknown) => {\n const errorMessage = (error as Error).message ?? \"An unknown error occurred\";\n this.logService.error(\"Failed to decrypt send: \" + errorMessage);\n },\n });\n\n if (this.editMode) {\n this.sendService\n .get$(this.sendId)\n .pipe(\n //Promise.reject will complete the BehaviourSubject, if desktop starts relying only on BehaviourSubject, this should be changed.\n concatMap((s) =>\n s instanceof Send ? s.decrypt() : Promise.reject(new Error(\"Failed to load send.\")),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe(send);\n } else {\n const sendView = new SendView();\n sendView.type = this.type;\n sendView.file = new SendFileView();\n sendView.text = new SendTextView();\n sendView.deletionDate = new Date();\n sendView.deletionDate.setDate(sendView.deletionDate.getDate() + 7);\n send.next(sendView);\n }\n }\n }\n\n async submit(): Promise {\n this.formGroup.markAllAsTouched();\n\n if (this.disableSend) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"sendDisabledWarning\"),\n });\n return false;\n }\n\n this.send.name = this.formGroup.controls.name.value;\n this.send.text.text = this.formGroup.controls.text.value;\n this.send.text.hidden = this.formGroup.controls.textHidden.value;\n this.send.maxAccessCount = this.formGroup.controls.maxAccessCount.value;\n this.send.accessCount = this.formGroup.controls.accessCount.value;\n this.send.password = this.formGroup.controls.password.value;\n this.send.notes = this.formGroup.controls.notes.value;\n this.send.hideEmail = this.formGroup.controls.hideEmail.value;\n this.send.disabled = this.formGroup.controls.disabled.value;\n this.send.type = this.type;\n\n if (Utils.isNullOrWhitespace(this.send.name)) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"nameRequired\"),\n });\n return false;\n }\n\n let file: File = null;\n if (this.type === SendType.File && !this.editMode) {\n const fileEl = document.getElementById(\"file\") as HTMLInputElement;\n const files = fileEl.files;\n if (files == null || files.length === 0) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"selectFile\"),\n });\n return;\n }\n\n file = files[0];\n if (files[0].size > 524288000) {\n // 500 MB\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"maxFileSize\"),\n });\n return;\n }\n }\n\n if (Utils.isNullOrWhitespace(this.send.password)) {\n this.send.password = null;\n }\n\n this.formPromise = this.encryptSend(file).then(async (encSend) => {\n const uploadPromise = this.sendApiService.save(encSend);\n await uploadPromise;\n if (this.send.id == null) {\n this.send.id = encSend[0].id;\n }\n if (this.send.accessId == null) {\n this.send.accessId = encSend[0].accessId;\n }\n this.onSavedSend.emit(this.send);\n if (this.formGroup.controls.copyLink.value && this.link != null) {\n await this.handleCopyLinkToClipboard();\n return;\n }\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(this.editMode ? \"editedSend\" : \"createdSend\"),\n });\n });\n try {\n await this.formPromise;\n return true;\n } catch (e) {\n this.logService.error(e);\n }\n return false;\n }\n\n async copyLinkToClipboard(link: string): Promise {\n return Promise.resolve(this.platformUtilsService.copyToClipboard(link));\n }\n\n protected async delete(): Promise {\n if (this.deletePromise != null) {\n return false;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteSend\" },\n content: { key: \"deleteSendConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.deletePromise = this.sendApiService.delete(this.send.id);\n await this.deletePromise;\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"deletedSend\"),\n });\n await this.load();\n this.onDeletedSend.emit(this.send);\n return true;\n } catch (e) {\n this.logService.error(e);\n }\n\n return false;\n }\n\n typeChanged() {\n if (this.type === SendType.File && !this.alertShown) {\n if (!this.canAccessPremium) {\n this.alertShown = true;\n this.messagingService.send(\"premiumRequired\");\n } else if (!this.emailVerified) {\n this.alertShown = true;\n this.messagingService.send(\"emailVerificationRequired\");\n }\n }\n this.type === SendType.Text || this.editMode\n ? this.formGroup.controls.file.disable()\n : this.formGroup.controls.file.enable();\n }\n\n toggleOptions() {\n this.showOptions = !this.showOptions;\n }\n\n protected loadSend(): Promise {\n return firstValueFrom(this.sendService.get$(this.sendId));\n }\n\n protected async encryptSend(file: File): Promise<[Send, EncArrayBuffer]> {\n const sendData = await this.sendService.encrypt(this.send, file, this.send.password, null);\n\n // Parse dates\n try {\n sendData[0].deletionDate =\n this.formattedDeletionDate == null ? null : new Date(this.formattedDeletionDate);\n } catch {\n sendData[0].deletionDate = null;\n }\n try {\n sendData[0].expirationDate =\n this.formattedExpirationDate == null ? null : new Date(this.formattedExpirationDate);\n } catch {\n sendData[0].expirationDate = null;\n }\n\n return sendData;\n }\n\n protected togglePasswordVisible() {\n this.showPassword = !this.showPassword;\n document.getElementById(\"password\").focus();\n }\n\n updateFormValues() {\n this.formGroup.patchValue({\n name: this.send?.name ?? \"\",\n text: this.send?.text?.text ?? \"\",\n textHidden: this.send?.text?.hidden ?? false,\n link: this.link ?? \"\",\n maxAccessCount: this.send?.maxAccessCount,\n accessCount: this.send?.accessCount ?? 0,\n notes: this.send?.notes ?? \"\",\n hideEmail: this.send?.hideEmail ?? false,\n disabled: this.send?.disabled ?? false,\n type: this.send.type ?? this.type,\n password: null,\n\n selectedDeletionDatePreset: this.editMode ? DatePreset.Custom : DatePreset.SevenDays,\n selectedExpirationDatePreset: this.editMode ? DatePreset.Custom : DatePreset.Never,\n defaultExpirationDateTime:\n this.send.expirationDate != null\n ? this.datePipe.transform(new Date(this.send.expirationDate), \"yyyy-MM-ddTHH:mm\")\n : null,\n defaultDeletionDateTime: this.datePipe.transform(\n new Date(this.send.deletionDate),\n \"yyyy-MM-ddTHH:mm\",\n ),\n });\n\n if (this.send.hideEmail) {\n this.formGroup.controls.hideEmail.enable();\n }\n }\n\n private async handleCopyLinkToClipboard() {\n const copySuccess = await this.copyLinkToClipboard(this.link);\n if (copySuccess ?? true) {\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(this.editMode ? \"editedSend\" : \"createdSend\"),\n });\n } else {\n await this.dialogService.openSimpleDialog({\n title: \"\",\n content: { key: this.editMode ? \"editedSend\" : \"createdSend\" },\n acceptButtonText: { key: \"ok\" },\n cancelButtonText: null,\n type: \"success\",\n });\n\n await this.copyLinkToClipboard(this.link);\n }\n }\n\n clearExpiration() {\n this.formGroup.controls.defaultExpirationDateTime.patchValue(null);\n }\n\n get formattedExpirationDate(): string {\n switch (this.formGroup.controls.selectedExpirationDatePreset.value as DatePreset) {\n case DatePreset.Never:\n return null;\n case DatePreset.Custom:\n if (!this.formGroup.controls.defaultExpirationDateTime.value) {\n return null;\n }\n return this.formGroup.controls.defaultExpirationDateTime.value;\n default: {\n const now = new Date();\n const milliseconds = now.setTime(\n now.getTime() +\n (this.formGroup.controls.selectedExpirationDatePreset.value as number) * 60 * 60 * 1000,\n );\n return new Date(milliseconds).toString();\n }\n }\n }\n\n get formattedDeletionDate(): string {\n switch (this.formGroup.controls.selectedDeletionDatePreset.value as DatePreset) {\n case DatePreset.Never:\n this.formGroup.controls.selectedDeletionDatePreset.patchValue(DatePreset.SevenDays);\n return this.formattedDeletionDate;\n case DatePreset.Custom:\n return this.formGroup.controls.defaultDeletionDateTime.value;\n default: {\n const now = new Date();\n const milliseconds = now.setTime(\n now.getTime() +\n (this.formGroup.controls.selectedDeletionDatePreset.value as number) * 60 * 60 * 1000,\n );\n return new Date(milliseconds).toString();\n }\n }\n }\n}\n","\n \n \n {{ title }}\n \n \n \n {{ \"sendDisabledWarning\" | i18n }}\n \n \n {{ \"sendOptionsPolicyInEffect\" | i18n }}\n
      \n
    • {{ \"sendDisableHideEmailInEffect\" | i18n }}
    • \n
    \n
    \n \n {{ \"name\" | i18n }}\n \n {{ \"sendNameDesc\" | i18n }}\n \n
    \n \n {{ \"whatTypeOfSend\" | i18n }}\n\n \n \n {{ o.name }}\n \n \n \n \n
    \n \n \n \n {{ \"sendTypeText\" | i18n }}\n \n {{ \"sendTextDesc\" | i18n }}\n \n \n \n {{ \"textHiddenByDefault\" | i18n }}\n \n \n \n \n
    \n
    \n {{ \"file\" | i18n }}\n

    \n {{ send.file.fileName }} ({{ send.file.sizeName }})\n

    \n
    \n \n {{ \"file\" | i18n }}\n
    \n \n {{ selectedFile?.name ?? (\"noFileChosen\" | i18n) }}\n
    \n \n {{ \"sendFileDesc\" | i18n }} {{ \"maxFileSize\" | i18n }}\n
    \n
    \n
    \n

    {{ \"share\" | i18n }}

    \n\n \n {{ \"sendLinkLabel\" | i18n }}\n \n \n\n \n \n {{ \"copySendLinkOnSave\" | i18n }}\n \n
    \n

    \n \n

    \n
    \n
    \n
    \n
    \n \n {{ \"deletionDate\" | i18n }}\n \n \n \n \n \n \n {{ \"deletionDateDesc\" | i18n }}\n \n
    \n
    \n \n {{ \"deletionDate\" | i18n }}\n \n {{ \"deletionDateDesc\" | i18n }}\n \n
    \n
    \n \n \n {{ \"expirationDate\" | i18n }}\n \n \n \n \n \n \n \n {{ \"expirationDateDesc\" | i18n }}\n \n
    \n
    \n \n \n {{ \"expirationDate\" | i18n }}\n\n \n {{ \"clear\" | i18n }}\n \n \n \n {{ \"expirationDateDesc\" | i18n }}\n \n
    \n
    \n
    \n \n {{ \"maxAccessCount\" | i18n }}\n \n {{ \"maxAccessCountDesc\" | i18n }}\n \n \n {{ \"currentAccessCount\" | i18n }}\n \n \n
    \n
    \n \n {{ \"password\" | i18n }}\n {{ \"newPassword\" | i18n }}\n\n \n \n {{ \"sendPasswordDesc\" | i18n }}\n \n
    \n \n {{ \"notes\" | i18n }}\n \n {{ \"sendNotesDesc\" | i18n }}\n \n\n \n \n {{ \"hideEmail\" | i18n }}\n \n\n \n \n {{ \"disableThisSend\" | i18n }}\n \n
    \n
    \n \n \n {{ \"save\" | i18n }}\n \n \n {{ \"cancel\" | i18n }}\n \n\n \n \n
    \n\n","import { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { DatePipe } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"@bitwarden/angular/tools/send/add-edit.component\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-send-add-edit\",\n templateUrl: \"add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent {\n override componentName = \"app-send-add-edit\";\n protected selectedFile: File;\n\n constructor(\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n datePipe: DatePipe,\n sendService: SendService,\n stateService: StateService,\n messagingService: MessagingService,\n policyService: PolicyService,\n logService: LogService,\n sendApiService: SendApiService,\n dialogService: DialogService,\n formBuilder: FormBuilder,\n billingAccountProfileStateService: BillingAccountProfileStateService,\n protected dialogRef: DialogRef,\n @Inject(DIALOG_DATA) params: { sendId: string },\n accountService: AccountService,\n toastService: ToastService,\n ) {\n super(\n i18nService,\n platformUtilsService,\n environmentService,\n datePipe,\n sendService,\n messagingService,\n policyService,\n logService,\n stateService,\n sendApiService,\n dialogService,\n formBuilder,\n billingAccountProfileStateService,\n accountService,\n toastService,\n );\n\n this.sendId = params.sendId;\n }\n\n async copyLinkToClipboard(link: string): Promise {\n // Copy function on web depends on the modal being open or not. Since this event occurs during a transition\n // of the modal closing we need to add a small delay to make sure state of the DOM is consistent.\n return new Promise((resolve) => {\n window.setTimeout(() => resolve(super.copyLinkToClipboard(link)), 500);\n });\n }\n\n protected setSelectedFile(event: Event) {\n const fileInputEl = event.target;\n const file = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;\n this.selectedFile = file;\n }\n\n submitAndClose = async () => {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n\n const success = await this.submit();\n if (success) {\n this.dialogRef.close();\n }\n };\n\n deleteAndClose = async () => {\n const success = await this.delete();\n if (success) {\n this.dialogRef.close();\n }\n };\n}\n","\n \n \n \n \n {{ \"loading\" | i18n }}\n \n \n \n\n \n\n\n\n {{ \"sendDisabledWarning\" | i18n }}\n\n
    \n
    \n
    \n
    \n {{ \"filters\" | i18n }}\n
    \n
    \n
    \n \n
    \n
    \n
      \n
    • \n \n \n \n
    • \n
    \n
    \n
    \n
    \n

    {{ \"types\" | i18n }}

    \n
    \n
      \n
    • \n \n \n {{ \"sendTypeText\" | i18n }}\n \n \n
    • \n
    • \n \n \n {{ \"sendTypeFile\" | i18n }}\n \n \n
    • \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"deletionDate\" | i18n }}\n {{ \"options\" | i18n }}\n \n \n \n \n \n \n \n \n \n \n \n \n {{ \"disabled\" | i18n }}\n \n \n \n {{ \"password\" | i18n }}\n \n \n \n {{ \"maxAccessCountReached\" | i18n }}\n \n \n \n {{ \"expired\" | i18n }}\n \n \n \n {{ \"pendingDeletion\" | i18n }}\n \n \n \n {{ s.deletionDate | date: \"medium\" }}\n \n \n \n \n \n \n \n {{ \"removePassword\" | i18n }}\n \n \n \n \n \n \n \n
    \n \n \n {{ \"loading\" | i18n }}\n \n \n \n {{ \"sendsNoItemsTitle\" | i18n }}\n {{ \"sendsNoItemsMessage\" | i18n }}\n \n \n \n
    \n
    \n
    \n\n","import { Component, NgZone, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { SendComponent as BaseSendComponent } from \"@bitwarden/angular/tools/send/send.component\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport {\n DialogService,\n NoItemsModule,\n SearchModule,\n TableDataSource,\n ToastService,\n} from \"@bitwarden/components\";\nimport { NoSendsIcon } from \"@bitwarden/send-ui\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { AddEditComponent } from \"./add-edit.component\";\n\nconst BroadcasterSubscriptionId = \"SendComponent\";\n\n@Component({\n selector: \"app-send\",\n standalone: true,\n imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule],\n templateUrl: \"send.component.html\",\n})\nexport class SendComponent extends BaseSendComponent {\n @ViewChild(\"sendAddEdit\", { read: ViewContainerRef, static: true })\n sendAddEditModalRef: ViewContainerRef;\n noItemIcon = NoSendsIcon;\n\n override set filteredSends(filteredSends: SendView[]) {\n super.filteredSends = filteredSends;\n this.dataSource.data = filteredSends;\n }\n\n override get filteredSends() {\n return super.filteredSends;\n }\n\n protected dataSource = new TableDataSource();\n\n constructor(\n sendService: SendService,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n environmentService: EnvironmentService,\n ngZone: NgZone,\n searchService: SearchService,\n policyService: PolicyService,\n private broadcasterService: BroadcasterService,\n logService: LogService,\n sendApiService: SendApiService,\n dialogService: DialogService,\n toastService: ToastService,\n ) {\n super(\n sendService,\n i18nService,\n platformUtilsService,\n environmentService,\n ngZone,\n searchService,\n policyService,\n logService,\n sendApiService,\n dialogService,\n toastService,\n );\n }\n\n async ngOnInit() {\n await super.ngOnInit();\n await this.load();\n\n // Broadcaster subscription - load if sync completes in the background\n this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.ngZone.run(async () => {\n switch (message.command) {\n case \"syncCompleted\":\n if (message.successfully) {\n await this.load();\n }\n break;\n }\n });\n });\n }\n\n ngOnDestroy() {\n this.dialogService.closeAll();\n this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n }\n\n async addSend() {\n if (this.disableSend) {\n return;\n }\n\n await this.editSend(null);\n }\n\n async editSend(send: SendView) {\n const dialog = this.dialogService.open(AddEditComponent, {\n data: {\n sendId: send == null ? null : send.id,\n },\n });\n\n await lastValueFrom(dialog.closed);\n await this.load();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { AsyncActionsModule, BannerModule, ButtonModule, LinkModule } from \"@bitwarden/components\";\n\n@Component({\n standalone: true,\n selector: \"app-verify-email\",\n templateUrl: \"verify-email.component.html\",\n imports: [AsyncActionsModule, BannerModule, ButtonModule, CommonModule, JslibModule, LinkModule],\n})\nexport class VerifyEmailComponent {\n actionPromise: Promise;\n\n @Output() onVerified = new EventEmitter();\n @Output() onDismiss = new EventEmitter();\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private tokenService: TokenService,\n ) {}\n\n async verifyEmail(): Promise {\n await this.apiService.refreshIdentityToken();\n if (await this.tokenService.getEmailVerified()) {\n this.onVerified.emit(true);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"emailVerified\"));\n return;\n }\n\n await this.apiService.postAccountVerifyEmail();\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"checkInboxForVerification\"),\n );\n }\n\n send = async () => {\n await this.verifyEmail();\n };\n}\n","\n {{ \"verifyEmailDesc\" | i18n }}\n \n {{ \"sendEmail\" | i18n }}\n \n\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { BulkDeleteDialogComponent } from \"./bulk-delete-dialog/bulk-delete-dialog.component\";\nimport { BulkMoveDialogComponent } from \"./bulk-move-dialog/bulk-move-dialog.component\";\nimport { BulkShareDialogComponent } from \"./bulk-share-dialog/bulk-share-dialog.component\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [BulkDeleteDialogComponent, BulkMoveDialogComponent, BulkShareDialogComponent],\n exports: [BulkDeleteDialogComponent, BulkMoveDialogComponent, BulkShareDialogComponent],\n})\nexport class BulkDialogsModule {}\n","import { Injectable } from \"@angular/core\";\nimport { Subject, Observable, combineLatest, firstValueFrom, map } from \"rxjs\";\nimport { mergeMap, take } from \"rxjs/operators\";\n\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { PBKDF2KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport {\n StateProvider,\n ActiveUserState,\n PREMIUM_BANNER_DISK_LOCAL,\n BANNERS_DISMISSED_DISK,\n UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\nexport enum VisibleVaultBanner {\n KDFSettings = \"kdf-settings\",\n OutdatedBrowser = \"outdated-browser\",\n Premium = \"premium\",\n VerifyEmail = \"verify-email\",\n}\n\ntype PremiumBannerReprompt = {\n numberOfDismissals: number;\n /** Timestamp representing when to show the prompt next */\n nextPromptDate: number;\n};\n\n/** Banners that will be re-shown on a new session */\ntype SessionBanners = Omit;\n\nexport const PREMIUM_BANNER_REPROMPT_KEY = new UserKeyDefinition(\n PREMIUM_BANNER_DISK_LOCAL,\n \"bannerReprompt\",\n {\n deserializer: (bannerReprompt) => bannerReprompt,\n clearOn: [], // Do not clear user tutorials\n },\n);\n\nexport const BANNERS_DISMISSED_DISK_KEY = new UserKeyDefinition(\n BANNERS_DISMISSED_DISK,\n \"bannersDismissed\",\n {\n deserializer: (bannersDismissed) => bannersDismissed,\n clearOn: [], // Do not clear user tutorials\n },\n);\n\n@Injectable()\nexport class VaultBannersService {\n shouldShowPremiumBanner$: Observable;\n\n private premiumBannerState: ActiveUserState;\n private sessionBannerState: ActiveUserState;\n\n /**\n * Emits when the sync service has completed a sync\n *\n * This is needed because `hasPremiumFromAnySource$` will emit false until the sync is completed\n * resulting in the premium banner being shown briefly on startup when the user has access to\n * premium features.\n */\n private syncCompleted$ = new Subject();\n\n constructor(\n private tokenService: TokenService,\n private userVerificationService: UserVerificationService,\n private stateProvider: StateProvider,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n private platformUtilsService: PlatformUtilsService,\n private kdfConfigService: KdfConfigService,\n private syncService: SyncService,\n ) {\n this.pollUntilSynced();\n this.premiumBannerState = this.stateProvider.getActive(PREMIUM_BANNER_REPROMPT_KEY);\n this.sessionBannerState = this.stateProvider.getActive(BANNERS_DISMISSED_DISK_KEY);\n\n const premiumSources$ = combineLatest([\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n this.premiumBannerState.state$,\n ]);\n\n this.shouldShowPremiumBanner$ = this.syncCompleted$.pipe(\n take(1), // Wait until the first sync is complete before considering the premium status\n mergeMap(() => premiumSources$),\n map(([canAccessPremium, dismissedState]) => {\n const shouldShowPremiumBanner =\n !canAccessPremium && !this.platformUtilsService.isSelfHost();\n\n // Check if nextPromptDate is in the past passed\n if (shouldShowPremiumBanner && dismissedState?.nextPromptDate) {\n const nextPromptDate = new Date(dismissedState.nextPromptDate);\n const now = new Date();\n return now >= nextPromptDate;\n }\n\n return shouldShowPremiumBanner;\n }),\n );\n }\n\n /** Returns true when the update browser banner should be shown */\n async shouldShowUpdateBrowserBanner(): Promise {\n const outdatedBrowser = window.navigator.userAgent.indexOf(\"MSIE\") !== -1;\n const alreadyDismissed = (await this.getBannerDismissedState()).includes(\n VisibleVaultBanner.OutdatedBrowser,\n );\n\n return outdatedBrowser && !alreadyDismissed;\n }\n\n /** Returns true when the verify email banner should be shown */\n async shouldShowVerifyEmailBanner(): Promise {\n const needsVerification = !(await this.tokenService.getEmailVerified());\n\n const alreadyDismissed = (await this.getBannerDismissedState()).includes(\n VisibleVaultBanner.VerifyEmail,\n );\n\n return needsVerification && !alreadyDismissed;\n }\n\n /** Returns true when the low KDF iteration banner should be shown */\n async shouldShowLowKDFBanner(): Promise {\n const hasLowKDF = (await this.userVerificationService.hasMasterPassword())\n ? await this.isLowKdfIteration()\n : false;\n\n const alreadyDismissed = (await this.getBannerDismissedState()).includes(\n VisibleVaultBanner.KDFSettings,\n );\n\n return hasLowKDF && !alreadyDismissed;\n }\n\n /** Dismiss the given banner and perform any respective side effects */\n async dismissBanner(banner: SessionBanners): Promise {\n if (banner === VisibleVaultBanner.Premium) {\n await this.dismissPremiumBanner();\n } else {\n await this.sessionBannerState.update((current) => {\n const bannersDismissed = current ?? [];\n\n return [...bannersDismissed, banner];\n });\n }\n }\n\n /** Returns banners that have already been dismissed */\n private async getBannerDismissedState(): Promise {\n // `state$` can emit null when a value has not been set yet,\n // use nullish coalescing to default to an empty array\n return (await firstValueFrom(this.sessionBannerState.state$)) ?? [];\n }\n\n /** Increment dismissal state of the premium banner */\n private async dismissPremiumBanner(): Promise {\n await this.premiumBannerState.update((current) => {\n const numberOfDismissals = current?.numberOfDismissals ?? 0;\n const now = new Date();\n\n // Set midnight of the current day\n now.setHours(0, 0, 0, 0);\n\n // First dismissal, re-prompt in 1 week\n if (numberOfDismissals === 0) {\n now.setDate(now.getDate() + 7);\n return {\n numberOfDismissals: 1,\n nextPromptDate: now.getTime(),\n };\n }\n\n // Second dismissal, re-prompt in 1 month\n if (numberOfDismissals === 1) {\n now.setMonth(now.getMonth() + 1);\n return {\n numberOfDismissals: 2,\n nextPromptDate: now.getTime(),\n };\n }\n\n // 3+ dismissals, re-prompt each year\n // Avoid day/month edge cases and only increment year\n const nextYear = new Date(now.getFullYear() + 1, now.getMonth(), now.getDate());\n nextYear.setHours(0, 0, 0, 0);\n return {\n numberOfDismissals: numberOfDismissals + 1,\n nextPromptDate: nextYear.getTime(),\n };\n });\n }\n\n private async isLowKdfIteration() {\n const kdfConfig = await this.kdfConfigService.getKdfConfig();\n return (\n kdfConfig.kdfType === KdfType.PBKDF2_SHA256 &&\n kdfConfig.iterations < PBKDF2KdfConfig.ITERATIONS.defaultValue\n );\n }\n\n /** Poll the `syncService` until a sync is completed */\n private pollUntilSynced() {\n const interval = setInterval(async () => {\n const lastSync = await this.syncService.getLastSync();\n if (lastSync !== null) {\n clearInterval(interval);\n this.syncCompleted$.next();\n }\n }, 200);\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SearchModule } from \"@bitwarden/components\";\n\nimport { VaultFilterSharedModule } from \"../../individual-vault/vault-filter/shared/vault-filter-shared.module\";\n\nimport { LinkSsoDirective } from \"./components/link-sso.directive\";\nimport { OrganizationOptionsComponent } from \"./components/organization-options.component\";\nimport { VaultFilterComponent } from \"./components/vault-filter.component\";\nimport { VaultFilterService as VaultFilterServiceAbstraction } from \"./services/abstractions/vault-filter.service\";\nimport { VaultFilterService } from \"./services/vault-filter.service\";\n\n@NgModule({\n imports: [VaultFilterSharedModule, SearchModule],\n declarations: [VaultFilterComponent, OrganizationOptionsComponent, LinkSsoDirective],\n exports: [VaultFilterComponent],\n providers: [\n {\n provide: VaultFilterServiceAbstraction,\n useClass: VaultFilterService,\n },\n ],\n})\nexport class VaultFilterModule {}\n","import { Observable } from \"rxjs\";\n\nimport { VaultOnboardingTasks } from \"../vault-onboarding.service\";\n\nexport abstract class VaultOnboardingService {\n vaultOnboardingState$: Observable;\n abstract setVaultOnboardingTasks(newState: VaultOnboardingTasks): Promise;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport {\n ActiveUserState,\n StateProvider,\n UserKeyDefinition,\n VAULT_ONBOARDING,\n} from \"@bitwarden/common/platform/state\";\n\nimport { VaultOnboardingService as VaultOnboardingServiceAbstraction } from \"./abstraction/vault-onboarding.service\";\n\nexport type VaultOnboardingTasks = {\n createAccount: boolean;\n importData: boolean;\n installExtension: boolean;\n};\n\nconst VAULT_ONBOARDING_KEY = new UserKeyDefinition(\n VAULT_ONBOARDING,\n \"tasks\",\n {\n deserializer: (jsonData) => jsonData,\n clearOn: [], // do not clear tutorials\n },\n);\n\n@Injectable()\nexport class VaultOnboardingService implements VaultOnboardingServiceAbstraction {\n private vaultOnboardingState: ActiveUserState;\n vaultOnboardingState$: Observable;\n\n constructor(private stateProvider: StateProvider) {\n this.vaultOnboardingState = this.stateProvider.getActive(VAULT_ONBOARDING_KEY);\n this.vaultOnboardingState$ = this.vaultOnboardingState.state$;\n }\n\n async setVaultOnboardingTasks(newState: VaultOnboardingTasks): Promise {\n await this.vaultOnboardingState.update(() => {\n return { ...newState };\n });\n }\n}\n","const VaultOnboardingMessages = {\n HasBwInstalled: \"hasBwInstalled\",\n checkBwInstalled: \"checkIfBWExtensionInstalled\",\n} as const;\n\nexport { VaultOnboardingMessages };\n","\n \n \n\n \n

    \n {{ \"onboardingImportDataDetailsPartOne\" | i18n }}\n \n \n {{ \"onboardingImportDataDetailsPartTwoNoOrgs\" | i18n }}\n \n

    \n \n\n \n \n {{ \"installBrowserExtensionDetails\" | i18n }}\n \n \n \n\n","import { CommonModule } from \"@angular/common\";\nimport {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n OnDestroy,\n SimpleChanges,\n OnChanges,\n} from \"@angular/core\";\nimport { Subject, takeUntil, Observable, firstValueFrom, fromEvent } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { VaultOnboardingMessages } from \"@bitwarden/common/vault/enums/vault-onboarding.enum\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { LinkModule } from \"@bitwarden/components\";\n\nimport { OnboardingModule } from \"../../../shared/components/onboarding/onboarding.module\";\n\nimport { VaultOnboardingService as VaultOnboardingServiceAbstraction } from \"./services/abstraction/vault-onboarding.service\";\nimport { VaultOnboardingTasks } from \"./services/vault-onboarding.service\";\n\n@Component({\n standalone: true,\n imports: [OnboardingModule, CommonModule, JslibModule, LinkModule],\n selector: \"app-vault-onboarding\",\n templateUrl: \"vault-onboarding.component.html\",\n})\nexport class VaultOnboardingComponent implements OnInit, OnChanges, OnDestroy {\n @Input() ciphers: CipherView[];\n @Input() orgs: Organization[];\n @Output() onAddCipher = new EventEmitter();\n\n extensionUrl: string;\n isIndividualPolicyVault: boolean;\n private destroy$ = new Subject();\n isNewAccount: boolean;\n private readonly onboardingReleaseDate = new Date(\"2024-04-02\");\n\n protected currentTasks: VaultOnboardingTasks;\n\n protected onboardingTasks$: Observable;\n protected showOnboarding = false;\n\n constructor(\n protected platformUtilsService: PlatformUtilsService,\n protected policyService: PolicyService,\n private apiService: ApiService,\n private vaultOnboardingService: VaultOnboardingServiceAbstraction,\n ) {}\n\n async ngOnInit() {\n this.onboardingTasks$ = this.vaultOnboardingService.vaultOnboardingState$;\n await this.setOnboardingTasks();\n this.setInstallExtLink();\n this.individualVaultPolicyCheck();\n this.checkForBrowserExtension();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (this.showOnboarding && changes?.ciphers) {\n const currentTasks = await firstValueFrom(this.onboardingTasks$);\n const updatedTasks = {\n createAccount: true,\n importData: this.ciphers.length > 0,\n installExtension: currentTasks.installExtension,\n };\n await this.vaultOnboardingService.setVaultOnboardingTasks(updatedTasks);\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n checkForBrowserExtension() {\n if (this.showOnboarding) {\n fromEvent(window, \"message\")\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n void this.getMessages(event);\n });\n\n window.postMessage({ command: VaultOnboardingMessages.checkBwInstalled });\n }\n }\n\n async getMessages(event: any) {\n if (event.data.command === VaultOnboardingMessages.HasBwInstalled && this.showOnboarding) {\n const currentTasks = await firstValueFrom(this.onboardingTasks$);\n const updatedTasks = {\n createAccount: currentTasks.createAccount,\n importData: currentTasks.importData,\n installExtension: true,\n };\n await this.vaultOnboardingService.setVaultOnboardingTasks(updatedTasks);\n }\n }\n\n async checkCreationDate() {\n const userProfile = await this.apiService.getProfile();\n const profileCreationDate = new Date(userProfile.creationDate);\n\n this.isNewAccount = this.onboardingReleaseDate < profileCreationDate ? true : false;\n\n if (!this.isNewAccount) {\n await this.hideOnboarding();\n }\n }\n\n protected async hideOnboarding() {\n await this.saveCompletedTasks({\n createAccount: true,\n importData: true,\n installExtension: true,\n });\n }\n\n async setOnboardingTasks() {\n const currentTasks = await firstValueFrom(this.onboardingTasks$);\n if (currentTasks == null) {\n const freshStart = {\n createAccount: true,\n importData: this.ciphers?.length > 0,\n installExtension: false,\n };\n await this.saveCompletedTasks(freshStart);\n } else if (currentTasks) {\n this.showOnboarding = Object.values(currentTasks).includes(false);\n }\n\n if (this.showOnboarding) {\n await this.checkCreationDate();\n }\n }\n\n private async saveCompletedTasks(vaultTasks: VaultOnboardingTasks) {\n this.showOnboarding = Object.values(vaultTasks).includes(false);\n await this.vaultOnboardingService.setVaultOnboardingTasks(vaultTasks);\n }\n\n individualVaultPolicyCheck() {\n this.policyService\n .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)\n .pipe(takeUntil(this.destroy$))\n .subscribe((data) => {\n this.isIndividualPolicyVault = data;\n });\n }\n\n emitToAddCipher() {\n this.onAddCipher.emit();\n }\n\n setInstallExtLink() {\n if (this.platformUtilsService.isChrome()) {\n this.extensionUrl =\n \"https://chromewebstore.google.com/detail/bitwarden-password-manage/nngceckbapebfimnlniiiahkandclblb\";\n } else if (this.platformUtilsService.isFirefox()) {\n this.extensionUrl =\n \"https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/\";\n } else if (this.platformUtilsService.isSafari()) {\n this.extensionUrl = \"https://apps.apple.com/us/app/bitwarden/id1352778147?mt=12\";\n } else if (this.platformUtilsService.isOpera()) {\n this.extensionUrl =\n \"https://addons.opera.com/extensions/details/bitwarden-free-password-manager/\";\n } else if (this.platformUtilsService.isEdge()) {\n this.extensionUrl =\n \"https://microsoftedge.microsoft.com/addons/detail/jbkfoedolllekgbhcbcoahefnbanhhlh\";\n } else {\n this.extensionUrl = \"https://bitwarden.com/download/#downloads-web-browser\";\n }\n }\n\n navigateToExtension() {\n window.open(this.extensionUrl, \"_blank\");\n }\n}\n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, Observable } from \"rxjs\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface BulkMoveDialogParams {\n cipherIds?: string[];\n}\n\nexport enum BulkMoveDialogResult {\n Moved = \"moved\",\n Canceled = \"canceled\",\n}\n\n/**\n * Strongly typed helper to open a BulkMoveDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openBulkMoveDialog = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(\n BulkMoveDialogComponent,\n config,\n );\n};\n\n@Component({\n templateUrl: \"bulk-move-dialog.component.html\",\n})\nexport class BulkMoveDialogComponent implements OnInit {\n cipherIds: string[] = [];\n\n formGroup = this.formBuilder.group({\n folderId: [\"\", [Validators.nullValidator]],\n });\n folders$: Observable;\n\n protected vaultBulkManagementActionEnabled$ = this.configService.getFeatureFlag$(\n FeatureFlag.VaultBulkManagementAction,\n );\n\n constructor(\n @Inject(DIALOG_DATA) params: BulkMoveDialogParams,\n private dialogRef: DialogRef,\n private cipherService: CipherService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private folderService: FolderService,\n private formBuilder: FormBuilder,\n private configService: ConfigService,\n ) {\n this.cipherIds = params.cipherIds ?? [];\n }\n\n async ngOnInit() {\n this.folders$ = this.folderService.folderViews$;\n this.formGroup.patchValue({\n folderId: (await firstValueFrom(this.folders$))[0].id,\n });\n }\n\n protected cancel() {\n this.close(BulkMoveDialogResult.Canceled);\n }\n\n protected submit = async () => {\n if (this.formGroup.invalid) {\n return;\n }\n\n await this.cipherService.moveManyWithServer(this.cipherIds, this.formGroup.value.folderId);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"movedItems\"));\n this.close(BulkMoveDialogResult.Moved);\n };\n\n private close(result: BulkMoveDialogResult) {\n this.dialogRef.close(result);\n }\n}\n","
    \n \n \n {{ ((vaultBulkManagementActionEnabled$ | async) ? \"addToFolder\" : \"moveSelected\") | i18n }}\n \n \n

    {{ \"moveSelectedItemsDesc\" | i18n: cipherIds.length }}

    \n \n {{ \"selectFolder\" | i18n }}\n \n \n \n \n \n
    \n \n \n \n \n
    \n
    \n","type CheckableBase = {\n checked?: boolean;\n};\n\nexport type Checkable = T & CheckableBase;\n\nexport function isChecked(item: CheckableBase): boolean {\n return !!item.checked;\n}\n","import { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Checkable, isChecked } from \"@bitwarden/common/types/checkable\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface BulkShareDialogParams {\n ciphers: CipherView[];\n organizationId?: string;\n}\n\nexport enum BulkShareDialogResult {\n Shared = \"shared\",\n Canceled = \"canceled\",\n}\n\n/**\n * Strongly typed helper to open a BulkShareDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openBulkShareDialog = (\n dialogService: DialogService,\n config: DialogConfig,\n) => {\n return dialogService.open(\n BulkShareDialogComponent,\n config,\n );\n};\n\n@Component({\n templateUrl: \"bulk-share-dialog.component.html\",\n})\nexport class BulkShareDialogComponent implements OnInit {\n ciphers: CipherView[] = [];\n organizationId: string;\n\n nonShareableCount = 0;\n collections: Checkable[] = [];\n organizations: Organization[] = [];\n shareableCiphers: CipherView[] = [];\n\n private writeableCollections: CollectionView[] = [];\n\n constructor(\n @Inject(DIALOG_DATA) params: BulkShareDialogParams,\n private dialogRef: DialogRef,\n private cipherService: CipherService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private collectionService: CollectionService,\n private organizationService: OrganizationService,\n private logService: LogService,\n ) {\n this.ciphers = params.ciphers ?? [];\n this.organizationId = params.organizationId;\n }\n\n async ngOnInit() {\n this.shareableCiphers = this.ciphers.filter(\n (c) => !c.hasOldAttachments && c.organizationId == null,\n );\n this.nonShareableCount = this.ciphers.length - this.shareableCiphers.length;\n const allCollections = await this.collectionService.getAllDecrypted();\n this.writeableCollections = allCollections.filter((c) => !c.readOnly);\n this.organizations = await this.organizationService.getAll();\n if (this.organizationId == null && this.organizations.length > 0) {\n this.organizationId = this.organizations[0].id;\n }\n this.filterCollections();\n }\n\n ngOnDestroy() {\n this.selectAll(false);\n }\n\n filterCollections() {\n this.selectAll(false);\n if (this.organizationId == null || this.writeableCollections.length === 0) {\n this.collections = [];\n } else {\n this.collections = this.writeableCollections.filter(\n (c) => c.organizationId === this.organizationId,\n );\n }\n }\n\n submit = async () => {\n const checkedCollectionIds = this.collections.filter(isChecked).map((c) => c.id);\n try {\n await this.cipherService.shareManyWithServer(\n this.shareableCiphers,\n this.organizationId,\n checkedCollectionIds,\n );\n const orgName =\n this.organizations.find((o) => o.id === this.organizationId)?.name ??\n this.i18nService.t(\"organization\");\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"movedItemsToOrg\", orgName),\n );\n this.close(BulkShareDialogResult.Shared);\n } catch (e) {\n this.logService.error(e);\n }\n };\n\n check(c: Checkable, select?: boolean) {\n c.checked = select == null ? !c.checked : select;\n }\n\n selectAll(select: boolean) {\n const collections = select ? this.collections : this.writeableCollections;\n collections.forEach((c) => this.check(c, select));\n }\n\n get canSave() {\n if (\n this.shareableCiphers != null &&\n this.shareableCiphers.length > 0 &&\n this.collections != null\n ) {\n for (let i = 0; i < this.collections.length; i++) {\n if (this.collections[i].checked) {\n return true;\n }\n }\n }\n return false;\n }\n\n protected cancel() {\n this.close(BulkShareDialogResult.Canceled);\n }\n\n private close(result: BulkShareDialogResult) {\n this.dialogRef.close(result);\n }\n}\n","\n \n {{ \"moveSelectedToOrg\" | i18n }}\n \n \n

    {{ \"moveManyToOrgDesc\" | i18n }}

    \n

    \n {{\n \"moveSelectedItemsCountDesc\"\n | i18n: this.ciphers.length : shareableCiphers.length : nonShareableCount\n }}\n

    \n \n {{ \"organization\" | i18n }}\n \n \n \n \n\n
    \n \n
    \n \n \n
    \n
    \n
    \n {{ \"noCollectionsInList\" | i18n }}\n
    \n \n \n \n \n \n \n \n {{ c.name }}\n \n \n \n \n
    \n \n \n \n \n
    \n","import { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { Validators, FormBuilder } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Directive()\nexport class FolderAddEditComponent implements OnInit {\n @Input() folderId: string;\n @Output() onSavedFolder = new EventEmitter();\n @Output() onDeletedFolder = new EventEmitter();\n\n editMode = false;\n folder: FolderView = new FolderView();\n title: string;\n formPromise: Promise;\n deletePromise: Promise;\n protected componentName = \"\";\n\n formGroup = this.formBuilder.group({\n name: [\"\", [Validators.required]],\n });\n\n constructor(\n protected folderService: FolderService,\n protected folderApiService: FolderApiServiceAbstraction,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected logService: LogService,\n protected dialogService: DialogService,\n protected formBuilder: FormBuilder,\n ) {}\n\n async ngOnInit() {\n await this.init();\n }\n\n async submit(): Promise {\n this.folder.name = this.formGroup.controls.name.value;\n if (this.folder.name == null || this.folder.name === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"nameRequired\"),\n );\n return false;\n }\n\n try {\n const folder = await this.folderService.encrypt(this.folder);\n this.formPromise = this.folderApiService.save(folder);\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.editMode ? \"editedFolder\" : \"addedFolder\"),\n );\n this.onSavedFolder.emit(this.folder);\n return true;\n } catch (e) {\n this.logService.error(e);\n }\n\n return false;\n }\n\n async delete(): Promise {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteFolder\" },\n content: { key: \"deleteFolderConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.deletePromise = this.folderApiService.delete(this.folder.id);\n await this.deletePromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deletedFolder\"));\n this.onDeletedFolder.emit(this.folder);\n } catch (e) {\n this.logService.error(e);\n }\n\n return true;\n }\n\n protected async init() {\n this.editMode = this.folderId != null;\n\n if (this.editMode) {\n this.editMode = true;\n this.title = this.i18nService.t(\"editFolder\");\n const folder = await this.folderService.get(this.folderId);\n this.folder = await folder.decrypt();\n } else {\n this.title = this.i18nService.t(\"addFolder\");\n }\n this.formGroup.controls.name.setValue(this.folder.name);\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { FolderAddEditComponent as BaseFolderAddEditComponent } from \"@bitwarden/angular/vault/components/folder-add-edit.component\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-folder-add-edit\",\n templateUrl: \"folder-add-edit.component.html\",\n})\nexport class FolderAddEditComponent extends BaseFolderAddEditComponent {\n protected override componentName = \"app-folder-add-edit\";\n constructor(\n folderService: FolderService,\n folderApiService: FolderApiServiceAbstraction,\n i18nService: I18nService,\n platformUtilsService: PlatformUtilsService,\n logService: LogService,\n dialogService: DialogService,\n formBuilder: FormBuilder,\n protected dialogRef: DialogRef,\n @Inject(DIALOG_DATA) params: FolderAddEditDialogParams,\n ) {\n super(\n folderService,\n folderApiService,\n i18nService,\n platformUtilsService,\n logService,\n dialogService,\n formBuilder,\n );\n params?.folderId ? (this.folderId = params.folderId) : null;\n }\n\n deleteAndClose = async () => {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteFolder\" },\n content: { key: \"deleteFolderConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n try {\n this.deletePromise = this.folderApiService.delete(this.folder.id);\n await this.deletePromise;\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deletedFolder\"));\n this.onDeletedFolder.emit(this.folder);\n } catch (e) {\n this.logService.error(e);\n }\n\n this.dialogRef.close(FolderAddEditDialogResult.Deleted);\n };\n\n submitAndClose = async () => {\n this.folder.name = this.formGroup.controls.name.value;\n if (this.folder.name == null || this.folder.name === \"\") {\n this.formGroup.controls.name.markAsTouched();\n return;\n }\n\n try {\n const folder = await this.folderService.encrypt(this.folder);\n this.formPromise = this.folderApiService.save(folder);\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.editMode ? \"editedFolder\" : \"addedFolder\"),\n );\n this.onSavedFolder.emit(this.folder);\n this.dialogRef.close(FolderAddEditDialogResult.Saved);\n } catch (e) {\n this.logService.error(e);\n }\n return;\n };\n}\n\nexport interface FolderAddEditDialogParams {\n folderId: string;\n}\n\nexport enum FolderAddEditDialogResult {\n Deleted = \"deleted\",\n Canceled = \"canceled\",\n Saved = \"saved\",\n}\n\n/**\n * Strongly typed helper to open a FolderAddEdit dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Optional configuration for the dialog\n */\nexport function openFolderAddEditDialog(\n dialogService: DialogService,\n config?: DialogConfig,\n) {\n return dialogService.open(\n FolderAddEditComponent,\n config,\n );\n}\n","
    \n \n \n {{ title }}\n \n \n \n {{ \"name\" | i18n }}\n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n","import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { Checkable, isChecked } from \"@bitwarden/common/types/checkable\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\n@Directive()\nexport class ShareComponent implements OnInit, OnDestroy {\n @Input() cipherId: string;\n @Input() organizationId: string;\n @Output() onSharedCipher = new EventEmitter();\n\n formPromise: Promise;\n cipher: CipherView;\n collections: Checkable[] = [];\n organizations$: Observable;\n\n protected writeableCollections: Checkable[] = [];\n\n private _destroy = new Subject();\n\n constructor(\n protected collectionService: CollectionService,\n protected platformUtilsService: PlatformUtilsService,\n protected i18nService: I18nService,\n protected cipherService: CipherService,\n private logService: LogService,\n protected organizationService: OrganizationService,\n ) {}\n\n async ngOnInit() {\n await this.load();\n }\n\n ngOnDestroy(): void {\n this._destroy.next();\n this._destroy.complete();\n }\n\n async load() {\n const allCollections = await this.collectionService.getAllDecrypted();\n this.writeableCollections = allCollections.map((c) => c).filter((c) => !c.readOnly);\n\n this.organizations$ = this.organizationService.memberOrganizations$.pipe(\n map((orgs) => {\n return orgs\n .filter((o) => o.enabled && o.status === OrganizationUserStatusType.Confirmed)\n .sort(Utils.getSortFunction(this.i18nService, \"name\"));\n }),\n );\n\n this.organizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {\n if (this.organizationId == null && orgs.length > 0) {\n this.organizationId = orgs[0].id;\n this.filterCollections();\n }\n });\n\n const cipherDomain = await this.cipherService.get(this.cipherId);\n this.cipher = await cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(cipherDomain),\n );\n }\n\n filterCollections() {\n this.writeableCollections.forEach((c) => (c.checked = false));\n if (this.organizationId == null || this.writeableCollections.length === 0) {\n this.collections = [];\n } else {\n this.collections = this.writeableCollections.filter(\n (c) => c.organizationId === this.organizationId,\n );\n }\n }\n\n async submit(): Promise {\n const selectedCollectionIds = this.collections.filter(isChecked).map((c) => c.id);\n if (selectedCollectionIds.length === 0) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"selectOneCollection\"),\n );\n return;\n }\n\n const cipherDomain = await this.cipherService.get(this.cipherId);\n const cipherView = await cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(cipherDomain),\n );\n const orgs = await firstValueFrom(this.organizations$);\n const orgName =\n orgs.find((o) => o.id === this.organizationId)?.name ?? this.i18nService.t(\"organization\");\n\n try {\n this.formPromise = this.cipherService\n .shareWithServer(cipherView, this.organizationId, selectedCollectionIds)\n .then(async () => {\n this.onSharedCipher.emit();\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"movedItemToOrg\", cipherView.name, orgName),\n );\n });\n await this.formPromise;\n return true;\n } catch (e) {\n this.logService.error(e);\n }\n return false;\n }\n\n get canSave() {\n if (this.collections != null) {\n for (let i = 0; i < this.collections.length; i++) {\n if (this.collections[i].checked) {\n return true;\n }\n }\n }\n return false;\n }\n}\n","
    \n
    \n
    \n
    \n

    \n {{ \"moveToOrganization\" | i18n }}\n {{ cipher.name }}\n

    \n \n ×\n \n
    \n \n
    \n {{ \"noOrganizationsList\" | i18n }}\n
    \n
    \n

    {{ \"moveToOrgDesc\" | i18n }}

    \n
    \n \n \n \n \n
    \n
    \n

    {{ \"collections\" | i18n }}

    \n
    \n \n \n
    \n
    \n
    \n {{ \"noCollectionsInList\" | i18n }}\n
    \n \n \n \n \n \n \n \n {{ c.name }}\n \n \n \n \n
    \n
    \n \n \n {{ \"save\" | i18n }}\n \n \n {{ \"newOrganization\" | i18n }}\n \n \n
    \n
    \n
    \n
    \n
    \n","import { Component, OnDestroy } from \"@angular/core\";\n\nimport { ShareComponent as BaseShareComponent } from \"@bitwarden/angular/components/share.component\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\n@Component({\n selector: \"app-vault-share\",\n templateUrl: \"share.component.html\",\n})\nexport class ShareComponent extends BaseShareComponent implements OnDestroy {\n constructor(\n collectionService: CollectionService,\n platformUtilsService: PlatformUtilsService,\n i18nService: I18nService,\n cipherService: CipherService,\n organizationService: OrganizationService,\n logService: LogService,\n ) {\n super(\n collectionService,\n platformUtilsService,\n i18nService,\n cipherService,\n logService,\n organizationService,\n );\n }\n\n ngOnDestroy() {\n this.selectAll(false);\n }\n\n check(c: CollectionView, select?: boolean) {\n (c as any).checked = select == null ? !(c as any).checked : select;\n }\n\n selectAll(select: boolean) {\n const collections = select ? this.collections : this.writeableCollections;\n collections.forEach((c) => this.check(c, select));\n }\n}\n","\n \n \n {{ activeOrganizationId | orgNameFromId: organizations }} {{ \"vault\" | i18n | lowercase }}\n \n \n \n {{ collection.name }}\n \n \n \n\n \n \n \n \n \n \n {{ \"editInfo\" | i18n }}\n \n \n \n {{ \"access\" | i18n }}\n \n \n \n \n \n \n {{ \"loading\" | i18n }}\n \n \n\n
    \n
    \n \n {{ \"new\" | i18n }}\n \n \n \n \n \n \n
    \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n} from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\n\nimport { CollectionDialogTabType } from \"../../components/collection-dialog\";\nimport {\n All,\n RoutedVaultFilterModel,\n Unassigned,\n} from \"../vault-filter/shared/models/routed-vault-filter.model\";\n\n@Component({\n selector: \"app-vault-header\",\n templateUrl: \"./vault-header.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaultHeaderComponent implements OnInit {\n protected Unassigned = Unassigned;\n protected All = All;\n protected CollectionDialogTabType = CollectionDialogTabType;\n\n /**\n * Boolean to determine the loading state of the header.\n * Shows a loading spinner if set to true\n */\n @Input() loading: boolean;\n\n /** Current active filter */\n @Input() filter: RoutedVaultFilterModel;\n\n /** All organizations that can be shown */\n @Input() organizations: Organization[] = [];\n\n /** Currently selected collection */\n @Input() collection?: TreeNode;\n\n /** Whether 'Collection' option is shown in the 'New' dropdown */\n @Input() canCreateCollections: boolean;\n\n /** Emits an event when the new item button is clicked in the header */\n @Output() onAddCipher = new EventEmitter();\n\n /** Emits an event when the new collection button is clicked in the 'New' dropdown menu */\n @Output() onAddCollection = new EventEmitter();\n\n /** Emits an event when the new folder button is clicked in the 'New' dropdown menu */\n @Output() onAddFolder = new EventEmitter();\n\n /** Emits an event when the edit collection button is clicked in the header */\n @Output() onEditCollection = new EventEmitter<{ tab: CollectionDialogTabType }>();\n\n /** Emits an event when the delete collection button is clicked in the header */\n @Output() onDeleteCollection = new EventEmitter();\n\n private flexibleCollectionsV1Enabled = false;\n\n constructor(\n private i18nService: I18nService,\n private configService: ConfigService,\n ) {}\n\n async ngOnInit() {\n this.flexibleCollectionsV1Enabled = await firstValueFrom(\n this.configService.getFeatureFlag$(FeatureFlag.FlexibleCollectionsV1),\n );\n }\n\n /**\n * The id of the organization that is currently being filtered on.\n * This can come from a collection filter or organization filter, if applied.\n */\n protected get activeOrganizationId() {\n if (this.collection != undefined) {\n return this.collection.node.organizationId;\n }\n\n if (this.filter.organizationId !== undefined) {\n return this.filter.organizationId;\n }\n\n return undefined;\n }\n\n protected get activeOrganization() {\n const organizationId = this.activeOrganizationId;\n return this.organizations?.find((org) => org.id === organizationId);\n }\n\n protected get showBreadcrumbs() {\n return this.filter.collectionId !== undefined && this.filter.collectionId !== All;\n }\n\n protected get title() {\n if (this.filter.collectionId === Unassigned) {\n return this.i18nService.t(\"unassigned\");\n }\n\n if (this.collection) {\n return this.collection.node.name;\n }\n\n if (this.filter.organizationId === Unassigned) {\n return this.i18nService.t(\"myVault\");\n }\n\n const activeOrganization = this.activeOrganization;\n if (activeOrganization) {\n return `${activeOrganization.name} ${this.i18nService.t(\"vault\").toLowerCase()}`;\n }\n\n return this.i18nService.t(\"allVaults\");\n }\n\n protected get icon() {\n return this.filter.collectionId && this.filter.collectionId !== All ? \"bwi-collection\" : \"\";\n }\n\n /**\n * A list of collection filters that form a chain from the organization root to currently selected collection.\n * Begins from the organization root and excludes the currently selected collection.\n */\n protected get collections() {\n if (this.collection == undefined) {\n return [];\n }\n\n const collections = [this.collection];\n while (collections[collections.length - 1].parent != undefined) {\n collections.push(collections[collections.length - 1].parent);\n }\n\n return collections\n .slice(1)\n .reverse()\n .map((treeNode) => treeNode.node);\n }\n\n get canEditCollection(): boolean {\n // Only edit collections if not editing \"Unassigned\"\n if (this.collection == null) {\n return false;\n }\n\n // Otherwise, check if we can edit the specified collection\n const organization = this.organizations.find(\n (o) => o.id === this.collection?.node.organizationId,\n );\n return this.collection.node.canEdit(organization, this.flexibleCollectionsV1Enabled);\n }\n\n async editCollection(tab: CollectionDialogTabType): Promise {\n this.onEditCollection.emit({ tab });\n }\n\n get canDeleteCollection(): boolean {\n // Only delete collections if not deleting \"Unassigned\"\n if (this.collection === undefined) {\n return false;\n }\n\n // Otherwise, check if we can delete the specified collection\n const organization = this.organizations.find(\n (o) => o.id === this.collection?.node.organizationId,\n );\n\n return this.collection.node.canDelete(organization, this.flexibleCollectionsV1Enabled);\n }\n\n deleteCollection() {\n this.onDeleteCollection.emit();\n }\n\n protected addCipher() {\n this.onAddCipher.emit();\n }\n\n async addFolder(): Promise {\n this.onAddFolder.emit();\n }\n\n async addCollection(): Promise {\n this.onAddCollection.emit();\n }\n}\n","\n {{ \"updateBrowserDesc\" | i18n }}\n \n {{ \"updateBrowser\" | i18n }}\n \n\n\n\n {{ \"lowKDFIterationsBanner\" | i18n }}\n \n {{ \"changeKDFSettings\" | i18n }}\n \n\n\n\n\n\n {{ \"premiumUpgradeUnlockFeatures\" | i18n }}\n \n {{ \"goPremium\" | i18n }}\n \n\n","import { Component, OnInit } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { VaultBannersService, VisibleVaultBanner } from \"./services/vault-banners.service\";\n\n@Component({\n selector: \"app-vault-banners\",\n templateUrl: \"./vault-banners.component.html\",\n})\nexport class VaultBannersComponent implements OnInit {\n visibleBanners: VisibleVaultBanner[] = [];\n premiumBannerVisible$: Observable;\n VisibleVaultBanner = VisibleVaultBanner;\n\n constructor(private vaultBannerService: VaultBannersService) {\n this.premiumBannerVisible$ = this.vaultBannerService.shouldShowPremiumBanner$;\n }\n\n async ngOnInit(): Promise {\n await this.determineVisibleBanners();\n }\n\n async dismissBanner(banner: VisibleVaultBanner): Promise {\n await this.vaultBannerService.dismissBanner(banner);\n\n await this.determineVisibleBanners();\n }\n\n /** Determine which banners should be present */\n private async determineVisibleBanners(): Promise {\n const showBrowserOutdated = await this.vaultBannerService.shouldShowUpdateBrowserBanner();\n const showVerifyEmail = await this.vaultBannerService.shouldShowVerifyEmailBanner();\n const showLowKdf = await this.vaultBannerService.shouldShowLowKDFBanner();\n\n this.visibleBanners = [\n showBrowserOutdated ? VisibleVaultBanner.OutdatedBrowser : null,\n showVerifyEmail ? VisibleVaultBanner.VerifyEmail : null,\n showLowKdf ? VisibleVaultBanner.KDFSettings : null,\n ].filter(Boolean); // remove all falsy values, i.e. null\n }\n}\n","\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n {{ trashCleanupWarning }}\n \n \n \n \n \n {{ \"loading\" | i18n }}\n
    \n \n \n

    {{ \"noItemsInList\" | i18n }}

    \n \n \n {{ \"newItem\" | i18n }}\n \n
    \n \n\n\n\n\n\n\n\n\n","import {\n ChangeDetectorRef,\n Component,\n NgZone,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport {\n BehaviorSubject,\n combineLatest,\n firstValueFrom,\n lastValueFrom,\n Observable,\n Subject,\n} from \"rxjs\";\nimport {\n concatMap,\n debounceTime,\n filter,\n first,\n map,\n shareReplay,\n switchMap,\n takeUntil,\n tap,\n} from \"rxjs/operators\";\n\nimport { SearchPipe } from \"@bitwarden/angular/pipes/search.pipe\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { CollectionData } from \"@bitwarden/common/vault/models/data/collection.data\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CollectionDetailsResponse } from \"@bitwarden/common/vault/models/response/collection.response\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CollectionView } from \"@bitwarden/common/vault/models/view/collection.view\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\nimport { DialogService, Icons, ToastService } from \"@bitwarden/components\";\nimport { CollectionAssignmentResult, PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AssignCollectionsWebComponent } from \"../components/assign-collections\";\nimport {\n CollectionDialogAction,\n CollectionDialogTabType,\n openCollectionDialog,\n} from \"../components/collection-dialog\";\nimport { VaultItem } from \"../components/vault-items/vault-item\";\nimport { VaultItemEvent } from \"../components/vault-items/vault-item-event\";\nimport { getNestedCollectionTree } from \"../utils/collection-utils\";\n\nimport { AddEditComponent } from \"./add-edit.component\";\nimport { AttachmentsComponent } from \"./attachments.component\";\nimport {\n BulkDeleteDialogResult,\n openBulkDeleteDialog,\n} from \"./bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component\";\nimport {\n BulkMoveDialogResult,\n openBulkMoveDialog,\n} from \"./bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component\";\nimport {\n BulkShareDialogResult,\n openBulkShareDialog,\n} from \"./bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component\";\nimport { openIndividualVaultCollectionsDialog } from \"./collections.component\";\nimport { FolderAddEditDialogResult, openFolderAddEditDialog } from \"./folder-add-edit.component\";\nimport { ShareComponent } from \"./share.component\";\nimport { VaultFilterComponent } from \"./vault-filter/components/vault-filter.component\";\nimport { VaultFilterService } from \"./vault-filter/services/abstractions/vault-filter.service\";\nimport { RoutedVaultFilterBridgeService } from \"./vault-filter/services/routed-vault-filter-bridge.service\";\nimport { RoutedVaultFilterService } from \"./vault-filter/services/routed-vault-filter.service\";\nimport { createFilterFunction } from \"./vault-filter/shared/models/filter-function\";\nimport {\n All,\n RoutedVaultFilterModel,\n Unassigned,\n} from \"./vault-filter/shared/models/routed-vault-filter.model\";\nimport { VaultFilter } from \"./vault-filter/shared/models/vault-filter.model\";\nimport { FolderFilter, OrganizationFilter } from \"./vault-filter/shared/models/vault-filter.type\";\n\nconst BroadcasterSubscriptionId = \"VaultComponent\";\nconst SearchTextDebounceInterval = 200;\n\n@Component({\n selector: \"app-vault\",\n templateUrl: \"vault.component.html\",\n providers: [RoutedVaultFilterService, RoutedVaultFilterBridgeService],\n})\nexport class VaultComponent implements OnInit, OnDestroy {\n @ViewChild(\"vaultFilter\", { static: true }) filterComponent: VaultFilterComponent;\n @ViewChild(\"attachments\", { read: ViewContainerRef, static: true })\n attachmentsModalRef: ViewContainerRef;\n @ViewChild(\"folderAddEdit\", { read: ViewContainerRef, static: true })\n folderAddEditModalRef: ViewContainerRef;\n @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n cipherAddEditModalRef: ViewContainerRef;\n @ViewChild(\"share\", { read: ViewContainerRef, static: true }) shareModalRef: ViewContainerRef;\n @ViewChild(\"collectionsModal\", { read: ViewContainerRef, static: true })\n collectionsModalRef: ViewContainerRef;\n\n trashCleanupWarning: string = null;\n kdfIterations: number;\n activeFilter: VaultFilter = new VaultFilter();\n\n protected noItemIcon = Icons.Search;\n protected performingInitialLoad = true;\n protected refreshing = false;\n protected processingEvent = false;\n protected filter: RoutedVaultFilterModel = {};\n protected showBulkMove: boolean;\n protected canAccessPremium: boolean;\n protected allCollections: CollectionView[];\n protected allOrganizations: Organization[] = [];\n protected ciphers: CipherView[];\n protected collections: CollectionView[];\n protected isEmpty: boolean;\n protected selectedCollection: TreeNode | undefined;\n protected canCreateCollections = false;\n protected currentSearchText$: Observable;\n protected flexibleCollectionsV1Enabled$ = this.configService.getFeatureFlag$(\n FeatureFlag.FlexibleCollectionsV1,\n );\n protected vaultBulkManagementActionEnabled$ = this.configService.getFeatureFlag$(\n FeatureFlag.VaultBulkManagementAction,\n );\n\n private searchText$ = new Subject();\n private refresh$ = new BehaviorSubject(null);\n private destroy$ = new Subject();\n\n constructor(\n private syncService: SyncService,\n private route: ActivatedRoute,\n private router: Router,\n private changeDetectorRef: ChangeDetectorRef,\n private i18nService: I18nService,\n private modalService: ModalService,\n private dialogService: DialogService,\n private messagingService: MessagingService,\n private platformUtilsService: PlatformUtilsService,\n private broadcasterService: BroadcasterService,\n private ngZone: NgZone,\n private organizationService: OrganizationService,\n private vaultFilterService: VaultFilterService,\n private routedVaultFilterService: RoutedVaultFilterService,\n private routedVaultFilterBridgeService: RoutedVaultFilterBridgeService,\n private cipherService: CipherService,\n private passwordRepromptService: PasswordRepromptService,\n private collectionService: CollectionService,\n private logService: LogService,\n private totpService: TotpService,\n private eventCollectionService: EventCollectionService,\n private searchService: SearchService,\n private searchPipe: SearchPipe,\n private configService: ConfigService,\n private apiService: ApiService,\n private billingAccountProfileStateService: BillingAccountProfileStateService,\n private toastService: ToastService,\n ) {}\n\n async ngOnInit() {\n this.trashCleanupWarning = this.i18nService.t(\n this.platformUtilsService.isSelfHost()\n ? \"trashCleanupWarningSelfHosted\"\n : \"trashCleanupWarning\",\n );\n\n const firstSetup$ = this.route.queryParams.pipe(\n first(),\n switchMap(async (params: Params) => {\n await this.syncService.fullSync(false);\n\n const cipherId = getCipherIdFromParams(params);\n if (!cipherId) {\n return;\n }\n const cipherView = new CipherView();\n cipherView.id = cipherId;\n if (params.action === \"clone\") {\n await this.cloneCipher(cipherView);\n } else if (params.action === \"edit\") {\n await this.editCipher(cipherView);\n }\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.ngZone.run(async () => {\n switch (message.command) {\n case \"syncCompleted\":\n if (message.successfully) {\n this.refresh();\n this.changeDetectorRef.detectChanges();\n }\n break;\n }\n });\n });\n\n this.routedVaultFilterBridgeService.activeFilter$\n .pipe(takeUntil(this.destroy$))\n .subscribe((activeFilter) => {\n this.activeFilter = activeFilter;\n });\n\n const filter$ = this.routedVaultFilterService.filter$;\n const allCollections$ = this.collectionService.decryptedCollections$;\n const nestedCollections$ = allCollections$.pipe(\n map((collections) => getNestedCollectionTree(collections)),\n );\n\n this.searchText$\n .pipe(debounceTime(SearchTextDebounceInterval), takeUntil(this.destroy$))\n .subscribe((searchText) =>\n this.router.navigate([], {\n queryParams: { search: Utils.isNullOrEmpty(searchText) ? null : searchText },\n queryParamsHandling: \"merge\",\n replaceUrl: true,\n }),\n );\n\n this.currentSearchText$ = this.route.queryParams.pipe(map((queryParams) => queryParams.search));\n\n const ciphers$ = combineLatest([\n Utils.asyncToObservable(() => this.cipherService.getAllDecrypted()),\n filter$,\n this.currentSearchText$,\n ]).pipe(\n filter(([ciphers, filter]) => ciphers != undefined && filter != undefined),\n concatMap(async ([ciphers, filter, searchText]) => {\n const filterFunction = createFilterFunction(filter);\n\n if (await this.searchService.isSearchable(searchText)) {\n return await this.searchService.searchCiphers(searchText, [filterFunction], ciphers);\n }\n\n return ciphers.filter(filterFunction);\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n const collections$ = combineLatest([nestedCollections$, filter$, this.currentSearchText$]).pipe(\n filter(([collections, filter]) => collections != undefined && filter != undefined),\n concatMap(async ([collections, filter, searchText]) => {\n if (filter.collectionId === undefined || filter.collectionId === Unassigned) {\n return [];\n }\n\n let collectionsToReturn = [];\n if (filter.organizationId !== undefined && filter.collectionId === All) {\n collectionsToReturn = collections\n .filter((c) => c.node.organizationId === filter.organizationId)\n .map((c) => c.node);\n } else if (filter.collectionId === All) {\n collectionsToReturn = collections.map((c) => c.node);\n } else {\n const selectedCollection = ServiceUtils.getTreeNodeObjectFromList(\n collections,\n filter.collectionId,\n );\n collectionsToReturn = selectedCollection?.children.map((c) => c.node) ?? [];\n }\n\n if (await this.searchService.isSearchable(searchText)) {\n collectionsToReturn = this.searchPipe.transform(\n collectionsToReturn,\n searchText,\n (collection) => collection.name,\n (collection) => collection.id,\n );\n }\n\n return collectionsToReturn;\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n const selectedCollection$ = combineLatest([nestedCollections$, filter$]).pipe(\n filter(([collections, filter]) => collections != undefined && filter != undefined),\n map(([collections, filter]) => {\n if (\n filter.collectionId === undefined ||\n filter.collectionId === All ||\n filter.collectionId === Unassigned\n ) {\n return undefined;\n }\n\n return ServiceUtils.getTreeNodeObjectFromList(collections, filter.collectionId);\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n firstSetup$\n .pipe(\n switchMap(() => this.route.queryParams),\n switchMap(async (params) => {\n const cipherId = getCipherIdFromParams(params);\n if (cipherId) {\n if ((await this.cipherService.get(cipherId)) != null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.editCipherId(cipherId);\n } else {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"unknownCipher\"),\n );\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([], {\n queryParams: { itemId: null, cipherId: null },\n queryParamsHandling: \"merge\",\n });\n }\n }\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n\n firstSetup$\n .pipe(\n switchMap(() => this.refresh$),\n tap(() => (this.refreshing = true)),\n switchMap(() =>\n combineLatest([\n filter$,\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n allCollections$,\n this.organizationService.organizations$,\n ciphers$,\n collections$,\n selectedCollection$,\n ]),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe(\n ([\n filter,\n canAccessPremium,\n allCollections,\n allOrganizations,\n ciphers,\n collections,\n selectedCollection,\n ]) => {\n this.filter = filter;\n this.canAccessPremium = canAccessPremium;\n this.allCollections = allCollections;\n this.allOrganizations = allOrganizations;\n this.ciphers = ciphers;\n this.collections = collections;\n this.selectedCollection = selectedCollection;\n\n this.canCreateCollections = allOrganizations?.some(\n (o) => o.canCreateNewCollections && !o.isProviderUser,\n );\n\n this.showBulkMove = filter.type !== \"trash\";\n this.isEmpty = collections?.length === 0 && ciphers?.length === 0;\n\n this.performingInitialLoad = false;\n this.refreshing = false;\n },\n );\n }\n\n ngOnDestroy() {\n this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n this.destroy$.next();\n this.destroy$.complete();\n this.vaultFilterService.clearOrganizationFilter();\n }\n\n async onVaultItemsEvent(event: VaultItemEvent) {\n this.processingEvent = true;\n try {\n if (event.type === \"viewAttachments\") {\n await this.editCipherAttachments(event.item);\n } else if (event.type === \"viewCipherCollections\") {\n await this.editCipherCollections(event.item);\n } else if (event.type === \"clone\") {\n await this.cloneCipher(event.item);\n } else if (event.type === \"restore\") {\n if (event.items.length === 1) {\n await this.restore(event.items[0]);\n } else {\n await this.bulkRestore(event.items);\n }\n } else if (event.type === \"delete\") {\n await this.handleDeleteEvent(event.items);\n } else if (event.type === \"moveToFolder\") {\n await this.bulkMove(event.items);\n } else if (event.type === \"moveToOrganization\") {\n if (event.items.length === 1) {\n await this.shareCipher(event.items[0]);\n } else {\n await this.bulkShare(event.items);\n }\n } else if (event.type === \"copyField\") {\n await this.copy(event.item, event.field);\n } else if (event.type === \"editCollection\") {\n await this.editCollection(event.item, CollectionDialogTabType.Info);\n } else if (event.type === \"viewCollectionAccess\") {\n await this.editCollection(event.item, CollectionDialogTabType.Access);\n } else if (event.type === \"assignToCollections\") {\n await this.bulkAssignToCollections(event.items);\n }\n } finally {\n this.processingEvent = false;\n }\n }\n\n async applyOrganizationFilter(orgId: string) {\n if (orgId == null) {\n orgId = \"MyVault\";\n }\n const orgs = await firstValueFrom(this.filterComponent.filters.organizationFilter.data$);\n const orgNode = ServiceUtils.getTreeNodeObject(orgs, orgId) as TreeNode;\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.filterComponent.filters?.organizationFilter?.action(orgNode);\n }\n\n addFolder = async (): Promise => {\n openFolderAddEditDialog(this.dialogService);\n };\n\n editFolder = async (folder: FolderFilter): Promise => {\n const dialog = openFolderAddEditDialog(this.dialogService, {\n data: {\n folderId: folder.id,\n },\n });\n\n const result = await lastValueFrom(dialog.closed);\n\n if (result === FolderAddEditDialogResult.Deleted) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([], {\n queryParams: { folderId: null },\n queryParamsHandling: \"merge\",\n replaceUrl: true,\n });\n }\n };\n\n filterSearchText(searchText: string) {\n this.searchText$.next(searchText);\n }\n\n async editCipherAttachments(cipher: CipherView) {\n if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) {\n this.go({ cipherId: null, itemId: null });\n return;\n }\n\n if (cipher.organizationId == null && !this.canAccessPremium) {\n this.messagingService.send(\"premiumRequired\");\n return;\n } else if (cipher.organizationId != null) {\n const org = await this.organizationService.get(cipher.organizationId);\n if (org != null && (org.maxStorageGb == null || org.maxStorageGb === 0)) {\n this.messagingService.send(\"upgradeOrganization\", {\n organizationId: cipher.organizationId,\n });\n return;\n }\n }\n\n const canEditAttachments = await this.canEditAttachments(cipher);\n const vaultBulkManagementActionEnabled = await firstValueFrom(\n this.vaultBulkManagementActionEnabled$,\n );\n\n let madeAttachmentChanges = false;\n const [modal] = await this.modalService.openViewRef(\n AttachmentsComponent,\n this.attachmentsModalRef,\n (comp) => {\n comp.cipherId = cipher.id;\n comp.viewOnly = !canEditAttachments && vaultBulkManagementActionEnabled;\n comp.onUploadedAttachment\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => (madeAttachmentChanges = true));\n comp.onDeletedAttachment\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => (madeAttachmentChanges = true));\n comp.onReuploadedAttachment\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => (madeAttachmentChanges = true));\n },\n );\n\n modal.onClosed.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (madeAttachmentChanges) {\n this.refresh();\n }\n madeAttachmentChanges = false;\n });\n }\n\n async shareCipher(cipher: CipherView) {\n if ((await this.flexibleCollectionsV1Enabled()) && cipher.organizationId != null) {\n // You cannot move ciphers between organizations\n this.showMissingPermissionsError();\n return;\n }\n\n if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) {\n this.go({ cipherId: null, itemId: null });\n return;\n }\n const [modal] = await this.modalService.openViewRef(\n ShareComponent,\n this.shareModalRef,\n (comp) => {\n comp.cipherId = cipher.id;\n comp.onSharedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n modal.close();\n this.refresh();\n });\n },\n );\n }\n\n async editCipherCollections(cipher: CipherView) {\n openIndividualVaultCollectionsDialog(this.dialogService, { data: { cipherId: cipher.id } });\n }\n\n async addCipher() {\n const component = await this.editCipher(null);\n component.type = this.activeFilter.cipherType;\n if (this.activeFilter.organizationId !== \"MyVault\") {\n component.organizationId = this.activeFilter.organizationId;\n component.collections = (\n await firstValueFrom(this.vaultFilterService.filteredCollections$)\n ).filter((c) => !c.readOnly && c.id != null);\n }\n const selectedColId = this.activeFilter.collectionId;\n if (selectedColId !== \"AllCollections\") {\n component.organizationId = component.collections.find(\n (collection) => collection.id === selectedColId,\n )?.organizationId;\n component.collectionIds = [selectedColId];\n }\n component.folderId = this.activeFilter.folderId;\n }\n\n async navigateToCipher(cipher: CipherView) {\n this.go({ itemId: cipher?.id });\n }\n\n async editCipher(cipher: CipherView) {\n return this.editCipherId(cipher?.id);\n }\n\n async editCipherId(id: string) {\n const cipher = await this.cipherService.get(id);\n // if cipher exists (cipher is null when new) and MP reprompt\n // is on for this cipher, then show password reprompt\n if (\n cipher &&\n cipher.reprompt !== 0 &&\n !(await this.passwordRepromptService.showPasswordPrompt())\n ) {\n // didn't pass password prompt, so don't open add / edit modal\n this.go({ cipherId: null, itemId: null });\n return;\n }\n\n const [modal, childComponent] = await this.modalService.openViewRef(\n AddEditComponent,\n this.cipherAddEditModalRef,\n (comp) => {\n comp.cipherId = id;\n comp.onSavedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n modal.close();\n this.refresh();\n });\n comp.onDeletedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n modal.close();\n this.refresh();\n });\n comp.onRestoredCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n modal.close();\n this.refresh();\n });\n },\n );\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n modal.onClosedPromise().then(() => {\n this.go({ cipherId: null, itemId: null });\n });\n\n return childComponent;\n }\n\n async addCollection() {\n const dialog = openCollectionDialog(this.dialogService, {\n data: {\n organizationId: this.allOrganizations\n .filter((o) => o.canCreateNewCollections && !o.isProviderUser)\n .sort(Utils.getSortFunction(this.i18nService, \"name\"))[0].id,\n parentCollectionId: this.filter.collectionId,\n showOrgSelector: true,\n limitNestedCollections: true,\n },\n });\n const result = await lastValueFrom(dialog.closed);\n if (result.action === CollectionDialogAction.Saved) {\n if (result.collection) {\n // Update CollectionService with the new collection\n const c = new CollectionData(result.collection as CollectionDetailsResponse);\n await this.collectionService.upsert(c);\n }\n this.refresh();\n }\n }\n\n async editCollection(c: CollectionView, tab: CollectionDialogTabType): Promise {\n const dialog = openCollectionDialog(this.dialogService, {\n data: {\n collectionId: c?.id,\n organizationId: c.organizationId,\n initialTab: tab,\n limitNestedCollections: true,\n },\n });\n\n const result = await lastValueFrom(dialog.closed);\n if (result.action === CollectionDialogAction.Saved) {\n if (result.collection) {\n // Update CollectionService with the new collection\n const c = new CollectionData(result.collection as CollectionDetailsResponse);\n await this.collectionService.upsert(c);\n }\n this.refresh();\n } else if (result.action === CollectionDialogAction.Deleted) {\n await this.collectionService.delete(result.collection?.id);\n this.refresh();\n // Navigate away if we deleted the collection we were viewing\n if (this.selectedCollection?.node.id === c?.id) {\n void this.router.navigate([], {\n queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null },\n queryParamsHandling: \"merge\",\n replaceUrl: true,\n });\n }\n }\n }\n\n async deleteCollection(collection: CollectionView): Promise {\n const organization = await this.organizationService.get(collection.organizationId);\n const flexibleCollectionsV1Enabled = await firstValueFrom(this.flexibleCollectionsV1Enabled$);\n if (!collection.canDelete(organization, flexibleCollectionsV1Enabled)) {\n this.showMissingPermissionsError();\n return;\n }\n const confirmed = await this.dialogService.openSimpleDialog({\n title: collection.name,\n content: { key: \"deleteCollectionConfirmation\" },\n type: \"warning\",\n });\n if (!confirmed) {\n return;\n }\n try {\n await this.apiService.deleteCollection(collection.organizationId, collection.id);\n await this.collectionService.delete(collection.id);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"deletedCollectionId\", collection.name),\n );\n // Navigate away if we deleted the collection we were viewing\n if (this.selectedCollection?.node.id === collection.id) {\n void this.router.navigate([], {\n queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null },\n queryParamsHandling: \"merge\",\n replaceUrl: true,\n });\n }\n this.refresh();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async bulkAssignToCollections(ciphers: CipherView[]) {\n if (!(await this.repromptCipher(ciphers))) {\n return;\n }\n\n if (ciphers.length === 0) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"nothingSelected\"),\n );\n return;\n }\n\n let availableCollections: CollectionView[] = [];\n const orgId =\n this.activeFilter.organizationId ||\n ciphers.find((c) => c.organizationId !== null)?.organizationId;\n\n if (orgId && orgId !== \"MyVault\") {\n const organization = this.allOrganizations.find((o) => o.id === orgId);\n availableCollections = this.allCollections.filter(\n (c) => c.organizationId === organization.id && !c.readOnly,\n );\n }\n\n const dialog = AssignCollectionsWebComponent.open(this.dialogService, {\n data: {\n ciphers,\n organizationId: orgId as OrganizationId,\n availableCollections,\n activeCollection: this.activeFilter?.selectedCollectionNode?.node,\n },\n });\n\n const result = await lastValueFrom(dialog.closed);\n if (result === CollectionAssignmentResult.Saved) {\n this.refresh();\n }\n }\n\n async cloneCipher(cipher: CipherView) {\n if (cipher.login?.hasFido2Credentials) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"passkeyNotCopied\" },\n content: { key: \"passkeyNotCopiedAlert\" },\n type: \"info\",\n });\n\n if (!confirmed) {\n return false;\n }\n }\n\n const component = await this.editCipher(cipher);\n component.cloneMode = true;\n }\n\n async restore(c: CipherView): Promise {\n if (!c.isDeleted) {\n return;\n }\n\n if ((await this.flexibleCollectionsV1Enabled()) && !c.edit) {\n this.showMissingPermissionsError();\n return;\n }\n\n if (!(await this.repromptCipher([c]))) {\n return;\n }\n\n try {\n await this.cipherService.restoreWithServer(c.id);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"restoredItem\"));\n this.refresh();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async bulkRestore(ciphers: CipherView[]) {\n if ((await this.flexibleCollectionsV1Enabled()) && ciphers.some((c) => !c.edit)) {\n this.showMissingPermissionsError();\n return;\n }\n\n if (!(await this.repromptCipher(ciphers))) {\n return;\n }\n\n const selectedCipherIds = ciphers.map((cipher) => cipher.id);\n if (selectedCipherIds.length === 0) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"nothingSelected\"));\n return;\n }\n\n await this.cipherService.restoreManyWithServer(selectedCipherIds);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"restoredItems\"));\n this.refresh();\n }\n\n private async handleDeleteEvent(items: VaultItem[]) {\n const ciphers = items.filter((i) => i.collection === undefined).map((i) => i.cipher);\n const collections = items.filter((i) => i.cipher === undefined).map((i) => i.collection);\n if (ciphers.length === 1 && collections.length === 0) {\n await this.deleteCipher(ciphers[0]);\n } else if (ciphers.length === 0 && collections.length === 1) {\n await this.deleteCollection(collections[0]);\n } else {\n const orgIds = items\n .filter((i) => i.cipher === undefined)\n .map((i) => i.collection.organizationId);\n const orgs = await firstValueFrom(\n this.organizationService.organizations$.pipe(\n map((orgs) => orgs.filter((o) => orgIds.includes(o.id))),\n ),\n );\n await this.bulkDelete(ciphers, collections, orgs);\n }\n }\n\n async deleteCipher(c: CipherView): Promise {\n if (!(await this.repromptCipher([c]))) {\n return;\n }\n\n if ((await this.flexibleCollectionsV1Enabled()) && !c.edit) {\n this.showMissingPermissionsError();\n return;\n }\n\n const permanent = c.isDeleted;\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: permanent ? \"permanentlyDeleteItem\" : \"deleteItem\" },\n content: { key: permanent ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n await this.deleteCipherWithServer(c.id, permanent);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(permanent ? \"permanentlyDeletedItem\" : \"deletedItem\"),\n );\n this.refresh();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async bulkDelete(\n ciphers: CipherView[],\n collections: CollectionView[],\n organizations: Organization[],\n ) {\n if (!(await this.repromptCipher(ciphers))) {\n return;\n }\n\n if (ciphers.length === 0 && collections.length === 0) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"nothingSelected\"));\n return;\n }\n\n const flexibleCollectionsV1Enabled = await this.flexibleCollectionsV1Enabled();\n\n const canDeleteCollections =\n collections == null ||\n collections.every((c) =>\n c.canDelete(\n organizations.find((o) => o.id == c.organizationId),\n flexibleCollectionsV1Enabled,\n ),\n );\n const canDeleteCiphers = ciphers == null || ciphers.every((c) => c.edit);\n\n if (flexibleCollectionsV1Enabled && (!canDeleteCollections || !canDeleteCiphers)) {\n this.showMissingPermissionsError();\n return;\n }\n\n const dialog = openBulkDeleteDialog(this.dialogService, {\n data: {\n permanent: this.filter.type === \"trash\",\n cipherIds: ciphers.map((c) => c.id),\n organizations: organizations,\n collections: collections,\n },\n });\n\n const result = await lastValueFrom(dialog.closed);\n if (result === BulkDeleteDialogResult.Deleted) {\n this.refresh();\n }\n }\n\n async bulkMove(ciphers: CipherView[]) {\n if (!(await this.repromptCipher(ciphers))) {\n return;\n }\n\n const selectedCipherIds = ciphers.map((cipher) => cipher.id);\n if (selectedCipherIds.length === 0) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"nothingSelected\"));\n return;\n }\n\n const dialog = openBulkMoveDialog(this.dialogService, {\n data: { cipherIds: selectedCipherIds },\n });\n\n const result = await lastValueFrom(dialog.closed);\n if (result === BulkMoveDialogResult.Moved) {\n this.refresh();\n }\n }\n\n async copy(cipher: CipherView, field: \"username\" | \"password\" | \"totp\") {\n let aType;\n let value;\n let typeI18nKey;\n\n if (field === \"username\") {\n aType = \"Username\";\n value = cipher.login.username;\n typeI18nKey = \"username\";\n } else if (field === \"password\") {\n aType = \"Password\";\n value = cipher.login.password;\n typeI18nKey = \"password\";\n } else if (field === \"totp\") {\n aType = \"TOTP\";\n value = await this.totpService.getCode(cipher.login.totp);\n typeI18nKey = \"verificationCodeTotp\";\n } else {\n this.platformUtilsService.showToast(\"info\", null, this.i18nService.t(\"unexpectedError\"));\n return;\n }\n\n if (\n this.passwordRepromptService.protectedFields().includes(aType) &&\n !(await this.repromptCipher([cipher]))\n ) {\n return;\n }\n\n if (!cipher.viewPassword) {\n return;\n }\n\n this.platformUtilsService.copyToClipboard(value, { window: window });\n this.platformUtilsService.showToast(\n \"info\",\n null,\n this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n );\n\n if (field === \"password\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, cipher.id);\n } else if (field === \"totp\") {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, cipher.id);\n }\n }\n\n async bulkShare(ciphers: CipherView[]) {\n if (!(await this.repromptCipher(ciphers))) {\n return;\n }\n\n if (\n (await this.flexibleCollectionsV1Enabled()) &&\n ciphers.some((c) => c.organizationId != null)\n ) {\n // You cannot move ciphers between organizations\n this.showMissingPermissionsError();\n return;\n }\n\n if (ciphers.length === 0) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"nothingSelected\"));\n return;\n }\n\n const dialog = openBulkShareDialog(this.dialogService, { data: { ciphers } });\n\n const result = await lastValueFrom(dialog.closed);\n if (result === BulkShareDialogResult.Shared) {\n this.refresh();\n }\n }\n\n protected deleteCipherWithServer(id: string, permanent: boolean) {\n return permanent\n ? this.cipherService.deleteWithServer(id)\n : this.cipherService.softDeleteWithServer(id);\n }\n\n protected async repromptCipher(ciphers: CipherView[]) {\n const notProtected = !ciphers.find((cipher) => cipher.reprompt !== CipherRepromptType.None);\n\n return notProtected || (await this.passwordRepromptService.showPasswordPrompt());\n }\n\n private refresh() {\n this.refresh$.next();\n }\n\n private async canEditAttachments(cipher: CipherView) {\n if (cipher.organizationId == null || cipher.edit) {\n return true;\n }\n\n const flexibleCollectionsV1Enabled = await this.flexibleCollectionsV1Enabled();\n\n const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);\n return organization.canEditAllCiphers(flexibleCollectionsV1Enabled, false);\n }\n\n private go(queryParams: any = null) {\n if (queryParams == null) {\n queryParams = {\n favorites: this.activeFilter.isFavorites || null,\n type: this.activeFilter.cipherType,\n folderId: this.activeFilter.folderId,\n collectionId: this.activeFilter.collectionId,\n deleted: this.activeFilter.isDeleted || null,\n };\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([], {\n relativeTo: this.route,\n queryParams: queryParams,\n queryParamsHandling: \"merge\",\n replaceUrl: true,\n });\n }\n\n private showMissingPermissionsError() {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"missingPermissions\"),\n });\n }\n\n private flexibleCollectionsV1Enabled() {\n return firstValueFrom(this.flexibleCollectionsV1Enabled$);\n }\n}\n\n/**\n * Allows backwards compatibility with\n * old links that used the original `cipherId` param\n */\nconst getCipherIdFromParams = (params: Params): string => {\n return params[\"itemId\"] || params[\"cipherId\"];\n};\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { VaultComponent } from \"./vault.component\";\nconst routes: Routes = [\n {\n path: \"\",\n component: VaultComponent,\n data: { titleId: \"vaults\" },\n },\n];\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class VaultRoutingModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerModule, BreadcrumbsModule } from \"@bitwarden/components\";\n\nimport { VerifyEmailComponent } from \"../../auth/settings/verify-email.component\";\nimport { LooseComponentsModule, SharedModule } from \"../../shared\";\nimport { CollectionDialogModule } from \"../components/collection-dialog\";\nimport { VaultItemsModule } from \"../components/vault-items/vault-items.module\";\nimport { CollectionBadgeModule } from \"../org-vault/collection-badge/collection-badge.module\";\nimport { GroupBadgeModule } from \"../org-vault/group-badge/group-badge.module\";\n\nimport { BulkDialogsModule } from \"./bulk-action-dialogs/bulk-dialogs.module\";\nimport { OrganizationBadgeModule } from \"./organization-badge/organization-badge.module\";\nimport { PipesModule } from \"./pipes/pipes.module\";\nimport { VaultBannersService } from \"./vault-banners/services/vault-banners.service\";\nimport { VaultBannersComponent } from \"./vault-banners/vault-banners.component\";\nimport { VaultFilterModule } from \"./vault-filter/vault-filter.module\";\nimport { VaultHeaderComponent } from \"./vault-header/vault-header.component\";\nimport { VaultOnboardingService as VaultOnboardingServiceAbstraction } from \"./vault-onboarding/services/abstraction/vault-onboarding.service\";\nimport { VaultOnboardingService } from \"./vault-onboarding/services/vault-onboarding.service\";\nimport { VaultOnboardingComponent } from \"./vault-onboarding/vault-onboarding.component\";\nimport { VaultRoutingModule } from \"./vault-routing.module\";\nimport { VaultComponent } from \"./vault.component\";\n\n@NgModule({\n imports: [\n VaultFilterModule,\n VaultRoutingModule,\n OrganizationBadgeModule,\n GroupBadgeModule,\n CollectionBadgeModule,\n PipesModule,\n SharedModule,\n LooseComponentsModule,\n BulkDialogsModule,\n BreadcrumbsModule,\n VaultItemsModule,\n CollectionDialogModule,\n VaultOnboardingComponent,\n BannerModule,\n VerifyEmailComponent,\n ],\n declarations: [VaultComponent, VaultHeaderComponent, VaultBannersComponent],\n exports: [VaultComponent],\n providers: [\n VaultBannersService,\n {\n provide: VaultOnboardingServiceAbstraction,\n useClass: VaultOnboardingService,\n },\n ],\n})\nexport class VaultModule {}\n","import { NgModule } from \"@angular/core\";\nimport { Route, RouterModule, Routes } from \"@angular/router\";\n\nimport {\n AuthGuard,\n lockGuard,\n redirectGuard,\n tdeDecryptionRequiredGuard,\n UnauthGuard,\n unauthGuardFn,\n} from \"@bitwarden/angular/auth/guards\";\nimport { canAccessFeature } from \"@bitwarden/angular/platform/guard/feature-flag.guard\";\nimport {\n AnonLayoutWrapperComponent,\n AnonLayoutWrapperData,\n RegistrationFinishComponent,\n RegistrationStartComponent,\n RegistrationStartSecondaryComponent,\n RegistrationStartSecondaryComponentData,\n LockIcon,\n} from \"@bitwarden/auth/angular\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\n\nimport { twofactorRefactorSwap } from \"../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap\";\nimport { flagEnabled, Flags } from \"../utils/flags\";\n\nimport { VerifyRecoverDeleteOrgComponent } from \"./admin-console/organizations/manage/verify-recover-delete-org.component\";\nimport { AcceptFamilySponsorshipComponent } from \"./admin-console/organizations/sponsorships/accept-family-sponsorship.component\";\nimport { FamiliesForEnterpriseSetupComponent } from \"./admin-console/organizations/sponsorships/families-for-enterprise-setup.component\";\nimport { VerifyRecoverDeleteProviderComponent } from \"./admin-console/providers/verify-recover-delete-provider.component\";\nimport { CreateOrganizationComponent } from \"./admin-console/settings/create-organization.component\";\nimport { deepLinkGuard } from \"./auth/guards/deep-link.guard\";\nimport { HintComponent } from \"./auth/hint.component\";\nimport { LockComponent } from \"./auth/lock.component\";\nimport { LoginDecryptionOptionsComponent } from \"./auth/login/login-decryption-options/login-decryption-options.component\";\nimport { LoginViaAuthRequestComponent } from \"./auth/login/login-via-auth-request.component\";\nimport { LoginViaWebAuthnComponent } from \"./auth/login/login-via-webauthn/login-via-webauthn.component\";\nimport { LoginComponent } from \"./auth/login/login.component\";\nimport { AcceptOrganizationComponent } from \"./auth/organization-invite/accept-organization.component\";\nimport { RecoverDeleteComponent } from \"./auth/recover-delete.component\";\nimport { RecoverTwoFactorComponent } from \"./auth/recover-two-factor.component\";\nimport { RemovePasswordComponent } from \"./auth/remove-password.component\";\nimport { SetPasswordComponent } from \"./auth/set-password.component\";\nimport { AccountComponent } from \"./auth/settings/account/account.component\";\nimport { EmergencyAccessComponent } from \"./auth/settings/emergency-access/emergency-access.component\";\nimport { EmergencyAccessViewComponent } from \"./auth/settings/emergency-access/view/emergency-access-view.component\";\nimport { SecurityRoutingModule } from \"./auth/settings/security/security-routing.module\";\nimport { SsoComponent } from \"./auth/sso.component\";\nimport { TrialInitiationComponent } from \"./auth/trial-initiation/trial-initiation.component\";\nimport { TwoFactorAuthComponent } from \"./auth/two-factor-auth.component\";\nimport { TwoFactorComponent } from \"./auth/two-factor.component\";\nimport { UpdatePasswordComponent } from \"./auth/update-password.component\";\nimport { UpdateTempPasswordComponent } from \"./auth/update-temp-password.component\";\nimport { VerifyEmailTokenComponent } from \"./auth/verify-email-token.component\";\nimport { VerifyRecoverDeleteComponent } from \"./auth/verify-recover-delete.component\";\nimport { SponsoredFamiliesComponent } from \"./billing/settings/sponsored-families.component\";\nimport { EnvironmentSelectorComponent } from \"./components/environment-selector/environment-selector.component\";\nimport { DataProperties } from \"./core\";\nimport { FrontendLayoutComponent } from \"./layouts/frontend-layout.component\";\nimport { UserLayoutComponent } from \"./layouts/user-layout.component\";\nimport { DomainRulesComponent } from \"./settings/domain-rules.component\";\nimport { PreferencesComponent } from \"./settings/preferences.component\";\nimport { GeneratorComponent } from \"./tools/generator.component\";\nimport { ReportsModule } from \"./tools/reports\";\nimport { AccessComponent } from \"./tools/send/access.component\";\nimport { SendComponent } from \"./tools/send/send.component\";\nimport { VaultModule } from \"./vault/individual-vault/vault.module\";\n\nconst routes: Routes = [\n {\n path: \"\",\n component: FrontendLayoutComponent,\n data: { doNotSaveUrl: true } satisfies DataProperties,\n children: [\n {\n path: \"\",\n pathMatch: \"full\",\n children: [], // Children lets us have an empty component.\n canActivate: [redirectGuard()], // Redirects either to vault, login, or lock page.\n },\n {\n path: \"login-with-device\",\n component: LoginViaAuthRequestComponent,\n data: { titleId: \"loginWithDevice\" } satisfies DataProperties,\n },\n {\n path: \"login-with-passkey\",\n component: LoginViaWebAuthnComponent,\n data: { titleId: \"loginWithPasskey\" } satisfies DataProperties,\n },\n {\n path: \"admin-approval-requested\",\n component: LoginViaAuthRequestComponent,\n data: { titleId: \"adminApprovalRequested\" } satisfies DataProperties,\n },\n {\n path: \"login-initiated\",\n component: LoginDecryptionOptionsComponent,\n canActivate: [tdeDecryptionRequiredGuard()],\n },\n {\n path: \"register\",\n component: TrialInitiationComponent,\n canActivate: [UnauthGuard],\n data: { titleId: \"createAccount\" } satisfies DataProperties,\n },\n {\n path: \"trial\",\n redirectTo: \"register\",\n pathMatch: \"full\",\n },\n {\n path: \"set-password\",\n component: SetPasswordComponent,\n data: { titleId: \"setMasterPassword\" } satisfies DataProperties,\n },\n { path: \"verify-email\", component: VerifyEmailTokenComponent },\n {\n path: \"accept-organization\",\n canActivate: [deepLinkGuard()],\n component: AcceptOrganizationComponent,\n data: { titleId: \"joinOrganization\", doNotSaveUrl: false } satisfies DataProperties,\n },\n {\n path: \"accept-families-for-enterprise\",\n component: AcceptFamilySponsorshipComponent,\n canActivate: [deepLinkGuard()],\n data: { titleId: \"acceptFamilySponsorship\", doNotSaveUrl: false } satisfies DataProperties,\n },\n { path: \"recover\", pathMatch: \"full\", redirectTo: \"recover-2fa\" },\n {\n path: \"verify-recover-delete-org\",\n component: VerifyRecoverDeleteOrgComponent,\n canActivate: [UnauthGuard],\n data: { titleId: \"deleteOrganization\" },\n },\n {\n path: \"verify-recover-delete-provider\",\n component: VerifyRecoverDeleteProviderComponent,\n canActivate: [UnauthGuard],\n data: { titleId: \"deleteAccount\" } satisfies DataProperties,\n },\n {\n path: \"send/:sendId/:key\",\n component: AccessComponent,\n data: { titleId: \"Bitwarden Send\" } satisfies DataProperties,\n },\n {\n path: \"update-temp-password\",\n component: UpdateTempPasswordComponent,\n canActivate: [AuthGuard],\n data: { titleId: \"updateTempPassword\" } satisfies DataProperties,\n },\n {\n path: \"update-password\",\n component: UpdatePasswordComponent,\n canActivate: [AuthGuard],\n data: { titleId: \"updatePassword\" } satisfies DataProperties,\n },\n {\n path: \"migrate-legacy-encryption\",\n loadComponent: () =>\n import(\"./auth/migrate-encryption/migrate-legacy-encryption.component\").then(\n (mod) => mod.MigrateFromLegacyEncryptionComponent,\n ),\n },\n ],\n },\n {\n path: \"\",\n component: AnonLayoutWrapperComponent,\n children: [\n {\n path: \"signup\",\n canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n data: { pageTitle: \"createAccount\", titleId: \"createAccount\" } satisfies DataProperties &\n AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: RegistrationStartComponent,\n },\n {\n path: \"\",\n component: RegistrationStartSecondaryComponent,\n outlet: \"secondary\",\n data: {\n loginRoute: \"/login\",\n } satisfies RegistrationStartSecondaryComponentData,\n },\n ],\n },\n {\n path: \"finish-signup\",\n canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n data: {\n pageTitle: \"setAStrongPassword\",\n pageSubtitle: \"finishCreatingYourAccountBySettingAPassword\",\n titleId: \"setAStrongPassword\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: RegistrationFinishComponent,\n },\n ],\n },\n {\n path: \"sso\",\n canActivate: [unauthGuardFn()],\n data: {\n pageTitle: \"enterpriseSingleSignOn\",\n titleId: \"enterpriseSingleSignOn\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: SsoComponent,\n },\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n },\n {\n path: \"login\",\n canActivate: [unauthGuardFn()],\n children: [\n {\n path: \"\",\n component: LoginComponent,\n },\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n data: {\n pageTitle: \"logIn\",\n },\n },\n {\n path: \"lock\",\n canActivate: [deepLinkGuard(), lockGuard()],\n children: [\n {\n path: \"\",\n component: LockComponent,\n },\n ],\n data: {\n pageTitle: \"yourVaultIsLockedV2\",\n pageIcon: LockIcon,\n showReadonlyHostname: true,\n } satisfies AnonLayoutWrapperData,\n },\n {\n path: \"2fa\",\n canActivate: [unauthGuardFn()],\n children: [\n ...twofactorRefactorSwap(TwoFactorComponent, TwoFactorAuthComponent, {\n path: \"\",\n }),\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n data: {\n pageTitle: \"verifyIdentity\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n },\n {\n path: \"recover-2fa\",\n canActivate: [unauthGuardFn()],\n children: [\n {\n path: \"\",\n component: RecoverTwoFactorComponent,\n },\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n data: {\n pageTitle: \"recoverAccountTwoStep\",\n titleId: \"recoverAccountTwoStep\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n },\n {\n path: \"accept-emergency\",\n canActivate: [deepLinkGuard()],\n data: {\n pageTitle: \"emergencyAccess\",\n titleId: \"acceptEmergency\",\n doNotSaveUrl: false,\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n loadComponent: () =>\n import(\"./auth/emergency-access/accept/accept-emergency.component\").then(\n (mod) => mod.AcceptEmergencyComponent,\n ),\n },\n ],\n },\n {\n path: \"recover-delete\",\n canActivate: [unauthGuardFn()],\n data: {\n pageTitle: \"deleteAccount\",\n titleId: \"deleteAccount\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: RecoverDeleteComponent,\n },\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n },\n {\n path: \"verify-recover-delete\",\n canActivate: [unauthGuardFn()],\n data: {\n pageTitle: \"deleteAccount\",\n titleId: \"deleteAccount\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: VerifyRecoverDeleteComponent,\n },\n ],\n },\n {\n path: \"hint\",\n canActivate: [unauthGuardFn()],\n data: {\n pageTitle: \"passwordHint\",\n titleId: \"passwordHint\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n children: [\n {\n path: \"\",\n component: HintComponent,\n },\n {\n path: \"\",\n component: EnvironmentSelectorComponent,\n outlet: \"environment-selector\",\n },\n ],\n },\n {\n path: \"remove-password\",\n component: RemovePasswordComponent,\n canActivate: [AuthGuard],\n data: {\n pageTitle: \"removeMasterPassword\",\n titleId: \"removeMasterPassword\",\n } satisfies DataProperties & AnonLayoutWrapperData,\n },\n ],\n },\n {\n path: \"\",\n component: UserLayoutComponent,\n canActivate: [deepLinkGuard(), AuthGuard],\n children: [\n {\n path: \"vault\",\n loadChildren: () => VaultModule,\n },\n {\n path: \"sends\",\n component: SendComponent,\n data: { titleId: \"send\" } satisfies DataProperties,\n },\n {\n path: \"create-organization\",\n component: CreateOrganizationComponent,\n data: { titleId: \"newOrganization\" } satisfies DataProperties,\n },\n {\n path: \"settings\",\n children: [\n { path: \"\", pathMatch: \"full\", redirectTo: \"account\" },\n {\n path: \"account\",\n component: AccountComponent,\n data: { titleId: \"myAccount\" } satisfies DataProperties,\n },\n {\n path: \"preferences\",\n component: PreferencesComponent,\n data: { titleId: \"preferences\" } satisfies DataProperties,\n },\n {\n path: \"security\",\n loadChildren: () => SecurityRoutingModule,\n },\n {\n path: \"domain-rules\",\n component: DomainRulesComponent,\n data: { titleId: \"domainRules\" } satisfies DataProperties,\n },\n {\n path: \"subscription\",\n loadChildren: () =>\n import(\"./billing/individual/individual-billing.module\").then(\n (m) => m.IndividualBillingModule,\n ),\n },\n {\n path: \"emergency-access\",\n children: [\n {\n path: \"\",\n component: EmergencyAccessComponent,\n data: { titleId: \"emergencyAccess\" } satisfies DataProperties,\n },\n {\n path: \":id\",\n component: EmergencyAccessViewComponent,\n data: { titleId: \"emergencyAccess\" } satisfies DataProperties,\n },\n ],\n },\n {\n path: \"sponsored-families\",\n component: SponsoredFamiliesComponent,\n data: { titleId: \"sponsoredFamilies\" } satisfies DataProperties,\n },\n ],\n },\n {\n path: \"tools\",\n canActivate: [AuthGuard],\n children: [\n { path: \"\", pathMatch: \"full\", redirectTo: \"generator\" },\n {\n path: \"import\",\n loadComponent: () =>\n import(\"./tools/import/import-web.component\").then((mod) => mod.ImportWebComponent),\n data: {\n titleId: \"importData\",\n } satisfies DataProperties,\n },\n {\n path: \"export\",\n loadComponent: () =>\n import(\"./tools/vault-export/export-web.component\").then(\n (mod) => mod.ExportWebComponent,\n ),\n data: {\n titleId: \"exportVault\",\n } satisfies DataProperties,\n },\n {\n path: \"generator\",\n component: GeneratorComponent,\n data: { titleId: \"generator\" } satisfies DataProperties,\n },\n ],\n },\n {\n path: \"reports\",\n loadChildren: () => ReportsModule,\n },\n { path: \"setup/families-for-enterprise\", component: FamiliesForEnterpriseSetupComponent },\n ],\n },\n {\n path: \"organizations\",\n loadChildren: () =>\n import(\"./admin-console/organizations/organization.module\").then((m) => m.OrganizationModule),\n },\n];\n\n@NgModule({\n imports: [\n RouterModule.forRoot(routes, {\n useHash: true,\n paramsInheritanceStrategy: \"always\",\n // enableTracing: true,\n }),\n ],\n exports: [RouterModule],\n})\nexport class OssRoutingModule {}\n\nexport function buildFlaggedRoute(flagName: keyof Flags, route: Route): Route {\n return flagEnabled(flagName)\n ? route\n : {\n path: route.path,\n redirectTo: \"/\",\n };\n}\n","import { Type, inject } from \"@angular/core\";\nimport { Route, Routes } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { componentRouteSwap } from \"./component-route-swap\";\n/**\n * Helper function to swap between two components based on the TwoFactorComponentRefactor feature flag.\n * @param defaultComponent - The current non-refactored component to render.\n * @param refreshedComponent - The new refactored component to render.\n * @param defaultOptions - The options to apply to the default component and the refactored component, if alt options are not provided.\n * @param altOptions - The options to apply to the refactored component.\n */\nexport function twofactorRefactorSwap(\n defaultComponent: Type,\n refreshedComponent: Type,\n defaultOptions: Route,\n altOptions?: Route,\n): Routes {\n return componentRouteSwap(\n defaultComponent,\n refreshedComponent,\n async () => {\n const configService = inject(ConfigService);\n return configService.getFeatureFlag(FeatureFlag.TwoFactorComponentRefactor);\n },\n defaultOptions,\n altOptions,\n );\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { CheckboxModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../app/shared\";\n\nimport { LoginDecryptionOptionsComponent } from \"./login-decryption-options/login-decryption-options.component\";\nimport { LoginViaAuthRequestComponent } from \"./login-via-auth-request.component\";\nimport { LoginViaWebAuthnComponent } from \"./login-via-webauthn/login-via-webauthn.component\";\nimport { LoginComponent } from \"./login.component\";\n\n@NgModule({\n imports: [SharedModule, CheckboxModule],\n declarations: [\n LoginComponent,\n LoginViaAuthRequestComponent,\n LoginDecryptionOptionsComponent,\n LoginViaWebAuthnComponent,\n ],\n exports: [\n LoginComponent,\n LoginViaAuthRequestComponent,\n LoginDecryptionOptionsComponent,\n LoginViaWebAuthnComponent,\n ],\n})\nexport class LoginModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { VerticalStepContentComponent } from \"./vertical-step-content.component\";\nimport { VerticalStep } from \"./vertical-step.component\";\nimport { VerticalStepperComponent } from \"./vertical-stepper.component\";\n\n@NgModule({\n imports: [SharedModule],\n declarations: [VerticalStepperComponent, VerticalStep, VerticalStepContentComponent],\n exports: [VerticalStepperComponent, VerticalStep],\n})\nexport class VerticalStepperModule {}\n","import { CdkStepperModule } from \"@angular/cdk/stepper\";\nimport { TitleCasePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { FormFieldModule } from \"@bitwarden/components\";\n\nimport { OrganizationCreateModule } from \"../../admin-console/organizations/create/organization-create.module\";\nimport { RegisterFormModule } from \"../../auth/register-form/register-form.module\";\nimport { SecretsManagerTrialFreeStepperComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component\";\nimport { SecretsManagerTrialPaidStepperComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component\";\nimport { SecretsManagerTrialComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial.component\";\nimport { PaymentComponent, TaxInfoComponent } from \"../../billing\";\nimport { TrialBillingStepComponent } from \"../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { EnvironmentSelectorModule } from \"../../components/environment-selector/environment-selector.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { ConfirmationDetailsComponent } from \"./confirmation-details.component\";\nimport { AbmEnterpriseContentComponent } from \"./content/abm-enterprise-content.component\";\nimport { AbmTeamsContentComponent } from \"./content/abm-teams-content.component\";\nimport { CnetEnterpriseContentComponent } from \"./content/cnet-enterprise-content.component\";\nimport { CnetIndividualContentComponent } from \"./content/cnet-individual-content.component\";\nimport { CnetTeamsContentComponent } from \"./content/cnet-teams-content.component\";\nimport { DefaultContentComponent } from \"./content/default-content.component\";\nimport { EnterpriseContentComponent } from \"./content/enterprise-content.component\";\nimport { Enterprise1ContentComponent } from \"./content/enterprise1-content.component\";\nimport { Enterprise2ContentComponent } from \"./content/enterprise2-content.component\";\nimport { LogoBadgesComponent } from \"./content/logo-badges.component\";\nimport { LogoCnet5StarsComponent } from \"./content/logo-cnet-5-stars.component\";\nimport { LogoCnetComponent } from \"./content/logo-cnet.component\";\nimport { LogoForbesComponent } from \"./content/logo-forbes.component\";\nimport { LogoUSNewsComponent } from \"./content/logo-us-news.component\";\nimport { ReviewBlurbComponent } from \"./content/review-blurb.component\";\nimport { ReviewLogoComponent } from \"./content/review-logo.component\";\nimport { SecretsManagerContentComponent } from \"./content/secrets-manager-content.component\";\nimport { TeamsContentComponent } from \"./content/teams-content.component\";\nimport { Teams1ContentComponent } from \"./content/teams1-content.component\";\nimport { Teams2ContentComponent } from \"./content/teams2-content.component\";\nimport { Teams3ContentComponent } from \"./content/teams3-content.component\";\nimport { TrialInitiationComponent } from \"./trial-initiation.component\";\nimport { VerticalStepperModule } from \"./vertical-stepper/vertical-stepper.module\";\n\n@NgModule({\n imports: [\n SharedModule,\n CdkStepperModule,\n VerticalStepperModule,\n FormFieldModule,\n RegisterFormModule,\n OrganizationCreateModule,\n EnvironmentSelectorModule,\n PaymentComponent,\n TaxInfoComponent,\n TrialBillingStepComponent,\n ],\n declarations: [\n TrialInitiationComponent,\n EnterpriseContentComponent,\n TeamsContentComponent,\n ConfirmationDetailsComponent,\n DefaultContentComponent,\n EnterpriseContentComponent,\n Enterprise1ContentComponent,\n Enterprise2ContentComponent,\n TeamsContentComponent,\n Teams1ContentComponent,\n Teams2ContentComponent,\n Teams3ContentComponent,\n CnetEnterpriseContentComponent,\n CnetIndividualContentComponent,\n CnetTeamsContentComponent,\n AbmEnterpriseContentComponent,\n AbmTeamsContentComponent,\n LogoBadgesComponent,\n LogoCnet5StarsComponent,\n LogoCnetComponent,\n LogoForbesComponent,\n LogoUSNewsComponent,\n ReviewLogoComponent,\n SecretsManagerContentComponent,\n ReviewBlurbComponent,\n SecretsManagerTrialComponent,\n SecretsManagerTrialFreeStepperComponent,\n SecretsManagerTrialPaidStepperComponent,\n ],\n exports: [TrialInitiationComponent],\n providers: [TitleCasePipe],\n})\nexport class TrialInitiationModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { AuthModule } from \"./auth\";\nimport { LoginModule } from \"./auth/login/login.module\";\nimport { TrialInitiationModule } from \"./auth/trial-initiation/trial-initiation.module\";\nimport { LooseComponentsModule, SharedModule } from \"./shared\";\nimport { AccessComponent } from \"./tools/send/access.component\";\nimport { OrganizationBadgeModule } from \"./vault/individual-vault/organization-badge/organization-badge.module\";\nimport { VaultFilterModule } from \"./vault/individual-vault/vault-filter/vault-filter.module\";\n\n@NgModule({\n imports: [\n SharedModule,\n LooseComponentsModule,\n TrialInitiationModule,\n VaultFilterModule,\n OrganizationBadgeModule,\n LoginModule,\n AuthModule,\n AccessComponent,\n ],\n exports: [\n SharedModule,\n LooseComponentsModule,\n TrialInitiationModule,\n VaultFilterModule,\n OrganizationBadgeModule,\n LoginModule,\n AccessComponent,\n ],\n bootstrap: [],\n})\nexport class OssModule {}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nconst routes: Routes = [{ path: \"**\", redirectTo: \"\" }];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class WildcardRoutingModule {}\n","import { Injectable } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class IsEnterpriseOrgGuard implements CanActivate {\n constructor(\n private router: Router,\n private organizationService: OrganizationService,\n private dialogService: DialogService,\n private configService: ConfigService,\n ) {}\n\n async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\n const isMemberAccessReportEnabled = await firstValueFrom(\n this.configService.getFeatureFlag$(FeatureFlag.MemberAccessReport),\n );\n\n // TODO: Remove on \"MemberAccessReport\" feature flag cleanup\n if (!isMemberAccessReportEnabled) {\n return this.router.createUrlTree([\"/\"]);\n }\n\n const org = await this.organizationService.get(route.params.organizationId);\n\n if (org == null) {\n return this.router.createUrlTree([\"/\"]);\n }\n\n if (org.productTierType != ProductTierType.Enterprise) {\n // Users without billing permission can't access billing\n if (!org.canEditSubscription) {\n await this.dialogService.openSimpleDialog({\n title: { key: \"upgradeOrganizationEnterprise\" },\n content: { key: \"onlyAvailableForEnterpriseOrganization\" },\n acceptButtonText: { key: \"ok\" },\n cancelButtonText: null,\n type: \"info\",\n });\n return false;\n } else {\n const upgradeConfirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"upgradeOrganizationEnterprise\" },\n content: { key: \"onlyAvailableForEnterpriseOrganization\" },\n acceptButtonText: { key: \"upgradeOrganization\" },\n type: \"info\",\n icon: \"bwi-arrow-circle-up\",\n });\n if (upgradeConfirmed) {\n await this.router.navigate([\"organizations\", org.id, \"billing\", \"subscription\"], {\n queryParams: { upgrade: true },\n });\n }\n }\n }\n\n return org.productTierType == ProductTierType.Enterprise;\n }\n}\n","import { SsoConfigApi } from \"../api/sso-config.api\";\n\nexport class OrganizationSsoRequest {\n enabled = false;\n identifier: string;\n data: SsoConfigApi;\n}\n","import { View } from \"../../../models/view/view\";\nimport {\n MemberDecryptionType,\n OpenIdConnectRedirectBehavior,\n Saml2BindingType,\n Saml2NameIdFormat,\n Saml2SigningBehavior,\n SsoType,\n} from \"../../enums/sso\";\nimport { OrganizationSsoResponse } from \"../response/organization-sso.response\";\n\nexport class SsoConfigView extends View {\n enabled: boolean;\n ssoIdentifier: string;\n\n configType: SsoType;\n\n memberDecryptionType: MemberDecryptionType;\n keyConnectorUrl: string;\n\n openId: {\n authority: string;\n clientId: string;\n clientSecret: string;\n metadataAddress: string;\n redirectBehavior: OpenIdConnectRedirectBehavior;\n getClaimsFromUserInfoEndpoint: boolean;\n additionalScopes: string;\n additionalUserIdClaimTypes: string;\n additionalEmailClaimTypes: string;\n additionalNameClaimTypes: string;\n acrValues: string;\n expectedReturnAcrValue: string;\n };\n\n saml: {\n spUniqueEntityId: boolean;\n spNameIdFormat: Saml2NameIdFormat;\n spOutboundSigningAlgorithm: string;\n spSigningBehavior: Saml2SigningBehavior;\n spMinIncomingSigningAlgorithm: string;\n spWantAssertionsSigned: boolean;\n spValidateCertificates: boolean;\n\n idpEntityId: string;\n idpBindingType: Saml2BindingType;\n idpSingleSignOnServiceUrl: string;\n idpSingleLogoutServiceUrl: string;\n idpX509PublicCert: string;\n idpOutboundSigningAlgorithm: string;\n idpAllowUnsolicitedAuthnResponse: boolean;\n idpAllowOutboundLogoutRequests: boolean;\n idpWantAuthnRequestsSigned: boolean;\n };\n\n constructor(orgSsoResponse: OrganizationSsoResponse) {\n super();\n\n if (orgSsoResponse == null) {\n return;\n }\n\n this.enabled = orgSsoResponse.enabled;\n this.ssoIdentifier = orgSsoResponse.identifier;\n\n if (orgSsoResponse.data == null) {\n return;\n }\n\n this.configType = orgSsoResponse.data.configType;\n this.memberDecryptionType = orgSsoResponse.data.memberDecryptionType;\n\n this.keyConnectorUrl = orgSsoResponse.data.keyConnectorUrl;\n\n if (this.configType === SsoType.OpenIdConnect) {\n this.openId = {\n authority: orgSsoResponse.data.authority,\n clientId: orgSsoResponse.data.clientId,\n clientSecret: orgSsoResponse.data.clientSecret,\n metadataAddress: orgSsoResponse.data.metadataAddress,\n redirectBehavior: orgSsoResponse.data.redirectBehavior,\n getClaimsFromUserInfoEndpoint: orgSsoResponse.data.getClaimsFromUserInfoEndpoint,\n additionalScopes: orgSsoResponse.data.additionalScopes,\n additionalUserIdClaimTypes: orgSsoResponse.data.additionalUserIdClaimTypes,\n additionalEmailClaimTypes: orgSsoResponse.data.additionalEmailClaimTypes,\n additionalNameClaimTypes: orgSsoResponse.data.additionalNameClaimTypes,\n acrValues: orgSsoResponse.data.acrValues,\n expectedReturnAcrValue: orgSsoResponse.data.expectedReturnAcrValue,\n };\n } else if (this.configType === SsoType.Saml2) {\n this.saml = {\n spUniqueEntityId: orgSsoResponse.data.spUniqueEntityId,\n spNameIdFormat: orgSsoResponse.data.spNameIdFormat,\n spOutboundSigningAlgorithm: orgSsoResponse.data.spOutboundSigningAlgorithm,\n spSigningBehavior: orgSsoResponse.data.spSigningBehavior,\n spMinIncomingSigningAlgorithm: orgSsoResponse.data.spMinIncomingSigningAlgorithm,\n spWantAssertionsSigned: orgSsoResponse.data.spWantAssertionsSigned,\n spValidateCertificates: orgSsoResponse.data.spValidateCertificates,\n\n idpEntityId: orgSsoResponse.data.idpEntityId,\n idpBindingType: orgSsoResponse.data.idpBindingType,\n idpSingleSignOnServiceUrl: orgSsoResponse.data.idpSingleSignOnServiceUrl,\n idpSingleLogoutServiceUrl: orgSsoResponse.data.idpSingleLogoutServiceUrl,\n idpX509PublicCert: orgSsoResponse.data.idpX509PublicCert,\n idpOutboundSigningAlgorithm: orgSsoResponse.data.idpOutboundSigningAlgorithm,\n idpAllowUnsolicitedAuthnResponse: orgSsoResponse.data.idpAllowUnsolicitedAuthnResponse,\n idpWantAuthnRequestsSigned: orgSsoResponse.data.idpWantAuthnRequestsSigned,\n\n // Value is inverted in the view model (allow instead of disable)\n idpAllowOutboundLogoutRequests:\n orgSsoResponse.data.idpDisableOutboundLogoutRequests == null\n ? null\n : !orgSsoResponse.data.idpDisableOutboundLogoutRequests,\n };\n }\n }\n}\n","import { Directive, HostListener, Input } from \"@angular/core\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Directive({\n selector: \"[appLaunchClick]\",\n})\nexport class LaunchClickDirective {\n constructor(private platformUtilsService: PlatformUtilsService) {}\n\n @Input(\"appLaunchClick\") uriToLaunch = \"\";\n\n @HostListener(\"click\") onClick() {\n if (!Utils.isNullOrWhitespace(this.uriToLaunch)) {\n this.platformUtilsService.launchUri(this.uriToLaunch);\n }\n }\n}\n","\n\n\n \n \n {{ \"loading\" | i18n }}\n \n\n
    \n

    \n {{ \"ssoPolicyHelpStart\" | i18n }}\n {{ \"ssoPolicyHelpAnchor\" | i18n }}\n {{ \"ssoPolicyHelpEnd\" | i18n }}\n
    \n

    \n\n \n \n \n {{ \"allowSso\" | i18n }}\n \n {{ \"allowSsoDesc\" | i18n }}\n \n\n \n {{ \"ssoIdentifier\" | i18n }}\n \n \n {{ \"ssoIdentifierHintPartOne\" | i18n }}\n {{ \"domainVerification\" | i18n }}\n \n \n\n
    \n\n \n {{ \"memberDecryptionOption\" | i18n }}\n\n \n {{ \"masterPass\" | i18n }}\n \n\n \n \n {{ \"keyConnector\" | i18n }}\n \n \n \n \n \n {{ \"memberDecryptionKeyConnectorDescStart\" | i18n }}\n {{ \"memberDecryptionKeyConnectorDescLink\" | i18n }}\n {{ \"memberDecryptionKeyConnectorDescEnd\" | i18n }}\n \n \n\n \n \n {{ \"trustedDevices\" | i18n }}\n \n \n {{ \"memberDecryptionOptionTdeDescriptionPartOne\" | i18n }}\n {{\n \"memberDecryptionOptionTdeDescriptionLinkOne\" | i18n\n }}\n {{ \"memberDecryptionOptionTdeDescriptionPartTwo\" | i18n }}\n {{\n \"memberDecryptionOptionTdeDescriptionLinkTwo\" | i18n\n }}\n {{ \"memberDecryptionOptionTdeDescriptionPartThree\" | i18n }}\n {{\n \"memberDecryptionOptionTdeDescriptionLinkThree\" | i18n\n }}\n {{ \"memberDecryptionOptionTdeDescriptionPartFour\" | i18n }}\n \n \n \n\n \n \n \n {{ \"keyConnectorWarning\" | i18n }}\n \n\n \n {{ \"keyConnectorUrl\" | i18n }}\n \n \n \n \n {{ \"keyConnectorTest\" | i18n }}\n \n \n \n \n \n {{ \"keyConnectorTestSuccess\" | i18n }}\n \n \n \n
    \n\n
    \n\n \n {{ \"type\" | i18n }}\n \n \n \n\n \n \n
    \n

    {{ \"openIdConnectConfig\" | i18n }}

    \n\n \n {{ \"callbackPath\" | i18n }}\n \n \n \n\n \n {{ \"signedOutCallbackPath\" | i18n }}\n \n \n \n\n \n {{ \"authority\" | i18n }}\n \n \n\n \n {{ \"clientId\" | i18n }}\n \n \n\n \n {{ \"clientSecret\" | i18n }}\n \n \n\n \n {{ \"metadataAddress\" | i18n }}\n \n {{ \"openIdAuthorityRequired\" | i18n }}\n \n\n \n {{ \"oidcRedirectBehavior\" | i18n }}\n \n \n\n \n {{ \"getClaimsFromUserInfoEndpoint\" | i18n }}\n \n \n\n \n \n

    \n {{ \"openIdOptionalCustomizations\" | i18n }}\n

    \n \n \n \n
    \n
    \n \n {{ \"additionalScopes\" | i18n }}\n \n {{ \"separateMultipleWithComma\" | i18n }}\n \n\n \n {{ \"additionalUserIdClaimTypes\" | i18n }}\n \n {{ \"separateMultipleWithComma\" | i18n }}\n \n\n \n {{ \"additionalEmailClaimTypes\" | i18n }}\n \n {{ \"separateMultipleWithComma\" | i18n }}\n \n\n \n {{ \"additionalNameClaimTypes\" | i18n }}\n \n {{ \"separateMultipleWithComma\" | i18n }}\n \n\n \n {{ \"acrValues\" | i18n }}\n \n acr_values\n \n\n \n {{ \"expectedReturnAcrValue\" | i18n }}\n \n acr_validaton\n \n
    \n \n \n\n \n
    \n \n
    \n

    {{ \"samlSpConfig\" | i18n }}

    \n\n \n {{ \"spUniqueEntityId\" | i18n }}\n \n {{ \"spUniqueEntityIdDesc\" | i18n }}\n \n\n \n {{ \"spEntityId\" | i18n }}\n \n \n \n\n \n {{ \"spEntityId\" | i18n }}\n \n \n \n\n \n {{ \"spMetadataUrl\" | i18n }}\n \n \n \n \n \n \n\n \n {{ \"spAcsUrl\" | i18n }}\n \n \n \n\n \n {{ \"spNameIdFormat\" | i18n }}\n \n \n\n \n {{ \"spOutboundSigningAlgorithm\" | i18n }}\n \n \n\n \n {{ \"spSigningBehavior\" | i18n }}\n \n \n\n \n {{ \"spMinIncomingSigningAlgorithm\" | i18n }}\n \n \n\n \n {{ \"spWantAssertionsSigned\" | i18n }}\n \n \n\n \n {{ \"spValidateCertificates\" | i18n }}\n \n \n
    \n\n \n
    \n

    {{ \"samlIdpConfig\" | i18n }}

    \n\n \n {{ \"idpEntityId\" | i18n }}\n \n \n\n \n {{ \"idpBindingType\" | i18n }}\n \n \n\n \n {{ \"idpSingleSignOnServiceUrl\" | i18n }}\n \n {{ \"idpSingleSignOnServiceUrlRequired\" | i18n }}\n \n\n \n {{ \"idpSingleLogoutServiceUrl\" | i18n }}\n \n \n\n \n {{ \"idpX509PublicCert\" | i18n }}\n \n \n\n \n {{ \"idpOutboundSigningAlgorithm\" | i18n }}\n \n \n\n \n \n\n \n {{ \"idpAllowOutboundLogoutRequests\" | i18n }}\n \n \n\n \n {{ \"idpSignAuthenticationRequests\" | i18n }}\n \n \n
    \n
    \n\n \n \n \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n AbstractControl,\n FormBuilder,\n FormControl,\n UntypedFormGroup,\n Validators,\n} from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { concatMap, Subject, takeUntil } from \"rxjs\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport {\n MemberDecryptionType,\n OpenIdConnectRedirectBehavior,\n Saml2BindingType,\n Saml2NameIdFormat,\n Saml2SigningBehavior,\n SsoType,\n} from \"@bitwarden/common/auth/enums/sso\";\nimport { SsoConfigApi } from \"@bitwarden/common/auth/models/api/sso-config.api\";\nimport { OrganizationSsoRequest } from \"@bitwarden/common/auth/models/request/organization-sso.request\";\nimport { OrganizationSsoResponse } from \"@bitwarden/common/auth/models/response/organization-sso.response\";\nimport { SsoConfigView } from \"@bitwarden/common/auth/models/view/sso-config.view\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { ssoTypeValidator } from \"./sso-type.validator\";\n\ninterface SelectOptions {\n name: string;\n value: any;\n disabled?: boolean;\n}\n\nconst defaultSigningAlgorithm = \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\";\n\n@Component({\n selector: \"app-org-manage-sso\",\n templateUrl: \"sso.component.html\",\n})\nexport class SsoComponent implements OnInit, OnDestroy {\n readonly ssoType = SsoType;\n readonly memberDecryptionType = MemberDecryptionType;\n\n readonly ssoTypeOptions: SelectOptions[] = [\n { name: this.i18nService.t(\"selectType\"), value: SsoType.None, disabled: true },\n { name: \"OpenID Connect\", value: SsoType.OpenIdConnect },\n { name: \"SAML 2.0\", value: SsoType.Saml2 },\n ];\n\n readonly samlSigningAlgorithms = [\n \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\",\n \"http://www.w3.org/2000/09/xmldsig#rsa-sha384\",\n \"http://www.w3.org/2000/09/xmldsig#rsa-sha512\",\n ];\n\n readonly saml2SigningBehaviourOptions: SelectOptions[] = [\n {\n name: \"If IdP Wants Authn Requests Signed\",\n value: Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned,\n },\n { name: \"Always\", value: Saml2SigningBehavior.Always },\n { name: \"Never\", value: Saml2SigningBehavior.Never },\n ];\n readonly saml2BindingTypeOptions: SelectOptions[] = [\n { name: \"Redirect\", value: Saml2BindingType.HttpRedirect },\n { name: \"HTTP POST\", value: Saml2BindingType.HttpPost },\n ];\n readonly saml2NameIdFormatOptions: SelectOptions[] = [\n { name: \"Not Configured\", value: Saml2NameIdFormat.NotConfigured },\n { name: \"Unspecified\", value: Saml2NameIdFormat.Unspecified },\n { name: \"Email Address\", value: Saml2NameIdFormat.EmailAddress },\n { name: \"X.509 Subject Name\", value: Saml2NameIdFormat.X509SubjectName },\n { name: \"Windows Domain Qualified Name\", value: Saml2NameIdFormat.WindowsDomainQualifiedName },\n { name: \"Kerberos Principal Name\", value: Saml2NameIdFormat.KerberosPrincipalName },\n { name: \"Entity Identifier\", value: Saml2NameIdFormat.EntityIdentifier },\n { name: \"Persistent\", value: Saml2NameIdFormat.Persistent },\n { name: \"Transient\", value: Saml2NameIdFormat.Transient },\n ];\n\n readonly connectRedirectOptions: SelectOptions[] = [\n { name: \"Redirect GET\", value: OpenIdConnectRedirectBehavior.RedirectGet },\n { name: \"Form POST\", value: OpenIdConnectRedirectBehavior.FormPost },\n ];\n\n private destroy$ = new Subject();\n showTdeOptions = false;\n showKeyConnectorOptions = false;\n\n showOpenIdCustomizations = false;\n\n loading = true;\n haveTestedKeyConnector = false;\n organizationId: string;\n organization: Organization;\n\n callbackPath: string;\n signedOutCallbackPath: string;\n spEntityId: string;\n spEntityIdStatic: string;\n spMetadataUrl: string;\n spAcsUrl: string;\n\n protected openIdForm = this.formBuilder.group>(\n {\n authority: new FormControl(\"\", Validators.required),\n clientId: new FormControl(\"\", Validators.required),\n clientSecret: new FormControl(\"\", Validators.required),\n metadataAddress: new FormControl(),\n redirectBehavior: new FormControl(\n OpenIdConnectRedirectBehavior.RedirectGet,\n Validators.required,\n ),\n getClaimsFromUserInfoEndpoint: new FormControl(),\n additionalScopes: new FormControl(),\n additionalUserIdClaimTypes: new FormControl(),\n additionalEmailClaimTypes: new FormControl(),\n additionalNameClaimTypes: new FormControl(),\n acrValues: new FormControl(),\n expectedReturnAcrValue: new FormControl(),\n },\n {\n updateOn: \"blur\",\n },\n );\n\n protected samlForm = this.formBuilder.group>(\n {\n spUniqueEntityId: new FormControl(true, { updateOn: \"change\" }),\n spNameIdFormat: new FormControl(Saml2NameIdFormat.NotConfigured),\n spOutboundSigningAlgorithm: new FormControl(defaultSigningAlgorithm),\n spSigningBehavior: new FormControl(Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned),\n spMinIncomingSigningAlgorithm: new FormControl(defaultSigningAlgorithm),\n spWantAssertionsSigned: new FormControl(),\n spValidateCertificates: new FormControl(),\n\n idpEntityId: new FormControl(\"\", Validators.required),\n idpBindingType: new FormControl(Saml2BindingType.HttpRedirect),\n idpSingleSignOnServiceUrl: new FormControl(),\n idpSingleLogoutServiceUrl: new FormControl(),\n idpX509PublicCert: new FormControl(\"\", Validators.required),\n idpOutboundSigningAlgorithm: new FormControl(defaultSigningAlgorithm),\n idpAllowUnsolicitedAuthnResponse: new FormControl(),\n idpAllowOutboundLogoutRequests: new FormControl(true),\n idpWantAuthnRequestsSigned: new FormControl(),\n },\n {\n updateOn: \"blur\",\n },\n );\n\n protected ssoConfigForm = this.formBuilder.group>({\n configType: new FormControl(SsoType.None),\n memberDecryptionType: new FormControl(MemberDecryptionType.MasterPassword),\n keyConnectorUrl: new FormControl(\"\"),\n openId: this.openIdForm,\n saml: this.samlForm,\n enabled: new FormControl(false),\n ssoIdentifier: new FormControl(\"\", {\n validators: [Validators.maxLength(50), Validators.required],\n }),\n });\n\n get enabledCtrl() {\n return this.ssoConfigForm?.controls?.enabled as FormControl;\n }\n get ssoIdentifierCtrl() {\n return this.ssoConfigForm?.controls?.ssoIdentifier as FormControl;\n }\n get configTypeCtrl() {\n return this.ssoConfigForm?.controls?.configType as FormControl;\n }\n\n constructor(\n private formBuilder: FormBuilder,\n private route: ActivatedRoute,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private organizationService: OrganizationService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private configService: ConfigService,\n ) {}\n\n async ngOnInit() {\n this.enabledCtrl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((enabled) => {\n if (enabled) {\n this.ssoIdentifierCtrl.setValidators([Validators.maxLength(50), Validators.required]);\n this.configTypeCtrl.setValidators([\n ssoTypeValidator(this.i18nService.t(\"selectionIsRequired\")),\n ]);\n } else {\n this.ssoIdentifierCtrl.setValidators([]);\n this.configTypeCtrl.setValidators([]);\n }\n\n this.ssoIdentifierCtrl.updateValueAndValidity();\n this.configTypeCtrl.updateValueAndValidity();\n });\n\n this.ssoConfigForm\n .get(\"configType\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((newType: SsoType) => {\n if (newType === SsoType.OpenIdConnect) {\n this.openIdForm.enable();\n this.samlForm.disable();\n } else if (newType === SsoType.Saml2) {\n this.openIdForm.disable();\n this.samlForm.enable();\n } else {\n this.openIdForm.disable();\n this.samlForm.disable();\n }\n });\n\n this.samlForm\n .get(\"spSigningBehavior\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe(() => this.samlForm.get(\"idpX509PublicCert\").updateValueAndValidity());\n\n this.route.params\n .pipe(\n concatMap(async (params) => {\n this.organizationId = params.organizationId;\n await this.load();\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n\n this.showKeyConnectorOptions = this.platformUtilsService.isSelfHost();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async load() {\n this.organization = await this.organizationService.get(this.organizationId);\n const ssoSettings = await this.organizationApiService.getSso(this.organizationId);\n this.populateForm(ssoSettings);\n\n this.callbackPath = ssoSettings.urls.callbackPath;\n this.signedOutCallbackPath = ssoSettings.urls.signedOutCallbackPath;\n this.spEntityId = ssoSettings.urls.spEntityId;\n this.spEntityIdStatic = ssoSettings.urls.spEntityIdStatic;\n this.spMetadataUrl = ssoSettings.urls.spMetadataUrl;\n this.spAcsUrl = ssoSettings.urls.spAcsUrl;\n\n this.loading = false;\n }\n\n submit = async () => {\n this.updateFormValidationState(this.ssoConfigForm);\n\n if (this.ssoConfigForm.value.memberDecryptionType === MemberDecryptionType.KeyConnector) {\n this.haveTestedKeyConnector = false;\n await this.validateKeyConnectorUrl();\n }\n\n if (!this.ssoConfigForm.valid) {\n this.readOutErrors();\n return;\n }\n const request = new OrganizationSsoRequest();\n request.enabled = this.enabledCtrl.value;\n // Return null instead of empty string to avoid duplicate id errors in database\n request.identifier = this.ssoIdentifierCtrl.value === \"\" ? null : this.ssoIdentifierCtrl.value;\n request.data = SsoConfigApi.fromView(this.ssoConfigForm.getRawValue());\n\n const response = await this.organizationApiService.updateSso(this.organizationId, request);\n this.populateForm(response);\n\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"ssoSettingsSaved\"));\n };\n\n async validateKeyConnectorUrl() {\n if (this.haveTestedKeyConnector) {\n return;\n }\n\n this.keyConnectorUrl.markAsPending();\n\n try {\n await this.apiService.getKeyConnectorAlive(this.keyConnectorUrl.value);\n this.keyConnectorUrl.updateValueAndValidity();\n } catch {\n this.keyConnectorUrl.setErrors({\n invalidUrl: { message: this.i18nService.t(\"keyConnectorTestFail\") },\n });\n }\n\n this.haveTestedKeyConnector = true;\n }\n\n toggleOpenIdCustomizations() {\n this.showOpenIdCustomizations = !this.showOpenIdCustomizations;\n }\n\n getErrorCount(form: UntypedFormGroup): number {\n return Object.values(form.controls).reduce((acc: number, control: AbstractControl) => {\n if (control instanceof UntypedFormGroup) {\n return acc + this.getErrorCount(control);\n }\n\n if (control.errors == null) {\n return acc;\n }\n return acc + Object.keys(control.errors).length;\n }, 0);\n }\n\n get enableTestKeyConnector() {\n return (\n this.ssoConfigForm.value?.memberDecryptionType === MemberDecryptionType.KeyConnector &&\n !Utils.isNullOrWhitespace(this.keyConnectorUrl?.value)\n );\n }\n\n get keyConnectorUrl() {\n return this.ssoConfigForm.get(\"keyConnectorUrl\");\n }\n\n get samlSigningAlgorithmOptions(): SelectOptions[] {\n return this.samlSigningAlgorithms.map((algorithm) => ({ name: algorithm, value: algorithm }));\n }\n\n /**\n * Shows any validation errors for the form by marking all controls as dirty and touched.\n * If nested form groups are found, they are also updated.\n * @param form - the form to show validation errors for\n */\n private updateFormValidationState(form: UntypedFormGroup) {\n Object.values(form.controls).forEach((control: AbstractControl) => {\n if (control.disabled) {\n return;\n }\n\n if (control instanceof UntypedFormGroup) {\n this.updateFormValidationState(control);\n } else {\n control.markAsDirty();\n control.markAsTouched();\n control.updateValueAndValidity();\n }\n });\n }\n\n private populateForm(orgSsoResponse: OrganizationSsoResponse) {\n const ssoConfigView = new SsoConfigView(orgSsoResponse);\n this.ssoConfigForm.patchValue(ssoConfigView);\n }\n\n private readOutErrors() {\n const errorText = this.i18nService.t(\"error\");\n const errorCount = this.getErrorCount(this.ssoConfigForm);\n const errorCountText = this.i18nService.t(\n errorCount === 1 ? \"formErrorSummarySingle\" : \"formErrorSummaryPlural\",\n errorCount.toString(),\n );\n\n const div = document.createElement(\"div\");\n div.className = \"sr-only\";\n div.id = \"srErrorCount\";\n div.setAttribute(\"aria-live\", \"polite\");\n div.innerText = errorText + \": \" + errorCountText;\n\n const existing = document.getElementById(\"srErrorCount\");\n if (existing != null) {\n existing.remove();\n }\n\n document.body.append(div);\n }\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nimport { SsoType } from \"@bitwarden/common/auth/enums/sso\";\n\nexport function ssoTypeValidator(errorMessage: string): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n\n if (value === SsoType.None) {\n return {\n validSsoTypeRequired: {\n message: errorMessage,\n },\n };\n }\n\n return null;\n };\n}\n","export class OrganizationDomainRequest {\n domainName: string;\n\n constructor(domainName: string) {\n this.domainName = domainName;\n }\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\nexport function uniqueInArrayValidator(values: Array, errorMessage: string): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n\n if (!value) {\n return null;\n }\n\n const lowerTrimmedValue = value.toLowerCase().trim();\n\n // check if the entered value is unique\n if (values.some((val) => val.toLowerCase().trim() === lowerTrimmedValue)) {\n return {\n nonUniqueValue: {\n message: errorMessage,\n },\n };\n }\n\n return null;\n };\n}\n","\n \n \n {{ \"newDomain\" | i18n }}\n {{ \"verifyDomain\" | i18n }}\n\n {{\n data.orgDomain.domainName\n }}\n\n {{\n \"domainStatusUnverified\" | i18n\n }}\n {{\n \"domainStatusVerified\" | i18n\n }}\n \n
    \n \n {{ \"domainName\" | i18n }}\n \n {{ \"domainNameInputHint\" | i18n }}\n \n\n \n {{ \"dnsTxtRecord\" | i18n }}\n \n {{ \"dnsTxtRecordInputHint\" | i18n }}\n \n \n \n \n\n \n {{ \"automaticDomainVerificationProcess\" | i18n }}\n \n
    \n \n \n \n\n \n \n
    \n\n","import { DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrgDomainServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain.response\";\nimport { OrganizationDomainRequest } from \"@bitwarden/common/admin-console/services/organization-domain/requests/organization-domain.request\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { CryptoFunctionService as CryptoFunctionServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { domainNameValidator } from \"./validators/domain-name.validator\";\nimport { uniqueInArrayValidator } from \"./validators/unique-in-array.validator\";\nexport interface DomainAddEditDialogData {\n organizationId: string;\n orgDomain: OrganizationDomainResponse;\n existingDomainNames: Array;\n}\n\n@Component({\n templateUrl: \"domain-add-edit-dialog.component.html\",\n})\nexport class DomainAddEditDialogComponent implements OnInit, OnDestroy {\n private componentDestroyed$: Subject = new Subject();\n\n domainForm: FormGroup = this.formBuilder.group({\n domainName: [\n \"\",\n [\n Validators.required,\n domainNameValidator(this.i18nService.t(\"invalidDomainNameMessage\")),\n uniqueInArrayValidator(\n this.data.existingDomainNames,\n this.i18nService.t(\"duplicateDomainError\"),\n ),\n ],\n ],\n txt: [{ value: null, disabled: true }],\n });\n\n get domainNameCtrl(): FormControl {\n return this.domainForm.controls.domainName as FormControl;\n }\n get txtCtrl(): FormControl {\n return this.domainForm.controls.txt as FormControl;\n }\n\n rejectedDomainNameValidator: ValidatorFn = null;\n\n rejectedDomainNames: Array = [];\n\n constructor(\n public dialogRef: DialogRef,\n @Inject(DIALOG_DATA) public data: DomainAddEditDialogData,\n private formBuilder: FormBuilder,\n private cryptoFunctionService: CryptoFunctionServiceAbstraction,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private orgDomainApiService: OrgDomainApiServiceAbstraction,\n private orgDomainService: OrgDomainServiceAbstraction,\n private validationService: ValidationService,\n private dialogService: DialogService,\n ) {}\n\n // Angular Method Implementations\n\n async ngOnInit(): Promise {\n // If we have data.orgDomain, then editing, otherwise creating new domain\n await this.populateForm();\n }\n\n ngOnDestroy(): void {\n this.componentDestroyed$.next();\n this.componentDestroyed$.complete();\n }\n\n // End Angular Method Implementations\n\n // Form methods\n\n async populateForm(): Promise {\n if (this.data.orgDomain) {\n // Edit\n this.domainForm.patchValue(this.data.orgDomain);\n this.domainForm.disable();\n }\n\n this.setupFormListeners();\n }\n\n setupFormListeners(): void {\n // suppresses touched state on change for reactive form controls\n // Manually set touched to show validation errors as the user stypes\n this.domainForm.valueChanges.pipe(takeUntil(this.componentDestroyed$)).subscribe(() => {\n this.domainForm.markAllAsTouched();\n });\n }\n\n copyDnsTxt(): void {\n this.orgDomainService.copyDnsTxt(this.txtCtrl.value);\n }\n\n // End Form methods\n\n // Async Form Actions\n // Creates a new domain record. The DNS TXT Record will be generated server-side and returned in the response.\n saveDomain = async (): Promise => {\n if (this.domainForm.invalid) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"domainFormInvalid\"));\n return;\n }\n\n this.domainNameCtrl.disable();\n\n const request: OrganizationDomainRequest = new OrganizationDomainRequest(\n this.domainNameCtrl.value,\n );\n\n try {\n this.data.orgDomain = await this.orgDomainApiService.post(this.data.organizationId, request);\n // Patch the DNS TXT Record that was generated server-side\n this.domainForm.controls.txt.patchValue(this.data.orgDomain.txt);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainSaved\"));\n } catch (e) {\n this.handleDomainSaveError(e);\n }\n };\n\n private handleDomainSaveError(e: any): void {\n if (e instanceof ErrorResponse) {\n const errorResponse: ErrorResponse = e as ErrorResponse;\n switch (errorResponse.statusCode) {\n case HttpStatusCode.Conflict:\n if (errorResponse.message.includes(\"The domain is not available to be claimed\")) {\n // If user has attempted to claim a different rejected domain first:\n if (this.rejectedDomainNameValidator) {\n // Remove the validator:\n this.domainNameCtrl.removeValidators(this.rejectedDomainNameValidator);\n this.domainNameCtrl.updateValueAndValidity();\n }\n\n // Update rejected domain names and add new unique in validator\n // which will prevent future known bad domain name submissions.\n this.rejectedDomainNames.push(this.domainNameCtrl.value);\n\n this.rejectedDomainNameValidator = uniqueInArrayValidator(\n this.rejectedDomainNames,\n this.i18nService.t(\"domainNotAvailable\", this.domainNameCtrl.value),\n );\n\n this.domainNameCtrl.addValidators(this.rejectedDomainNameValidator);\n this.domainNameCtrl.updateValueAndValidity();\n\n // Give them another chance to enter a new domain name:\n this.domainForm.enable();\n } else {\n this.validationService.showError(errorResponse);\n }\n\n break;\n\n default:\n this.validationService.showError(errorResponse);\n break;\n }\n } else {\n this.validationService.showError(e);\n }\n }\n\n verifyDomain = async (): Promise => {\n if (this.domainForm.invalid) {\n // Note: shouldn't be possible, but going to leave this to be safe.\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"domainFormInvalid\"));\n return;\n }\n\n try {\n this.data.orgDomain = await this.orgDomainApiService.verify(\n this.data.organizationId,\n this.data.orgDomain.id,\n );\n\n if (this.data.orgDomain.verifiedDate) {\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainVerified\"));\n this.dialogRef.close();\n } else {\n this.domainNameCtrl.setErrors({\n errorPassthrough: {\n message: this.i18nService.t(\"domainNotVerified\", this.domainNameCtrl.value),\n },\n });\n // For the case where user opens dialog and reverifies when domain name formControl disabled.\n // The input directive only shows error if touched, so must manually mark as touched.\n this.domainNameCtrl.markAsTouched();\n // Update this item so the last checked date gets updated.\n await this.updateOrgDomain();\n }\n } catch (e) {\n this.handleVerifyDomainError(e, this.domainNameCtrl.value);\n // Update this item so the last checked date gets updated.\n await this.updateOrgDomain();\n }\n };\n\n private handleVerifyDomainError(e: any, domainName: string): void {\n if (e instanceof ErrorResponse) {\n const errorResponse: ErrorResponse = e as ErrorResponse;\n switch (errorResponse.statusCode) {\n case HttpStatusCode.Conflict:\n if (errorResponse.message.includes(\"The domain is not available to be claimed\")) {\n this.domainNameCtrl.setErrors({\n errorPassthrough: {\n message: this.i18nService.t(\"domainNotAvailable\", domainName),\n },\n });\n }\n break;\n\n default:\n this.validationService.showError(errorResponse);\n break;\n }\n }\n }\n\n private async updateOrgDomain() {\n // Update this item so the last checked date gets updated.\n await this.orgDomainApiService.getByOrgIdAndOrgDomainId(\n this.data.organizationId,\n this.data.orgDomain.id,\n );\n }\n\n deleteDomain = async (): Promise => {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"removeDomain\" },\n content: { key: \"removeDomainWarning\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n await this.orgDomainApiService.delete(this.data.organizationId, this.data.orgDomain.id);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainRemoved\"));\n\n this.dialogRef.close();\n };\n\n // End Async Form Actions\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nexport function domainNameValidator(errorMessage: string): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n\n if (!value) {\n return null;\n }\n\n // Domain labels (sections) are only allowed to be 63 chars in length max\n // 1st and last chars cannot be hyphens per RFC 3696 (https://www.rfc-editor.org/rfc/rfc3696#section-2)\n // We do not want any prefixes per industry standards.\n\n // Must support top-level domains and any number of subdomains.\n // / # start regex\n // ^ # start of string\n // (?!(http(s)?:\\/\\/|www\\.)) # negative lookahead to check if input doesn't match \"http://\", \"https://\" or \"www.\"\n // ( # start of capturing group for the entire domain\n // [a-zA-Z0-9] # first character of domain must be a letter or a number\n // ( # start of optional group for subdomain or domain section\n // [a-zA-Z0-9-]{0,61} # subdomain/domain section can have 0 to 61 characters that are letters, numbers, or hyphens\n // [a-zA-Z0-9] # subdomain/domain section must end with a letter or a number\n // )? # end of optional group for subdomain or domain section\n // \\. # subdomain/domain section must have a period\n // )+ # end of capturing group for the entire domain, repeatable for subdomains\n // [a-zA-Z]{2,} # domain name must have at least two letters (the domain extension)\n // $/ # end of string\n\n const validDomainNameRegex =\n /^(?!(http(s)?:\\/\\/|www\\.))([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n\n const invalid = !validDomainNameRegex.test(control.value);\n\n if (invalid) {\n return {\n invalidDomainName: {\n message: errorMessage,\n },\n };\n }\n\n return null;\n };\n}\n","\n \n\n\n\n \n {{ \"loading\" | i18n }}\n\n\n\n \n
    \n \n \n \n {{ \"name\" | i18n }}\n {{ \"status\" | i18n }}\n {{ \"lastChecked\" | i18n }}\n {{ \"options\" | i18n }}\n \n \n \n \n \n \n {{ orgDomain.domainName }}\n \n \n \n {{\n \"domainStatusUnverified\" | i18n\n }}\n {{\n \"domainStatusVerified\" | i18n\n }}\n \n \n {{ orgDomain.lastCheckedDate | date: \"medium\" }}\n \n\n \n \n \n \n \n \n \n \n {{ \"verifyDomain\" | i18n }}\n \n \n \n \n \n \n \n
    \n\n \n \"\"\n\n
    \n {{ \"noDomains\" | i18n }}\n
    \n\n
    \n \n {{ \"noDomainsSubText\" | i18n }}\n \n
    \n\n \n \n
    \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Params } from \"@angular/router\";\nimport { concatMap, Observable, Subject, take, takeUntil } from \"rxjs\";\n\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrgDomainServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain.response\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport {\n DomainAddEditDialogComponent,\n DomainAddEditDialogData,\n} from \"./domain-add-edit-dialog/domain-add-edit-dialog.component\";\n\n@Component({\n selector: \"app-org-manage-domain-verification\",\n templateUrl: \"domain-verification.component.html\",\n})\nexport class DomainVerificationComponent implements OnInit, OnDestroy {\n private componentDestroyed$ = new Subject();\n\n loading = true;\n\n organizationId: string;\n orgDomains$: Observable;\n\n constructor(\n private route: ActivatedRoute,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private orgDomainApiService: OrgDomainApiServiceAbstraction,\n private orgDomainService: OrgDomainServiceAbstraction,\n private dialogService: DialogService,\n private validationService: ValidationService,\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n async ngOnInit() {\n this.orgDomains$ = this.orgDomainService.orgDomains$;\n\n // Note: going to use concatMap as async subscribe blocks don't work as you expect and\n // as such, ESLint rejects it\n // ex: https://stackoverflow.com/a/71056380\n this.route.params\n .pipe(\n concatMap(async (params: Params) => {\n this.organizationId = params.organizationId;\n await this.load();\n }),\n takeUntil(this.componentDestroyed$),\n )\n .subscribe();\n }\n\n async load() {\n await this.orgDomainApiService.getAllByOrgId(this.organizationId);\n\n this.loading = false;\n }\n\n addDomain() {\n const domainAddEditDialogData: DomainAddEditDialogData = {\n organizationId: this.organizationId,\n orgDomain: null,\n existingDomainNames: this.getExistingDomainNames(),\n };\n\n this.dialogService.open(DomainAddEditDialogComponent, {\n data: domainAddEditDialogData,\n });\n }\n\n editDomain(orgDomain: OrganizationDomainResponse) {\n const domainAddEditDialogData: DomainAddEditDialogData = {\n organizationId: this.organizationId,\n orgDomain: orgDomain,\n existingDomainNames: this.getExistingDomainNames(),\n };\n\n this.dialogService.open(DomainAddEditDialogComponent, {\n data: domainAddEditDialogData,\n });\n }\n\n private getExistingDomainNames(): Array {\n let existingDomainNames: string[];\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n this.orgDomains$.pipe(take(1)).subscribe((orgDomains: Array) => {\n existingDomainNames = orgDomains.map((o) => o.domainName);\n });\n return existingDomainNames;\n }\n\n // Options\n\n copyDnsTxt(dnsTxt: string): void {\n this.orgDomainService.copyDnsTxt(dnsTxt);\n }\n\n async verifyDomain(orgDomainId: string, domainName: string): Promise {\n try {\n const orgDomain: OrganizationDomainResponse = await this.orgDomainApiService.verify(\n this.organizationId,\n orgDomainId,\n );\n\n if (orgDomain.verifiedDate) {\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainVerified\"));\n } else {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"domainNotVerified\", domainName),\n );\n // Update this item so the last checked date gets updated.\n await this.updateOrgDomain(orgDomainId);\n }\n } catch (e) {\n this.handleVerifyDomainError(e, domainName);\n // Update this item so the last checked date gets updated.\n await this.updateOrgDomain(orgDomainId);\n }\n }\n\n private async updateOrgDomain(orgDomainId: string) {\n // Update this item so the last checked date gets updated.\n await this.orgDomainApiService.getByOrgIdAndOrgDomainId(this.organizationId, orgDomainId);\n }\n\n private handleVerifyDomainError(e: any, domainName: string): void {\n if (e instanceof ErrorResponse) {\n const errorResponse: ErrorResponse = e as ErrorResponse;\n switch (errorResponse.statusCode) {\n case HttpStatusCode.Conflict:\n if (errorResponse.message.includes(\"The domain is not available to be claimed\")) {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"domainNotAvailable\", domainName),\n );\n }\n break;\n\n default:\n this.validationService.showError(errorResponse);\n break;\n }\n }\n }\n\n async deleteDomain(orgDomainId: string): Promise {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"removeDomain\" },\n content: { key: \"removeDomainWarning\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n await this.orgDomainApiService.delete(this.organizationId, orgDomainId);\n\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainRemoved\"));\n }\n\n ngOnDestroy(): void {\n this.componentDestroyed$.next();\n this.componentDestroyed$.complete();\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { ScimProviderType } from \"../../enums\";\n\nexport class ScimConfigApi extends BaseResponse {\n enabled: boolean;\n scimProvider: ScimProviderType;\n\n constructor(data: any) {\n super(data);\n if (data == null) {\n return;\n }\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.scimProvider = this.getResponseProperty(\"ScimProvider\");\n }\n}\n","import { ScimProviderType } from \"../../enums\";\n\nexport class ScimConfigRequest {\n constructor(\n private enabled: boolean,\n private scimProvider: ScimProviderType = null,\n ) {}\n}\n","\n\n

    {{ \"scimDescription\" | i18n }}

    \n\n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n \n {{ \"scimEnabledCheckboxDesc\" | i18n }}\n {{ \"scimEnabledCheckboxDescHelpText\" | i18n }}\n \n \n {{ \"scimUrl\" | i18n }}\n \n \n \n\n \n {{ \"scimApiKey\" | i18n }}\n \n \n \n \n {{ \"scimApiKeyHelperText\" | i18n }}\n \n\n \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { UntypedFormBuilder, FormControl } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport {\n OrganizationApiKeyType,\n OrganizationConnectionType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { ScimConfigApi } from \"@bitwarden/common/admin-console/models/api/scim-config.api\";\nimport { OrganizationApiKeyRequest } from \"@bitwarden/common/admin-console/models/request/organization-api-key.request\";\nimport { OrganizationConnectionRequest } from \"@bitwarden/common/admin-console/models/request/organization-connection.request\";\nimport { ScimConfigRequest } from \"@bitwarden/common/admin-console/models/request/scim-config.request\";\nimport { OrganizationConnectionResponse } from \"@bitwarden/common/admin-console/models/response/organization-connection.response\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-org-manage-scim\",\n templateUrl: \"scim.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class ScimComponent implements OnInit {\n loading = true;\n organizationId: string;\n existingConnectionId: string;\n enabled = new FormControl(false);\n showScimSettings = false;\n showScimKey = false;\n\n formData = this.formBuilder.group({\n endpointUrl: new FormControl({ value: \"\", disabled: true }),\n clientSecret: new FormControl({ value: \"\", disabled: true }),\n });\n\n constructor(\n private formBuilder: UntypedFormBuilder,\n private route: ActivatedRoute,\n private apiService: ApiService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n private environmentService: EnvironmentService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.parent.params.subscribe(async (params) => {\n this.organizationId = params.organizationId;\n await this.load();\n });\n }\n\n async load() {\n const connection = await this.apiService.getOrganizationConnection(\n this.organizationId,\n OrganizationConnectionType.Scim,\n ScimConfigApi,\n );\n await this.setConnectionFormValues(connection);\n }\n\n async loadApiKey() {\n const apiKeyRequest = new OrganizationApiKeyRequest();\n apiKeyRequest.type = OrganizationApiKeyType.Scim;\n apiKeyRequest.masterPasswordHash = \"N/A\";\n const apiKeyResponse = await this.organizationApiService.getOrCreateApiKey(\n this.organizationId,\n apiKeyRequest,\n );\n this.formData.setValue({\n endpointUrl: await this.getScimEndpointUrl(),\n clientSecret: apiKeyResponse.apiKey,\n });\n }\n\n copyScimUrl = async () => {\n this.platformUtilsService.copyToClipboard(await this.getScimEndpointUrl());\n };\n\n rotateScimKey = async () => {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"rotateScimKey\" },\n content: { key: \"rotateScimKeyWarning\" },\n acceptButtonText: { key: \"rotateKey\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n const request = new OrganizationApiKeyRequest();\n request.type = OrganizationApiKeyType.Scim;\n request.masterPasswordHash = \"N/A\";\n\n const response = await this.organizationApiService.rotateApiKey(this.organizationId, request);\n this.formData.setValue({\n endpointUrl: await this.getScimEndpointUrl(),\n clientSecret: response.apiKey,\n });\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"scimApiKeyRotated\"));\n };\n\n copyScimKey = async () => {\n this.platformUtilsService.copyToClipboard(this.formData.get(\"clientSecret\").value);\n };\n\n submit = async () => {\n const request = new OrganizationConnectionRequest(\n this.organizationId,\n OrganizationConnectionType.Scim,\n true,\n new ScimConfigRequest(this.enabled.value),\n );\n let response: OrganizationConnectionResponse;\n\n if (this.existingConnectionId == null) {\n response = await this.apiService.createOrganizationConnection(request, ScimConfigApi);\n } else {\n response = await this.apiService.updateOrganizationConnection(\n request,\n ScimConfigApi,\n this.existingConnectionId,\n );\n }\n\n await this.setConnectionFormValues(response);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"scimSettingsSaved\"));\n };\n\n async getScimEndpointUrl() {\n const env = await firstValueFrom(this.environmentService.environment$);\n return env.getScimUrl() + \"/\" + this.organizationId;\n }\n\n toggleScimKey = () => {\n this.showScimKey = !this.showScimKey;\n document.getElementById(\"clientSecret\").focus();\n };\n\n private async setConnectionFormValues(connection: OrganizationConnectionResponse) {\n this.existingConnectionId = connection?.id;\n if (connection !== null && connection.config?.enabled) {\n this.showScimSettings = true;\n this.enabled.setValue(true);\n this.formData.setValue({\n endpointUrl: await this.getScimEndpointUrl(),\n clientSecret: \"\",\n });\n await this.loadApiKey();\n } else {\n this.showScimSettings = false;\n this.enabled.setValue(false);\n }\n this.loading = false;\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { AuthGuard } from \"@bitwarden/angular/auth/guards\";\nimport { canAccessSettingsTab } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { IsEnterpriseOrgGuard } from \"@bitwarden/web-vault/app/admin-console/organizations/guards/is-enterprise-org.guard\";\nimport { organizationPermissionsGuard } from \"@bitwarden/web-vault/app/admin-console/organizations/guards/org-permissions.guard\";\nimport { OrganizationLayoutComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/layouts/organization-layout.component\";\n\nimport { SsoComponent } from \"../../auth/sso/sso.component\";\n\nimport { DomainVerificationComponent } from \"./manage/domain-verification/domain-verification.component\";\nimport { ScimComponent } from \"./manage/scim.component\";\n\nconst routes: Routes = [\n {\n path: \"organizations/:organizationId\",\n component: OrganizationLayoutComponent,\n canActivate: [AuthGuard, organizationPermissionsGuard()],\n children: [\n {\n path: \"settings\",\n canActivate: [organizationPermissionsGuard(canAccessSettingsTab)],\n children: [\n {\n path: \"domain-verification\",\n component: DomainVerificationComponent,\n canActivate: [organizationPermissionsGuard((org) => org.canManageDomainVerification)],\n data: {\n titleId: \"domainVerification\",\n },\n },\n {\n path: \"sso\",\n component: SsoComponent,\n canActivate: [organizationPermissionsGuard((org) => org.canManageSso)],\n data: {\n titleId: \"singleSignOn\",\n },\n },\n {\n path: \"scim\",\n component: ScimComponent,\n canActivate: [organizationPermissionsGuard((org) => org.canManageScim)],\n data: {\n titleId: \"scim\",\n },\n },\n {\n path: \"device-approvals\",\n loadComponent: () =>\n import(\"./manage/device-approvals/device-approvals.component\").then(\n (mod) => mod.DeviceApprovalsComponent,\n ),\n canActivate: [organizationPermissionsGuard((org) => org.canManageDeviceApprovals)],\n data: {\n titleId: \"deviceApprovals\",\n },\n },\n ],\n },\n {\n path: \"reporting/reports\",\n canActivate: [AuthGuard, organizationPermissionsGuard((org) => org.canAccessReports)],\n children: [\n {\n path: \"member-access-report\",\n loadComponent: () =>\n import(\n \"../../tools/reports/member-access-report/member-access-report.component\"\n ).then((mod) => mod.MemberAccessReportComponent),\n data: {\n titleId: \"memberAccessReport\",\n },\n canActivate: [IsEnterpriseOrgGuard],\n },\n ],\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class OrganizationsRoutingModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { LooseComponentsModule } from \"@bitwarden/web-vault/app/shared\";\nimport { SharedModule } from \"@bitwarden/web-vault/app/shared/shared.module\";\n\nimport { SsoComponent } from \"../../auth/sso/sso.component\";\n\nimport { DomainAddEditDialogComponent } from \"./manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component\";\nimport { DomainVerificationComponent } from \"./manage/domain-verification/domain-verification.component\";\nimport { ScimComponent } from \"./manage/scim.component\";\nimport { OrganizationsRoutingModule } from \"./organizations-routing.module\";\n\n@NgModule({\n imports: [SharedModule, OrganizationsRoutingModule, LooseComponentsModule],\n declarations: [\n SsoComponent,\n ScimComponent,\n DomainVerificationComponent,\n DomainAddEditDialogComponent,\n ],\n})\nexport class OrganizationsModule {}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ProviderPortalLogo = svgIcon`\n\n`;\n","import { Injectable } from \"@angular/core\";\n\nimport {\n StateProvider,\n AC_BANNERS_DISMISSED_DISK,\n UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\n\nexport const SHOW_BANNER_KEY = new UserKeyDefinition(\n AC_BANNERS_DISMISSED_DISK,\n \"showProviderClientVaultPrivacyBanner\",\n {\n deserializer: (b) => b,\n clearOn: [],\n },\n);\n\n/** Displays a banner warning provider users that client organization vaults\n * will soon become inaccessible directly. */\n@Injectable({ providedIn: \"root\" })\nexport class ProviderClientVaultPrivacyBannerService {\n private _showBanner = this.stateProvider.getActive(SHOW_BANNER_KEY);\n\n showBanner$ = this._showBanner.state$;\n\n constructor(private stateProvider: StateProvider) {}\n\n async hideBanner() {\n await this._showBanner.update(() => false);\n }\n}\n","\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n {{ \"providerClientVaultPrivacyNotification\" | i18n }}\n \n {{ \"contactBitwardenSupport\" | i18n }} .\n \n \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { switchMap, Observable, Subject, combineLatest, map } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { hasConsolidatedBilling } from \"@bitwarden/common/billing/abstractions/provider-billing.service.abstraction\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { BannerModule, IconModule, LinkModule } from \"@bitwarden/components\";\nimport { ProviderPortalLogo } from \"@bitwarden/web-vault/app/admin-console/icons/provider-portal-logo\";\nimport { WebLayoutModule } from \"@bitwarden/web-vault/app/layouts/web-layout.module\";\n\nimport { ProviderClientVaultPrivacyBannerService } from \"./services/provider-client-vault-privacy-banner.service\";\n\n@Component({\n selector: \"providers-layout\",\n templateUrl: \"providers-layout.component.html\",\n standalone: true,\n imports: [\n CommonModule,\n RouterModule,\n JslibModule,\n WebLayoutModule,\n IconModule,\n LinkModule,\n BannerModule,\n ],\n})\nexport class ProvidersLayoutComponent implements OnInit, OnDestroy {\n protected readonly logo = ProviderPortalLogo;\n\n private destroy$ = new Subject();\n protected provider$: Observable;\n\n protected hasConsolidatedBilling$: Observable;\n protected canAccessBilling$: Observable;\n\n protected showProviderClientVaultPrivacyWarningBanner$ = this.configService.getFeatureFlag$(\n FeatureFlag.ProviderClientVaultPrivacyBanner,\n );\n\n constructor(\n private route: ActivatedRoute,\n private providerService: ProviderService,\n private configService: ConfigService,\n protected providerClientVaultPrivacyBannerService: ProviderClientVaultPrivacyBannerService,\n ) {}\n\n ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n\n this.provider$ = this.route.params.pipe(\n switchMap((params) => this.providerService.get$(params.providerId)),\n takeUntil(this.destroy$),\n );\n\n this.hasConsolidatedBilling$ = this.provider$.pipe(\n hasConsolidatedBilling(this.configService),\n takeUntil(this.destroy$),\n );\n\n this.canAccessBilling$ = combineLatest([this.hasConsolidatedBilling$, this.provider$]).pipe(\n map(\n ([hasConsolidatedBilling, provider]) => hasConsolidatedBilling && provider.isProviderAdmin,\n ),\n takeUntil(this.destroy$),\n );\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n showManageTab(provider: Provider) {\n return provider.canManageUsers || provider.canAccessEventLogs;\n }\n\n showSettingsTab(provider: Provider) {\n return provider.isProviderAdmin;\n }\n}\n","\n\n\n

    \n \n {{ \"loading\" | i18n }}\n

    \n \n \n \n \n \n \n \n \n
    \n \n \n {{ p.name }}\n \n \n {{ \"providerIsDisabled\" | i18n }}\n \n
    \n
    \n
    \n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Component({\n selector: \"app-providers\",\n templateUrl: \"providers.component.html\",\n})\nexport class ProvidersComponent implements OnInit {\n providers: Provider[];\n loaded = false;\n actionPromise: Promise;\n\n constructor(\n private providerService: ProviderService,\n private i18nService: I18nService,\n ) {}\n\n async ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n await this.load();\n }\n\n async load() {\n const providers = await this.providerService.getAll();\n providers.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n this.providers = providers;\n this.loaded = true;\n }\n}\n","import { DatePipe } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { map, Subject, takeUntil } from \"rxjs\";\n\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { InvoiceResponse } from \"@bitwarden/common/billing/models/response/invoices.response\";\n\n@Component({\n templateUrl: \"./provider-billing-history.component.html\",\n})\nexport class ProviderBillingHistoryComponent implements OnInit, OnDestroy {\n private providerId: string;\n\n private destroy$ = new Subject();\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private billingApiService: BillingApiServiceAbstraction,\n private datePipe: DatePipe,\n ) {}\n\n getClientInvoiceReport = (invoiceId: string) =>\n this.billingApiService.getProviderClientInvoiceReport(this.providerId, invoiceId);\n\n getClientInvoiceReportName = (invoice: InvoiceResponse) => {\n const date = this.datePipe.transform(invoice.date, \"yyyyMMdd\");\n return `bitwarden_provider-billing-history_${date}_${invoice.number}`;\n };\n\n getInvoices = async () => await this.billingApiService.getProviderInvoices(this.providerId);\n\n ngOnInit() {\n this.activatedRoute.params\n .pipe(\n map(({ providerId }) => {\n this.providerId = providerId;\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","\n\n

    {{ \"invoices\" | i18n }}

    \n

    {{ \"billingHistoryDescription\" | i18n }}

    \n \n
    \n","export class ProviderAddOrganizationRequest {\n organizationId: string;\n key: string;\n}\n","import { OrganizationKeysRequest } from \"../../../admin-console/models/request/organization-keys.request\";\nimport { PlanType } from \"../../../billing/enums\";\n\nexport class CreateClientOrganizationRequest {\n name: string;\n ownerEmail: string;\n planType: PlanType;\n seats: number;\n key: string;\n keyPair: OrganizationKeysRequest;\n collectionName: string;\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { ProviderAddOrganizationRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-add-organization.request\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billilng-api.service.abstraction\";\nimport { PlanType } from \"@bitwarden/common/billing/enums\";\nimport { CreateClientOrganizationRequest } from \"@bitwarden/common/billing/models/request/create-client-organization.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\n@Injectable()\nexport class WebProviderService {\n constructor(\n private cryptoService: CryptoService,\n private syncService: SyncService,\n private apiService: ApiService,\n private i18nService: I18nService,\n private encryptService: EncryptService,\n private billingApiService: BillingApiServiceAbstraction,\n ) {}\n\n async addOrganizationToProvider(providerId: string, organizationId: string) {\n const orgKey = await this.cryptoService.getOrgKey(organizationId);\n const providerKey = await this.cryptoService.getProviderKey(providerId);\n\n const encryptedOrgKey = await this.cryptoService.encrypt(orgKey.key, providerKey);\n\n const request = new ProviderAddOrganizationRequest();\n request.organizationId = organizationId;\n request.key = encryptedOrgKey.encryptedString;\n\n const response = await this.apiService.postProviderAddOrganization(providerId, request);\n await this.syncService.fullSync(true);\n return response;\n }\n\n async createClientOrganization(\n providerId: string,\n name: string,\n ownerEmail: string,\n planType: PlanType,\n seats: number,\n ): Promise {\n const organizationKey = (await this.cryptoService.makeOrgKey())[1];\n\n const [publicKey, encryptedPrivateKey] = await this.cryptoService.makeKeyPair(organizationKey);\n\n const encryptedCollectionName = await this.encryptService.encrypt(\n this.i18nService.t(\"defaultCollection\"),\n organizationKey,\n );\n\n const providerKey = await this.cryptoService.getProviderKey(providerId);\n\n const encryptedProviderKey = await this.encryptService.encrypt(\n organizationKey.key,\n providerKey,\n );\n\n const request = new CreateClientOrganizationRequest();\n request.name = name;\n request.ownerEmail = ownerEmail;\n request.planType = planType;\n request.seats = seats;\n\n request.key = encryptedProviderKey.encryptedString;\n request.keyPair = new OrganizationKeysRequest(publicKey, encryptedPrivateKey.encryptedString);\n request.collectionName = encryptedCollectionName.encryptedString;\n\n await this.billingApiService.createClientOrganization(providerId, request);\n\n await this.apiService.refreshIdentityToken();\n\n await this.syncService.fullSync(true);\n }\n\n async detachOrganization(providerId: string, organizationId: string): Promise {\n await this.apiService.deleteProviderOrganization(providerId, organizationId);\n await this.syncService.fullSync(true);\n }\n}\n","
    \n \n \n {{ \"newClientOrganization\" | i18n }}\n \n
    \n

    {{ \"createNewClientToManageAsProvider\" | i18n }}

    \n
    \n {{ \"selectAPlan\" | i18n }}\n {{\n \"providerDiscount\" | i18n: this.discountPercentage\n }}\n
    \n \n
    \n \n
    \n \n {{ \"selected\" | i18n }}\n
    \n
    \n

    {{ planCard.name }}

    \n {{\n planCard.cost | currency: \"$\"\n }}\n / {{ \"monthPerMember\" | i18n }}\n
    \n
    \n
    \n \n \n
    \n \n \n {{ \"organizationName\" | i18n }}\n \n \n \n \n \n {{ \"clientOwnerEmail\" | i18n }}\n \n \n \n
    \n
    \n \n \n {{ \"seats\" | i18n }}\n \n \n 0\"\n >\n {{ unassignedSeats }} {{ \"unassignedSeatsDescription\" | i18n | lowercase }}\n {{ additionalSeatsPurchased }}\n {{ \"purchaseSeatDescription\" | i18n | lowercase }}\n \n \n
    \n \n \n \n \n \n
    \n
    \n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\n\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billilng-api.service.abstraction\";\nimport { PlanType } from \"@bitwarden/common/billing/enums\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { ProviderPlanResponse } from \"@bitwarden/common/billing/models/response/provider-subscription-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { WebProviderService } from \"../../../admin-console/providers/services/web-provider.service\";\n\ntype CreateClientDialogParams = {\n providerId: string;\n plans: PlanResponse[];\n};\n\nexport enum CreateClientDialogResultType {\n Closed = \"closed\",\n Submitted = \"submitted\",\n}\n\nexport const openCreateClientDialog = (\n dialogService: DialogService,\n dialogConfig: DialogConfig,\n) =>\n dialogService.open(\n CreateClientDialogComponent,\n dialogConfig,\n );\n\ntype PlanCard = {\n name: string;\n cost: number;\n type: PlanType;\n plan: PlanResponse;\n selected: boolean;\n};\n\n@Component({\n templateUrl: \"./create-client-dialog.component.html\",\n})\nexport class CreateClientDialogComponent implements OnInit {\n protected discountPercentage: number;\n protected formGroup = new FormGroup({\n clientOwnerEmail: new FormControl(\"\", [Validators.required, Validators.email]),\n organizationName: new FormControl(\"\", [Validators.required]),\n seats: new FormControl(null, [Validators.required, Validators.min(1)]),\n });\n protected loading = true;\n protected planCards: PlanCard[];\n protected ResultType = CreateClientDialogResultType;\n\n private providerPlans: ProviderPlanResponse[];\n\n constructor(\n private billingApiService: BillingApiServiceAbstraction,\n @Inject(DIALOG_DATA) private dialogParams: CreateClientDialogParams,\n private dialogRef: DialogRef,\n private i18nService: I18nService,\n private toastService: ToastService,\n private webProviderService: WebProviderService,\n ) {}\n\n protected getPlanCardContainerClasses(selected: boolean) {\n switch (selected) {\n case true: {\n return [\n \"tw-group\",\n \"tw-cursor-pointer\",\n \"tw-block\",\n \"tw-rounded\",\n \"tw-border\",\n \"tw-border-solid\",\n \"tw-border-primary-600\",\n \"hover:tw-border-primary-700\",\n \"focus:tw-border-2\",\n \"focus:tw-border-primary-700\",\n \"focus:tw-rounded-lg\",\n ];\n }\n case false: {\n return [\n \"tw-cursor-pointer\",\n \"tw-block\",\n \"tw-rounded\",\n \"tw-border\",\n \"tw-border-solid\",\n \"tw-border-secondary-300\",\n \"hover:tw-border-text-main\",\n \"focus:tw-border-2\",\n \"focus:tw-border-primary-700\",\n ];\n }\n }\n }\n\n async ngOnInit(): Promise {\n const response = await this.billingApiService.getProviderSubscription(\n this.dialogParams.providerId,\n );\n\n this.providerPlans = response?.plans ?? [];\n\n const teamsPlan = this.dialogParams.plans.find((plan) => plan.type === PlanType.TeamsMonthly);\n const enterprisePlan = this.dialogParams.plans.find(\n (plan) => plan.type === PlanType.EnterpriseMonthly,\n );\n\n this.discountPercentage = response.discountPercentage;\n const discountFactor = this.discountPercentage ? (100 - this.discountPercentage) / 100 : 1;\n\n this.planCards = [\n {\n name: this.i18nService.t(\"planNameTeams\"),\n cost: teamsPlan.PasswordManager.providerPortalSeatPrice * discountFactor,\n type: teamsPlan.type,\n plan: teamsPlan,\n selected: true,\n },\n {\n name: this.i18nService.t(\"planNameEnterprise\"),\n cost: enterprisePlan.PasswordManager.providerPortalSeatPrice * discountFactor,\n type: enterprisePlan.type,\n plan: enterprisePlan,\n selected: false,\n },\n ];\n\n this.loading = false;\n }\n\n protected selectPlan(name: string) {\n this.planCards.find((planCard) => planCard.name === name).selected = true;\n this.planCards.find((planCard) => planCard.name !== name).selected = false;\n }\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n const selectedPlanCard = this.planCards.find((planCard) => planCard.selected);\n\n await this.webProviderService.createClientOrganization(\n this.dialogParams.providerId,\n this.formGroup.value.organizationName,\n this.formGroup.value.clientOwnerEmail,\n selectedPlanCard.type,\n this.formGroup.value.seats,\n );\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"createdNewClient\"),\n });\n\n this.dialogRef.close(this.ResultType.Submitted);\n };\n\n protected get openSeats(): number {\n const selectedProviderPlan = this.getSelectedProviderPlan();\n\n if (selectedProviderPlan === null) {\n return 0;\n }\n\n return selectedProviderPlan.seatMinimum - selectedProviderPlan.assignedSeats;\n }\n\n protected get unassignedSeats(): number {\n const unassignedSeats = this.openSeats - this.formGroup.value.seats;\n\n return unassignedSeats > 0 ? unassignedSeats : 0;\n }\n\n protected get additionalSeatsPurchased(): number {\n const selectedProviderPlan = this.getSelectedProviderPlan();\n\n if (selectedProviderPlan === null) {\n return 0;\n }\n\n const selectedSeats = this.formGroup.value.seats ?? 0;\n\n const purchased = selectedSeats - this.openSeats;\n\n return purchased > 0 ? purchased : 0;\n }\n\n private getSelectedProviderPlan(): ProviderPlanResponse {\n if (this.loading || !this.planCards) {\n return null;\n }\n const selectedPlan = this.planCards.find((planCard) => planCard.selected).plan;\n return this.providerPlans.find((providerPlan) => providerPlan.planName === selectedPlan.name);\n }\n}\n","import { SelectionModel } from \"@angular/cdk/collections\";\nimport { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { BehaviorSubject, from, Subject, switchMap } from \"rxjs\";\nimport { first, takeUntil } from \"rxjs/operators\";\n\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { ProviderOrganizationOrganizationDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-organization.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService, TableDataSource, ToastService } from \"@bitwarden/components\";\n\nimport { WebProviderService } from \"../services/web-provider.service\";\n\n@Directive()\nexport abstract class BaseClientsComponent implements OnInit, OnDestroy {\n protected destroy$ = new Subject();\n\n private searchText$ = new BehaviorSubject(\"\");\n\n get searchText() {\n return this.searchText$.value;\n }\n\n set searchText(value: string) {\n this.searchText$.next(value);\n this.selection.clear();\n this.dataSource.filter = value;\n }\n\n private searching = false;\n protected scrolled = false;\n protected pageSize = 100;\n private pagedClientsCount = 0;\n protected selection = new SelectionModel(true, []);\n\n protected clients: ProviderOrganizationOrganizationDetailsResponse[];\n protected pagedClients: ProviderOrganizationOrganizationDetailsResponse[];\n protected dataSource = new TableDataSource();\n\n abstract providerId: string;\n\n protected constructor(\n protected activatedRoute: ActivatedRoute,\n protected dialogService: DialogService,\n private i18nService: I18nService,\n private searchService: SearchService,\n private toastService: ToastService,\n private validationService: ValidationService,\n private webProviderService: WebProviderService,\n ) {}\n\n abstract load(): Promise;\n\n ngOnInit() {\n this.activatedRoute.queryParams\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe((queryParams) => {\n this.searchText = queryParams.search;\n });\n\n this.searchText$\n .pipe(\n switchMap((searchText) => from(this.searchService.isSearchable(searchText))),\n takeUntil(this.destroy$),\n )\n .subscribe((isSearchable) => {\n this.searching = isSearchable;\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n isPaging() {\n if (this.searching && this.scrolled) {\n this.resetPaging();\n }\n return !this.searching && this.clients && this.clients.length > this.pageSize;\n }\n\n resetPaging() {\n this.pagedClients = [];\n this.loadMore();\n }\n\n loadMore() {\n if (!this.clients || this.clients.length <= this.pageSize) {\n return;\n }\n const pagedLength = this.pagedClients.length;\n let pagedSize = this.pageSize;\n if (pagedLength === 0 && this.pagedClientsCount > this.pageSize) {\n pagedSize = this.pagedClientsCount;\n }\n if (this.clients.length > pagedLength) {\n this.pagedClients = this.pagedClients.concat(\n this.clients.slice(pagedLength, pagedLength + pagedSize),\n );\n }\n this.pagedClientsCount = this.pagedClients.length;\n this.scrolled = this.pagedClients.length > this.pageSize;\n }\n\n async remove(organization: ProviderOrganizationOrganizationDetailsResponse) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: organization.organizationName,\n content: { key: \"detachOrganizationConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n try {\n await this.webProviderService.detachOrganization(this.providerId, organization.id);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"detachedOrganization\", organization.organizationName),\n });\n await this.load();\n } catch (e) {\n this.validationService.showError(e);\n }\n }\n}\n","export class UpdateClientOrganizationRequest {\n assignedSeats: number;\n name: string;\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billilng-api.service.abstraction\";\nimport { UpdateClientOrganizationRequest } from \"@bitwarden/common/billing/models/request/update-client-organization.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\ntype ManageClientNameDialogParams = {\n providerId: string;\n organization: {\n id: string;\n name: string;\n seats: number;\n };\n};\n\nexport enum ManageClientNameDialogResultType {\n Closed = \"closed\",\n Submitted = \"submitted\",\n}\n\nexport const openManageClientNameDialog = (\n dialogService: DialogService,\n dialogConfig: DialogConfig,\n) =>\n dialogService.open(\n ManageClientNameDialogComponent,\n dialogConfig,\n );\n\n@Component({\n templateUrl: \"manage-client-name-dialog.component.html\",\n})\nexport class ManageClientNameDialogComponent {\n protected ResultType = ManageClientNameDialogResultType;\n protected formGroup = this.formBuilder.group({\n name: [this.dialogParams.organization.name, Validators.required],\n });\n\n constructor(\n @Inject(DIALOG_DATA) protected dialogParams: ManageClientNameDialogParams,\n private billingApiService: BillingApiServiceAbstraction,\n private dialogRef: DialogRef,\n private formBuilder: FormBuilder,\n private i18nService: I18nService,\n private toastService: ToastService,\n ) {}\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n const request = new UpdateClientOrganizationRequest();\n request.assignedSeats = this.dialogParams.organization.seats;\n request.name = this.formGroup.value.name;\n\n await this.billingApiService.updateClientOrganization(\n this.dialogParams.providerId,\n this.dialogParams.organization.id,\n request,\n );\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"updatedOrganizationName\"),\n });\n\n this.dialogRef.close(this.ResultType.Submitted);\n };\n}\n","
    \n \n \n {{ \"updateName\" | i18n }}\n {{ dialogParams.organization.name }}\n \n
    \n \n \n {{ \"organizationName\" | i18n }}\n \n \n \n
    \n \n \n \n \n
    \n
    \n","
    \n \n \n {{ \"manageSeats\" | i18n }}\n {{ dialogParams.organization.organizationName }}\n \n
    \n

    {{ \"manageSeatsDescription\" | i18n }}

    \n \n \n {{ \"assignedSeats\" | i18n }}\n \n \n 0 || isServiceUserWithPurchasedSeats\">\n \n \n {{ unassignedSeats }} {{ \"unassignedSeatsDescription\" | i18n | lowercase }}\n \n {{ additionalSeatsPurchased }}\n {{ \"purchaseSeatDescription\" | i18n | lowercase }}\n
    \n \n \n \n \n \n {{ \"save\" | i18n }}\n \n \n \n
    \n
    \n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from \"@angular/forms\";\n\nimport { ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { ProviderOrganizationOrganizationDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-organization.response\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { UpdateClientOrganizationRequest } from \"@bitwarden/common/billing/models/request/update-client-organization.request\";\nimport { ProviderPlanResponse } from \"@bitwarden/common/billing/models/response/provider-subscription-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\ntype ManageClientSubscriptionDialogParams = {\n organization: ProviderOrganizationOrganizationDetailsResponse;\n provider: Provider;\n};\n\nexport enum ManageClientSubscriptionDialogResultType {\n Closed = \"closed\",\n Submitted = \"submitted\",\n}\n\nexport const openManageClientSubscriptionDialog = (\n dialogService: DialogService,\n dialogConfig: DialogConfig,\n) =>\n dialogService.open<\n ManageClientSubscriptionDialogResultType,\n ManageClientSubscriptionDialogParams\n >(ManageClientSubscriptionDialogComponent, dialogConfig);\n\n@Component({\n templateUrl: \"./manage-client-subscription-dialog.component.html\",\n})\nexport class ManageClientSubscriptionDialogComponent implements OnInit {\n protected loading = true;\n protected providerPlan: ProviderPlanResponse;\n protected openSeats: number;\n protected readonly ResultType = ManageClientSubscriptionDialogResultType;\n\n protected formGroup = new FormGroup({\n assignedSeats: new FormControl(this.dialogParams.organization.seats, [\n Validators.required,\n Validators.min(this.dialogParams.organization.occupiedSeats),\n ]),\n });\n\n constructor(\n private billingApiService: BillingApiServiceAbstraction,\n @Inject(DIALOG_DATA) protected dialogParams: ManageClientSubscriptionDialogParams,\n private dialogRef: DialogRef,\n private i18nService: I18nService,\n private toastService: ToastService,\n ) {}\n\n async ngOnInit(): Promise {\n const response = await this.billingApiService.getProviderSubscription(\n this.dialogParams.provider.id,\n );\n\n this.providerPlan = response.plans.find(\n (plan) => plan.planName === this.dialogParams.organization.plan,\n );\n\n this.openSeats = this.providerPlan.seatMinimum - this.providerPlan.assignedSeats;\n\n this.formGroup.controls.assignedSeats.addValidators(\n this.isServiceUserWithPurchasedSeats\n ? this.createPurchasedSeatsValidator()\n : this.createUnassignedSeatsValidator(),\n );\n\n this.loading = false;\n }\n\n submit = async () => {\n this.loading = true;\n\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n const request = new UpdateClientOrganizationRequest();\n request.assignedSeats = this.formGroup.value.assignedSeats;\n request.name = this.dialogParams.organization.organizationName;\n\n await this.billingApiService.updateClientOrganization(\n this.dialogParams.provider.id,\n this.dialogParams.organization.id,\n request,\n );\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"subscriptionUpdated\"),\n });\n\n this.loading = false;\n this.dialogRef.close(this.ResultType.Submitted);\n };\n\n createPurchasedSeatsValidator =\n (): ValidatorFn =>\n (formControl: FormControl): ValidationErrors | null => {\n if (this.isProviderAdmin) {\n return null;\n }\n\n const seatAdjustment = formControl.value - this.dialogParams.organization.seats;\n\n if (seatAdjustment <= 0) {\n return null;\n }\n\n return {\n insufficientPermissions: {\n message: this.i18nService.t(\"contactYourProviderForAdditionalSeats\"),\n },\n };\n };\n\n createUnassignedSeatsValidator =\n (): ValidatorFn =>\n (formControl: FormControl): ValidationErrors | null => {\n if (this.isProviderAdmin) {\n return null;\n }\n\n const seatAdjustment = formControl.value - this.dialogParams.organization.seats;\n\n if (seatAdjustment <= this.openSeats) {\n return null;\n }\n\n const unassignedSeatsAvailableMessage = this.i18nService.t(\n \"unassignedSeatsAvailable\",\n this.openSeats,\n );\n\n const contactYourProviderMessage = this.i18nService.t(\n \"contactYourProviderForAdditionalSeats\",\n );\n\n return {\n insufficientPermissions: {\n message: `${unassignedSeatsAvailableMessage} ${contactYourProviderMessage}`,\n },\n };\n };\n\n get unassignedSeats(): number {\n const seatDifference =\n this.formGroup.value.assignedSeats - this.dialogParams.organization.seats;\n\n const unassignedSeats = this.openSeats - seatDifference;\n\n return unassignedSeats >= 0 ? unassignedSeats : 0;\n }\n\n get additionalSeatsPurchased(): number {\n const seatDifference =\n this.formGroup.value.assignedSeats - this.dialogParams.organization.seats;\n\n const purchasedSeats = seatDifference - this.openSeats;\n\n return purchasedSeats > 0 ? purchasedSeats : 0;\n }\n\n get isProviderAdmin(): boolean {\n return this.dialogParams.provider.type === ProviderUserType.ProviderAdmin;\n }\n\n get isServiceUserWithPurchasedSeats(): boolean {\n return !this.isProviderAdmin && this.providerPlan && this.providerPlan.purchasedSeats > 0;\n }\n}\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { svgIcon } from \"@bitwarden/components\";\n\nconst gearIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n\n@Component({\n selector: \"app-no-clients\",\n template: `
    \n \n

    {{ \"noClients\" | i18n }}

    \n \n \n {{ \"addNewOrganization\" | i18n }}\n \n
    `,\n})\nexport class NoClientsComponent {\n icon = gearIcon;\n @Input() showAddOrganizationButton = true;\n @Output() addNewOrganizationClicked = new EventEmitter();\n\n addNewOrganization = () => this.addNewOrganizationClicked.emit();\n}\n","\n \n \n \n {{ \"addNewOrganization\" | i18n }}\n \n\n\n\n \n {{ \"loading\" | i18n }}\n\n\n\n \n \n \n {{ \"client\" | i18n }}\n {{ \"assigned\" | i18n }}\n {{ \"used\" | i18n }}\n {{ \"remaining\" | i18n }}\n {{ \"billingPlan\" | i18n }}\n \n \n \n \n \n \n \n \n \n \n \n \n {{ client.seats }}\n \n \n {{ client.occupiedSeats }}\n \n \n {{ client.remainingSeats }}\n \n \n {{ removeMonthly(client.plan) }}\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, from, lastValueFrom, map } from \"rxjs\";\nimport { switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { ProviderOrganizationOrganizationDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-organization.response\";\nimport { BillingApiServiceAbstraction as BillingApiService } from \"@bitwarden/common/billing/abstractions/billilng-api.service.abstraction\";\nimport { hasConsolidatedBilling } from \"@bitwarden/common/billing/abstractions/provider-billing.service.abstraction\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { BaseClientsComponent } from \"../../../admin-console/providers/clients/base-clients.component\";\nimport { WebProviderService } from \"../../../admin-console/providers/services/web-provider.service\";\n\nimport {\n CreateClientDialogResultType,\n openCreateClientDialog,\n} from \"./create-client-dialog.component\";\nimport {\n ManageClientNameDialogResultType,\n openManageClientNameDialog,\n} from \"./manage-client-name-dialog.component\";\nimport {\n ManageClientSubscriptionDialogResultType,\n openManageClientSubscriptionDialog,\n} from \"./manage-client-subscription-dialog.component\";\n\n@Component({\n templateUrl: \"manage-clients.component.html\",\n})\nexport class ManageClientsComponent extends BaseClientsComponent {\n providerId: string;\n provider: Provider;\n\n loading = true;\n isProviderAdmin = false;\n\n protected plans: PlanResponse[];\n\n constructor(\n private apiService: ApiService,\n private billingApiService: BillingApiService,\n private configService: ConfigService,\n private providerService: ProviderService,\n private router: Router,\n activatedRoute: ActivatedRoute,\n dialogService: DialogService,\n i18nService: I18nService,\n searchService: SearchService,\n toastService: ToastService,\n validationService: ValidationService,\n webProviderService: WebProviderService,\n ) {\n super(\n activatedRoute,\n dialogService,\n i18nService,\n searchService,\n toastService,\n validationService,\n webProviderService,\n );\n }\n\n ngOnInit() {\n this.activatedRoute.parent.params\n .pipe(\n switchMap((params) => {\n this.providerId = params.providerId;\n return this.providerService.get$(this.providerId).pipe(\n hasConsolidatedBilling(this.configService),\n map((hasConsolidatedBilling) => {\n if (!hasConsolidatedBilling) {\n return from(\n this.router.navigate([\"../clients\"], {\n relativeTo: this.activatedRoute,\n }),\n );\n } else {\n return from(this.load());\n }\n }),\n );\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n removeMonthly = (plan: string) => plan.replace(\" (Monthly)\", \"\");\n\n async load() {\n this.provider = await firstValueFrom(this.providerService.get$(this.providerId));\n\n this.isProviderAdmin = this.provider.type === ProviderUserType.ProviderAdmin;\n\n this.clients = (await this.apiService.getProviderClients(this.providerId)).data;\n\n this.dataSource.data = this.clients;\n\n this.plans = (await this.billingApiService.getPlans()).data;\n\n this.loading = false;\n }\n\n createClient = async () => {\n const reference = openCreateClientDialog(this.dialogService, {\n data: {\n providerId: this.providerId,\n plans: this.plans,\n },\n });\n\n const result = await lastValueFrom(reference.closed);\n\n if (result === CreateClientDialogResultType.Submitted) {\n await this.load();\n }\n };\n\n manageClientName = async (organization: ProviderOrganizationOrganizationDetailsResponse) => {\n const dialogRef = openManageClientNameDialog(this.dialogService, {\n data: {\n providerId: this.providerId,\n organization: {\n id: organization.id,\n name: organization.organizationName,\n seats: organization.seats,\n },\n },\n });\n\n const result = await firstValueFrom(dialogRef.closed);\n\n if (result === ManageClientNameDialogResultType.Submitted) {\n await this.load();\n }\n };\n\n manageClientSubscription = async (\n organization: ProviderOrganizationOrganizationDetailsResponse,\n ) => {\n const dialogRef = openManageClientSubscriptionDialog(this.dialogService, {\n data: {\n organization,\n provider: this.provider,\n },\n });\n\n const result = await firstValueFrom(dialogRef.closed);\n\n if (result === ManageClientSubscriptionDialogResultType.Submitted) {\n await this.load();\n }\n };\n}\n","import { inject } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivateFn, createUrlTreeFromSnapshot } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { ProviderStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nexport const hasConsolidatedBilling: CanActivateFn = async (route: ActivatedRouteSnapshot) => {\n const configService = inject(ConfigService);\n const providerService = inject(ProviderService);\n\n const provider = await firstValueFrom(providerService.get$(route.params.providerId));\n\n const consolidatedBillingEnabled = await configService.getFeatureFlag(\n FeatureFlag.EnableConsolidatedBilling,\n );\n\n if (\n !consolidatedBillingEnabled ||\n !provider ||\n provider.providerStatus !== ProviderStatusType.Billable\n ) {\n return createUrlTreeFromSnapshot(route, [\"/providers\", route.params.providerId]);\n }\n\n return true;\n};\n","import { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { TokenizedPaymentMethod } from \"@bitwarden/common/billing/models/domain\";\n\nexport class TokenizedPaymentMethodRequest {\n type: PaymentMethodType;\n token: string;\n\n static From(tokenizedPaymentMethod: TokenizedPaymentMethod): TokenizedPaymentMethodRequest {\n const request = new TokenizedPaymentMethodRequest();\n request.type = tokenizedPaymentMethod.type;\n request.token = tokenizedPaymentMethod.token;\n return request;\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, Output, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\n\nimport { SelectPaymentMethodComponent } from \"@bitwarden/angular/billing/components\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { TokenizedPaymentMethodRequest } from \"@bitwarden/common/billing/models/request/tokenized-payment-method.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\ntype ProviderSelectPaymentMethodDialogParams = {\n providerId: string;\n};\n\nexport enum ProviderSelectPaymentMethodDialogResultType {\n Closed = \"closed\",\n Submitted = \"submitted\",\n}\n\nexport const openProviderSelectPaymentMethodDialog = (\n dialogService: DialogService,\n dialogConfig: DialogConfig,\n) =>\n dialogService.open<\n ProviderSelectPaymentMethodDialogResultType,\n ProviderSelectPaymentMethodDialogParams\n >(ProviderSelectPaymentMethodDialogComponent, dialogConfig);\n\n@Component({\n templateUrl: \"provider-select-payment-method-dialog.component.html\",\n})\nexport class ProviderSelectPaymentMethodDialogComponent {\n @ViewChild(SelectPaymentMethodComponent)\n selectPaymentMethodComponent: SelectPaymentMethodComponent;\n @Output() providerPaymentMethodUpdated = new EventEmitter();\n\n protected readonly formGroup = new FormGroup({});\n protected readonly ResultType = ProviderSelectPaymentMethodDialogResultType;\n\n constructor(\n private billingApiService: BillingApiServiceAbstraction,\n @Inject(DIALOG_DATA) private dialogParams: ProviderSelectPaymentMethodDialogParams,\n private dialogRef: DialogRef,\n private i18nService: I18nService,\n private toastService: ToastService,\n ) {}\n\n submit = async () => {\n const tokenizedPaymentMethod = await this.selectPaymentMethodComponent.tokenizePaymentMethod();\n const request = TokenizedPaymentMethodRequest.From(tokenizedPaymentMethod);\n await this.billingApiService.updateProviderPaymentMethod(this.dialogParams.providerId, request);\n this.providerPaymentMethodUpdated.emit();\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"updatedPaymentMethod\"),\n });\n this.dialogRef.close(this.ResultType.Submitted);\n };\n}\n","
    \n \n \n {{ \"addPaymentMethod\" | i18n }}\n \n \n \n \n \n \n \n \n \n
    \n","import { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { MaskedPaymentMethodResponse } from \"@bitwarden/common/billing/models/response/masked-payment-method.response\";\n\nexport class MaskedPaymentMethod {\n type: PaymentMethodType;\n description: string;\n needsVerification: boolean;\n\n static from(response: MaskedPaymentMethodResponse | undefined) {\n if (response === undefined) {\n return null;\n }\n return {\n ...response,\n };\n }\n}\n","import { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\n\nexport class TaxInformation {\n country: string;\n postalCode: string;\n taxId: string;\n line1: string;\n line2: string;\n city: string;\n state: string;\n\n static empty(): TaxInformation {\n return {\n country: null,\n postalCode: null,\n taxId: null,\n line1: null,\n line2: null,\n city: null,\n state: null,\n };\n }\n\n static from(response: TaxInfoResponse | null): TaxInformation {\n if (response === null) {\n return TaxInformation.empty();\n }\n return {\n ...response,\n };\n }\n}\n","export class VerifyBankAccountRequest {\n amount1: number;\n amount2: number;\n\n constructor(amount1: number, amount2: number) {\n this.amount1 = amount1;\n this.amount2 = amount2;\n }\n}\n","\n\n \n {{ \"loading\" | i18n }}\n\n\n \n \n

    \n {{ \"accountCredit\" | i18n }}\n

    \n

    {{ accountCredit | currency: \"$\" }}

    \n

    {{ \"creditAppliedDesc\" | i18n }}

    \n \n
    \n \n \n

    {{ \"paymentMethod\" | i18n }}

    \n

    {{ \"noPaymentMethod\" | i18n }}

    \n \n \n

    \n \n {{ paymentMethodDescription }}\n

    \n
    \n \n
    \n \n \n

    {{ \"taxInformation\" | i18n }}

    \n

    {{ \"taxInformationDesc\" | i18n }}

    \n \n
    \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { from, lastValueFrom, Subject, switchMap } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { openAddAccountCreditDialog } from \"@bitwarden/angular/billing/components\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { MaskedPaymentMethod, TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { VerifyBankAccountRequest } from \"@bitwarden/common/billing/models/request/verify-bank-account.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport {\n openProviderSelectPaymentMethodDialog,\n ProviderSelectPaymentMethodDialogResultType,\n} from \"./provider-select-payment-method-dialog.component\";\n\n@Component({\n selector: \"app-provider-payment-method\",\n templateUrl: \"./provider-payment-method.component.html\",\n})\nexport class ProviderPaymentMethodComponent implements OnInit, OnDestroy {\n protected providerId: string;\n protected loading: boolean;\n\n protected accountCredit: number;\n protected maskedPaymentMethod: MaskedPaymentMethod;\n protected taxInformation: TaxInformation;\n\n private destroy$ = new Subject();\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private billingApiService: BillingApiServiceAbstraction,\n private dialogService: DialogService,\n private i18nService: I18nService,\n private toastService: ToastService,\n ) {}\n\n addAccountCredit = () =>\n openAddAccountCreditDialog(this.dialogService, {\n data: {\n providerId: this.providerId,\n },\n });\n\n changePaymentMethod = async () => {\n const dialogRef = openProviderSelectPaymentMethodDialog(this.dialogService, {\n data: {\n providerId: this.providerId,\n },\n });\n\n const result = await lastValueFrom(dialogRef.closed);\n\n if (result == ProviderSelectPaymentMethodDialogResultType.Submitted) {\n await this.load();\n }\n };\n\n async load() {\n this.loading = true;\n const paymentInformation = await this.billingApiService.getProviderPaymentInformation(\n this.providerId,\n );\n this.accountCredit = paymentInformation.accountCredit;\n this.maskedPaymentMethod = MaskedPaymentMethod.from(paymentInformation.paymentMethod);\n this.taxInformation = TaxInformation.from(paymentInformation.taxInformation);\n this.loading = false;\n }\n\n onDataUpdated = async () => await this.load();\n\n updateTaxInformation = async (taxInformation: TaxInformation) => {\n const request = ExpandedTaxInfoUpdateRequest.From(taxInformation);\n await this.billingApiService.updateProviderTaxInformation(this.providerId, request);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"updatedTaxInformation\"),\n });\n };\n\n verifyBankAccount = async (amount1: number, amount2: number) => {\n const request = new VerifyBankAccountRequest(amount1, amount2);\n await this.billingApiService.verifyProviderBankAccount(this.providerId, request);\n };\n\n ngOnInit() {\n this.activatedRoute.params\n .pipe(\n switchMap(({ providerId }) => {\n this.providerId = providerId;\n return from(this.load());\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected get hasPaymentMethod(): boolean {\n return !!this.maskedPaymentMethod;\n }\n\n protected get hasUnverifiedPaymentMethod(): boolean {\n return !!this.maskedPaymentMethod && this.maskedPaymentMethod.needsVerification;\n }\n\n protected get paymentMethodClass(): string[] {\n switch (this.maskedPaymentMethod.type) {\n case PaymentMethodType.Card:\n return [\"bwi-credit-card\"];\n case PaymentMethodType.BankAccount:\n return [\"bwi-bank\"];\n case PaymentMethodType.PayPal:\n return [\"bwi-paypal tw-text-primary\"];\n default:\n return [];\n }\n }\n\n protected get paymentMethodDescription(): string {\n let description = this.maskedPaymentMethod.description;\n if (this.maskedPaymentMethod.type === PaymentMethodType.BankAccount) {\n if (this.hasUnverifiedPaymentMethod) {\n description += \" - \" + this.i18nService.t(\"unverified\");\n } else {\n description += \" - \" + this.i18nService.t(\"verified\");\n }\n }\n return description;\n }\n}\n","\n \n

    {{ data.callout.body }}

    \n
    \n
    \n
    {{ \"billingPlan\" | i18n }}
    \n
    {{ \"providerPlan\" | i18n }}
    \n \n
    {{ data.status.label }}
    \n
    \n \n {{ data.status.value }}\n \n
    \n
    \n {{ data.date.label | titlecase }}\n
    \n
    \n {{ data.date.value | date: \"mediumDate\" }}\n
    \n
    \n
    \n
    \n","import { DatePipe } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { ProviderSubscriptionResponse } from \"@bitwarden/common/billing/models/response/provider-subscription-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\ntype ComponentData = {\n status?: {\n label: string;\n value: string;\n };\n date?: {\n label: string;\n value: string;\n };\n callout?: {\n severity: \"danger\" | \"warning\";\n header: string;\n body: string;\n };\n};\n\n@Component({\n selector: \"app-provider-subscription-status\",\n templateUrl: \"provider-subscription-status.component.html\",\n})\nexport class ProviderSubscriptionStatusComponent {\n @Input({ required: true }) subscription: ProviderSubscriptionResponse;\n\n constructor(\n private datePipe: DatePipe,\n private i18nService: I18nService,\n ) {}\n\n get status(): string {\n if (this.subscription.cancelAt && this.subscription.status === \"active\") {\n return \"pending_cancellation\";\n }\n\n return this.subscription.status;\n }\n\n get data(): ComponentData {\n const defaultStatusLabel = this.i18nService.t(\"status\");\n\n const nextChargeDateLabel = this.i18nService.t(\"nextCharge\");\n const subscriptionExpiredDateLabel = this.i18nService.t(\"subscriptionExpired\");\n const cancellationDateLabel = this.i18nService.t(\"cancellationDate\");\n\n switch (this.status) {\n case \"active\": {\n return {\n status: {\n label: defaultStatusLabel,\n value: this.i18nService.t(\"active\"),\n },\n date: {\n label: nextChargeDateLabel,\n value: this.subscription.currentPeriodEndDate,\n },\n };\n }\n case \"past_due\": {\n const pastDueText = this.i18nService.t(\"pastDue\");\n const suspensionDate = this.datePipe.transform(\n this.subscription.suspension.suspensionDate,\n \"mediumDate\",\n );\n const calloutBody =\n this.subscription.collectionMethod === \"charge_automatically\"\n ? this.i18nService.t(\n \"pastDueWarningForChargeAutomatically\",\n this.subscription.suspension.gracePeriod,\n suspensionDate,\n )\n : this.i18nService.t(\n \"pastDueWarningForSendInvoice\",\n this.subscription.suspension.gracePeriod,\n suspensionDate,\n );\n return {\n status: {\n label: defaultStatusLabel,\n value: pastDueText,\n },\n date: {\n label: subscriptionExpiredDateLabel,\n value: this.subscription.suspension.unpaidPeriodEndDate,\n },\n callout: {\n severity: \"warning\",\n header: pastDueText,\n body: calloutBody,\n },\n };\n }\n case \"unpaid\": {\n return {\n status: {\n label: defaultStatusLabel,\n value: this.i18nService.t(\"unpaid\"),\n },\n date: {\n label: subscriptionExpiredDateLabel,\n value: this.subscription.suspension.unpaidPeriodEndDate,\n },\n callout: {\n severity: \"danger\",\n header: this.i18nService.t(\"unpaidInvoice\"),\n body: this.i18nService.t(\"toReactivateYourSubscription\"),\n },\n };\n }\n case \"pending_cancellation\": {\n const pendingCancellationText = this.i18nService.t(\"pendingCancellation\");\n return {\n status: {\n label: defaultStatusLabel,\n value: pendingCancellationText,\n },\n date: {\n label: cancellationDateLabel,\n value: this.subscription.cancelAt,\n },\n callout: {\n severity: \"warning\",\n header: pendingCancellationText,\n body:\n this.i18nService.t(\"subscriptionPendingCanceled\") +\n this.i18nService.t(\"providerReinstate\"),\n },\n };\n }\n case \"incomplete_expired\":\n case \"canceled\": {\n const canceledText = this.i18nService.t(\"canceled\");\n return {\n status: {\n label: defaultStatusLabel,\n value: canceledText,\n },\n date: {\n label: cancellationDateLabel,\n value: this.subscription.currentPeriodEndDate,\n },\n callout: {\n severity: \"danger\",\n header: canceledText,\n body: this.i18nService.t(\"subscriptionCanceled\"),\n },\n };\n }\n }\n }\n}\n","\n\n \n \n {{ \"loading\" | i18n }}\n \n \n \n \n
    \n {{ \"details\" | i18n }}  {{ \"providerDiscount\" | i18n: subscription.discountPercentage }}\n \n \n \n \n \n \n {{ getFormattedPlanName(i.planName) }} {{ \"orgSeats\" | i18n }} ({{\n i.cadence.toLowerCase()\n }}) {{ \"×\" }}{{ getFormattedSeatCount(i.seatMinimum, i.purchasedSeats) }}\n @\n {{\n getFormattedCost(\n i.cost,\n i.seatMinimum,\n i.purchasedSeats,\n subscription.discountPercentage\n ) | currency: \"$\"\n }}\n \n \n {{ ((100 - subscription.discountPercentage) / 100) * i.cost | currency: \"$\" }} /{{\n \"month\" | i18n\n }}\n
    \n \n {{ i.cost | currency: \"$\" }} /{{ \"month\" | i18n }}\n \n
    \n \n \n\n \n \n \n Total: {{ totalCost | currency: \"$\" }} /{{\n \"month\" | i18n\n }}\n \n \n
    \n
    \n
    \n
    \n
    \n \n \n

    \n {{ \"accountCredit\" | i18n }}\n

    \n

    {{ subscription.accountCredit | currency: \"$\" }}

    \n

    {{ \"creditAppliedDesc\" | i18n }}

    \n \n
    \n \n \n

    {{ \"taxInformation\" | i18n }}

    \n

    {{ \"taxInformationDesc\" | i18n }}

    \n \n
    \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, concatMap, takeUntil } from \"rxjs\";\n\nimport { openAddAccountCreditDialog } from \"@bitwarden/angular/billing/components\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billilng-api.service.abstraction\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport {\n ProviderPlanResponse,\n ProviderSubscriptionResponse,\n} from \"@bitwarden/common/billing/models/response/provider-subscription-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"app-provider-subscription\",\n templateUrl: \"./provider-subscription.component.html\",\n})\nexport class ProviderSubscriptionComponent {\n providerId: string;\n subscription: ProviderSubscriptionResponse;\n\n firstLoaded = false;\n loading: boolean;\n private destroy$ = new Subject();\n totalCost: number;\n currentDate = new Date();\n\n constructor(\n private billingApiService: BillingApiServiceAbstraction,\n private dialogService: DialogService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private toastService: ToastService,\n ) {}\n\n async ngOnInit() {\n this.route.params\n .pipe(\n concatMap(async (params) => {\n this.providerId = params.providerId;\n await this.load();\n this.firstLoaded = true;\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n get isExpired() {\n return this.subscription.status !== \"active\";\n }\n\n async load() {\n if (this.loading) {\n return;\n }\n this.loading = true;\n this.subscription = await this.billingApiService.getProviderSubscription(this.providerId);\n this.totalCost =\n ((100 - this.subscription.discountPercentage) / 100) * this.sumCost(this.subscription.plans);\n this.loading = false;\n }\n\n addAccountCredit = () =>\n openAddAccountCreditDialog(this.dialogService, {\n data: {\n providerId: this.providerId,\n },\n });\n\n updateTaxInformation = async (taxInformation: TaxInformation) => {\n const request = ExpandedTaxInfoUpdateRequest.From(taxInformation);\n await this.billingApiService.updateProviderTaxInformation(this.providerId, request);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"updatedTaxInformation\"),\n });\n };\n\n getFormattedCost(\n cost: number,\n seatMinimum: number,\n purchasedSeats: number,\n discountPercentage: number,\n ): number {\n const costPerSeat = cost / (seatMinimum + purchasedSeats);\n return costPerSeat - (costPerSeat * discountPercentage) / 100;\n }\n\n getFormattedPlanName(planName: string): string {\n const spaceIndex = planName.indexOf(\" \");\n return planName.substring(0, spaceIndex);\n }\n\n getFormattedSeatCount(seatMinimum: number, purchasedSeats: number): string {\n const totalSeats = seatMinimum + purchasedSeats;\n return totalSeats > 1 ? totalSeats.toString() : \"\";\n }\n\n sumCost(plans: ProviderPlanResponse[]): number {\n return plans.reduce((acc, plan) => acc + plan.cost, 0);\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected readonly TaxInformation = TaxInformation;\n}\n","\n {{ \"addExistingOrganization\" | i18n }}\n \n \n \n \n \n \n \n \n {{ o.name }}\n \n \n \n \n \n \n \n \n \n \n \n\n","import { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\n\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { WebProviderService } from \"../services/web-provider.service\";\n\ninterface AddOrganizationDialogData {\n providerId: string;\n organizations: Organization[];\n}\n\n@Component({\n templateUrl: \"add-organization.component.html\",\n})\nexport class AddOrganizationComponent implements OnInit {\n protected provider: Provider;\n protected loading = true;\n\n constructor(\n private dialogRef: DialogRef,\n @Inject(DIALOG_DATA) protected data: AddOrganizationDialogData,\n private providerService: ProviderService,\n private webProviderService: WebProviderService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private validationService: ValidationService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n await this.load();\n }\n\n async load() {\n if (this.data.providerId == null) {\n return;\n }\n\n this.provider = await this.providerService.get(this.data.providerId);\n\n this.loading = false;\n }\n\n add(organization: Organization) {\n return async () => {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: organization.name,\n content: {\n key: \"addOrganizationConfirmation\",\n placeholders: [organization.name, this.provider.name],\n },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n await this.webProviderService.addOrganizationToProvider(\n this.data.providerId,\n organization.id,\n );\n } catch (e) {\n this.validationService.showError(e);\n return;\n }\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"organizationJoinedProvider\"),\n );\n\n this.dialogRef.close(true);\n };\n }\n\n static open(dialogService: DialogService, data: AddOrganizationDialogData) {\n return dialogService.open(AddOrganizationComponent, {\n data,\n });\n }\n}\n","\n \n \n \n {{ \"newClient\" | i18n }}\n \n \n \n {{ \"addExistingOrganization\" | i18n }}\n \n\n\n\n \n {{ \"loading\" | i18n }}\n\n\n\n

    {{ \"noClientsInList\" | i18n }}

    \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"numberOfUsers\" | i18n }}\n {{ \"billingPlan\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ o.organizationName }}\n \n \n {{ o.userCount }}\n / {{ o.seats }}\n \n \n {{ o.plan }}\n \n \n \n \n \n \n \n \n\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, from, map } from \"rxjs\";\nimport { switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { hasConsolidatedBilling } from \"@bitwarden/common/billing/abstractions/provider-billing.service.abstraction\";\nimport { PlanType } from \"@bitwarden/common/billing/enums\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { WebProviderService } from \"../services/web-provider.service\";\n\nimport { AddOrganizationComponent } from \"./add-organization.component\";\nimport { BaseClientsComponent } from \"./base-clients.component\";\n\nconst DisallowedPlanTypes = [\n PlanType.Free,\n PlanType.FamiliesAnnually2019,\n PlanType.FamiliesAnnually,\n PlanType.TeamsStarter2023,\n PlanType.TeamsStarter,\n];\n\n@Component({\n templateUrl: \"clients.component.html\",\n})\nexport class ClientsComponent extends BaseClientsComponent implements OnInit, OnDestroy {\n providerId: string;\n addableOrganizations: Organization[];\n loading = true;\n manageOrganizations = false;\n showAddExisting = false;\n\n constructor(\n private router: Router,\n private providerService: ProviderService,\n private apiService: ApiService,\n private organizationService: OrganizationService,\n private organizationApiService: OrganizationApiServiceAbstraction,\n private configService: ConfigService,\n activatedRoute: ActivatedRoute,\n dialogService: DialogService,\n i18nService: I18nService,\n searchService: SearchService,\n toastService: ToastService,\n validationService: ValidationService,\n webProviderService: WebProviderService,\n ) {\n super(\n activatedRoute,\n dialogService,\n i18nService,\n searchService,\n toastService,\n validationService,\n webProviderService,\n );\n }\n\n ngOnInit() {\n this.activatedRoute.parent.params\n .pipe(\n switchMap((params) => {\n this.providerId = params.providerId;\n return this.providerService.get$(this.providerId).pipe(\n hasConsolidatedBilling(this.configService),\n map((hasConsolidatedBilling) => {\n if (hasConsolidatedBilling) {\n return from(\n this.router.navigate([\"../manage-client-organizations\"], {\n relativeTo: this.activatedRoute,\n }),\n );\n } else {\n return from(this.load());\n }\n }),\n );\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n async load() {\n const response = await this.apiService.getProviderClients(this.providerId);\n this.clients = response.data != null && response.data.length > 0 ? response.data : [];\n this.manageOrganizations =\n (await this.providerService.get(this.providerId)).type === ProviderUserType.ProviderAdmin;\n const candidateOrgs = (await this.organizationService.getAll()).filter(\n (o) => o.isOwner && o.providerId == null,\n );\n const allowedOrgsIds = await Promise.all(\n candidateOrgs.map((o) => this.organizationApiService.get(o.id)),\n ).then((orgs) =>\n orgs.filter((o) => !DisallowedPlanTypes.includes(o.planType)).map((o) => o.id),\n );\n this.addableOrganizations = candidateOrgs.filter((o) => allowedOrgsIds.includes(o.id));\n\n this.showAddExisting = this.addableOrganizations.length !== 0;\n this.loading = false;\n }\n\n async addExistingOrganization() {\n const dialogRef = AddOrganizationComponent.open(this.dialogService, {\n providerId: this.providerId,\n organizations: this.addableOrganizations,\n });\n\n if (await firstValueFrom(dialogRef.closed)) {\n await this.load();\n }\n }\n}\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\n\nimport { OrganizationPlansComponent } from \"@bitwarden/web-vault/app/billing\";\n\n@Component({\n selector: \"app-create-organization\",\n templateUrl: \"create-organization.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class CreateOrganizationComponent implements OnInit {\n @ViewChild(OrganizationPlansComponent, { static: true })\n orgPlansComponent: OrganizationPlansComponent;\n\n providerId: string;\n\n constructor(private route: ActivatedRoute) {}\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.params.subscribe(async (params) => {\n this.providerId = params.providerId;\n });\n }\n}\n","\n

    {{ \"newClientOrganizationDesc\" | i18n }}

    \n\n","import { inject } from \"@angular/core\";\nimport {\n ActivatedRouteSnapshot,\n CanActivateFn,\n Router,\n RouterStateSnapshot,\n} from \"@angular/router\";\n\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n/**\n * `CanActivateFn` that asserts the logged in user has permission to access\n * the page being navigated to. Two high-level checks are performed:\n *\n * 1. If the user is not a member of the provider in the URL parameters, they\n * are redirected to the home screen.\n * 2. If the provider in the URL parameters is disabled and the user is not\n * an admin, they are redirected to the home screen.\n *\n * In addition to these high level checks the guard accepts a callback\n * function as an argument that will be called to check for more granular\n * permissions. Based on the return from this callback one of the following\n * will happen:\n *\n * 1. If the logged in user does not have the required permissions they are\n * redirected to `/providers`.\n * 2. If the logged in user does have the required permissions navigation\n * proceeds as expected.\n */\nexport function providerPermissionsGuard(\n permissionsCallback?: (provider: Provider) => boolean,\n): CanActivateFn {\n return async (route: ActivatedRouteSnapshot, _state: RouterStateSnapshot) => {\n const providerService = inject(ProviderService);\n const router = inject(Router);\n const platformUtilsService = inject(PlatformUtilsService);\n const i18nService = inject(I18nService);\n\n const provider = await providerService.get(route.params.providerId);\n if (provider == null) {\n return router.createUrlTree([\"/\"]);\n }\n\n if (!provider.isProviderAdmin && !provider.enabled) {\n platformUtilsService.showToast(\"error\", null, i18nService.t(\"providerIsDisabled\"));\n return router.createUrlTree([\"/\"]);\n }\n\n const hasSpecifiedPermissions = permissionsCallback == null || permissionsCallback(provider);\n\n if (!hasSpecifiedPermissions) {\n platformUtilsService.showToast(\"error\", null, i18nService.t(\"accessDenied\"));\n return router.createUrlTree([\"/providers\", provider.id]);\n }\n\n return true;\n };\n}\n","export class ProviderUserAcceptRequest {\n token: string;\n}\n","
    \n
    \n \"Bitwarden\"\n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n
    \n
    \n

    \n {{ providerName }}\n {{ email }}\n

    \n

    {{ \"joinProviderDesc\" | i18n }}

    \n
    \n
    \n \n {{ \"logIn\" | i18n }}\n \n \n {{ \"createAccount\" | i18n }}\n \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderUserAcceptRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-accept.request\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { BaseAcceptComponent } from \"@bitwarden/web-vault/app/common/base.accept.component\";\n\n@Component({\n selector: \"app-accept-provider\",\n templateUrl: \"accept-provider.component.html\",\n})\nexport class AcceptProviderComponent extends BaseAcceptComponent {\n providerName: string;\n\n failedMessage = \"providerInviteAcceptFailed\";\n\n requiredParameters = [\"providerId\", \"providerUserId\", \"token\"];\n\n constructor(\n router: Router,\n i18nService: I18nService,\n route: ActivatedRoute,\n authService: AuthService,\n private apiService: ApiService,\n platformUtilService: PlatformUtilsService,\n registerRouteService: RegisterRouteService,\n ) {\n super(router, platformUtilService, i18nService, route, authService, registerRouteService);\n }\n\n async authedHandler(qParams: Params) {\n const request = new ProviderUserAcceptRequest();\n request.token = qParams.token;\n\n await this.apiService.postProviderUserAccept(\n qParams.providerId,\n qParams.providerUserId,\n request,\n );\n this.platformUtilService.showToast(\n \"success\",\n this.i18nService.t(\"inviteAccepted\"),\n this.i18nService.t(\"providerInviteAcceptedDesc\"),\n { timeout: 10000 },\n );\n this.router.navigate([\"/vault\"]);\n }\n\n async unauthedHandler(qParams: Params) {\n this.providerName = qParams.providerName;\n }\n}\n","\n\n
    \n
    \n \n {{ \"startDate\" | i18n }}\n \n \n -\n \n {{ \"endDate\" | i18n }}\n \n \n
    \n \n {{ \"refresh\" | i18n }}\n \n \n
    \n \n {{ \"export\" | i18n }}\n \n \n \n
    \n
    \n\n \n {{ \"loading\" | i18n }}\n\n\n

    {{ \"noEventsInList\" | i18n }}

    \n \n \n \n {{ \"timestamp\" | i18n }}\n {{ \"device\" | i18n }}\n {{ \"user\" | i18n }}\n {{ \"event\" | i18n }}\n \n \n \n \n {{ e.date | date: \"medium\" }}\n \n \n {{ e.appName }}, {{ e.ip }}\n \n \n {{ e.userName }}\n \n \n \n \n \n \n \n {{ \"loadMore\" | i18n }}\n \n
    \n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { EventResponse } from \"@bitwarden/common/models/response/event.response\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { BaseEventsComponent } from \"@bitwarden/web-vault/app/admin-console/common/base.events.component\";\nimport { EventService } from \"@bitwarden/web-vault/app/core\";\nimport { EventExportService } from \"@bitwarden/web-vault/app/tools/event-export\";\n\n@Component({\n selector: \"provider-events\",\n templateUrl: \"events.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EventsComponent extends BaseEventsComponent implements OnInit {\n exportFileName = \"provider-events\";\n providerId: string;\n\n private providerUsersUserIdMap = new Map();\n private providerUsersIdMap = new Map();\n\n constructor(\n private apiService: ApiService,\n private route: ActivatedRoute,\n eventService: EventService,\n i18nService: I18nService,\n private providerService: ProviderService,\n exportService: EventExportService,\n platformUtilsService: PlatformUtilsService,\n private router: Router,\n logService: LogService,\n private userNamePipe: UserNamePipe,\n fileDownloadService: FileDownloadService,\n ) {\n super(\n eventService,\n i18nService,\n exportService,\n platformUtilsService,\n logService,\n fileDownloadService,\n );\n }\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.parent.params.subscribe(async (params) => {\n this.providerId = params.providerId;\n const provider = await this.providerService.get(this.providerId);\n if (provider == null || !provider.useEvents) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/providers\", this.providerId]);\n return;\n }\n await this.load();\n });\n }\n\n async load() {\n const response = await this.apiService.getProviderUsers(this.providerId);\n response.data.forEach((u) => {\n const name = this.userNamePipe.transform(u);\n this.providerUsersIdMap.set(u.id, { name: name, email: u.email });\n this.providerUsersUserIdMap.set(u.userId, { name: name, email: u.email });\n });\n await this.refreshEvents();\n this.loaded = true;\n }\n\n protected requestEvents(startDate: string, endDate: string, continuationToken: string) {\n return this.apiService.getEventsProvider(\n this.providerId,\n startDate,\n endDate,\n continuationToken,\n );\n }\n\n protected getUserName(r: EventResponse, userId: string) {\n if (r.installationId != null) {\n return `Installation: ${r.installationId}`;\n }\n\n if (userId != null && this.providerUsersUserIdMap.has(userId)) {\n return this.providerUsersUserIdMap.get(userId);\n }\n\n return null;\n }\n}\n","export class ProviderUserBulkRequest {\n ids: string[];\n\n constructor(ids: string[]) {\n this.ids = ids == null ? [] : ids;\n }\n}\n","export class ProviderUserConfirmRequest {\n key: string;\n}\n","import { ProviderUserType } from \"../../../enums\";\n\nexport class ProviderUserInviteRequest {\n emails: string[] = [];\n type: ProviderUserType;\n}\n","import { ProviderUserType } from \"../../../enums\";\n\nexport class ProviderUserUpdateRequest {\n type: ProviderUserType;\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserInviteRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-update.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nexport type AddEditMemberDialogParams = {\n providerId: string;\n user?: {\n id: string;\n name: string;\n type: ProviderUserType;\n };\n};\n\nexport enum AddEditMemberDialogResultType {\n Closed = \"closed\",\n Deleted = \"deleted\",\n Saved = \"saved\",\n}\n\n@Component({\n templateUrl: \"add-edit-member-dialog.component.html\",\n})\nexport class AddEditMemberDialogComponent {\n editing = false;\n loading = true;\n title: string;\n\n protected ResultType = AddEditMemberDialogResultType;\n protected UserType = ProviderUserType;\n\n protected formGroup = new FormGroup({\n emails: new FormControl(\"\", [Validators.required]),\n type: new FormControl(this.dialogParams.user?.type ?? ProviderUserType.ServiceUser),\n });\n\n constructor(\n private apiService: ApiService,\n @Inject(DIALOG_DATA) protected dialogParams: AddEditMemberDialogParams,\n private dialogRef: DialogRef,\n private dialogService: DialogService,\n private i18nService: I18nService,\n private toastService: ToastService,\n ) {\n this.editing = this.loading = this.dialogParams.user != null;\n if (this.editing) {\n this.title = this.i18nService.t(\"editMember\");\n const emailControl = this.formGroup.controls.emails;\n emailControl.removeValidators(Validators.required);\n emailControl.disable();\n } else {\n this.title = this.i18nService.t(\"inviteMember\");\n }\n\n this.loading = false;\n }\n\n delete = async (): Promise => {\n if (!this.editing) {\n return;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.dialogParams.user.name,\n content: { key: \"removeUserConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n await this.apiService.deleteProviderUser(\n this.dialogParams.providerId,\n this.dialogParams.user.id,\n );\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"removedUserId\", this.dialogParams.user.name),\n });\n\n this.dialogRef.close(AddEditMemberDialogResultType.Deleted);\n };\n\n submit = async (): Promise => {\n if (this.editing) {\n const request = new ProviderUserUpdateRequest();\n request.type = this.formGroup.value.type;\n await this.apiService.putProviderUser(\n this.dialogParams.providerId,\n this.dialogParams.user.id,\n request,\n );\n } else {\n const request = new ProviderUserInviteRequest();\n request.emails = this.formGroup.value.emails.trim().split(/\\s*,\\s*/);\n request.type = this.formGroup.value.type;\n await this.apiService.postProviderUserInvite(this.dialogParams.providerId, request);\n }\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\n this.editing ? \"editedUserId\" : \"invitedUsers\",\n this.dialogParams.user?.name,\n ),\n });\n\n this.dialogRef.close(AddEditMemberDialogResultType.Saved);\n };\n\n static open(dialogService: DialogService, dialogConfig: DialogConfig) {\n return dialogService.open(\n AddEditMemberDialogComponent,\n dialogConfig,\n );\n }\n}\n","
    \n \n \n {{ title | uppercase }}\n {{ dialogParams.user.name }}\n \n
    \n \n

    {{ \"providerInviteUserDesc\" | i18n }}

    \n
    \n \n \n {{ \"email\" | i18n }}\n \n \n {{ \"inviteMultipleEmailDesc\" | i18n: \"20\" }}\n \n
    \n
    \n \n

    \n {{ \"userType\" | i18n | uppercase }}\n \n \n \n

    \n \n \n \n {{ \"serviceUser\" | i18n }}\n \n {{ \"serviceUserDesc\" | i18n }}\n \n \n \n {{ \"providerAdmin\" | i18n }}\n \n {{ \"providerAdminDesc\" | i18n }}\n \n \n
    \n
    \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n","type ProviderUserBulkRequestEntry = {\n id: string;\n key: string;\n};\n\nexport class ProviderUserBulkConfirmRequest {\n keys: ProviderUserBulkRequestEntry[];\n\n constructor(keys: ProviderUserBulkRequestEntry[]) {\n this.keys = keys;\n }\n}\n","import { Directive, OnInit } from \"@angular/core\";\n\nimport {\n OrganizationUserBulkPublicKeyResponse,\n OrganizationUserBulkResponse,\n} from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport { ProviderUserBulkPublicKeyResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\n\nimport { BulkUserDetails } from \"./bulk-status.component\";\n\n@Directive()\nexport abstract class BaseBulkConfirmComponent implements OnInit {\n protected users: BulkUserDetails[];\n\n protected excludedUsers: BulkUserDetails[];\n protected filteredUsers: BulkUserDetails[];\n\n protected publicKeys: Map = new Map();\n protected fingerprints: Map = new Map();\n protected statuses: Map = new Map();\n\n protected done = false;\n protected loading = true;\n protected error: string;\n\n protected constructor(\n protected cryptoService: CryptoService,\n protected i18nService: I18nService,\n ) {}\n\n async ngOnInit() {\n this.excludedUsers = this.users.filter((user) => !this.isAccepted(user));\n this.filteredUsers = this.users.filter((user) => this.isAccepted(user));\n\n if (this.filteredUsers.length <= 0) {\n this.done = true;\n }\n\n const publicKeysResponse = await this.getPublicKeys();\n\n for (const entry of publicKeysResponse.data) {\n const publicKey = Utils.fromB64ToArray(entry.key);\n const fingerprint = await this.cryptoService.getFingerprint(entry.userId, publicKey);\n if (fingerprint != null) {\n this.publicKeys.set(entry.id, publicKey);\n this.fingerprints.set(entry.id, fingerprint.join(\"-\"));\n }\n }\n\n this.loading = false;\n }\n\n submit = async () => {\n this.loading = true;\n try {\n const key = await this.getCryptoKey();\n const userIdsWithKeys: { id: string; key: string }[] = [];\n\n for (const user of this.filteredUsers) {\n const publicKey = this.publicKeys.get(user.id);\n if (publicKey == null) {\n continue;\n }\n const encryptedKey = await this.cryptoService.rsaEncrypt(key.key, publicKey);\n userIdsWithKeys.push({\n id: user.id,\n key: encryptedKey.encryptedString,\n });\n }\n\n const userBulkResponse = await this.postConfirmRequest(userIdsWithKeys);\n\n userBulkResponse.data.forEach((entry) => {\n const error = entry.error !== \"\" ? entry.error : this.i18nService.t(\"bulkConfirmMessage\");\n this.statuses.set(entry.id, error);\n });\n\n this.done = true;\n } catch (e) {\n this.error = e.message;\n }\n this.loading = false;\n };\n\n protected abstract getCryptoKey(): Promise;\n protected abstract getPublicKeys(): Promise<\n ListResponse\n >;\n protected abstract isAccepted(user: BulkUserDetails): boolean;\n protected abstract postConfirmRequest(\n userIdsWithKeys: { id: string; key: string }[],\n ): Promise>;\n}\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport {\n OrganizationUserBulkPublicKeyResponse,\n OrganizationUserBulkResponse,\n} from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport { ProviderUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserBulkConfirmRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserBulkPublicKeyResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { BaseBulkConfirmComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/base-bulk-confirm.component\";\nimport { BulkUserDetails } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component\";\n\ntype BulkConfirmDialogParams = {\n providerId: string;\n users: BulkUserDetails[];\n};\n\n@Component({\n templateUrl:\n \"../../../../../../../../apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.html\",\n})\nexport class BulkConfirmDialogComponent extends BaseBulkConfirmComponent {\n providerId: string;\n\n constructor(\n private apiService: ApiService,\n protected cryptoService: CryptoService,\n @Inject(DIALOG_DATA) protected dialogParams: BulkConfirmDialogParams,\n protected i18nService: I18nService,\n ) {\n super(cryptoService, i18nService);\n\n this.providerId = dialogParams.providerId;\n this.users = dialogParams.users;\n }\n\n protected getCryptoKey = (): Promise =>\n this.cryptoService.getProviderKey(this.providerId);\n\n protected getPublicKeys = async (): Promise<\n ListResponse\n > => {\n const request = new ProviderUserBulkRequest(this.filteredUsers.map((user) => user.id));\n return await this.apiService.postProviderUsersPublicKey(this.providerId, request);\n };\n\n protected isAccepted = (user: BulkUserDetails): boolean =>\n user.status === ProviderUserStatusType.Accepted;\n\n protected postConfirmRequest = async (\n userIdsWithKeys: { id: string; key: string }[],\n ): Promise> => {\n const request = new ProviderUserBulkConfirmRequest(userIdsWithKeys);\n return await this.apiService.postProviderUserBulkConfirm(this.providerId, request);\n };\n\n static open(dialogService: DialogService, dialogConfig: DialogConfig) {\n return dialogService.open(BulkConfirmDialogComponent, dialogConfig);\n }\n}\n","import { Directive } from \"@angular/core\";\n\nimport { OrganizationUserBulkResponse } from \"@bitwarden/common/admin-console/abstractions/organization-user/responses\";\nimport { ProviderUserBulkResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Directive()\nexport abstract class BaseBulkRemoveComponent {\n protected showNoMasterPasswordWarning: boolean;\n protected statuses: Map = new Map();\n\n protected done = false;\n protected loading = false;\n protected error: string;\n\n protected constructor(protected i18nService: I18nService) {}\n\n submit = async () => {\n this.loading = true;\n try {\n const deleteUsersResponse = await this.deleteUsers();\n deleteUsersResponse.data.forEach((entry) => {\n const error = entry.error !== \"\" ? entry.error : this.i18nService.t(\"bulkRemovedMessage\");\n this.statuses.set(entry.id, error);\n });\n this.done = true;\n } catch (e) {\n this.error = e.message;\n }\n\n this.loading = false;\n };\n\n protected abstract deleteUsers(): Promise<\n ListResponse\n >;\n\n protected abstract get removeUsersWarning(): string;\n}\n","import { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserBulkResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { BaseBulkRemoveComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/base-bulk-remove.component\";\nimport { BulkUserDetails } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component\";\n\ntype BulkRemoveDialogParams = {\n providerId: string;\n users: BulkUserDetails[];\n};\n\n@Component({\n templateUrl:\n \"../../../../../../../../apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.html\",\n})\nexport class BulkRemoveDialogComponent extends BaseBulkRemoveComponent {\n providerId: string;\n users: BulkUserDetails[];\n\n constructor(\n private apiService: ApiService,\n @Inject(DIALOG_DATA) dialogParams: BulkRemoveDialogParams,\n protected i18nService: I18nService,\n ) {\n super(i18nService);\n\n this.providerId = dialogParams.providerId;\n this.users = dialogParams.users;\n }\n\n protected deleteUsers = (): Promise> => {\n const request = new ProviderUserBulkRequest(this.users.map((user) => user.id));\n return this.apiService.deleteManyProviderUsers(this.providerId, request);\n };\n\n protected get removeUsersWarning() {\n return this.i18nService.t(\"removeOrgUsersConfirmation\");\n }\n\n static open(dialogService: DialogService, dialogConfig: DialogConfig) {\n return dialogService.open(BulkRemoveDialogComponent, dialogConfig);\n }\n}\n","\n \n \n \n\n\n
    \n \n \n {{ \"all\" | i18n }}\n \n {{ allCount }}\n \n \n \n {{ \"invited\" | i18n }}\n \n {{ invitedCount }}\n \n \n \n {{ \"needsConfirmation\" | i18n }}\n \n {{ acceptedCount }}\n \n \n \n
    \n\n\n \n \n {{ \"loading\" | i18n }}\n\n\n\n

    {{ \"noMembersInList\" | i18n }}

    \n \n \n {{ \"providerUsersNeedConfirmed\" | i18n }}\n \n \n \n \n \n \n \n \n \n {{ \"name\" | i18n }}\n {{ \"role\" | i18n }}\n \n \n \n \n \n {{ \"reinviteSelected\" | i18n }}\n \n \n \n \n {{ \"confirmSelected\" | i18n }}\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n \n \n {{ \"invited\" | i18n }}\n \n \n {{ \"needsConfirmation\" | i18n }}\n \n \n {{ \"revoked\" | i18n }}\n \n
    \n
    \n {{ user.email }}\n
    \n
    \n
    \n \n \n {{ \"providerAdmin\" | i18n }}\n {{ \"serviceUser\" | i18n }}\n \n \n \n \n \n \n {{ \"resendInvitation\" | i18n }}\n \n \n \n \n {{ \"confirm\" | i18n }}\n \n \n \n \n {{ \"eventLogs\" | i18n }}\n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { combineLatest, lastValueFrom, switchMap } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport {\n OrganizationUserStatusType,\n ProviderUserStatusType,\n ProviderUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserUserDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { BaseMembersComponent } from \"@bitwarden/web-vault/app/admin-console/common/base-members.component\";\nimport {\n peopleFilter,\n PeopleTableDataSource,\n} from \"@bitwarden/web-vault/app/admin-console/common/people-table-data-source\";\nimport { openEntityEventsDialog } from \"@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component\";\nimport { BulkStatusComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component\";\n\nimport {\n AddEditMemberDialogComponent,\n AddEditMemberDialogParams,\n AddEditMemberDialogResultType,\n} from \"./dialogs/add-edit-member-dialog.component\";\nimport { BulkConfirmDialogComponent } from \"./dialogs/bulk-confirm-dialog.component\";\nimport { BulkRemoveDialogComponent } from \"./dialogs/bulk-remove-dialog.component\";\n\ntype ProviderUser = ProviderUserUserDetailsResponse;\n\nclass MembersTableDataSource extends PeopleTableDataSource {\n protected statusType = OrganizationUserStatusType;\n}\n\n@Component({\n templateUrl: \"members.component.html\",\n})\nexport class MembersComponent extends BaseMembersComponent {\n accessEvents = false;\n dataSource = new MembersTableDataSource();\n loading = true;\n providerId: string;\n rowHeight = 62;\n rowHeightClass = `tw-h-[62px]`;\n status: ProviderUserStatusType = null;\n\n userStatusType = ProviderUserStatusType;\n userType = ProviderUserType;\n\n constructor(\n apiService: ApiService,\n cryptoService: CryptoService,\n dialogService: DialogService,\n i18nService: I18nService,\n logService: LogService,\n organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n toastService: ToastService,\n userNamePipe: UserNamePipe,\n validationService: ValidationService,\n private activatedRoute: ActivatedRoute,\n private providerService: ProviderService,\n private router: Router,\n ) {\n super(\n apiService,\n i18nService,\n cryptoService,\n validationService,\n logService,\n userNamePipe,\n dialogService,\n organizationManagementPreferencesService,\n toastService,\n );\n\n combineLatest([\n this.activatedRoute.parent.params,\n this.activatedRoute.queryParams.pipe(first()),\n ])\n .pipe(\n switchMap(async ([urlParams, queryParams]) => {\n this.searchControl.setValue(queryParams.search, { emitEvent: false });\n this.dataSource.filter = peopleFilter(queryParams.search, null);\n\n this.providerId = urlParams.providerId;\n const provider = await this.providerService.get(this.providerId);\n if (!provider || !provider.canManageUsers) {\n return await this.router.navigate([\"../\"], { relativeTo: this.activatedRoute });\n }\n this.accessEvents = provider.useEvents;\n await this.load();\n\n if (queryParams.viewEvents != null) {\n const user = this.dataSource.data.find((user) => user.id === queryParams.viewEvents);\n if (user && user.status === ProviderUserStatusType.Confirmed) {\n this.openEventsDialog(user);\n }\n }\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n async bulkConfirm(): Promise {\n if (this.actionPromise != null) {\n return;\n }\n\n const dialogRef = BulkConfirmDialogComponent.open(this.dialogService, {\n data: {\n providerId: this.providerId,\n users: this.dataSource.getCheckedUsers(),\n },\n });\n\n await lastValueFrom(dialogRef.closed);\n await this.load();\n }\n\n async bulkReinvite(): Promise {\n if (this.actionPromise != null) {\n return;\n }\n\n const checkedUsers = this.dataSource.getCheckedUsers();\n const checkedInvitedUsers = checkedUsers.filter(\n (user) => user.status === ProviderUserStatusType.Invited,\n );\n\n if (checkedInvitedUsers.length <= 0) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"noSelectedUsersApplicable\"),\n });\n return;\n }\n\n try {\n const request = this.apiService.postManyProviderUserReinvite(\n this.providerId,\n new ProviderUserBulkRequest(checkedInvitedUsers.map((user) => user.id)),\n );\n\n const dialogRef = BulkStatusComponent.open(this.dialogService, {\n data: {\n users: checkedUsers,\n filteredUsers: checkedInvitedUsers,\n request,\n successfulMessage: this.i18nService.t(\"bulkReinviteMessage\"),\n },\n });\n await lastValueFrom(dialogRef.closed);\n } catch (error) {\n this.validationService.showError(error);\n }\n }\n\n async bulkRemove(): Promise {\n if (this.actionPromise != null) {\n return;\n }\n\n const dialogRef = BulkRemoveDialogComponent.open(this.dialogService, {\n data: {\n providerId: this.providerId,\n users: this.dataSource.getCheckedUsers(),\n },\n });\n\n await lastValueFrom(dialogRef.closed);\n await this.load();\n }\n\n async confirmUser(user: ProviderUser, publicKey: Uint8Array): Promise {\n const providerKey = await this.cryptoService.getProviderKey(this.providerId);\n const key = await this.cryptoService.rsaEncrypt(providerKey.key, publicKey);\n const request = new ProviderUserConfirmRequest();\n request.key = key.encryptedString;\n await this.apiService.postProviderUserConfirm(this.providerId, user.id, request);\n }\n\n deleteUser = (id: string): Promise =>\n this.apiService.deleteProviderUser(this.providerId, id);\n\n edit = async (user: ProviderUser | null): Promise => {\n const data: AddEditMemberDialogParams = {\n providerId: this.providerId,\n };\n\n if (user != null) {\n data.user = {\n id: user.id,\n name: this.userNamePipe.transform(user),\n type: user.type,\n };\n }\n\n const dialogRef = AddEditMemberDialogComponent.open(this.dialogService, {\n data,\n });\n\n const result = await lastValueFrom(dialogRef.closed);\n\n switch (result) {\n case AddEditMemberDialogResultType.Saved:\n case AddEditMemberDialogResultType.Deleted:\n await this.load();\n break;\n }\n };\n\n openEventsDialog = (user: ProviderUser): DialogRef =>\n openEntityEventsDialog(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(user),\n providerId: this.providerId,\n entityId: user.id,\n showUser: false,\n entity: \"user\",\n },\n });\n\n getUsers = (): Promise> =>\n this.apiService.getProviderUsers(this.providerId);\n\n reinviteUser = (id: string): Promise =>\n this.apiService.postProviderUserReinvite(this.providerId, id);\n}\n","import { Directive, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\nimport { firstValueFrom, concatMap, map, lastValueFrom, startWith, debounceTime } from \"rxjs\";\n\nimport { SearchPipe } from \"@bitwarden/angular/pipes/search.pipe\";\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport {\n OrganizationUserStatusType,\n OrganizationUserType,\n ProviderUserStatusType,\n ProviderUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserUserDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { OrganizationUserView } from \"../organizations/core/views/organization-user.view\";\nimport { UserConfirmComponent } from \"../organizations/manage/user-confirm.component\";\n\ntype StatusType = OrganizationUserStatusType | ProviderUserStatusType;\n\nconst MaxCheckedCount = 500;\n\n@Directive()\nexport abstract class BasePeopleComponent<\n UserType extends ProviderUserUserDetailsResponse | OrganizationUserView,\n> {\n @ViewChild(\"confirmTemplate\", { read: ViewContainerRef, static: true })\n confirmModalRef: ViewContainerRef;\n\n get allCount() {\n return this.activeUsers != null ? this.activeUsers.length : 0;\n }\n\n get invitedCount() {\n return this.statusMap.has(this.userStatusType.Invited)\n ? this.statusMap.get(this.userStatusType.Invited).length\n : 0;\n }\n\n get acceptedCount() {\n return this.statusMap.has(this.userStatusType.Accepted)\n ? this.statusMap.get(this.userStatusType.Accepted).length\n : 0;\n }\n\n get confirmedCount() {\n return this.statusMap.has(this.userStatusType.Confirmed)\n ? this.statusMap.get(this.userStatusType.Confirmed).length\n : 0;\n }\n\n get revokedCount() {\n return this.statusMap.has(this.userStatusType.Revoked)\n ? this.statusMap.get(this.userStatusType.Revoked).length\n : 0;\n }\n\n get showConfirmUsers(): boolean {\n return (\n this.activeUsers != null &&\n this.statusMap != null &&\n this.activeUsers.length > 1 &&\n this.confirmedCount > 0 &&\n this.confirmedCount < 3 &&\n this.acceptedCount > 0\n );\n }\n\n get showBulkConfirmUsers(): boolean {\n return this.acceptedCount > 0;\n }\n\n abstract userType: typeof OrganizationUserType | typeof ProviderUserType;\n abstract userStatusType: typeof OrganizationUserStatusType | typeof ProviderUserStatusType;\n\n loading = true;\n statusMap = new Map();\n status: StatusType;\n users: UserType[] = [];\n pagedUsers: UserType[] = [];\n actionPromise: Promise;\n\n protected allUsers: UserType[] = [];\n protected activeUsers: UserType[] = [];\n\n protected didScroll = false;\n protected pageSize = 100;\n\n protected searchControl = new FormControl(\"\", { nonNullable: true });\n protected isSearching$ = this.searchControl.valueChanges.pipe(\n debounceTime(500),\n concatMap((searchText) => this.searchService.isSearchable(searchText)),\n startWith(false),\n );\n protected isPaging$ = this.isSearching$.pipe(\n map((isSearching) => {\n if (isSearching && this.didScroll) {\n this.resetPaging();\n }\n return !isSearching && this.users && this.users.length > this.pageSize;\n }),\n );\n\n private pagedUsersCount = 0;\n\n constructor(\n protected apiService: ApiService,\n private searchService: SearchService,\n protected i18nService: I18nService,\n protected platformUtilsService: PlatformUtilsService,\n protected cryptoService: CryptoService,\n protected validationService: ValidationService,\n protected modalService: ModalService,\n private logService: LogService,\n private searchPipe: SearchPipe,\n protected userNamePipe: UserNamePipe,\n protected dialogService: DialogService,\n protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n ) {}\n\n abstract edit(user: UserType): void;\n abstract getUsers(): Promise | UserType[]>;\n abstract deleteUser(id: string): Promise;\n abstract revokeUser(id: string): Promise;\n abstract restoreUser(id: string): Promise;\n abstract reinviteUser(id: string): Promise;\n abstract confirmUser(user: UserType, publicKey: Uint8Array): Promise;\n\n async load() {\n const response = await this.getUsers();\n this.statusMap.clear();\n this.activeUsers = [];\n for (const status of Utils.iterateEnum(this.userStatusType)) {\n this.statusMap.set(status, []);\n }\n\n if (response instanceof ListResponse) {\n this.allUsers = response.data != null && response.data.length > 0 ? response.data : [];\n } else if (Array.isArray(response)) {\n this.allUsers = response;\n }\n\n this.allUsers.sort(\n Utils.getSortFunction(\n this.i18nService,\n \"email\",\n ),\n );\n this.allUsers.forEach((u) => {\n if (!this.statusMap.has(u.status)) {\n this.statusMap.set(u.status, [u]);\n } else {\n this.statusMap.get(u.status).push(u);\n }\n if (u.status !== this.userStatusType.Revoked) {\n this.activeUsers.push(u);\n }\n });\n this.filter(this.status);\n this.loading = false;\n }\n\n filter(status: StatusType) {\n this.status = status;\n if (this.status != null) {\n this.users = this.statusMap.get(this.status);\n } else {\n this.users = this.activeUsers;\n }\n // Reset checkbox selecton\n this.selectAll(false);\n this.resetPaging();\n }\n\n loadMore() {\n if (!this.users || this.users.length <= this.pageSize) {\n return;\n }\n const pagedLength = this.pagedUsers.length;\n let pagedSize = this.pageSize;\n if (pagedLength === 0 && this.pagedUsersCount > this.pageSize) {\n pagedSize = this.pagedUsersCount;\n }\n if (this.users.length > pagedLength) {\n this.pagedUsers = this.pagedUsers.concat(\n this.users.slice(pagedLength, pagedLength + pagedSize),\n );\n }\n this.pagedUsersCount = this.pagedUsers.length;\n this.didScroll = this.pagedUsers.length > this.pageSize;\n }\n\n checkUser(user: UserType, select?: boolean) {\n (user as any).checked = select == null ? !(user as any).checked : select;\n }\n\n selectAll(select: boolean) {\n if (select) {\n this.selectAll(false);\n }\n\n const filteredUsers = this.searchPipe.transform(\n this.users,\n this.searchControl.value,\n \"name\",\n \"email\",\n \"id\",\n );\n\n const selectCount =\n select && filteredUsers.length > MaxCheckedCount ? MaxCheckedCount : filteredUsers.length;\n for (let i = 0; i < selectCount; i++) {\n this.checkUser(filteredUsers[i], select);\n }\n }\n\n resetPaging() {\n this.pagedUsers = [];\n this.loadMore();\n }\n\n invite() {\n this.edit(null);\n }\n\n protected async removeUserConfirmationDialog(user: UserType) {\n return this.dialogService.openSimpleDialog({\n title: this.userNamePipe.transform(user),\n content: { key: \"removeUserConfirmation\" },\n type: \"warning\",\n });\n }\n\n async remove(user: UserType) {\n const confirmed = await this.removeUserConfirmationDialog(user);\n if (!confirmed) {\n return false;\n }\n\n this.actionPromise = this.deleteUser(user.id);\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"removedUserId\", this.userNamePipe.transform(user)),\n );\n this.removeUser(user);\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n protected async revokeUserConfirmationDialog(user: UserType) {\n return this.dialogService.openSimpleDialog({\n title: { key: \"revokeAccess\", placeholders: [this.userNamePipe.transform(user)] },\n content: this.revokeWarningMessage(),\n acceptButtonText: { key: \"revokeAccess\" },\n type: \"warning\",\n });\n }\n\n async revoke(user: UserType) {\n const confirmed = await this.revokeUserConfirmationDialog(user);\n\n if (!confirmed) {\n return false;\n }\n\n this.actionPromise = this.revokeUser(user.id);\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"revokedUserId\", this.userNamePipe.transform(user)),\n );\n await this.load();\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async restore(user: UserType) {\n this.actionPromise = this.restoreUser(user.id);\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"restoredUserId\", this.userNamePipe.transform(user)),\n );\n await this.load();\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async reinvite(user: UserType) {\n if (this.actionPromise != null) {\n return;\n }\n\n this.actionPromise = this.reinviteUser(user.id);\n try {\n await this.actionPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"hasBeenReinvited\", this.userNamePipe.transform(user)),\n );\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async confirm(user: UserType) {\n function updateUser(self: BasePeopleComponent) {\n user.status = self.userStatusType.Confirmed;\n const mapIndex = self.statusMap.get(self.userStatusType.Accepted).indexOf(user);\n if (mapIndex > -1) {\n self.statusMap.get(self.userStatusType.Accepted).splice(mapIndex, 1);\n self.statusMap.get(self.userStatusType.Confirmed).push(user);\n }\n }\n\n const confirmUser = async (publicKey: Uint8Array) => {\n try {\n this.actionPromise = this.confirmUser(user, publicKey);\n await this.actionPromise;\n updateUser(this);\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(user)),\n );\n } catch (e) {\n this.validationService.showError(e);\n throw e;\n } finally {\n this.actionPromise = null;\n }\n };\n\n if (this.actionPromise != null) {\n return;\n }\n\n try {\n const publicKeyResponse = await this.apiService.getUserPublicKey(user.userId);\n const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n const autoConfirm = await firstValueFrom(\n this.organizationManagementPreferencesService.autoConfirmFingerPrints.state$,\n );\n if (autoConfirm == null || !autoConfirm) {\n const dialogRef = UserConfirmComponent.open(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(user),\n userId: user != null ? user.userId : null,\n publicKey: publicKey,\n confirmUser: () => confirmUser(publicKey),\n },\n });\n await lastValueFrom(dialogRef.closed);\n\n return;\n }\n\n try {\n const fingerprint = await this.cryptoService.getFingerprint(user.userId, publicKey);\n this.logService.info(`User's fingerprint: ${fingerprint.join(\"-\")}`);\n } catch (e) {\n this.logService.error(e);\n }\n await confirmUser(publicKey);\n } catch (e) {\n this.logService.error(`Handled exception: ${e}`);\n }\n }\n\n protected revokeWarningMessage(): string {\n return this.i18nService.t(\"revokeUserConfirmation\");\n }\n\n protected getCheckedUsers() {\n return this.users.filter((u) => (u as any).checked);\n }\n\n protected removeUser(user: UserType) {\n let index = this.users.indexOf(user);\n if (index > -1) {\n this.users.splice(index, 1);\n this.resetPaging();\n }\n\n index = this.allUsers.indexOf(user);\n if (index > -1) {\n this.allUsers.splice(index, 1);\n }\n\n if (this.statusMap.has(user.status)) {\n index = this.statusMap.get(user.status).indexOf(user);\n if (index > -1) {\n this.statusMap.get(user.status).splice(index, 1);\n }\n }\n }\n}\n","import { Component, Input } from \"@angular/core\";\n\nimport { ProviderUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserBulkConfirmRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { BulkConfirmComponent as OrganizationBulkConfirmComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-confirm.component\";\nimport { BulkUserDetails } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component\";\n\n/**\n * @deprecated Please use the {@link BulkConfirmDialogComponent} instead.\n */\n@Component({\n templateUrl:\n \"../../../../../../../../apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.html\",\n})\nexport class BulkConfirmComponent extends OrganizationBulkConfirmComponent {\n @Input() providerId: string;\n\n protected override isAccepted(user: BulkUserDetails) {\n return user.status === ProviderUserStatusType.Accepted;\n }\n\n protected override async getPublicKeys() {\n const request = new ProviderUserBulkRequest(this.filteredUsers.map((user) => user.id));\n return await this.apiService.postProviderUsersPublicKey(this.providerId, request);\n }\n\n protected override getCryptoKey(): Promise {\n return this.cryptoService.getProviderKey(this.providerId);\n }\n\n protected override async postConfirmRequest(userIdsWithKeys: any[]) {\n const request = new ProviderUserBulkConfirmRequest(userIdsWithKeys);\n return await this.apiService.postProviderUserBulkConfirm(this.providerId, request);\n }\n}\n","import { Component, Input } from \"@angular/core\";\n\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { BulkRemoveComponent as OrganizationBulkRemoveComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-remove.component\";\n\n/**\n * @deprecated Please use the {@link BulkRemoveDialogComponent} instead.\n */\n@Component({\n templateUrl:\n \"../../../../../../../../apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.html\",\n})\nexport class BulkRemoveComponent extends OrganizationBulkRemoveComponent {\n @Input() providerId: string;\n\n async deleteUsers() {\n const request = new ProviderUserBulkRequest(this.users.map((user) => user.id));\n return await this.apiService.deleteManyProviderUsers(this.providerId, request);\n }\n\n protected get removeUsersWarning() {\n return this.i18nService.t(\"removeUsersWarning\");\n }\n}\n","
    \n
    \n \n
    \n

    \n {{ title }}\n {{ name }}\n

    \n \n ×\n \n
    \n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n \n

    {{ \"providerInviteUserDesc\" | i18n }}

    \n
    \n \n \n {{ \"inviteMultipleEmailDesc\" | i18n: \"20\" }}\n
    \n
    \n

    \n {{ \"userType\" | i18n }}\n \n \n \n

    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n \n \n \n \n
    \n
    \n \n
    \n
    \n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\nimport { ProviderUserInviteRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-update.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n/**\n * @deprecated Please use the {@link MembersDialogComponent} instead.\n */\n@Component({\n selector: \"provider-user-add-edit\",\n templateUrl: \"user-add-edit.component.html\",\n})\nexport class UserAddEditComponent implements OnInit {\n @Input() name: string;\n @Input() providerUserId: string;\n @Input() providerId: string;\n @Output() savedUser = new EventEmitter();\n @Output() deletedUser = new EventEmitter();\n\n loading = true;\n editMode = false;\n title: string;\n emails: string;\n type: ProviderUserType = ProviderUserType.ServiceUser;\n permissions = new PermissionsApi();\n showCustom = false;\n access: \"all\" | \"selected\" = \"selected\";\n formPromise: Promise;\n deletePromise: Promise;\n userType = ProviderUserType;\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private logService: LogService,\n private dialogService: DialogService,\n ) {}\n\n async ngOnInit() {\n this.editMode = this.loading = this.providerUserId != null;\n\n if (this.editMode) {\n this.editMode = true;\n this.title = this.i18nService.t(\"editMember\");\n try {\n const user = await this.apiService.getProviderUser(this.providerId, this.providerUserId);\n this.type = user.type;\n } catch (e) {\n this.logService.error(e);\n }\n } else {\n this.title = this.i18nService.t(\"inviteMember\");\n }\n\n this.loading = false;\n }\n\n async submit() {\n try {\n if (this.editMode) {\n const request = new ProviderUserUpdateRequest();\n request.type = this.type;\n this.formPromise = this.apiService.putProviderUser(\n this.providerId,\n this.providerUserId,\n request,\n );\n } else {\n const request = new ProviderUserInviteRequest();\n request.emails = this.emails.trim().split(/\\s*,\\s*/);\n request.type = this.type;\n this.formPromise = this.apiService.postProviderUserInvite(this.providerId, request);\n }\n await this.formPromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(this.editMode ? \"editedUserId\" : \"invitedUsers\", this.name),\n );\n this.savedUser.emit();\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n async delete() {\n if (!this.editMode) {\n return;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: this.name,\n content: { key: \"removeUserConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return false;\n }\n\n try {\n this.deletePromise = this.apiService.deleteProviderUser(this.providerId, this.providerUserId);\n await this.deletePromise;\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"removedUserId\", this.name),\n );\n this.deletedUser.emit();\n } catch (e) {\n this.logService.error(e);\n }\n }\n}\n","\n \n \n\n\n
    \n \n \n {{ \"all\" | i18n }}\n {{ allCount }}\n \n\n \n {{ \"invited\" | i18n }}\n {{ invitedCount }}\n \n\n \n {{ \"needsConfirmation\" | i18n }}\n {{ acceptedCount }}\n \n \n\n
    \n \n \n \n
    \n \n \n \n {{ \"confirmSelected\" | i18n }}\n \n \n
    \n \n \n
    \n
    \n
    \n\n\n \n {{ \"loading\" | i18n }}\n\n\n

    {{ \"noUsersInList\" | i18n }}

    \n \n \n {{ \"providerUsersNeedConfirmed\" | i18n }}\n \n \n \n \n \n \n \n \n \n \n \n {{ u.email }}\n {{\n \"invited\" | i18n\n }}\n {{\n \"needsConfirmation\" | i18n\n }}\n {{ u.name }}\n \n \n \n \n {{ \"userUsingTwoStep\" | i18n }}\n \n \n \n {{ \"providerAdmin\" | i18n }}\n {{ \"serviceUser\" | i18n }}\n \n \n
    \n \n \n \n
    \n \n \n {{ \"resendInvitation\" | i18n }}\n \n \n \n {{ \"confirm\" | i18n }}\n \n \n \n {{ \"eventLogs\" | i18n }}\n \n \n \n {{ \"remove\" | i18n }}\n \n
    \n
    \n \n \n \n \n
    \n\n\n\n\n\n\n","import { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { SearchPipe } from \"@bitwarden/angular/pipes/search.pipe\";\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { ProviderUserStatusType, ProviderUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { ProviderUserBulkRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserUserDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-user.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { BasePeopleComponent } from \"@bitwarden/web-vault/app/admin-console/common/base.people.component\";\nimport { openEntityEventsDialog } from \"@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component\";\nimport { BulkStatusComponent } from \"@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component\";\n\nimport { BulkConfirmComponent } from \"./bulk/bulk-confirm.component\";\nimport { BulkRemoveComponent } from \"./bulk/bulk-remove.component\";\nimport { UserAddEditComponent } from \"./user-add-edit.component\";\n\n/**\n * @deprecated Please use the {@link MembersComponent} instead.\n */\n@Component({\n selector: \"provider-people\",\n templateUrl: \"people.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class PeopleComponent\n extends BasePeopleComponent\n implements OnInit\n{\n @ViewChild(\"addEdit\", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;\n @ViewChild(\"groupsTemplate\", { read: ViewContainerRef, static: true })\n groupsModalRef: ViewContainerRef;\n @ViewChild(\"bulkStatusTemplate\", { read: ViewContainerRef, static: true })\n bulkStatusModalRef: ViewContainerRef;\n @ViewChild(\"bulkConfirmTemplate\", { read: ViewContainerRef, static: true })\n bulkConfirmModalRef: ViewContainerRef;\n @ViewChild(\"bulkRemoveTemplate\", { read: ViewContainerRef, static: true })\n bulkRemoveModalRef: ViewContainerRef;\n\n userType = ProviderUserType;\n userStatusType = ProviderUserStatusType;\n status: ProviderUserStatusType = null;\n providerId: string;\n accessEvents = false;\n\n constructor(\n apiService: ApiService,\n private route: ActivatedRoute,\n i18nService: I18nService,\n modalService: ModalService,\n platformUtilsService: PlatformUtilsService,\n cryptoService: CryptoService,\n private router: Router,\n searchService: SearchService,\n validationService: ValidationService,\n logService: LogService,\n searchPipe: SearchPipe,\n userNamePipe: UserNamePipe,\n private providerService: ProviderService,\n dialogService: DialogService,\n organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n private configService: ConfigService,\n ) {\n super(\n apiService,\n searchService,\n i18nService,\n platformUtilsService,\n cryptoService,\n validationService,\n modalService,\n logService,\n searchPipe,\n userNamePipe,\n dialogService,\n organizationManagementPreferencesService,\n );\n }\n\n ngOnInit() {\n // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n this.route.parent.params.subscribe(async (params) => {\n this.providerId = params.providerId;\n const provider = await this.providerService.get(this.providerId);\n\n if (!provider.canManageUsers) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"../\"], { relativeTo: this.route });\n return;\n }\n\n this.accessEvents = provider.useEvents;\n\n await this.load();\n\n /* eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe, rxjs/no-nested-subscribe */\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n this.searchControl.setValue(qParams.search);\n if (qParams.viewEvents != null) {\n const user = this.users.filter((u) => u.id === qParams.viewEvents);\n if (user.length > 0 && user[0].status === ProviderUserStatusType.Confirmed) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.events(user[0]);\n }\n }\n });\n });\n }\n\n getUsers(): Promise> {\n return this.apiService.getProviderUsers(this.providerId);\n }\n\n deleteUser(id: string): Promise {\n return this.apiService.deleteProviderUser(this.providerId, id);\n }\n\n revokeUser(id: string): Promise {\n // Not implemented.\n return null;\n }\n\n restoreUser(id: string): Promise {\n // Not implemented.\n return null;\n }\n\n reinviteUser(id: string): Promise {\n return this.apiService.postProviderUserReinvite(this.providerId, id);\n }\n\n async confirmUser(user: ProviderUserUserDetailsResponse, publicKey: Uint8Array): Promise {\n const providerKey = await this.cryptoService.getProviderKey(this.providerId);\n const key = await this.cryptoService.rsaEncrypt(providerKey.key, publicKey);\n const request = new ProviderUserConfirmRequest();\n request.key = key.encryptedString;\n await this.apiService.postProviderUserConfirm(this.providerId, user.id, request);\n }\n\n async edit(user: ProviderUserUserDetailsResponse) {\n const [modal] = await this.modalService.openViewRef(\n UserAddEditComponent,\n this.addEditModalRef,\n (comp) => {\n comp.name = this.userNamePipe.transform(user);\n comp.providerId = this.providerId;\n comp.providerUserId = user != null ? user.id : null;\n comp.savedUser.subscribe(() => {\n modal.close();\n this.load();\n });\n comp.deletedUser.subscribe(() => {\n modal.close();\n this.removeUser(user);\n });\n },\n );\n }\n\n async events(user: ProviderUserUserDetailsResponse) {\n await openEntityEventsDialog(this.dialogService, {\n data: {\n name: this.userNamePipe.transform(user),\n providerId: this.providerId,\n entityId: user.id,\n showUser: false,\n entity: \"user\",\n },\n });\n }\n\n async bulkRemove() {\n if (this.actionPromise != null) {\n return;\n }\n\n const [modal] = await this.modalService.openViewRef(\n BulkRemoveComponent,\n this.bulkRemoveModalRef,\n (comp) => {\n comp.providerId = this.providerId;\n comp.users = this.getCheckedUsers();\n },\n );\n\n await modal.onClosedPromise();\n await this.load();\n }\n\n async bulkReinvite() {\n if (this.actionPromise != null) {\n return;\n }\n\n const users = this.getCheckedUsers();\n const filteredUsers = users.filter((u) => u.status === ProviderUserStatusType.Invited);\n\n if (filteredUsers.length <= 0) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"noSelectedUsersApplicable\"),\n );\n return;\n }\n\n try {\n const request = new ProviderUserBulkRequest(filteredUsers.map((user) => user.id));\n const response = this.apiService.postManyProviderUserReinvite(this.providerId, request);\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n // Bulk Status component open\n const dialogRef = BulkStatusComponent.open(this.dialogService, {\n data: {\n users: users,\n filteredUsers: filteredUsers,\n request: response,\n successfulMessage: this.i18nService.t(\"bulkReinviteMessage\"),\n },\n });\n await lastValueFrom(dialogRef.closed);\n } catch (e) {\n this.validationService.showError(e);\n }\n this.actionPromise = null;\n }\n\n async bulkConfirm() {\n if (this.actionPromise != null) {\n return;\n }\n\n const [modal] = await this.modalService.openViewRef(\n BulkConfirmComponent,\n this.bulkConfirmModalRef,\n (comp) => {\n comp.providerId = this.providerId;\n comp.users = this.getCheckedUsers();\n },\n );\n\n await modal.onClosedPromise();\n await this.load();\n }\n}\n","export class ProviderUpdateRequest {\n name: string;\n businessName: string;\n billingEmail: string;\n}\n","\n\n
    \n \n {{ \"loading\" | i18n }}\n
    \n
    \n
    \n
    \n \n {{ \"providerName\" | i18n }}\n \n \n \n {{ \"billingEmail\" | i18n }}\n \n \n
    \n
    \n \n
    \n
    \n \n
    \n\n \n \n \n
    \n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport { UserVerificationDialogComponent } from \"@bitwarden/auth/angular\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderUpdateRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-update.request\";\nimport { ProviderResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"provider-account\",\n templateUrl: \"account.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class AccountComponent implements OnDestroy, OnInit {\n selfHosted = false;\n loading = true;\n provider: ProviderResponse;\n taxFormPromise: Promise;\n\n private destroy$ = new Subject();\n private providerId: string;\n protected formGroup = this.formBuilder.group({\n providerName: [\"\" as ProviderResponse[\"name\"]],\n providerBillingEmail: [\"\" as ProviderResponse[\"billingEmail\"], Validators.email],\n });\n protected enableDeleteProvider$ = this.configService.getFeatureFlag$(\n FeatureFlag.EnableDeleteProvider,\n );\n\n constructor(\n private apiService: ApiService,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private syncService: SyncService,\n private platformUtilsService: PlatformUtilsService,\n private logService: LogService,\n private dialogService: DialogService,\n private configService: ConfigService,\n private providerApiService: ProviderApiServiceAbstraction,\n private formBuilder: FormBuilder,\n private router: Router,\n ) {}\n\n async ngOnInit() {\n this.selfHosted = this.platformUtilsService.isSelfHost();\n this.route.parent.parent.params\n .pipe(\n switchMap(async (params) => {\n this.providerId = params.providerId;\n try {\n this.provider = await this.providerApiService.getProvider(this.providerId);\n this.formGroup.patchValue({\n providerName: this.provider.name,\n providerBillingEmail: this.provider.billingEmail,\n });\n } catch (e) {\n this.logService.error(`Handled exception: ${e}`);\n } finally {\n this.loading = false;\n }\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n submit = async () => {\n const request = new ProviderUpdateRequest();\n request.name = this.formGroup.value.providerName;\n request.businessName = this.formGroup.value.providerName;\n request.billingEmail = this.formGroup.value.providerBillingEmail;\n\n await this.providerApiService.putProvider(this.providerId, request);\n await this.syncService.fullSync(true);\n this.provider = await this.providerApiService.getProvider(this.providerId);\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"providerUpdated\"));\n };\n\n async deleteProvider() {\n const providerClients = await this.apiService.getProviderClients(this.providerId);\n if (providerClients.data != null && providerClients.data.length > 0) {\n await this.dialogService.openSimpleDialog({\n title: { key: \"deleteProviderName\", placeholders: [this.provider.name] },\n content: { key: \"deleteProviderWarningDescription\", placeholders: [this.provider.name] },\n acceptButtonText: { key: \"ok\" },\n cancelButtonText: { key: \"close\" },\n type: \"danger\",\n });\n\n return false;\n }\n\n const userVerified = await this.verifyUser();\n if (!userVerified) {\n return;\n }\n\n try {\n await this.providerApiService.deleteProvider(this.providerId);\n this.platformUtilsService.showToast(\n \"success\",\n this.i18nService.t(\"providerDeleted\"),\n this.i18nService.t(\"providerDeletedDesc\"),\n );\n } catch (e) {\n this.logService.error(e);\n }\n await this.router.navigate([\"/\"]);\n }\n\n private async verifyUser(): Promise {\n const confirmDescription = \"deleteProviderConfirmation\";\n const result = await UserVerificationDialogComponent.open(this.dialogService, {\n title: \"deleteProvider\",\n bodyText: confirmDescription,\n confirmButtonOptions: {\n text: \"deleteProvider\",\n type: \"danger\",\n },\n });\n\n // Handle the result of the dialog based on user action and verification success\n if (result.userAction === \"cancel\") {\n // User cancelled the dialog\n return false;\n }\n\n // User confirmed the dialog so check verification success\n if (!result.verificationSuccess) {\n return false;\n }\n return true;\n }\n}\n","
    \n
    \n \"Bitwarden\"\n

    \n \n {{ \"loading\" | i18n }}\n

    \n
    \n
    \n
    \n
    \n
    \n

    {{ \"setupProvider\" | i18n }}

    \n
    \n
    \n

    {{ \"setupProviderLoginDesc\" | i18n }}

    \n
    \n
    \n \n {{ \"logIn\" | i18n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n","import { Component } from \"@angular/core\";\nimport { Params } from \"@angular/router\";\n\nimport { BaseAcceptComponent } from \"@bitwarden/web-vault/app/common/base.accept.component\";\n\n@Component({\n selector: \"app-setup-provider\",\n templateUrl: \"setup-provider.component.html\",\n})\nexport class SetupProviderComponent extends BaseAcceptComponent {\n failedShortMessage = \"inviteAcceptFailedShort\";\n failedMessage = \"inviteAcceptFailed\";\n\n requiredParameters = [\"providerId\", \"email\", \"token\"];\n\n async authedHandler(qParams: Params) {\n this.router.navigate([\"/providers/setup\"], { queryParams: qParams });\n }\n\n async unauthedHandler(qParams: Params) {\n // Empty\n }\n}\n","import { ExpandedTaxInfoUpdateRequest } from \"../../../../billing/models/request/expanded-tax-info-update.request\";\n\nexport class ProviderSetupRequest {\n name: string;\n businessName: string;\n billingEmail: string;\n token: string;\n key: string;\n taxInfo: ExpandedTaxInfoUpdateRequest;\n}\n","\n\n \n {{ \"loading\" | i18n }}\n\n
    \n
    \n

    {{ \"setupProvider\" | i18n }}

    \n
    \n

    {{ \"setupProviderDesc\" | i18n }}

    \n
    \n

    {{ \"generalInformation\" | i18n }}

    \n
    \n
    \n \n {{ \"providerName\" | i18n }}\n \n \n
    \n
    \n \n {{ \"billingEmail\" | i18n }}\n \n {{\n \"providerBillingEmailHint\" | i18n\n }}\n \n
    \n
    \n \n \n \n
    \n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, Subject, switchMap } from \"rxjs\";\nimport { first, takeUntil } from \"rxjs/operators\";\n\nimport { ManageTaxInformationComponent } from \"@bitwarden/angular/billing/components\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderSetupRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-setup.request\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { ProviderKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n selector: \"provider-setup\",\n templateUrl: \"setup.component.html\",\n})\nexport class SetupComponent implements OnInit, OnDestroy {\n @ViewChild(ManageTaxInformationComponent)\n manageTaxInformationComponent: ManageTaxInformationComponent;\n\n loading = true;\n providerId: string;\n token: string;\n\n protected formGroup = this.formBuilder.group({\n name: [\"\", Validators.required],\n billingEmail: [\"\", [Validators.required, Validators.email]],\n });\n\n protected readonly TaxInformation = TaxInformation;\n\n protected showPaymentMethodWarningBanners$ = this.configService.getFeatureFlag$(\n FeatureFlag.ShowPaymentMethodWarningBanners,\n );\n\n protected enableConsolidatedBilling$ = this.configService.getFeatureFlag$(\n FeatureFlag.EnableConsolidatedBilling,\n );\n\n private destroy$ = new Subject();\n\n constructor(\n private router: Router,\n private i18nService: I18nService,\n private route: ActivatedRoute,\n private cryptoService: CryptoService,\n private syncService: SyncService,\n private validationService: ValidationService,\n private configService: ConfigService,\n private providerApiService: ProviderApiServiceAbstraction,\n private formBuilder: FormBuilder,\n private toastService: ToastService,\n ) {}\n\n ngOnInit() {\n document.body.classList.remove(\"layout_frontend\");\n\n this.route.queryParams\n .pipe(\n first(),\n switchMap(async (queryParams) => {\n const error =\n queryParams.providerId == null ||\n queryParams.email == null ||\n queryParams.token == null;\n\n if (error) {\n this.toastService.showToast({\n variant: \"error\",\n title: null,\n message: this.i18nService.t(\"emergencyInviteAcceptFailed\"),\n timeout: 10000,\n });\n\n return await this.router.navigate([\"/\"]);\n }\n\n this.providerId = queryParams.providerId;\n this.token = queryParams.token;\n\n try {\n const provider = await this.providerApiService.getProvider(this.providerId);\n\n if (provider.name != null) {\n /*\n This is currently always going to result in a redirect to the Vault because the `provider-permissions.guard`\n checks for the existence of the Provider in state. However, when accessing the Setup page via the email link,\n this `navigate` invocation will be hit before the sync can complete, thus resulting in a null Provider. If we want\n to resolve it, we'd either need to use the ProviderApiService in the provider-permissions.guard (added expense)\n or somehow check that the previous route was /setup.\n */\n return await this.router.navigate([\"/providers\", provider.id], {\n replaceUrl: true,\n });\n }\n this.loading = false;\n } catch (error) {\n this.validationService.showError(error);\n return await this.router.navigate([\"/\"]);\n }\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n submit = async () => {\n try {\n const consolidatedBillingEnabled = await firstValueFrom(this.enableConsolidatedBilling$);\n\n this.formGroup.markAllAsTouched();\n\n const formIsValid = consolidatedBillingEnabled\n ? this.formGroup.valid && this.manageTaxInformationComponent.touch()\n : this.formGroup.valid;\n\n if (!formIsValid) {\n return;\n }\n\n const providerKey = await this.cryptoService.makeOrgKey();\n const key = providerKey[0].encryptedString;\n\n const request = new ProviderSetupRequest();\n request.name = this.formGroup.value.name;\n request.billingEmail = this.formGroup.value.billingEmail;\n request.token = this.token;\n request.key = key;\n\n if (consolidatedBillingEnabled) {\n request.taxInfo = new ExpandedTaxInfoUpdateRequest();\n const taxInformation = this.manageTaxInformationComponent.getTaxInformation();\n\n request.taxInfo.country = taxInformation.country;\n request.taxInfo.postalCode = taxInformation.postalCode;\n if (taxInformation.includeTaxId) {\n request.taxInfo.taxId = taxInformation.taxId;\n request.taxInfo.line1 = taxInformation.line1;\n request.taxInfo.line2 = taxInformation.line2;\n request.taxInfo.city = taxInformation.city;\n request.taxInfo.state = taxInformation.state;\n }\n }\n\n const provider = await this.providerApiService.postProviderSetup(this.providerId, request);\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"providerSetup\"),\n });\n\n await this.syncService.fullSync(true);\n\n await this.router.navigate([\"/providers\", provider.id]);\n } catch (e) {\n this.validationService.showError(e);\n }\n };\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { AuthGuard } from \"@bitwarden/angular/auth/guards\";\nimport { featureFlaggedRoute } from \"@bitwarden/angular/platform/utils/feature-flagged-route\";\nimport { AnonLayoutWrapperComponent } from \"@bitwarden/auth/angular\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ProvidersComponent } from \"@bitwarden/web-vault/app/admin-console/providers/providers.component\";\nimport { FrontendLayoutComponent } from \"@bitwarden/web-vault/app/layouts/frontend-layout.component\";\nimport { UserLayoutComponent } from \"@bitwarden/web-vault/app/layouts/user-layout.component\";\n\nimport {\n ManageClientsComponent,\n ProviderSubscriptionComponent,\n hasConsolidatedBilling,\n ProviderBillingHistoryComponent,\n} from \"../../billing/providers\";\n\nimport { ClientsComponent } from \"./clients/clients.component\";\nimport { CreateOrganizationComponent } from \"./clients/create-organization.component\";\nimport { providerPermissionsGuard } from \"./guards/provider-permissions.guard\";\nimport { AcceptProviderComponent } from \"./manage/accept-provider.component\";\nimport { EventsComponent } from \"./manage/events.component\";\nimport { MembersComponent } from \"./manage/members.component\";\nimport { PeopleComponent } from \"./manage/people.component\";\nimport { ProvidersLayoutComponent } from \"./providers-layout.component\";\nimport { AccountComponent } from \"./settings/account.component\";\nimport { SetupProviderComponent } from \"./setup/setup-provider.component\";\nimport { SetupComponent } from \"./setup/setup.component\";\n\nconst routes: Routes = [\n {\n path: \"\",\n canActivate: [AuthGuard],\n component: UserLayoutComponent,\n children: [\n {\n path: \"\",\n canActivate: [AuthGuard],\n component: ProvidersComponent,\n data: { titleId: \"providers\" },\n },\n ],\n },\n {\n path: \"\",\n component: FrontendLayoutComponent,\n children: [\n {\n path: \"setup-provider\",\n component: SetupProviderComponent,\n data: { titleId: \"setupProvider\" },\n },\n ],\n },\n {\n path: \"\",\n component: AnonLayoutWrapperComponent,\n children: [\n {\n path: \"accept-provider\",\n component: AcceptProviderComponent,\n data: {\n pageTitle: \"joinProvider\",\n titleId: \"acceptProvider\",\n },\n },\n ],\n },\n {\n path: \"\",\n canActivate: [AuthGuard],\n children: [\n {\n path: \"setup\",\n component: SetupComponent,\n },\n {\n path: \":providerId\",\n component: ProvidersLayoutComponent,\n canActivate: [providerPermissionsGuard()],\n children: [\n { path: \"\", pathMatch: \"full\", redirectTo: \"clients\" },\n { path: \"clients/create\", component: CreateOrganizationComponent },\n { path: \"clients\", component: ClientsComponent, data: { titleId: \"clients\" } },\n {\n path: \"manage-client-organizations\",\n canActivate: [hasConsolidatedBilling],\n component: ManageClientsComponent,\n data: { titleId: \"clients\" },\n },\n {\n path: \"manage\",\n children: [\n {\n path: \"\",\n pathMatch: \"full\",\n redirectTo: \"people\",\n },\n ...featureFlaggedRoute({\n defaultComponent: PeopleComponent,\n flaggedComponent: MembersComponent,\n featureFlag: FeatureFlag.AC2828_ProviderPortalMembersPage,\n routeOptions: {\n path: \"people\",\n canActivate: [\n providerPermissionsGuard((provider: Provider) => provider.canManageUsers),\n ],\n data: {\n titleId: \"people\",\n },\n },\n }),\n {\n path: \"events\",\n component: EventsComponent,\n canActivate: [\n providerPermissionsGuard((provider: Provider) => provider.canAccessEventLogs),\n ],\n data: {\n titleId: \"eventLogs\",\n },\n },\n ],\n },\n {\n path: \"billing\",\n canActivate: [hasConsolidatedBilling],\n children: [\n {\n path: \"\",\n pathMatch: \"full\",\n redirectTo: \"subscription\",\n },\n {\n path: \"subscription\",\n component: ProviderSubscriptionComponent,\n canActivate: [providerPermissionsGuard()],\n data: {\n titleId: \"subscription\",\n },\n },\n {\n path: \"history\",\n component: ProviderBillingHistoryComponent,\n canActivate: [providerPermissionsGuard()],\n data: {\n titleId: \"billingHistory\",\n },\n },\n ],\n },\n {\n path: \"settings\",\n children: [\n {\n path: \"\",\n pathMatch: \"full\",\n redirectTo: \"account\",\n },\n {\n path: \"account\",\n component: AccountComponent,\n canActivate: [\n providerPermissionsGuard((provider: Provider) => provider.isProviderAdmin),\n ],\n data: {\n titleId: \"myProvider\",\n },\n },\n ],\n },\n ],\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class ProvidersRoutingModule {}\n","import { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SearchModule } from \"@bitwarden/components\";\nimport { DangerZoneComponent } from \"@bitwarden/web-vault/app/auth/settings/account/danger-zone.component\";\nimport { OrganizationPlansComponent, TaxInfoComponent } from \"@bitwarden/web-vault/app/billing\";\nimport { PaymentMethodWarningsModule } from \"@bitwarden/web-vault/app/billing/shared\";\nimport { OssModule } from \"@bitwarden/web-vault/app/oss.module\";\n\nimport {\n CreateClientDialogComponent,\n NoClientsComponent,\n ManageClientNameDialogComponent,\n ManageClientsComponent,\n ManageClientSubscriptionDialogComponent,\n ProviderBillingHistoryComponent,\n ProviderPaymentMethodComponent,\n ProviderSelectPaymentMethodDialogComponent,\n ProviderSubscriptionComponent,\n ProviderSubscriptionStatusComponent,\n} from \"../../billing/providers\";\n\nimport { AddOrganizationComponent } from \"./clients/add-organization.component\";\nimport { ClientsComponent } from \"./clients/clients.component\";\nimport { CreateOrganizationComponent } from \"./clients/create-organization.component\";\nimport { AcceptProviderComponent } from \"./manage/accept-provider.component\";\nimport { BulkConfirmComponent } from \"./manage/bulk/bulk-confirm.component\";\nimport { BulkRemoveComponent } from \"./manage/bulk/bulk-remove.component\";\nimport { AddEditMemberDialogComponent } from \"./manage/dialogs/add-edit-member-dialog.component\";\nimport { BulkConfirmDialogComponent } from \"./manage/dialogs/bulk-confirm-dialog.component\";\nimport { BulkRemoveDialogComponent } from \"./manage/dialogs/bulk-remove-dialog.component\";\nimport { EventsComponent } from \"./manage/events.component\";\nimport { MembersComponent } from \"./manage/members.component\";\nimport { PeopleComponent } from \"./manage/people.component\";\nimport { UserAddEditComponent } from \"./manage/user-add-edit.component\";\nimport { ProvidersLayoutComponent } from \"./providers-layout.component\";\nimport { ProvidersRoutingModule } from \"./providers-routing.module\";\nimport { WebProviderService } from \"./services/web-provider.service\";\nimport { AccountComponent } from \"./settings/account.component\";\nimport { SetupProviderComponent } from \"./setup/setup-provider.component\";\nimport { SetupComponent } from \"./setup/setup.component\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n OssModule,\n JslibModule,\n ProvidersRoutingModule,\n OrganizationPlansComponent,\n SearchModule,\n ProvidersLayoutComponent,\n PaymentMethodWarningsModule,\n TaxInfoComponent,\n DangerZoneComponent,\n ScrollingModule,\n ],\n declarations: [\n AcceptProviderComponent,\n AccountComponent,\n AddOrganizationComponent,\n BulkConfirmComponent,\n BulkConfirmDialogComponent,\n BulkRemoveComponent,\n BulkRemoveDialogComponent,\n ClientsComponent,\n CreateOrganizationComponent,\n EventsComponent,\n PeopleComponent,\n MembersComponent,\n SetupComponent,\n SetupProviderComponent,\n UserAddEditComponent,\n AddEditMemberDialogComponent,\n CreateClientDialogComponent,\n NoClientsComponent,\n ManageClientsComponent,\n ManageClientNameDialogComponent,\n ManageClientSubscriptionDialogComponent,\n ProviderBillingHistoryComponent,\n ProviderSubscriptionComponent,\n ProviderSelectPaymentMethodDialogComponent,\n ProviderPaymentMethodComponent,\n ProviderSubscriptionStatusComponent,\n ],\n providers: [WebProviderService],\n})\nexport class ProvidersModule {}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { deepLinkGuard } from \"@bitwarden/web-vault/app/auth/guards/deep-link.guard\";\n\nimport { ProvidersModule } from \"./admin-console/providers/providers.module\";\n\nconst routes: Routes = [\n {\n path: \"providers\",\n canActivate: [deepLinkGuard()],\n loadChildren: () => ProvidersModule,\n },\n {\n path: \"sm\",\n canActivate: [deepLinkGuard()],\n loadChildren: async () =>\n (await import(\"./secrets-manager/secrets-manager.module\")).SecretsManagerModule,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class AppRoutingModule {}\n","import { DOCUMENT } from \"@angular/common\";\nimport { Component, Inject, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport * as jq from \"jquery\";\nimport {\n Subject,\n combineLatest,\n filter,\n firstValueFrom,\n map,\n switchMap,\n takeUntil,\n timeout,\n timer,\n} from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport { EventUploadService } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout.service\";\nimport { InternalOrganizationServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { PaymentMethodWarningsServiceAbstraction as PaymentMethodWarningService } from \"@bitwarden/common/billing/abstractions/payment-method-warnings-service.abstraction\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { BiometricStateService } from \"@bitwarden/common/platform/biometrics/biometric-state.service\";\nimport { StateEventRunnerService } from \"@bitwarden/common/platform/state\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CollectionService } from \"@bitwarden/common/vault/abstractions/collection.service\";\nimport { InternalFolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { DialogService, ToastOptions, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { PolicyListService } from \"./admin-console/core/policy-list.service\";\nimport {\n DisableSendPolicy,\n MasterPasswordPolicy,\n PasswordGeneratorPolicy,\n PersonalOwnershipPolicy,\n RequireSsoPolicy,\n ResetPasswordPolicy,\n SendOptionsPolicy,\n SingleOrgPolicy,\n TwoFactorAuthenticationPolicy,\n} from \"./admin-console/organizations/policies\";\n\nconst BroadcasterSubscriptionId = \"AppComponent\";\nconst IdleTimeout = 60000 * 10; // 10 minutes\nconst PaymentMethodWarningsRefresh = 60000; // 1 Minute\n\n@Component({\n selector: \"app-root\",\n templateUrl: \"app.component.html\",\n})\nexport class AppComponent implements OnDestroy, OnInit {\n private lastActivity: Date = null;\n private idleTimer: number = null;\n private isIdle = false;\n private destroy$ = new Subject();\n private paymentMethodWarningsRefresh$ = timer(0, PaymentMethodWarningsRefresh);\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private broadcasterService: BroadcasterService,\n private folderService: InternalFolderService,\n private syncService: SyncService,\n private passwordGenerationService: PasswordGenerationServiceAbstraction,\n private cipherService: CipherService,\n private authService: AuthService,\n private router: Router,\n private toastService: ToastService,\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private ngZone: NgZone,\n private vaultTimeoutService: VaultTimeoutService,\n private cryptoService: CryptoService,\n private collectionService: CollectionService,\n private searchService: SearchService,\n private notificationsService: NotificationsService,\n private stateService: StateService,\n private eventUploadService: EventUploadService,\n private policyService: InternalPolicyService,\n protected policyListService: PolicyListService,\n private keyConnectorService: KeyConnectorService,\n private configService: ConfigService,\n private dialogService: DialogService,\n private biometricStateService: BiometricStateService,\n private stateEventRunnerService: StateEventRunnerService,\n private paymentMethodWarningService: PaymentMethodWarningService,\n private organizationService: InternalOrganizationServiceAbstraction,\n private accountService: AccountService,\n ) {}\n\n ngOnInit() {\n this.i18nService.locale$.pipe(takeUntil(this.destroy$)).subscribe((locale) => {\n this.document.documentElement.lang = locale;\n });\n\n this.ngZone.runOutsideAngular(() => {\n window.onmousemove = () => this.recordActivity();\n window.onmousedown = () => this.recordActivity();\n window.ontouchstart = () => this.recordActivity();\n window.onclick = () => this.recordActivity();\n window.onscroll = () => this.recordActivity();\n window.onkeypress = () => this.recordActivity();\n });\n\n /// ############ DEPRECATED ############\n /// Please do not use the AppComponent to send events between services.\n ///\n /// Services that depends on other services, should do so through Dependency Injection\n /// and subscribe to events through that service observable.\n ///\n this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.ngZone.run(async () => {\n switch (message.command) {\n case \"loggedIn\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.updateConnection(false);\n break;\n case \"loggedOut\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.updateConnection(false);\n break;\n case \"unlocked\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.updateConnection(false);\n break;\n case \"authBlocked\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n break;\n case \"logout\":\n await this.logOut(message.logoutReason, message.redirect);\n break;\n case \"lockVault\":\n await this.vaultTimeoutService.lock();\n break;\n case \"locked\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.updateConnection(false);\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"lock\"]);\n break;\n case \"lockedUrl\":\n break;\n case \"syncStarted\":\n break;\n case \"syncCompleted\":\n if (message.successfully) {\n await this.configService.ensureConfigFetched();\n }\n break;\n case \"upgradeOrganization\": {\n const upgradeConfirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"upgradeOrganization\" },\n content: { key: \"upgradeOrganizationDesc\" },\n acceptButtonText: { key: \"upgradeOrganization\" },\n type: \"info\",\n });\n if (upgradeConfirmed) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\n \"organizations\",\n message.organizationId,\n \"billing\",\n \"subscription\",\n ]);\n }\n break;\n }\n case \"premiumRequired\": {\n const premiumConfirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"premiumRequired\" },\n content: { key: \"premiumRequiredDesc\" },\n acceptButtonText: { key: \"upgrade\" },\n type: \"success\",\n });\n if (premiumConfirmed) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"settings/subscription/premium\"]);\n }\n break;\n }\n case \"emailVerificationRequired\": {\n const emailVerificationConfirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"emailVerificationRequired\" },\n content: { key: \"emailVerificationRequiredDesc\" },\n acceptButtonText: { key: \"learnMore\" },\n type: \"info\",\n });\n if (emailVerificationConfirmed) {\n this.platformUtilsService.launchUri(\n \"https://bitwarden.com/help/create-bitwarden-account/\",\n );\n }\n break;\n }\n case \"showToast\":\n this.toastService._showToast(message);\n break;\n case \"convertAccountToKeyConnector\":\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/remove-password\"]);\n break;\n default:\n break;\n }\n });\n });\n\n this.router.events.pipe(takeUntil(this.destroy$)).subscribe((event) => {\n if (event instanceof NavigationEnd) {\n const modals = Array.from(document.querySelectorAll(\".modal\"));\n for (const modal of modals) {\n (jq(modal) as any).modal(\"hide\");\n }\n }\n });\n\n this.policyListService.addPolicies([\n new TwoFactorAuthenticationPolicy(),\n new MasterPasswordPolicy(),\n new ResetPasswordPolicy(),\n new PasswordGeneratorPolicy(),\n new SingleOrgPolicy(),\n new RequireSsoPolicy(),\n new PersonalOwnershipPolicy(),\n new DisableSendPolicy(),\n new SendOptionsPolicy(),\n ]);\n\n combineLatest([\n this.configService.getFeatureFlag$(FeatureFlag.ShowPaymentMethodWarningBanners),\n this.paymentMethodWarningsRefresh$,\n ])\n .pipe(\n filter(([showPaymentMethodWarningBanners]) => showPaymentMethodWarningBanners),\n switchMap(() => this.organizationService.memberOrganizations$),\n switchMap(\n async (organizations) =>\n await Promise.all(\n organizations.map((organization) =>\n this.paymentMethodWarningService.update(organization.id),\n ),\n ),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n ngOnDestroy() {\n this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private async displayLogoutReason(logoutReason: LogoutReason) {\n let toastOptions: ToastOptions;\n switch (logoutReason) {\n case \"invalidSecurityStamp\":\n case \"sessionExpired\": {\n toastOptions = {\n variant: \"warning\",\n title: this.i18nService.t(\"loggedOut\"),\n message: this.i18nService.t(\"loginExpired\"),\n };\n break;\n }\n default: {\n toastOptions = {\n variant: \"info\",\n title: this.i18nService.t(\"loggedOut\"),\n message: this.i18nService.t(\"loggedOutDesc\"),\n };\n break;\n }\n }\n\n this.toastService.showToast(toastOptions);\n }\n\n private async logOut(logoutReason: LogoutReason, redirect = true) {\n await this.displayLogoutReason(logoutReason);\n\n await this.eventUploadService.uploadEvents();\n const userId = (await this.stateService.getUserId()) as UserId;\n\n const logoutPromise = firstValueFrom(\n this.authService.authStatusFor$(userId).pipe(\n filter((authenticationStatus) => authenticationStatus === AuthenticationStatus.LoggedOut),\n timeout({\n first: 5_000,\n with: () => {\n throw new Error(\"The logout process did not complete in a reasonable amount of time.\");\n },\n }),\n ),\n );\n\n await Promise.all([\n this.syncService.setLastSync(new Date(0)),\n this.cryptoService.clearKeys(),\n this.cipherService.clear(userId),\n this.folderService.clear(userId),\n this.collectionService.clear(userId),\n this.biometricStateService.logout(userId),\n this.paymentMethodWarningService.clear(),\n ]);\n\n await this.stateEventRunnerService.handleEvent(\"logout\", userId);\n\n await this.searchService.clearIndex();\n this.authService.logOut(async () => {\n await this.stateService.clean({ userId: userId });\n await this.accountService.clean(userId);\n await this.accountService.switchAccount(null);\n\n await logoutPromise;\n\n if (redirect) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.router.navigate([\"/\"]);\n }\n });\n }\n\n private async recordActivity() {\n const activeUserId = await firstValueFrom(\n this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n );\n const now = new Date();\n if (this.lastActivity != null && now.getTime() - this.lastActivity.getTime() < 250) {\n return;\n }\n\n this.lastActivity = now;\n await this.accountService.setAccountActivity(activeUserId, now);\n // Idle states\n if (this.isIdle) {\n this.isIdle = false;\n this.idleStateChanged();\n }\n if (this.idleTimer != null) {\n window.clearTimeout(this.idleTimer);\n this.idleTimer = null;\n }\n this.idleTimer = window.setTimeout(() => {\n if (!this.isIdle) {\n this.isIdle = true;\n this.idleStateChanged();\n }\n }, IdleTimeout);\n }\n\n private idleStateChanged() {\n if (this.isIdle) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.disconnectFromInactivity();\n } else {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.notificationsService.reconnectFromActivity();\n }\n }\n}\n","\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport {\n BasePolicy,\n BasePolicyComponent,\n} from \"@bitwarden/web-vault/app/admin-console/organizations/policies/base-policy.component\";\n\nexport class ActivateAutofillPolicy extends BasePolicy {\n name = \"activateAutofill\";\n description = \"activateAutofillPolicyDesc\";\n type = PolicyType.ActivateAutofill;\n component = ActivateAutofillPolicyComponent;\n\n display(organization: Organization) {\n return organization.useActivateAutofillPolicy;\n }\n}\n\n@Component({\n selector: \"policy-activate-autofill\",\n templateUrl: \"activate-autofill.component.html\",\n})\nexport class ActivateAutofillPolicyComponent extends BasePolicyComponent {}\n","\n {{ \"experimentalFeature\" | i18n }}\n {{\n \"learnMoreAboutAutofill\" | i18n\n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport {\n BasePolicy,\n BasePolicyComponent,\n} from \"@bitwarden/web-vault/app/admin-console/organizations/policies/base-policy.component\";\n\nexport class DisablePersonalVaultExportPolicy extends BasePolicy {\n name = \"disablePersonalVaultExport\";\n description = \"disablePersonalVaultExportDescription\";\n type = PolicyType.DisablePersonalVaultExport;\n component = DisablePersonalVaultExportPolicyComponent;\n}\n\n@Component({\n selector: \"policy-disable-personal-vault-export\",\n templateUrl: \"disable-personal-vault-export.component.html\",\n})\nexport class DisablePersonalVaultExportPolicyComponent extends BasePolicyComponent {}\n","\n {{ \"requireSsoPolicyReq\" | i18n }}\n\n\n\n \n {{ \"turnOn\" | i18n }}\n\n\n
    \n
    \n \n {{ \"maximumVaultTimeoutLabel\" | i18n }}\n \n {{ \"hours\" | i18n }}\n \n \n \n {{ \"minutes\" | i18n }}\n \n \n {{ \"vaultTimeoutAction\" | i18n }}\n \n \n \n \n
    \n
    \n","\n \n {{ \"turnOn\" | i18n }}\n\n","import { Component } from \"@angular/core\";\nimport { FormBuilder, FormControl } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport {\n BasePolicy,\n BasePolicyComponent,\n} from \"@bitwarden/web-vault/app/admin-console/organizations/policies/base-policy.component\";\n\nexport class MaximumVaultTimeoutPolicy extends BasePolicy {\n name = \"maximumVaultTimeout\";\n description = \"maximumVaultTimeoutDesc\";\n type = PolicyType.MaximumVaultTimeout;\n component = MaximumVaultTimeoutPolicyComponent;\n}\n\n@Component({\n selector: \"policy-maximum-timeout\",\n templateUrl: \"maximum-vault-timeout.component.html\",\n})\nexport class MaximumVaultTimeoutPolicyComponent extends BasePolicyComponent {\n vaultTimeoutActionOptions: { name: string; value: string }[];\n data = this.formBuilder.group({\n hours: new FormControl(null),\n minutes: new FormControl(null),\n action: new FormControl(null),\n });\n\n constructor(\n private formBuilder: FormBuilder,\n private i18nService: I18nService,\n ) {\n super();\n this.vaultTimeoutActionOptions = [\n { name: i18nService.t(\"userPreference\"), value: null },\n { name: i18nService.t(VaultTimeoutAction.Lock), value: VaultTimeoutAction.Lock },\n { name: i18nService.t(VaultTimeoutAction.LogOut), value: VaultTimeoutAction.LogOut },\n ];\n }\n\n loadData() {\n const minutes = this.policyResponse.data?.minutes;\n const action = this.policyResponse.data?.action;\n\n this.data.patchValue({\n hours: minutes ? Math.floor(minutes / 60) : null,\n minutes: minutes ? minutes % 60 : null,\n action: action,\n });\n }\n\n buildRequestData() {\n if (this.data.value.hours == null && this.data.value.minutes == null) {\n return null;\n }\n\n return {\n minutes: this.data.value.hours * 60 + this.data.value.minutes,\n action: this.data.value.action,\n };\n }\n\n buildRequest(policiesEnabledMap: Map): Promise {\n const singleOrgEnabled = policiesEnabledMap.get(PolicyType.SingleOrg) ?? false;\n if (this.enabled.value && !singleOrgEnabled) {\n throw new Error(this.i18nService.t(\"requireSsoPolicyReqError\"));\n }\n\n const data = this.buildRequestData();\n if (data?.minutes == null || data?.minutes <= 0) {\n throw new Error(this.i18nService.t(\"invalidMaximumVaultTimeout\"));\n }\n\n return super.buildRequest(policiesEnabledMap);\n }\n}\n","import { Component } from \"@angular/core\";\n\nimport { AppComponent as BaseAppComponent } from \"@bitwarden/web-vault/app/app.component\";\n\nimport { ActivateAutofillPolicy } from \"./admin-console/policies/activate-autofill.component\";\nimport { DisablePersonalVaultExportPolicy } from \"./admin-console/policies/disable-personal-vault-export.component\";\nimport { MaximumVaultTimeoutPolicy } from \"./admin-console/policies/maximum-vault-timeout.component\";\n\n@Component({\n selector: \"app-root\",\n templateUrl: \"../../../../apps/web/src/app/app.component.html\",\n})\nexport class AppComponent extends BaseAppComponent {\n ngOnInit() {\n super.ngOnInit();\n\n this.policyListService.addPolicies([\n new MaximumVaultTimeoutPolicy(),\n new DisablePersonalVaultExportPolicy(),\n new ActivateAutofillPolicy(),\n ]);\n }\n}\n","import { DragDropModule } from \"@angular/cdk/drag-drop\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { BrowserAnimationsModule } from \"@angular/platform-browser/animations\";\nimport { RouterModule } from \"@angular/router\";\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { CoreModule } from \"@bitwarden/web-vault/app/core\";\nimport { OssRoutingModule } from \"@bitwarden/web-vault/app/oss-routing.module\";\nimport { OssModule } from \"@bitwarden/web-vault/app/oss.module\";\nimport { WildcardRoutingModule } from \"@bitwarden/web-vault/app/wildcard-routing.module\";\n\nimport { OrganizationsModule } from \"./admin-console/organizations/organizations.module\";\nimport { ActivateAutofillPolicyComponent } from \"./admin-console/policies/activate-autofill.component\";\nimport { DisablePersonalVaultExportPolicyComponent } from \"./admin-console/policies/disable-personal-vault-export.component\";\nimport { MaximumVaultTimeoutPolicyComponent } from \"./admin-console/policies/maximum-vault-timeout.component\";\nimport { AppRoutingModule } from \"./app-routing.module\";\nimport { AppComponent } from \"./app.component\";\n\n/**\n * This is the AppModule for the commercial version of Bitwarden.\n * `apps/web/app.module.ts` contains the OSS version.\n *\n * You probably do not want to modify this file. Consider editing `oss.module.ts` instead.\n */\n@NgModule({\n imports: [\n OverlayModule,\n OssModule,\n JslibModule,\n BrowserAnimationsModule,\n FormsModule,\n ReactiveFormsModule,\n CoreModule,\n InfiniteScrollModule,\n DragDropModule,\n AppRoutingModule,\n OssRoutingModule,\n OrganizationsModule, // Must be after OssRoutingModule for competing routes to resolve properly\n RouterModule,\n WildcardRoutingModule, // Needs to be last to catch all non-existing routes\n ],\n declarations: [\n AppComponent,\n DisablePersonalVaultExportPolicyComponent,\n MaximumVaultTimeoutPolicyComponent,\n ActivateAutofillPolicyComponent,\n ],\n bootstrap: [AppComponent],\n})\nexport class AppModule {}\n","import { enableProdMode } from \"@angular/core\";\nimport { platformBrowserDynamic } from \"@angular/platform-browser-dynamic\";\n\nimport \"bootstrap\";\nimport \"jquery\";\nimport \"popper.js\";\n\nrequire(\"@bitwarden/web-vault/scss/styles.scss\");\nrequire(\"@bitwarden/web-vault/scss/tailwind.css\");\n\nimport { AppModule } from \"./app/app.module\";\n\nif (process.env.NODE_ENV === \"production\") {\n enableProdMode();\n}\n\n// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nplatformBrowserDynamic().bootstrapModule(AppModule, { preserveWhitespaces: true });\n","import { Directive } from \"@angular/core\";\nimport { ActivatedRoute, NavigationExtras, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport {\n LoginStrategyServiceAbstraction,\n SsoLoginCredentials,\n TrustedDeviceUserDecryptionOption,\n UserDecryptionOptions,\n UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SsoPreValidateResponse } from \"@bitwarden/common/auth/models/response/sso-pre-validate.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Directive()\nexport class SsoComponent {\n identifier: string;\n loggingIn = false;\n\n formPromise: Promise;\n initiateSsoFormPromise: Promise;\n onSuccessfulLogin: () => Promise;\n onSuccessfulLoginNavigate: () => Promise;\n onSuccessfulLoginTwoFactorNavigate: () => Promise;\n onSuccessfulLoginChangePasswordNavigate: () => Promise;\n onSuccessfulLoginForceResetNavigate: () => Promise;\n\n onSuccessfulLoginTde: () => Promise;\n onSuccessfulLoginTdeNavigate: () => Promise;\n\n protected twoFactorRoute = \"2fa\";\n protected successRoute = \"lock\";\n protected trustedDeviceEncRoute = \"login-initiated\";\n protected changePasswordRoute = \"set-password\";\n protected forcePasswordResetRoute = \"update-temp-password\";\n protected clientId: string;\n protected redirectUri: string;\n protected state: string;\n protected codeChallenge: string;\n\n constructor(\n protected ssoLoginService: SsoLoginServiceAbstraction,\n protected loginStrategyService: LoginStrategyServiceAbstraction,\n protected router: Router,\n protected i18nService: I18nService,\n protected route: ActivatedRoute,\n protected stateService: StateService,\n protected platformUtilsService: PlatformUtilsService,\n protected apiService: ApiService,\n protected cryptoFunctionService: CryptoFunctionService,\n protected environmentService: EnvironmentService,\n protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n protected logService: LogService,\n protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n protected configService: ConfigService,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected accountService: AccountService,\n ) {}\n\n async ngOnInit() {\n // eslint-disable-next-line rxjs/no-async-subscribe\n this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n if (qParams.code != null && qParams.state != null) {\n const codeVerifier = await this.ssoLoginService.getCodeVerifier();\n const state = await this.ssoLoginService.getSsoState();\n await this.ssoLoginService.setCodeVerifier(null);\n await this.ssoLoginService.setSsoState(null);\n if (\n qParams.code != null &&\n codeVerifier != null &&\n state != null &&\n this.checkState(state, qParams.state)\n ) {\n const ssoOrganizationIdentifier = this.getOrgIdentifierFromState(qParams.state);\n await this.logIn(qParams.code, codeVerifier, ssoOrganizationIdentifier);\n }\n } else if (\n qParams.clientId != null &&\n qParams.redirectUri != null &&\n qParams.state != null &&\n qParams.codeChallenge != null\n ) {\n this.redirectUri = qParams.redirectUri;\n this.state = qParams.state;\n this.codeChallenge = qParams.codeChallenge;\n this.clientId = qParams.clientId;\n }\n });\n }\n\n async submit(returnUri?: string, includeUserIdentifier?: boolean) {\n if (this.identifier == null || this.identifier === \"\") {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"ssoValidationFailed\"),\n this.i18nService.t(\"ssoIdentifierRequired\"),\n );\n return;\n }\n\n this.initiateSsoFormPromise = this.apiService.preValidateSso(this.identifier);\n const response = await this.initiateSsoFormPromise;\n\n const authorizeUrl = await this.buildAuthorizeUrl(\n returnUri,\n includeUserIdentifier,\n response.token,\n );\n this.platformUtilsService.launchUri(authorizeUrl, { sameWindow: true });\n }\n\n protected async buildAuthorizeUrl(\n returnUri?: string,\n includeUserIdentifier?: boolean,\n token?: string,\n ): Promise {\n let codeChallenge = this.codeChallenge;\n let state = this.state;\n\n const passwordOptions: any = {\n type: \"password\",\n length: 64,\n uppercase: true,\n lowercase: true,\n numbers: true,\n special: false,\n };\n\n if (codeChallenge == null) {\n const codeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n const codeVerifierHash = await this.cryptoFunctionService.hash(codeVerifier, \"sha256\");\n codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n await this.ssoLoginService.setCodeVerifier(codeVerifier);\n }\n\n if (state == null) {\n state = await this.passwordGenerationService.generatePassword(passwordOptions);\n if (returnUri) {\n state += `_returnUri='${returnUri}'`;\n }\n }\n\n // Add Organization Identifier to state\n state += `_identifier=${this.identifier}`;\n\n // Save state (regardless of new or existing)\n await this.ssoLoginService.setSsoState(state);\n\n const env = await firstValueFrom(this.environmentService.environment$);\n\n let authorizeUrl =\n env.getIdentityUrl() +\n \"/connect/authorize?\" +\n \"client_id=\" +\n this.clientId +\n \"&redirect_uri=\" +\n encodeURIComponent(this.redirectUri) +\n \"&\" +\n \"response_type=code&scope=api offline_access&\" +\n \"state=\" +\n state +\n \"&code_challenge=\" +\n codeChallenge +\n \"&\" +\n \"code_challenge_method=S256&response_mode=query&\" +\n \"domain_hint=\" +\n encodeURIComponent(this.identifier) +\n \"&ssoToken=\" +\n encodeURIComponent(token);\n\n if (includeUserIdentifier) {\n const userIdentifier = await this.apiService.getSsoUserIdentifier();\n authorizeUrl += `&user_identifier=${encodeURIComponent(userIdentifier)}`;\n }\n\n return authorizeUrl;\n }\n\n private async logIn(code: string, codeVerifier: string, orgSsoIdentifier: string): Promise {\n this.loggingIn = true;\n try {\n const email = await this.ssoLoginService.getSsoEmail();\n\n const credentials = new SsoLoginCredentials(\n code,\n codeVerifier,\n this.redirectUri,\n orgSsoIdentifier,\n email,\n );\n this.formPromise = this.loginStrategyService.logIn(credentials);\n const authResult = await this.formPromise;\n\n if (authResult.requiresTwoFactor) {\n return await this.handleTwoFactorRequired(orgSsoIdentifier);\n }\n\n // Everything after the 2FA check is considered a successful login\n // Just have to figure out where to send the user\n\n // Save off the OrgSsoIdentifier for use in the TDE flows (or elsewhere)\n // - TDE login decryption options component\n // - Browser SSO on extension open\n // Note: you cannot set this in state before 2FA b/c there won't be an account in state.\n await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(orgSsoIdentifier);\n\n // Users enrolled in admin acct recovery can be forced to set a new password after\n // having the admin set a temp password for them (affects TDE & standard users)\n if (authResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n // Weak password is not a valid scenario here b/c we cannot have evaluated a MP yet\n return await this.handleForcePasswordReset(orgSsoIdentifier);\n }\n\n // must come after 2fa check since user decryption options aren't available if 2fa is required\n const userDecryptionOpts = await firstValueFrom(\n this.userDecryptionOptionsService.userDecryptionOptions$,\n );\n\n const tdeEnabled = await this.isTrustedDeviceEncEnabled(\n userDecryptionOpts.trustedDeviceOption,\n );\n\n if (tdeEnabled) {\n return await this.handleTrustedDeviceEncryptionEnabled(\n authResult,\n orgSsoIdentifier,\n userDecryptionOpts,\n );\n }\n\n // In the standard, non TDE case, a user must set password if they don't\n // have one and they aren't using key connector.\n // Note: TDE & Key connector are mutually exclusive org config options.\n const requireSetPassword =\n !userDecryptionOpts.hasMasterPassword &&\n userDecryptionOpts.keyConnectorOption === undefined;\n\n if (requireSetPassword || authResult.resetMasterPassword) {\n // Change implies going no password -> password in this case\n return await this.handleChangePasswordRequired(orgSsoIdentifier);\n }\n\n // Standard SSO login success case\n return await this.handleSuccessfulLogin();\n } catch (e) {\n await this.handleLoginError(e);\n }\n }\n\n private async isTrustedDeviceEncEnabled(\n trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n ): Promise {\n return trustedDeviceOption !== undefined;\n }\n\n private async handleTwoFactorRequired(orgIdentifier: string) {\n await this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginTwoFactorNavigate,\n [this.twoFactorRoute],\n {\n queryParams: {\n identifier: orgIdentifier,\n sso: \"true\",\n },\n },\n );\n }\n\n private async handleTrustedDeviceEncryptionEnabled(\n authResult: AuthResult,\n orgIdentifier: string,\n userDecryptionOpts: UserDecryptionOptions,\n ): Promise {\n // If user doesn't have a MP, but has reset password permission, they must set a MP\n if (\n !userDecryptionOpts.hasMasterPassword &&\n userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n ) {\n // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n // Note: we cannot directly navigate in this scenario as we are in a pre-decryption state, and\n // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n userId,\n );\n }\n\n if (this.onSuccessfulLoginTde != null) {\n // Don't await b/c causes hang on desktop & browser\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLoginTde();\n }\n\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginTdeNavigate,\n // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n // their user key, the login-initiated guard will redirect them to the vault)\n [this.trustedDeviceEncRoute],\n );\n }\n\n private async handleChangePasswordRequired(orgIdentifier: string) {\n await this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginChangePasswordNavigate,\n [this.changePasswordRoute],\n {\n queryParams: {\n identifier: orgIdentifier,\n },\n },\n );\n }\n\n private async handleForcePasswordReset(orgIdentifier: string) {\n await this.navigateViaCallbackOrRoute(\n this.onSuccessfulLoginForceResetNavigate,\n [this.forcePasswordResetRoute],\n {\n queryParams: {\n identifier: orgIdentifier,\n },\n },\n );\n }\n\n private async handleSuccessfulLogin() {\n if (this.onSuccessfulLogin != null) {\n // Don't await b/c causes hang on desktop & browser\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.onSuccessfulLogin();\n }\n\n await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n }\n\n private async handleLoginError(e: any) {\n this.logService.error(e);\n\n // TODO: Key Connector Service should pass this error message to the logout callback instead of displaying here\n if (e.message === \"Key Connector error\") {\n this.platformUtilsService.showToast(\n \"error\",\n null,\n this.i18nService.t(\"ssoKeyConnectorError\"),\n );\n }\n }\n\n private async navigateViaCallbackOrRoute(\n callback: () => Promise,\n commands: unknown[],\n extras?: NavigationExtras,\n ): Promise {\n if (callback) {\n await callback();\n } else {\n await this.router.navigate(commands, extras);\n }\n }\n\n private getOrgIdentifierFromState(state: string): string {\n if (state === null || state === undefined) {\n return null;\n }\n\n const stateSplit = state.split(\"_identifier=\");\n return stateSplit.length > 1 ? stateSplit[1] : null;\n }\n\n private checkState(state: string, checkState: string): boolean {\n if (state === null || state === undefined) {\n return false;\n }\n if (checkState === null || checkState === undefined) {\n return false;\n }\n\n const stateSplit = state.split(\"_identifier=\");\n const checkStateSplit = checkState.split(\"_identifier=\");\n return stateSplit[0] === checkStateSplit[0];\n }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const EmailIcon = svgIcon`\n \n Email\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RecoveryCodeIcon = svgIcon`\n \n Recovery Code\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const TOTPIcon = svgIcon`\n\n TOTP Authenticator\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const WebAuthnIcon = svgIcon`\n \n Webauthn\n \n \n \n \n \n \n \n \n \n \n`;\n","\n \n \n \n \n \n \n \n \n \n \n\n","import { Component, Input } from \"@angular/core\";\n\nimport { EmailIcon } from \"../icons/email.icon\";\nimport { RecoveryCodeIcon } from \"../icons/recovery.icon\";\nimport { TOTPIcon } from \"../icons/totp.icon\";\nimport { WebAuthnIcon } from \"../icons/webauthn.icon\";\n\n@Component({\n selector: \"auth-two-factor-icon\",\n templateUrl: \"./two-factor-icon.component.html\",\n})\nexport class TwoFactorIconComponent {\n @Input() provider: any;\n @Input() name: string;\n\n protected readonly Icons = {\n TOTPIcon,\n EmailIcon,\n WebAuthnIcon,\n RecoveryCodeIcon,\n };\n\n constructor() {}\n}\n","import { Injectable } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { MasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n constructor(\n private authService: AuthService,\n private router: Router,\n private messagingService: MessagingService,\n private keyConnectorService: KeyConnectorService,\n private accountService: AccountService,\n private masterPasswordService: MasterPasswordServiceAbstraction,\n ) {}\n\n async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {\n const authStatus = await this.authService.getAuthStatus();\n\n if (authStatus === AuthenticationStatus.LoggedOut) {\n this.messagingService.send(\"authBlocked\", { url: routerState.url });\n return false;\n }\n\n if (authStatus === AuthenticationStatus.Locked) {\n if (routerState != null) {\n this.messagingService.send(\"lockedUrl\", { url: routerState.url });\n }\n return this.router.createUrlTree([\"lock\"], { queryParams: { promptBiometric: true } });\n }\n\n if (\n !routerState.url.includes(\"remove-password\") &&\n (await this.keyConnectorService.getConvertAccountRequired())\n ) {\n return this.router.createUrlTree([\"/remove-password\"]);\n }\n\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n const forceSetPasswordReason = await firstValueFrom(\n this.masterPasswordService.forceSetPasswordReason$(userId),\n );\n\n if (\n forceSetPasswordReason ===\n ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission &&\n !routerState.url.includes(\"set-password\")\n ) {\n return this.router.createUrlTree([\"/set-password\"]);\n }\n\n if (\n forceSetPasswordReason !== ForceSetPasswordReason.None &&\n !routerState.url.includes(\"update-temp-password\")\n ) {\n return this.router.createUrlTree([\"/update-temp-password\"]);\n }\n\n return true;\n }\n}\n","import { inject } from \"@angular/core\";\nimport {\n ActivatedRouteSnapshot,\n CanActivateFn,\n Router,\n RouterStateSnapshot,\n} from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n/**\n * Only allow access to this route if the vault is locked.\n * If TDE is enabled then the user must also have had a user key at some point.\n * Otherwise redirect to root.\n *\n * TODO: This should return Observable once we can remove all the promises\n */\nexport function lockGuard(): CanActivateFn {\n return async (\n activatedRouteSnapshot: ActivatedRouteSnapshot,\n routerStateSnapshot: RouterStateSnapshot,\n ) => {\n const authService = inject(AuthService);\n const cryptoService = inject(CryptoService);\n const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n const platformUtilService = inject(PlatformUtilsService);\n const messagingService = inject(MessagingService);\n const router = inject(Router);\n const userVerificationService = inject(UserVerificationService);\n\n const authStatus = await authService.getAuthStatus();\n if (authStatus !== AuthenticationStatus.Locked) {\n return router.createUrlTree([\"/\"]);\n }\n\n // If legacy user on web, redirect to migration page\n if (await cryptoService.isLegacyUser()) {\n if (platformUtilService.getClientType() === ClientType.Web) {\n return router.createUrlTree([\"migrate-legacy-encryption\"]);\n }\n // Log out legacy users on other clients\n messagingService.send(\"logout\");\n return false;\n }\n\n // User is authN and in locked state.\n\n const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n\n // Create special exception which allows users to go from the login-initiated page to the lock page for the approve w/ MP flow\n // The MP check is necessary to prevent direct manual navigation from other locked state pages for users who don't have a MP\n if (\n activatedRouteSnapshot.queryParams[\"from\"] === \"login-initiated\" &&\n tdeEnabled &&\n (await userVerificationService.hasMasterPassword())\n ) {\n return true;\n }\n\n // If authN user with TDE directly navigates to lock, kick them upwards so redirect guard can\n // properly route them to the login decryption options component.\n const everHadUserKey = await firstValueFrom(cryptoService.everHadUserKey$);\n if (tdeEnabled && !everHadUserKey) {\n return router.createUrlTree([\"/\"]);\n }\n\n return true;\n };\n}\n","import { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nexport interface RedirectRoutes {\n loggedIn: string;\n loggedOut: string;\n locked: string;\n notDecrypted: string;\n}\n\nconst defaultRoutes: RedirectRoutes = {\n loggedIn: \"/vault\",\n loggedOut: \"/login\",\n locked: \"/lock\",\n notDecrypted: \"/login-initiated\",\n};\n\n/**\n * Guard that consolidates all redirection logic, should be applied to root route.\n *\n * TODO: This should return Observable once we can get rid of all the promises\n */\nexport function redirectGuard(overrides: Partial = {}): CanActivateFn {\n const routes = { ...defaultRoutes, ...overrides };\n return async (route) => {\n const authService = inject(AuthService);\n const cryptoService = inject(CryptoService);\n const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n const logService = inject(LogService);\n const router = inject(Router);\n\n const authStatus = await authService.getAuthStatus();\n\n if (authStatus === AuthenticationStatus.LoggedOut) {\n return router.createUrlTree([routes.loggedOut], { queryParams: route.queryParams });\n }\n\n if (authStatus === AuthenticationStatus.Unlocked) {\n return router.createUrlTree([routes.loggedIn], { queryParams: route.queryParams });\n }\n\n // If locked, TDE is enabled, and the user hasn't decrypted yet, then redirect to the\n // login decryption options component.\n const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n const everHadUserKey = await firstValueFrom(cryptoService.everHadUserKey$);\n if (authStatus === AuthenticationStatus.Locked && tdeEnabled && !everHadUserKey) {\n logService.info(\n \"Sending user to TDE decryption options. AuthStatus is %s. TDE support is %s. Ever had user key is %s.\",\n AuthenticationStatus[authStatus],\n tdeEnabled,\n everHadUserKey,\n );\n return router.createUrlTree([routes.notDecrypted], { queryParams: route.queryParams });\n }\n\n if (authStatus === AuthenticationStatus.Locked) {\n return router.createUrlTree([routes.locked], { queryParams: route.queryParams });\n }\n\n return router.createUrlTree([\"/\"]);\n };\n}\n","import { inject } from \"@angular/core\";\nimport {\n ActivatedRouteSnapshot,\n Router,\n RouterStateSnapshot,\n CanActivateFn,\n} from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\n/**\n * Only allow access to this route if the vault is locked and has never been decrypted.\n * Otherwise redirect to root.\n *\n * TODO: This should return Observable once we can get rid of all the promises\n */\nexport function tdeDecryptionRequiredGuard(): CanActivateFn {\n return async (_: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const authService = inject(AuthService);\n const cryptoService = inject(CryptoService);\n const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n const logService = inject(LogService);\n const router = inject(Router);\n\n const authStatus = await authService.getAuthStatus();\n const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n const everHadUserKey = await firstValueFrom(cryptoService.everHadUserKey$);\n\n // We need to determine if we should bypass the decryption options and send the user to the vault.\n // The ONLY time that we want to send a user to the decryption options is when:\n // 1. The user's auth status is Locked, AND\n // 2. TDE is enabled, AND\n // 3. The user has never had a user key in state since last logout.\n // The inverse of this is when we should send the user to the vault.\n if (authStatus !== AuthenticationStatus.Locked || !tdeEnabled || everHadUserKey) {\n return router.createUrlTree([\"/\"]);\n }\n\n logService.info(\n \"Sending user to TDE decryption options. AuthStatus is %s. TDE support is %s. Ever had user key is %s.\",\n AuthenticationStatus[authStatus],\n tdeEnabled,\n everHadUserKey,\n );\n\n return true;\n };\n}\n","import { Injectable, inject } from \"@angular/core\";\nimport { CanActivate, CanActivateFn, Router, UrlTree } from \"@angular/router\";\nimport { Observable, map } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\n\n/**\n * @deprecated use unauthGuardFn function instead\n */\n@Injectable()\nexport class UnauthGuard implements CanActivate {\n protected homepage = \"vault\";\n constructor(\n private authService: AuthService,\n private router: Router,\n ) {}\n\n async canActivate() {\n const authStatus = await this.authService.getAuthStatus();\n\n if (authStatus === AuthenticationStatus.LoggedOut) {\n return true;\n }\n\n if (authStatus === AuthenticationStatus.Locked) {\n return this.router.createUrlTree([\"lock\"]);\n }\n\n return this.router.createUrlTree([this.homepage]);\n }\n}\n\ntype UnauthRoutes = {\n homepage: () => string;\n locked: string;\n};\n\nconst defaultRoutes: UnauthRoutes = {\n homepage: () => \"/vault\",\n locked: \"/lock\",\n};\n\nfunction unauthGuard(routes: UnauthRoutes): Observable {\n const authService = inject(AuthService);\n const router = inject(Router);\n\n return authService.activeAccountStatus$.pipe(\n map((status) => {\n if (status == null || status === AuthenticationStatus.LoggedOut) {\n return true;\n } else if (status === AuthenticationStatus.Locked) {\n return router.createUrlTree([routes.locked]);\n } else {\n return router.createUrlTree([routes.homepage()]);\n }\n }),\n );\n}\n\nexport function unauthGuardFn(overrides: Partial = {}): CanActivateFn {\n return () => unauthGuard({ ...defaultRoutes, ...overrides });\n}\n","import { AbstractControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nimport { FormGroupControls } from \"../../platform/abstractions/form-validation-errors.service\";\n\nexport class InputsFieldMatch {\n /**\n * Check to ensure two fields do not have the same value\n *\n * @deprecated Use compareInputs() instead\n */\n static validateInputsDoesntMatch(matchTo: string, errorMessage: string): ValidatorFn {\n return (control: AbstractControl) => {\n if (control.parent && control.parent.controls) {\n return control?.value === (control?.parent?.controls as FormGroupControls)[matchTo].value\n ? {\n inputsMatchError: {\n message: errorMessage,\n },\n }\n : null;\n }\n\n return null;\n };\n }\n\n //check to ensure two fields have the same value\n static validateInputsMatch(matchTo: string, errorMessage: string): ValidatorFn {\n return (control: AbstractControl) => {\n if (control.parent && control.parent.controls) {\n return control?.value === (control?.parent?.controls as FormGroupControls)[matchTo].value\n ? null\n : {\n inputsDoesntMatchError: {\n message: errorMessage,\n },\n };\n }\n\n return null;\n };\n }\n\n /**\n * Checks the formGroup if two fields have the same value and validation is controlled from either field\n *\n * @deprecated\n * Use compareInputs() instead.\n *\n * For more info on deprecation\n * - Do not use untyped `options` object in formBuilder.group() {@link https://angular.dev/api/forms/UntypedFormBuilder}\n * - Use formBuilder.group() overload with AbstractControlOptions type instead {@link https://angular.dev/api/forms/AbstractControlOptions}\n *\n * Remove this method after deprecated instances are replaced\n */\n static validateFormInputsMatch(field: string, fieldMatchTo: string, errorMessage: string) {\n return (formGroup: UntypedFormGroup) => {\n const fieldCtrl = formGroup.controls[field];\n const fieldMatchToCtrl = formGroup.controls[fieldMatchTo];\n\n if (fieldCtrl.value !== fieldMatchToCtrl.value) {\n fieldMatchToCtrl.setErrors({\n inputsDoesntMatchError: {\n message: errorMessage,\n },\n });\n } else {\n fieldMatchToCtrl.setErrors(null);\n }\n };\n }\n\n /**\n * Checks whether two form controls do or do not have the same input value (except for empty string values).\n *\n * - Validation is controlled from either form control.\n * - The error message is displayed under controlB by default, but can be set to controlA.\n *\n * @param validationGoal Whether you want to verify that the form control input values match or do not match\n * @param controlNameA The name of the first form control to compare.\n * @param controlNameB The name of the second form control to compare.\n * @param errorMessage The error message to display if there is an error. This will probably\n * be an i18n translated string.\n * @param showErrorOn The control under which you want to display the error (default is controlB).\n */\n static compareInputs(\n validationGoal: \"match\" | \"doNotMatch\",\n controlNameA: string,\n controlNameB: string,\n errorMessage: string,\n showErrorOn: \"controlA\" | \"controlB\" = \"controlB\",\n ): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const controlA = control.get(controlNameA);\n const controlB = control.get(controlNameB);\n\n if (!controlA || !controlB) {\n return null;\n }\n\n const controlThatShowsError = showErrorOn === \"controlA\" ? controlA : controlB;\n\n // Don't compare empty strings\n if (controlA.value === \"\" && controlB.value === \"\") {\n return pass();\n }\n\n const controlValuesMatch = controlA.value === controlB.value;\n\n if (validationGoal === \"match\") {\n if (controlValuesMatch) {\n return pass();\n } else {\n return fail();\n }\n }\n\n if (validationGoal === \"doNotMatch\") {\n if (!controlValuesMatch) {\n return pass();\n } else {\n return fail();\n }\n }\n\n return null; // default return\n\n function fail() {\n controlThatShowsError.setErrors({\n // Preserve any pre-existing errors\n ...controlThatShowsError.errors,\n // Add new inputMatchError\n inputMatchError: {\n message: errorMessage,\n },\n });\n\n return {\n inputMatchError: {\n message: errorMessage,\n },\n };\n }\n\n function pass(): null {\n // Get the current errors object\n const errorsObj = controlThatShowsError?.errors;\n\n if (errorsObj != null) {\n // Remove any inputMatchError if it exists, since that is the sole error we are targeting with this validator\n if (errorsObj?.inputMatchError) {\n delete errorsObj.inputMatchError;\n }\n\n // Check if the errorsObj is now empty\n const isEmptyObj = Object.keys(errorsObj).length === 0;\n\n // If the errorsObj is empty, set errors to null, otherwise set the errors to an object of pre-existing errors (other than inputMatchError)\n controlThatShowsError.setErrors(isEmptyObj ? null : errorsObj);\n }\n\n // Return null for this validator\n return null;\n }\n };\n }\n}\n","import { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, ElementRef, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { AccountInfo, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BitPayInvoiceRequest } from \"@bitwarden/common/billing/models/request/bit-pay-invoice.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport type AddAccountCreditDialogParams = {\n organizationId?: string;\n providerId?: string;\n};\n\nexport enum AddAccountCreditDialogResultType {\n Closed = \"closed\",\n Submitted = \"submitted\",\n}\n\nexport const openAddAccountCreditDialog = (\n dialogService: DialogService,\n dialogConfig: DialogConfig,\n) =>\n dialogService.open(\n AddAccountCreditDialogComponent,\n dialogConfig,\n );\n\ntype PayPalConfig = {\n businessId?: string;\n buttonAction?: string;\n returnUrl?: string;\n customField?: string;\n subject?: string;\n};\n\n@Component({\n templateUrl: \"./add-account-credit-dialog.component.html\",\n})\nexport class AddAccountCreditDialogComponent implements OnInit {\n @ViewChild(\"payPalForm\", { read: ElementRef, static: true }) payPalForm: ElementRef;\n protected formGroup = new FormGroup({\n paymentMethod: new FormControl(PaymentMethodType.PayPal),\n creditAmount: new FormControl(null, [Validators.required, Validators.min(0.01)]),\n });\n protected payPalConfig: PayPalConfig;\n protected ResultType = AddAccountCreditDialogResultType;\n\n private organization?: Organization;\n private provider?: Provider;\n private user?: { id: UserId } & AccountInfo;\n\n constructor(\n private accountService: AccountService,\n private apiService: ApiService,\n private configService: ConfigService,\n @Inject(DIALOG_DATA) private dialogParams: AddAccountCreditDialogParams,\n private dialogRef: DialogRef,\n private organizationService: OrganizationService,\n private platformUtilsService: PlatformUtilsService,\n private providerService: ProviderService,\n ) {\n this.payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;\n }\n\n protected readonly paymentMethodType = PaymentMethodType;\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n return;\n }\n\n if (this.formGroup.value.paymentMethod === PaymentMethodType.PayPal) {\n this.payPalForm.nativeElement.submit();\n return;\n }\n\n if (this.formGroup.value.paymentMethod === PaymentMethodType.BitPay) {\n const request = this.getBitPayInvoiceRequest();\n const bitPayUrl = await this.apiService.postBitPayInvoice(request);\n this.platformUtilsService.launchUri(bitPayUrl);\n return;\n }\n\n this.dialogRef.close(AddAccountCreditDialogResultType.Submitted);\n };\n\n async ngOnInit(): Promise {\n let payPalCustomField: string;\n\n if (this.dialogParams.organizationId) {\n this.formGroup.patchValue({\n creditAmount: 20.0,\n });\n this.organization = await this.organizationService.get(this.dialogParams.organizationId);\n payPalCustomField = \"organization_id:\" + this.organization.id;\n this.payPalConfig.subject = this.organization.name;\n } else if (this.dialogParams.providerId) {\n this.formGroup.patchValue({\n creditAmount: 20.0,\n });\n this.provider = await this.providerService.get(this.dialogParams.providerId);\n payPalCustomField = \"provider_id:\" + this.provider.id;\n this.payPalConfig.subject = this.provider.name;\n } else {\n this.formGroup.patchValue({\n creditAmount: 10.0,\n });\n this.user = await firstValueFrom(this.accountService.activeAccount$);\n payPalCustomField = \"user_id:\" + this.user.id;\n this.payPalConfig.subject = this.user.email;\n }\n\n const region = await firstValueFrom(this.configService.cloudRegion$);\n\n payPalCustomField += \",account_credit:1\";\n payPalCustomField += `,region:${region}`;\n\n this.payPalConfig.customField = payPalCustomField;\n this.payPalConfig.returnUrl = window.location.href;\n }\n\n getBitPayInvoiceRequest(): BitPayInvoiceRequest {\n const request = new BitPayInvoiceRequest();\n if (this.organization) {\n request.name = this.organization.name;\n request.organizationId = this.organization.id;\n } else if (this.provider) {\n request.name = this.provider.name;\n request.providerId = this.provider.id;\n } else {\n request.email = this.user.email;\n request.userId = this.user.id;\n }\n\n request.credit = true;\n request.amount = this.formGroup.value.creditAmount;\n request.returnUrl = window.location.href;\n\n return request;\n }\n}\n","
    \n \n \n

    {{ \"creditDelayed\" | i18n }}

    \n
    \n \n \n {{ \"payPal\" | i18n }}\n \n \n {{ \"bitcoin\" | i18n }}\n \n \n
    \n
    \n \n {{ \"amount\" | i18n }}\n \n $USD\n \n
    \n
    \n \n \n \n {{ \"cancel\" | i18n }}\n \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n","\n \n {{ \"loading\" | i18n }}\n\n\n \n \n {{ \"date\" | i18n }}\n {{ \"invoice\" | i18n }}\n {{ \"total\" | i18n }}\n {{ \"status\" | i18n }}\n {{ \"clientDetails\" | i18n }}\n \n \n \n \n {{ invoice.date | date: \"mediumDate\" }}\n \n \n {{ invoice.number }}\n \n \n {{ invoice.total | currency: \"$\" }}\n \n \n {{ \"open\" | i18n | titlecase }}\n \n \n \n {{ \"unpaid\" | i18n | titlecase }}\n \n \n \n {{ \"paid\" | i18n | titlecase }}\n \n \n \n {{ \"uncollectible\" | i18n | titlecase }}\n \n \n \n \n \n \n \n\n
    \n \n
    \n","import { Component, Input, OnInit } from \"@angular/core\";\n\nimport {\n InvoiceResponse,\n InvoicesResponse,\n} from \"@bitwarden/common/billing/models/response/invoices.response\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\n\n@Component({\n selector: \"app-invoices\",\n templateUrl: \"./invoices.component.html\",\n})\nexport class InvoicesComponent implements OnInit {\n @Input() startWith?: InvoicesResponse;\n @Input() getInvoices?: () => Promise;\n @Input() getClientInvoiceReport?: (invoiceId: string) => Promise;\n @Input() getClientInvoiceReportName?: (invoiceResponse: InvoiceResponse) => string;\n\n protected invoices: InvoiceResponse[] = [];\n protected loading = true;\n\n constructor(private fileDownloadService: FileDownloadService) {}\n\n runExport = async (invoiceId: string): Promise => {\n const blobData = await this.getClientInvoiceReport(invoiceId);\n let fileName = \"report.csv\";\n if (this.getClientInvoiceReportName) {\n const invoice = this.invoices.find((invoice) => invoice.id === invoiceId);\n fileName = this.getClientInvoiceReportName(invoice);\n }\n this.fileDownloadService.download({\n fileName,\n blobData,\n blobOptions: {\n type: \"text/csv\",\n },\n });\n };\n\n async ngOnInit(): Promise {\n if (this.startWith) {\n this.invoices = this.startWith.invoices;\n } else if (this.getInvoices) {\n const response = await this.getInvoices();\n this.invoices = response.invoices;\n }\n this.loading = false;\n }\n\n expandInvoiceStatus = (\n invoice: InvoiceResponse,\n ): \"open\" | \"unpaid\" | \"paid\" | \"uncollectible\" => {\n switch (invoice.status) {\n case \"open\": {\n const dueDate = new Date(invoice.dueDate);\n return dueDate < new Date() ? \"unpaid\" : invoice.status;\n }\n case \"paid\":\n case \"uncollectible\": {\n return invoice.status;\n }\n }\n };\n}\n","import { Component } from \"@angular/core\";\n\nimport { svgIcon } from \"@bitwarden/components\";\n\nconst partnerTrustIcon = svgIcon`\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n\n@Component({\n selector: \"app-no-invoices\",\n template: `
    \n \n

    {{ \"noInvoicesToList\" | i18n }}

    \n
    `,\n})\nexport class NoInvoicesComponent {\n icon = partnerTrustIcon;\n}\n","
    \n
    \n
    \n \n {{ \"country\" | i18n }}\n \n \n \n \n
    \n
    \n \n {{ \"zipPostalCode\" | i18n }}\n \n \n
    \n
    \n \n \n {{ \"includeVAT\" | i18n }}\n \n
    \n
    \n \n
    \n \n {{ \"taxIdNumber\" | i18n }}\n \n \n
    \n \n \n
    \n \n {{ \"address1\" | i18n }}\n \n \n
    \n
    \n \n {{ \"address2\" | i18n }}\n \n \n
    \n
    \n \n {{ \"cityTown\" | i18n }}\n \n \n
    \n
    \n \n {{ \"stateProvince\" | i18n }}\n \n \n
    \n \n \n\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\n\ntype Country = {\n name: string;\n value: string;\n disabled: boolean;\n};\n\n@Component({\n selector: \"app-manage-tax-information\",\n templateUrl: \"./manage-tax-information.component.html\",\n})\nexport class ManageTaxInformationComponent implements OnInit, OnDestroy {\n @Input() startWith: TaxInformation;\n @Input() onSubmit?: (taxInformation: TaxInformation) => Promise;\n @Output() taxInformationUpdated = new EventEmitter();\n\n protected formGroup = this.formBuilder.group({\n country: [\"\", Validators.required],\n postalCode: [\"\", Validators.required],\n includeTaxId: false,\n taxId: \"\",\n line1: \"\",\n line2: \"\",\n city: \"\",\n state: \"\",\n });\n\n private destroy$ = new Subject();\n\n private taxInformation: TaxInformation;\n\n constructor(private formBuilder: FormBuilder) {}\n\n getTaxInformation = (): TaxInformation & { includeTaxId: boolean } => ({\n ...this.taxInformation,\n includeTaxId: this.formGroup.value.includeTaxId,\n });\n\n submit = async () => {\n this.formGroup.markAllAsTouched();\n if (this.formGroup.invalid) {\n return;\n }\n await this.onSubmit(this.taxInformation);\n this.taxInformationUpdated.emit();\n };\n\n touch = (): boolean => {\n this.formGroup.markAllAsTouched();\n return this.formGroup.valid;\n };\n\n async ngOnInit() {\n if (this.startWith) {\n this.formGroup.patchValue({\n ...this.startWith,\n includeTaxId:\n this.countrySupportsTax(this.startWith.country) &&\n (!!this.startWith.taxId ||\n !!this.startWith.line1 ||\n !!this.startWith.line2 ||\n !!this.startWith.city ||\n !!this.startWith.state),\n });\n }\n\n this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((values) => {\n this.taxInformation = {\n country: values.country,\n postalCode: values.postalCode,\n taxId: values.taxId,\n line1: values.line1,\n line2: values.line2,\n city: values.city,\n state: values.state,\n };\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n protected countrySupportsTax(countryCode: string) {\n return this.taxSupportedCountryCodes.includes(countryCode);\n }\n\n protected get includeTaxIdIsSelected() {\n return this.formGroup.value.includeTaxId;\n }\n\n protected get selectionSupportsAdditionalOptions() {\n return (\n this.formGroup.value.country !== \"US\" && this.countrySupportsTax(this.formGroup.value.country)\n );\n }\n\n protected countries: Country[] = [\n { name: \"-- Select --\", value: \"\", disabled: false },\n { name: \"United States\", value: \"US\", disabled: false },\n { name: \"China\", value: \"CN\", disabled: false },\n { name: \"France\", value: \"FR\", disabled: false },\n { name: \"Germany\", value: \"DE\", disabled: false },\n { name: \"Canada\", value: \"CA\", disabled: false },\n { name: \"United Kingdom\", value: \"GB\", disabled: false },\n { name: \"Australia\", value: \"AU\", disabled: false },\n { name: \"India\", value: \"IN\", disabled: false },\n { name: \"\", value: \"-\", disabled: true },\n { name: \"Afghanistan\", value: \"AF\", disabled: false },\n { name: \"Åland Islands\", value: \"AX\", disabled: false },\n { name: \"Albania\", value: \"AL\", disabled: false },\n { name: \"Algeria\", value: \"DZ\", disabled: false },\n { name: \"American Samoa\", value: \"AS\", disabled: false },\n { name: \"Andorra\", value: \"AD\", disabled: false },\n { name: \"Angola\", value: \"AO\", disabled: false },\n { name: \"Anguilla\", value: \"AI\", disabled: false },\n { name: \"Antarctica\", value: \"AQ\", disabled: false },\n { name: \"Antigua and Barbuda\", value: \"AG\", disabled: false },\n { name: \"Argentina\", value: \"AR\", disabled: false },\n { name: \"Armenia\", value: \"AM\", disabled: false },\n { name: \"Aruba\", value: \"AW\", disabled: false },\n { name: \"Austria\", value: \"AT\", disabled: false },\n { name: \"Azerbaijan\", value: \"AZ\", disabled: false },\n { name: \"Bahamas\", value: \"BS\", disabled: false },\n { name: \"Bahrain\", value: \"BH\", disabled: false },\n { name: \"Bangladesh\", value: \"BD\", disabled: false },\n { name: \"Barbados\", value: \"BB\", disabled: false },\n { name: \"Belarus\", value: \"BY\", disabled: false },\n { name: \"Belgium\", value: \"BE\", disabled: false },\n { name: \"Belize\", value: \"BZ\", disabled: false },\n { name: \"Benin\", value: \"BJ\", disabled: false },\n { name: \"Bermuda\", value: \"BM\", disabled: false },\n { name: \"Bhutan\", value: \"BT\", disabled: false },\n { name: \"Bolivia, Plurinational State of\", value: \"BO\", disabled: false },\n { name: \"Bonaire, Sint Eustatius and Saba\", value: \"BQ\", disabled: false },\n { name: \"Bosnia and Herzegovina\", value: \"BA\", disabled: false },\n { name: \"Botswana\", value: \"BW\", disabled: false },\n { name: \"Bouvet Island\", value: \"BV\", disabled: false },\n { name: \"Brazil\", value: \"BR\", disabled: false },\n { name: \"British Indian Ocean Territory\", value: \"IO\", disabled: false },\n { name: \"Brunei Darussalam\", value: \"BN\", disabled: false },\n { name: \"Bulgaria\", value: \"BG\", disabled: false },\n { name: \"Burkina Faso\", value: \"BF\", disabled: false },\n { name: \"Burundi\", value: \"BI\", disabled: false },\n { name: \"Cambodia\", value: \"KH\", disabled: false },\n { name: \"Cameroon\", value: \"CM\", disabled: false },\n { name: \"Cape Verde\", value: \"CV\", disabled: false },\n { name: \"Cayman Islands\", value: \"KY\", disabled: false },\n { name: \"Central African Republic\", value: \"CF\", disabled: false },\n { name: \"Chad\", value: \"TD\", disabled: false },\n { name: \"Chile\", value: \"CL\", disabled: false },\n { name: \"Christmas Island\", value: \"CX\", disabled: false },\n { name: \"Cocos (Keeling) Islands\", value: \"CC\", disabled: false },\n { name: \"Colombia\", value: \"CO\", disabled: false },\n { name: \"Comoros\", value: \"KM\", disabled: false },\n { name: \"Congo\", value: \"CG\", disabled: false },\n { name: \"Congo, the Democratic Republic of the\", value: \"CD\", disabled: false },\n { name: \"Cook Islands\", value: \"CK\", disabled: false },\n { name: \"Costa Rica\", value: \"CR\", disabled: false },\n { name: \"Côte d'Ivoire\", value: \"CI\", disabled: false },\n { name: \"Croatia\", value: \"HR\", disabled: false },\n { name: \"Cuba\", value: \"CU\", disabled: false },\n { name: \"Curaçao\", value: \"CW\", disabled: false },\n { name: \"Cyprus\", value: \"CY\", disabled: false },\n { name: \"Czech Republic\", value: \"CZ\", disabled: false },\n { name: \"Denmark\", value: \"DK\", disabled: false },\n { name: \"Djibouti\", value: \"DJ\", disabled: false },\n { name: \"Dominica\", value: \"DM\", disabled: false },\n { name: \"Dominican Republic\", value: \"DO\", disabled: false },\n { name: \"Ecuador\", value: \"EC\", disabled: false },\n { name: \"Egypt\", value: \"EG\", disabled: false },\n { name: \"El Salvador\", value: \"SV\", disabled: false },\n { name: \"Equatorial Guinea\", value: \"GQ\", disabled: false },\n { name: \"Eritrea\", value: \"ER\", disabled: false },\n { name: \"Estonia\", value: \"EE\", disabled: false },\n { name: \"Ethiopia\", value: \"ET\", disabled: false },\n { name: \"Falkland Islands (Malvinas)\", value: \"FK\", disabled: false },\n { name: \"Faroe Islands\", value: \"FO\", disabled: false },\n { name: \"Fiji\", value: \"FJ\", disabled: false },\n { name: \"Finland\", value: \"FI\", disabled: false },\n { name: \"French Guiana\", value: \"GF\", disabled: false },\n { name: \"French Polynesia\", value: \"PF\", disabled: false },\n { name: \"French Southern Territories\", value: \"TF\", disabled: false },\n { name: \"Gabon\", value: \"GA\", disabled: false },\n { name: \"Gambia\", value: \"GM\", disabled: false },\n { name: \"Georgia\", value: \"GE\", disabled: false },\n { name: \"Ghana\", value: \"GH\", disabled: false },\n { name: \"Gibraltar\", value: \"GI\", disabled: false },\n { name: \"Greece\", value: \"GR\", disabled: false },\n { name: \"Greenland\", value: \"GL\", disabled: false },\n { name: \"Grenada\", value: \"GD\", disabled: false },\n { name: \"Guadeloupe\", value: \"GP\", disabled: false },\n { name: \"Guam\", value: \"GU\", disabled: false },\n { name: \"Guatemala\", value: \"GT\", disabled: false },\n { name: \"Guernsey\", value: \"GG\", disabled: false },\n { name: \"Guinea\", value: \"GN\", disabled: false },\n { name: \"Guinea-Bissau\", value: \"GW\", disabled: false },\n { name: \"Guyana\", value: \"GY\", disabled: false },\n { name: \"Haiti\", value: \"HT\", disabled: false },\n { name: \"Heard Island and McDonald Islands\", value: \"HM\", disabled: false },\n { name: \"Holy See (Vatican City State)\", value: \"VA\", disabled: false },\n { name: \"Honduras\", value: \"HN\", disabled: false },\n { name: \"Hong Kong\", value: \"HK\", disabled: false },\n { name: \"Hungary\", value: \"HU\", disabled: false },\n { name: \"Iceland\", value: \"IS\", disabled: false },\n { name: \"Indonesia\", value: \"ID\", disabled: false },\n { name: \"Iran, Islamic Republic of\", value: \"IR\", disabled: false },\n { name: \"Iraq\", value: \"IQ\", disabled: false },\n { name: \"Ireland\", value: \"IE\", disabled: false },\n { name: \"Isle of Man\", value: \"IM\", disabled: false },\n { name: \"Israel\", value: \"IL\", disabled: false },\n { name: \"Italy\", value: \"IT\", disabled: false },\n { name: \"Jamaica\", value: \"JM\", disabled: false },\n { name: \"Japan\", value: \"JP\", disabled: false },\n { name: \"Jersey\", value: \"JE\", disabled: false },\n { name: \"Jordan\", value: \"JO\", disabled: false },\n { name: \"Kazakhstan\", value: \"KZ\", disabled: false },\n { name: \"Kenya\", value: \"KE\", disabled: false },\n { name: \"Kiribati\", value: \"KI\", disabled: false },\n { name: \"Korea, Democratic People's Republic of\", value: \"KP\", disabled: false },\n { name: \"Korea, Republic of\", value: \"KR\", disabled: false },\n { name: \"Kuwait\", value: \"KW\", disabled: false },\n { name: \"Kyrgyzstan\", value: \"KG\", disabled: false },\n { name: \"Lao People's Democratic Republic\", value: \"LA\", disabled: false },\n { name: \"Latvia\", value: \"LV\", disabled: false },\n { name: \"Lebanon\", value: \"LB\", disabled: false },\n { name: \"Lesotho\", value: \"LS\", disabled: false },\n { name: \"Liberia\", value: \"LR\", disabled: false },\n { name: \"Libya\", value: \"LY\", disabled: false },\n { name: \"Liechtenstein\", value: \"LI\", disabled: false },\n { name: \"Lithuania\", value: \"LT\", disabled: false },\n { name: \"Luxembourg\", value: \"LU\", disabled: false },\n { name: \"Macao\", value: \"MO\", disabled: false },\n { name: \"Macedonia, the former Yugoslav Republic of\", value: \"MK\", disabled: false },\n { name: \"Madagascar\", value: \"MG\", disabled: false },\n { name: \"Malawi\", value: \"MW\", disabled: false },\n { name: \"Malaysia\", value: \"MY\", disabled: false },\n { name: \"Maldives\", value: \"MV\", disabled: false },\n { name: \"Mali\", value: \"ML\", disabled: false },\n { name: \"Malta\", value: \"MT\", disabled: false },\n { name: \"Marshall Islands\", value: \"MH\", disabled: false },\n { name: \"Martinique\", value: \"MQ\", disabled: false },\n { name: \"Mauritania\", value: \"MR\", disabled: false },\n { name: \"Mauritius\", value: \"MU\", disabled: false },\n { name: \"Mayotte\", value: \"YT\", disabled: false },\n { name: \"Mexico\", value: \"MX\", disabled: false },\n { name: \"Micronesia, Federated States of\", value: \"FM\", disabled: false },\n { name: \"Moldova, Republic of\", value: \"MD\", disabled: false },\n { name: \"Monaco\", value: \"MC\", disabled: false },\n { name: \"Mongolia\", value: \"MN\", disabled: false },\n { name: \"Montenegro\", value: \"ME\", disabled: false },\n { name: \"Montserrat\", value: \"MS\", disabled: false },\n { name: \"Morocco\", value: \"MA\", disabled: false },\n { name: \"Mozambique\", value: \"MZ\", disabled: false },\n { name: \"Myanmar\", value: \"MM\", disabled: false },\n { name: \"Namibia\", value: \"NA\", disabled: false },\n { name: \"Nauru\", value: \"NR\", disabled: false },\n { name: \"Nepal\", value: \"NP\", disabled: false },\n { name: \"Netherlands\", value: \"NL\", disabled: false },\n { name: \"New Caledonia\", value: \"NC\", disabled: false },\n { name: \"New Zealand\", value: \"NZ\", disabled: false },\n { name: \"Nicaragua\", value: \"NI\", disabled: false },\n { name: \"Niger\", value: \"NE\", disabled: false },\n { name: \"Nigeria\", value: \"NG\", disabled: false },\n { name: \"Niue\", value: \"NU\", disabled: false },\n { name: \"Norfolk Island\", value: \"NF\", disabled: false },\n { name: \"Northern Mariana Islands\", value: \"MP\", disabled: false },\n { name: \"Norway\", value: \"NO\", disabled: false },\n { name: \"Oman\", value: \"OM\", disabled: false },\n { name: \"Pakistan\", value: \"PK\", disabled: false },\n { name: \"Palau\", value: \"PW\", disabled: false },\n { name: \"Palestinian Territory, Occupied\", value: \"PS\", disabled: false },\n { name: \"Panama\", value: \"PA\", disabled: false },\n { name: \"Papua New Guinea\", value: \"PG\", disabled: false },\n { name: \"Paraguay\", value: \"PY\", disabled: false },\n { name: \"Peru\", value: \"PE\", disabled: false },\n { name: \"Philippines\", value: \"PH\", disabled: false },\n { name: \"Pitcairn\", value: \"PN\", disabled: false },\n { name: \"Poland\", value: \"PL\", disabled: false },\n { name: \"Portugal\", value: \"PT\", disabled: false },\n { name: \"Puerto Rico\", value: \"PR\", disabled: false },\n { name: \"Qatar\", value: \"QA\", disabled: false },\n { name: \"Réunion\", value: \"RE\", disabled: false },\n { name: \"Romania\", value: \"RO\", disabled: false },\n { name: \"Russian Federation\", value: \"RU\", disabled: false },\n { name: \"Rwanda\", value: \"RW\", disabled: false },\n { name: \"Saint Barthélemy\", value: \"BL\", disabled: false },\n { name: \"Saint Helena, Ascension and Tristan da Cunha\", value: \"SH\", disabled: false },\n { name: \"Saint Kitts and Nevis\", value: \"KN\", disabled: false },\n { name: \"Saint Lucia\", value: \"LC\", disabled: false },\n { name: \"Saint Martin (French part)\", value: \"MF\", disabled: false },\n { name: \"Saint Pierre and Miquelon\", value: \"PM\", disabled: false },\n { name: \"Saint Vincent and the Grenadines\", value: \"VC\", disabled: false },\n { name: \"Samoa\", value: \"WS\", disabled: false },\n { name: \"San Marino\", value: \"SM\", disabled: false },\n { name: \"Sao Tome and Principe\", value: \"ST\", disabled: false },\n { name: \"Saudi Arabia\", value: \"SA\", disabled: false },\n { name: \"Senegal\", value: \"SN\", disabled: false },\n { name: \"Serbia\", value: \"RS\", disabled: false },\n { name: \"Seychelles\", value: \"SC\", disabled: false },\n { name: \"Sierra Leone\", value: \"SL\", disabled: false },\n { name: \"Singapore\", value: \"SG\", disabled: false },\n { name: \"Sint Maarten (Dutch part)\", value: \"SX\", disabled: false },\n { name: \"Slovakia\", value: \"SK\", disabled: false },\n { name: \"Slovenia\", value: \"SI\", disabled: false },\n { name: \"Solomon Islands\", value: \"SB\", disabled: false },\n { name: \"Somalia\", value: \"SO\", disabled: false },\n { name: \"South Africa\", value: \"ZA\", disabled: false },\n { name: \"South Georgia and the South Sandwich Islands\", value: \"GS\", disabled: false },\n { name: \"South Sudan\", value: \"SS\", disabled: false },\n { name: \"Spain\", value: \"ES\", disabled: false },\n { name: \"Sri Lanka\", value: \"LK\", disabled: false },\n { name: \"Sudan\", value: \"SD\", disabled: false },\n { name: \"Suriname\", value: \"SR\", disabled: false },\n { name: \"Svalbard and Jan Mayen\", value: \"SJ\", disabled: false },\n { name: \"Swaziland\", value: \"SZ\", disabled: false },\n { name: \"Sweden\", value: \"SE\", disabled: false },\n { name: \"Switzerland\", value: \"CH\", disabled: false },\n { name: \"Syrian Arab Republic\", value: \"SY\", disabled: false },\n { name: \"Taiwan\", value: \"TW\", disabled: false },\n { name: \"Tajikistan\", value: \"TJ\", disabled: false },\n { name: \"Tanzania, United Republic of\", value: \"TZ\", disabled: false },\n { name: \"Thailand\", value: \"TH\", disabled: false },\n { name: \"Timor-Leste\", value: \"TL\", disabled: false },\n { name: \"Togo\", value: \"TG\", disabled: false },\n { name: \"Tokelau\", value: \"TK\", disabled: false },\n { name: \"Tonga\", value: \"TO\", disabled: false },\n { name: \"Trinidad and Tobago\", value: \"TT\", disabled: false },\n { name: \"Tunisia\", value: \"TN\", disabled: false },\n { name: \"Turkey\", value: \"TR\", disabled: false },\n { name: \"Turkmenistan\", value: \"TM\", disabled: false },\n { name: \"Turks and Caicos Islands\", value: \"TC\", disabled: false },\n { name: \"Tuvalu\", value: \"TV\", disabled: false },\n { name: \"Uganda\", value: \"UG\", disabled: false },\n { name: \"Ukraine\", value: \"UA\", disabled: false },\n { name: \"United Arab Emirates\", value: \"AE\", disabled: false },\n { name: \"United States Minor Outlying Islands\", value: \"UM\", disabled: false },\n { name: \"Uruguay\", value: \"UY\", disabled: false },\n { name: \"Uzbekistan\", value: \"UZ\", disabled: false },\n { name: \"Vanuatu\", value: \"VU\", disabled: false },\n { name: \"Venezuela, Bolivarian Republic of\", value: \"VE\", disabled: false },\n { name: \"Viet Nam\", value: \"VN\", disabled: false },\n { name: \"Virgin Islands, British\", value: \"VG\", disabled: false },\n { name: \"Virgin Islands, U.S.\", value: \"VI\", disabled: false },\n { name: \"Wallis and Futuna\", value: \"WF\", disabled: false },\n { name: \"Western Sahara\", value: \"EH\", disabled: false },\n { name: \"Yemen\", value: \"YE\", disabled: false },\n { name: \"Zambia\", value: \"ZM\", disabled: false },\n { name: \"Zimbabwe\", value: \"ZW\", disabled: false },\n ];\n\n private taxSupportedCountryCodes: string[] = [\n \"CN\",\n \"FR\",\n \"DE\",\n \"CA\",\n \"GB\",\n \"AU\",\n \"IN\",\n \"AD\",\n \"AR\",\n \"AT\",\n \"BE\",\n \"BO\",\n \"BR\",\n \"BG\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"HR\",\n \"CY\",\n \"CZ\",\n \"DK\",\n \"DO\",\n \"EC\",\n \"EG\",\n \"SV\",\n \"EE\",\n \"FI\",\n \"GE\",\n \"GR\",\n \"HK\",\n \"HU\",\n \"IS\",\n \"ID\",\n \"IQ\",\n \"IE\",\n \"IL\",\n \"IT\",\n \"JP\",\n \"KE\",\n \"KR\",\n \"LV\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"MY\",\n \"MT\",\n \"MX\",\n \"NL\",\n \"NZ\",\n \"NO\",\n \"PE\",\n \"PH\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"RU\",\n \"SA\",\n \"RS\",\n \"SG\",\n \"SK\",\n \"SI\",\n \"ZA\",\n \"ES\",\n \"SE\",\n \"CH\",\n \"TW\",\n \"TH\",\n \"TR\",\n \"UA\",\n \"AE\",\n \"UY\",\n \"VE\",\n \"VN\",\n ];\n}\n","
    \n
    \n \n \n \n \n {{ \"creditCard\" | i18n }}\n \n \n \n \n \n {{ \"bankAccount\" | i18n }}\n \n \n \n \n \n {{ \"payPal\" | i18n }}\n \n \n \n \n \n {{ \"accountCredit\" | i18n }}\n \n \n \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n {{ \"verifyBankAccountInitialDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}\n \n
    \n \n {{ \"routingNumber\" | i18n }}\n \n \n \n {{ \"accountNumber\" | i18n }}\n \n \n \n {{ \"accountHolderName\" | i18n }}\n \n \n \n {{ \"bankAccountType\" | i18n }}\n \n \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n {{ \"paypalClickSubmit\" | i18n }}\n
    \n
    \n \n \n \n {{ \"makeSureEnoughCredit\" | i18n }}\n \n \n \n
    \n","import { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n BillingApiServiceAbstraction,\n BraintreeServiceAbstraction,\n StripeServiceAbstraction,\n} from \"@bitwarden/common/billing/abstractions\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { TokenizedPaymentMethod } from \"@bitwarden/common/billing/models/domain\";\n\n@Component({\n selector: \"app-select-payment-method\",\n templateUrl: \"./select-payment-method.component.html\",\n})\nexport class SelectPaymentMethodComponent implements OnInit, OnDestroy {\n @Input() protected showAccountCredit: boolean = true;\n @Input() protected showBankAccount: boolean = true;\n @Input() protected showPayPal: boolean = true;\n @Input() private startWith: PaymentMethodType = PaymentMethodType.Card;\n @Input() protected onSubmit: (tokenizedPaymentMethod: TokenizedPaymentMethod) => Promise;\n\n private destroy$ = new Subject();\n\n protected formGroup = this.formBuilder.group({\n paymentMethod: [this.startWith],\n bankInformation: this.formBuilder.group({\n routingNumber: [\"\", [Validators.required]],\n accountNumber: [\"\", [Validators.required]],\n accountHolderName: [\"\", [Validators.required]],\n accountHolderType: [\"\", [Validators.required]],\n }),\n });\n protected PaymentMethodType = PaymentMethodType;\n\n constructor(\n private billingApiService: BillingApiServiceAbstraction,\n private braintreeService: BraintreeServiceAbstraction,\n private formBuilder: FormBuilder,\n private stripeService: StripeServiceAbstraction,\n ) {}\n\n async tokenizePaymentMethod(): Promise {\n const type = this.selected;\n\n if (this.usingStripe) {\n const clientSecret = await this.billingApiService.createSetupIntent(type);\n\n if (this.usingBankAccount) {\n const token = await this.stripeService.setupBankAccountPaymentMethod(clientSecret, {\n accountHolderName: this.formGroup.value.bankInformation.accountHolderName,\n routingNumber: this.formGroup.value.bankInformation.routingNumber,\n accountNumber: this.formGroup.value.bankInformation.accountNumber,\n accountHolderType: this.formGroup.value.bankInformation.accountHolderType,\n });\n return {\n type,\n token,\n };\n }\n\n if (this.usingCard) {\n const token = await this.stripeService.setupCardPaymentMethod(clientSecret);\n return {\n type,\n token,\n };\n }\n }\n\n if (this.usingPayPal) {\n const token = await this.braintreeService.requestPaymentMethod();\n return {\n type,\n token,\n };\n }\n\n return null;\n }\n\n submit = async () => {\n const tokenizedPaymentMethod = await this.tokenizePaymentMethod();\n await this.onSubmit(tokenizedPaymentMethod);\n };\n\n ngOnInit(): void {\n this.stripeService.loadStripe(\n {\n cardNumber: \"#stripe-card-number\",\n cardExpiry: \"#stripe-card-expiry\",\n cardCvc: \"#stripe-card-cvc\",\n },\n this.startWith === PaymentMethodType.Card,\n );\n\n if (this.showPayPal) {\n this.braintreeService.loadBraintree(\n \"#braintree-container\",\n this.startWith === PaymentMethodType.PayPal,\n );\n }\n\n this.formGroup\n .get(\"paymentMethod\")\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((type) => {\n this.onPaymentMethodChange(type);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.stripeService.unloadStripe();\n if (this.showPayPal) {\n this.braintreeService.unloadBraintree();\n }\n }\n\n private onPaymentMethodChange(type: PaymentMethodType): void {\n switch (type) {\n case PaymentMethodType.Card: {\n this.stripeService.mountElements();\n break;\n }\n case PaymentMethodType.PayPal: {\n this.braintreeService.createDropin();\n break;\n }\n }\n }\n\n private get selected(): PaymentMethodType {\n return this.formGroup.value.paymentMethod;\n }\n\n protected get usingAccountCredit(): boolean {\n return this.selected === PaymentMethodType.Credit;\n }\n\n protected get usingBankAccount(): boolean {\n return this.selected === PaymentMethodType.BankAccount;\n }\n\n protected get usingCard(): boolean {\n return this.selected === PaymentMethodType.Card;\n }\n\n protected get usingPayPal(): boolean {\n return this.selected === PaymentMethodType.PayPal;\n }\n\n private get usingStripe(): boolean {\n return this.usingBankAccount || this.usingCard;\n }\n}\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\n\n@Component({\n selector: \"app-verify-bank-account\",\n templateUrl: \"./verify-bank-account.component.html\",\n})\nexport class VerifyBankAccountComponent {\n @Input() onSubmit?: (amount1: number, amount2: number) => Promise;\n @Output() verificationSubmitted = new EventEmitter();\n\n protected formGroup = this.formBuilder.group({\n amount1: new FormControl(null, [\n Validators.required,\n Validators.min(0),\n Validators.max(99),\n ]),\n amount2: new FormControl(null, [\n Validators.required,\n Validators.min(0),\n Validators.max(99),\n ]),\n });\n\n constructor(private formBuilder: FormBuilder) {}\n\n submit = async () => {\n if (this.onSubmit) {\n await this.onSubmit(this.formGroup.value.amount1, this.formGroup.value.amount2);\n }\n this.verificationSubmitted.emit();\n };\n}\n","\n

    {{ \"verifyBankAccountDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}

    \n
    \n \n {{ \"amountX\" | i18n: \"1\" }}\n \n $0.\n \n \n {{ \"amountX\" | i18n: \"2\" }}\n \n $0.\n \n \n
    \n
    \n","\n

    \n \n {{ title }}\n

    \n
    \n {{ enforcedPolicyMessage }}\n
      \n
    • 0\">\n {{ \"policyInEffectMinComplexity\" | i18n: getPasswordScoreAlertDisplay() }}\n
    • \n
    • 0\">\n {{ \"policyInEffectMinLength\" | i18n: enforcedPolicyOptions?.minLength.toString() }}\n
    • \n
    • \n {{ \"policyInEffectUppercase\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectLowercase\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectNumbers\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectSpecial\" | i18n: \"!@#$%^&*\" }}\n
    • \n
    \n
    \n \n\n","import { Component, Input, OnInit } from \"@angular/core\";\n\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Component({\n selector: \"app-callout\",\n templateUrl: \"callout.component.html\",\n})\nexport class CalloutComponent implements OnInit {\n @Input() type = \"info\";\n @Input() icon: string;\n @Input() title: string;\n @Input() clickable: boolean;\n @Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;\n @Input() enforcedPolicyMessage: string;\n @Input() useAlertRole = false;\n\n calloutStyle: string;\n\n constructor(private i18nService: I18nService) {}\n\n ngOnInit() {\n this.calloutStyle = this.type;\n\n if (this.enforcedPolicyMessage === undefined) {\n this.enforcedPolicyMessage = this.i18nService.t(\"masterPasswordPolicyInEffect\");\n }\n\n if (this.type === \"warning\" || this.type === \"danger\") {\n if (this.type === \"danger\") {\n this.calloutStyle = \"danger\";\n }\n if (this.title === undefined) {\n this.title = this.i18nService.t(\"warning\");\n }\n if (this.icon === undefined) {\n this.icon = \"bwi-exclamation-triangle\";\n }\n } else if (this.type === \"error\") {\n this.calloutStyle = \"danger\";\n if (this.title === undefined) {\n this.title = this.i18nService.t(\"error\");\n }\n if (this.icon === undefined) {\n this.icon = \"bwi-error\";\n }\n } else if (this.type === \"tip\") {\n this.calloutStyle = \"success\";\n if (this.title === undefined) {\n this.title = this.i18nService.t(\"tip\");\n }\n if (this.icon === undefined) {\n this.icon = \"bwi-lightbulb\";\n }\n }\n }\n\n getPasswordScoreAlertDisplay() {\n if (this.enforcedPolicyOptions == null) {\n return \"\";\n }\n\n let str: string;\n switch (this.enforcedPolicyOptions.minComplexity) {\n case 4:\n str = this.i18nService.t(\"strong\");\n break;\n case 3:\n str = this.i18nService.t(\"good\");\n break;\n default:\n str = this.i18nService.t(\"weak\");\n break;\n }\n return str + \" (\" + this.enforcedPolicyOptions.minComplexity + \")\";\n }\n}\n","import { Directive, ElementRef, Input, Renderer2 } from \"@angular/core\";\n\n@Directive({\n selector: \"[appA11yTitle]\",\n})\nexport class A11yTitleDirective {\n @Input() set appA11yTitle(title: string) {\n this.title = title;\n }\n\n private title: string;\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n ) {}\n\n ngOnInit() {\n if (!this.el.nativeElement.hasAttribute(\"title\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"title\", this.title);\n }\n if (!this.el.nativeElement.hasAttribute(\"aria-label\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"aria-label\", this.title);\n }\n }\n}\n","import { Directive, ElementRef, Input, OnChanges } from \"@angular/core\";\n\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\n\n/**\n * Provides error handling, in particular for any error returned by the server in an api call.\n * Attach it to a
    element and provide the name of the class property that will hold the api call promise.\n * e.g. \n * Any errors/rejections that occur will be intercepted and displayed as error toasts.\n *\n * @deprecated Use the CL's {@link BitSubmitDirective} instead\n */\n@Directive({\n selector: \"[appApiAction]\",\n})\nexport class ApiActionDirective implements OnChanges {\n @Input() appApiAction: Promise;\n\n constructor(\n private el: ElementRef,\n private validationService: ValidationService,\n private logService: LogService,\n ) {}\n\n ngOnChanges(changes: any) {\n if (this.appApiAction == null || this.appApiAction.then == null) {\n return;\n }\n\n this.el.nativeElement.loading = true;\n\n this.appApiAction.then(\n (response: any) => {\n this.el.nativeElement.loading = false;\n },\n (e: any) => {\n this.el.nativeElement.loading = false;\n\n if ((e as ErrorResponse).captchaRequired) {\n this.logService.error(\"Captcha required error response: \" + e.getSingleMessage());\n return;\n }\n this.logService?.error(`Received API exception: ${e}`);\n this.validationService.showError(e);\n },\n );\n }\n}\n","import { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { Directive, HostListener, Input } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Directive({\n selector: \"[appCopyClick]\",\n})\nexport class CopyClickDirective {\n constructor(\n private platformUtilsService: PlatformUtilsService,\n private toastService: ToastService,\n private i18nService: I18nService,\n ) {}\n\n @Input(\"appCopyClick\") valueToCopy = \"\";\n @Input({ transform: coerceBooleanProperty }) showToast?: boolean;\n\n @HostListener(\"click\") onClick() {\n this.platformUtilsService.copyToClipboard(this.valueToCopy);\n\n if (this.showToast) {\n this.toastService.showToast({\n variant: \"info\",\n title: null,\n message: this.i18nService.t(\"copySuccessful\"),\n });\n }\n }\n}\n","import { Directive, ElementRef, Input, Renderer2 } from \"@angular/core\";\n\n@Directive({\n selector: \"[appInputVerbatim]\",\n})\nexport class InputVerbatimDirective {\n @Input() set appInputVerbatim(condition: boolean | string) {\n this.disableComplete = condition === \"\" || condition === true;\n }\n\n private disableComplete: boolean;\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n ) {}\n\n ngOnInit() {\n if (this.disableComplete && !this.el.nativeElement.hasAttribute(\"autocomplete\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"autocomplete\", \"off\");\n }\n if (!this.el.nativeElement.hasAttribute(\"autocapitalize\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"autocapitalize\", \"none\");\n }\n if (!this.el.nativeElement.hasAttribute(\"autocorrect\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"autocorrect\", \"none\");\n }\n if (!this.el.nativeElement.hasAttribute(\"spellcheck\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"spellcheck\", \"false\");\n }\n if (!this.el.nativeElement.hasAttribute(\"inputmode\")) {\n this.renderer.setAttribute(this.el.nativeElement, \"inputmode\", \"verbatim\");\n }\n }\n}\n","import { Directive, HostListener } from \"@angular/core\";\n\n@Directive({\n selector: \"[appStopClick]\",\n})\nexport class StopClickDirective {\n @HostListener(\"click\", [\"$event\"]) onClick($event: MouseEvent) {\n $event.preventDefault();\n }\n}\n","import { Directive, HostListener } from \"@angular/core\";\n\n@Directive({\n selector: \"[appStopProp]\",\n})\nexport class StopPropDirective {\n @HostListener(\"click\", [\"$event\"]) onClick($event: MouseEvent) {\n $event.stopPropagation();\n }\n}\n","\n
    \n \n
    \n {{ variant | i18n }}\n

    {{ title }}

    \n

    \n {{ m }}\n

    \n
    \n \n
    \n
    \n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { IconButtonModule } from \"../icon-button\";\nimport { SharedModule } from \"../shared\";\n\nexport type ToastVariant = \"success\" | \"error\" | \"info\" | \"warning\";\n\nconst variants: Record = {\n success: {\n icon: \"bwi-check\",\n bgColor: \"tw-bg-success-600\",\n },\n error: {\n icon: \"bwi-error\",\n bgColor: \"tw-bg-danger-600\",\n },\n info: {\n icon: \"bwi-info-circle\",\n bgColor: \"tw-bg-info-600\",\n },\n warning: {\n icon: \"bwi-exclamation-triangle\",\n bgColor: \"tw-bg-warning-600\",\n },\n};\n\n@Component({\n selector: \"bit-toast\",\n templateUrl: \"toast.component.html\",\n standalone: true,\n imports: [SharedModule, IconButtonModule],\n})\nexport class ToastComponent {\n @Input() variant: ToastVariant = \"info\";\n\n /**\n * The message to display\n *\n * Pass an array to render multiple paragraphs.\n **/\n @Input({ required: true })\n message: string | string[];\n\n /** An optional title to display over the message. */\n @Input() title: string;\n\n /**\n * The percent width of the progress bar, from 0-100\n **/\n @Input() progressWidth = 0;\n\n /** Emits when the user presses the close button */\n @Output() onClose = new EventEmitter();\n\n protected get iconClass(): string {\n return variants[this.variant].icon;\n }\n\n protected get bgColor(): string {\n return variants[this.variant].bgColor;\n }\n\n protected get messageArray(): string[] {\n return Array.isArray(this.message) ? this.message : [this.message];\n }\n}\n","import { animate, state, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { Toast as BaseToastrComponent } from \"ngx-toastr\";\n\n@Component({\n template: `\n \n `,\n animations: [\n trigger(\"flyInOut\", [\n state(\"inactive\", style({ opacity: 0 })),\n state(\"active\", style({ opacity: 1 })),\n state(\"removed\", style({ opacity: 0 })),\n transition(\"inactive => active\", animate(\"{{ easeTime }}ms {{ easing }}\")),\n transition(\"active => removed\", animate(\"{{ easeTime }}ms {{ easing }}\")),\n ]),\n ],\n preserveWhitespaces: false,\n})\nexport class BitwardenToastrComponent extends BaseToastrComponent {}\n","import { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { DefaultNoComponentGlobalConfig, GlobalConfig, TOAST_CONFIG } from \"ngx-toastr\";\n\nimport { ToastComponent } from \"./toast.component\";\nimport { BitwardenToastrComponent } from \"./toastr.component\";\n\n@NgModule({\n imports: [CommonModule, ToastComponent],\n declarations: [BitwardenToastrComponent],\n exports: [BitwardenToastrComponent],\n})\nexport class ToastModule {\n static forRoot(config: Partial = {}): ModuleWithProviders {\n return {\n ngModule: ToastModule,\n providers: [\n {\n provide: TOAST_CONFIG,\n useValue: {\n default: BitwardenToastrGlobalConfig,\n config: config,\n },\n },\n ],\n };\n }\n}\n\nexport const BitwardenToastrGlobalConfig: GlobalConfig = {\n ...DefaultNoComponentGlobalConfig,\n toastComponent: BitwardenToastrComponent,\n tapToDismiss: false,\n timeOut: 5000,\n extendedTimeOut: 2000,\n maxOpened: 5,\n autoDismiss: true,\n progressBar: true,\n};\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\ninterface CardRuleEntry {\n cardLength: number;\n blocks: number[];\n}\n\n// See https://baymard.com/checkout-usability/credit-card-patterns for\n// all possible credit card spacing patterns. For now, we just handle\n// the below.\nconst numberFormats: Record = {\n Visa: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n Mastercard: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n Maestro: [\n { cardLength: 16, blocks: [4, 4, 4, 4] },\n { cardLength: 13, blocks: [4, 4, 5] },\n { cardLength: 15, blocks: [4, 6, 5] },\n { cardLength: 19, blocks: [4, 4, 4, 4, 3] },\n ],\n Discover: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n \"Diners Club\": [{ cardLength: 14, blocks: [4, 6, 4] }],\n JCB: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n UnionPay: [\n { cardLength: 16, blocks: [4, 4, 4, 4] },\n { cardLength: 19, blocks: [6, 13] },\n ],\n Amex: [{ cardLength: 15, blocks: [4, 6, 5] }],\n Other: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n};\n\n@Pipe({ name: \"creditCardNumber\" })\nexport class CreditCardNumberPipe implements PipeTransform {\n transform(creditCardNumber: string, brand: string): string {\n let rules = numberFormats[brand];\n\n if (rules == null) {\n rules = numberFormats[\"Other\"];\n }\n\n const cardLength = creditCardNumber.length;\n\n let matchingRule = rules.find((r) => r.cardLength == cardLength);\n if (matchingRule == null) {\n matchingRule = rules[0];\n }\n\n const blocks = matchingRule.blocks;\n\n const chunks: string[] = [];\n let total = 0;\n\n blocks.forEach((c) => {\n chunks.push(creditCardNumber.slice(total, total + c));\n total += c;\n });\n\n // Append the remaining part\n if (cardLength > total) {\n chunks.push(creditCardNumber.slice(total));\n }\n\n return chunks.join(\" \");\n }\n}\n","import { CommonModule, DatePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport {\n AddAccountCreditDialogComponent,\n InvoicesComponent,\n NoInvoicesComponent,\n ManageTaxInformationComponent,\n SelectPaymentMethodComponent,\n VerifyBankAccountComponent,\n} from \"@bitwarden/angular/billing/components\";\nimport {\n AsyncActionsModule,\n AutofocusDirective,\n ButtonModule,\n CheckboxModule,\n DialogModule,\n FormFieldModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n MenuModule,\n RadioButtonModule,\n SelectModule,\n TableModule,\n ToastModule,\n TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { TwoFactorIconComponent } from \"./auth/components/two-factor-icon.component\";\nimport { CalloutComponent } from \"./components/callout.component\";\nimport { A11yInvalidDirective } from \"./directives/a11y-invalid.directive\";\nimport { A11yTitleDirective } from \"./directives/a11y-title.directive\";\nimport { ApiActionDirective } from \"./directives/api-action.directive\";\nimport { BoxRowDirective } from \"./directives/box-row.directive\";\nimport { CopyClickDirective } from \"./directives/copy-click.directive\";\nimport { CopyTextDirective } from \"./directives/copy-text.directive\";\nimport { FallbackSrcDirective } from \"./directives/fallback-src.directive\";\nimport { IfFeatureDirective } from \"./directives/if-feature.directive\";\nimport { InputStripSpacesDirective } from \"./directives/input-strip-spaces.directive\";\nimport { InputVerbatimDirective } from \"./directives/input-verbatim.directive\";\nimport { LaunchClickDirective } from \"./directives/launch-click.directive\";\nimport { NotPremiumDirective } from \"./directives/not-premium.directive\";\nimport { StopClickDirective } from \"./directives/stop-click.directive\";\nimport { StopPropDirective } from \"./directives/stop-prop.directive\";\nimport { TrueFalseValueDirective } from \"./directives/true-false-value.directive\";\nimport { CreditCardNumberPipe } from \"./pipes/credit-card-number.pipe\";\nimport { PluralizePipe } from \"./pipes/pluralize.pipe\";\nimport { SearchCiphersPipe } from \"./pipes/search-ciphers.pipe\";\nimport { SearchPipe } from \"./pipes/search.pipe\";\nimport { UserNamePipe } from \"./pipes/user-name.pipe\";\nimport { UserTypePipe } from \"./pipes/user-type.pipe\";\nimport { EllipsisPipe } from \"./platform/pipes/ellipsis.pipe\";\nimport { FingerprintPipe } from \"./platform/pipes/fingerprint.pipe\";\nimport { I18nPipe } from \"./platform/pipes/i18n.pipe\";\nimport { PasswordStrengthComponent } from \"./tools/password-strength/password-strength.component\";\nimport { IconComponent } from \"./vault/components/icon.component\";\n\n@NgModule({\n imports: [\n ToastModule.forRoot({\n maxOpened: 5,\n autoDismiss: true,\n closeButton: true,\n }),\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n AsyncActionsModule,\n RadioButtonModule,\n FormFieldModule,\n SelectModule,\n ButtonModule,\n CheckboxModule,\n DialogModule,\n TypographyModule,\n TableModule,\n MenuModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n IconModule,\n ],\n declarations: [\n A11yInvalidDirective,\n A11yTitleDirective,\n ApiActionDirective,\n AutofocusDirective,\n BoxRowDirective,\n CalloutComponent,\n CopyTextDirective,\n CreditCardNumberPipe,\n EllipsisPipe,\n FallbackSrcDirective,\n I18nPipe,\n IconComponent,\n InputStripSpacesDirective,\n InputVerbatimDirective,\n NotPremiumDirective,\n SearchCiphersPipe,\n SearchPipe,\n StopClickDirective,\n StopPropDirective,\n TrueFalseValueDirective,\n CopyClickDirective,\n LaunchClickDirective,\n UserNamePipe,\n PasswordStrengthComponent,\n UserTypePipe,\n IfFeatureDirective,\n FingerprintPipe,\n AddAccountCreditDialogComponent,\n InvoicesComponent,\n NoInvoicesComponent,\n ManageTaxInformationComponent,\n SelectPaymentMethodComponent,\n VerifyBankAccountComponent,\n TwoFactorIconComponent,\n ],\n exports: [\n A11yInvalidDirective,\n A11yTitleDirective,\n ApiActionDirective,\n AutofocusDirective,\n ToastModule,\n BoxRowDirective,\n CalloutComponent,\n CopyTextDirective,\n CreditCardNumberPipe,\n EllipsisPipe,\n FallbackSrcDirective,\n I18nPipe,\n IconComponent,\n InputStripSpacesDirective,\n InputVerbatimDirective,\n NotPremiumDirective,\n SearchCiphersPipe,\n SearchPipe,\n StopClickDirective,\n StopPropDirective,\n TrueFalseValueDirective,\n CopyClickDirective,\n LaunchClickDirective,\n UserNamePipe,\n PasswordStrengthComponent,\n UserTypePipe,\n IfFeatureDirective,\n FingerprintPipe,\n AddAccountCreditDialogComponent,\n InvoicesComponent,\n NoInvoicesComponent,\n ManageTaxInformationComponent,\n SelectPaymentMethodComponent,\n VerifyBankAccountComponent,\n TwoFactorIconComponent,\n ],\n providers: [\n CreditCardNumberPipe,\n DatePipe,\n I18nPipe,\n SearchPipe,\n UserNamePipe,\n UserTypePipe,\n FingerprintPipe,\n PluralizePipe,\n ],\n})\nexport class JslibModule {}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n name: \"pluralize\",\n standalone: true,\n})\nexport class PluralizePipe implements PipeTransform {\n transform(count: number, singular: string, plural: string): string {\n return `${count} ${count === 1 ? singular : plural}`;\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\ntype PropertyValueFunction = (item: T) => { toString: () => string };\n\n@Pipe({\n name: \"search\",\n})\nexport class SearchPipe implements PipeTransform {\n transform(\n items: T[],\n searchText: string,\n prop1?: keyof T,\n prop2?: keyof T,\n prop3?: keyof T,\n ): T[];\n transform(\n items: T[],\n searchText: string,\n prop1?: PropertyValueFunction,\n prop2?: PropertyValueFunction,\n prop3?: PropertyValueFunction,\n ): T[];\n transform(\n items: T[],\n searchText: string,\n prop1?: keyof T | PropertyValueFunction,\n prop2?: keyof T | PropertyValueFunction,\n prop3?: keyof T | PropertyValueFunction,\n ): T[] {\n if (items == null || items.length === 0) {\n return [];\n }\n\n if (searchText == null || searchText.length < 2) {\n return items;\n }\n\n searchText = searchText.trim().toLowerCase();\n return items.filter((i) => {\n if (prop1 != null) {\n const propValue = typeof prop1 === \"function\" ? prop1(i) : i[prop1];\n\n if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n return true;\n }\n }\n\n if (prop2 != null) {\n const propValue = typeof prop2 === \"function\" ? prop2(i) : i[prop2];\n\n if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n return true;\n }\n }\n\n if (prop3 != null) {\n const propValue = typeof prop3 === \"function\" ? prop3(i) : i[prop3];\n\n if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n return true;\n }\n }\n\n return false;\n });\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nexport interface User {\n name?: string;\n email?: string;\n}\n\n@Pipe({\n name: \"userName\",\n})\nexport class UserNamePipe implements PipeTransform {\n transform(user?: User): string {\n if (user == null) {\n return null;\n }\n\n if (user.name == null && user.email == null) {\n return null;\n }\n\n return user.name == null || user.name.trim() === \"\" ? user.email : user.name;\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n name: \"userType\",\n})\nexport class UserTypePipe implements PipeTransform {\n constructor(private i18nService: I18nService) {}\n\n transform(value?: OrganizationUserType): string {\n if (value == null) {\n return this.i18nService.t(\"unknown\");\n }\n switch (value) {\n case OrganizationUserType.Owner:\n return this.i18nService.t(\"owner\");\n case OrganizationUserType.Admin:\n return this.i18nService.t(\"admin\");\n case OrganizationUserType.User:\n return this.i18nService.t(\"user\");\n case OrganizationUserType.Custom:\n return this.i18nService.t(\"custom\");\n }\n }\n}\n","import { AbstractControl } from \"@angular/forms\";\nexport interface AllValidationErrors {\n controlName: string;\n errorName: string;\n}\n\nexport interface FormGroupControls {\n [key: string]: AbstractControl;\n}\n\nexport abstract class FormValidationErrorsService {\n abstract getFormValidationErrors(controls: FormGroupControls): AllValidationErrors[];\n}\n","import { Pipe } from \"@angular/core\";\n\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Pipe({\n name: \"fingerprint\",\n})\nexport class FingerprintPipe {\n constructor(private cryptoService: CryptoService) {}\n\n async transform(publicKey: string | Uint8Array, fingerprintMaterial: string): Promise {\n try {\n if (typeof publicKey === \"string\") {\n publicKey = Utils.fromB64ToArray(publicKey);\n }\n\n const fingerprint = await this.cryptoService.getFingerprint(fingerprintMaterial, publicKey);\n\n if (fingerprint != null) {\n return fingerprint.join(\"-\");\n }\n\n return \"\";\n } catch {\n return \"\";\n }\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n name: \"i18n\",\n})\nexport class I18nPipe implements PipeTransform {\n constructor(private i18nService: I18nService) {}\n\n transform(id: string, p1?: string | number, p2?: string | number, p3?: string | number): string {\n return this.i18nService.t(id, p1, p2, p3);\n }\n}\n","import { Observable, Subscription } from \"rxjs\";\n\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\n\n/**\n * A service for managing and observing the current application theme.\n */\n// FIXME: Rename to ThemingService\nexport abstract class AbstractThemingService {\n /**\n * The effective theme based on the user configured choice and the current system theme if\n * the configured choice is {@link ThemeType.System}.\n */\n abstract theme$: Observable;\n /**\n * Listens for effective theme changes and applies changes to the provided document.\n * @param document The document that should have theme classes applied to it.\n *\n * @returns A subscription that can be unsubscribed from to cancel the application of theme classes.\n */\n abstract applyThemeChangesTo(document: Document): Subscription;\n}\n","import { Type, inject } from \"@angular/core\";\nimport { Route, Routes } from \"@angular/router\";\nimport { map } from \"rxjs\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { componentRouteSwap } from \"../../utils/component-route-swap\";\n\n/**\n * @param defaultComponent The component to be used when the feature flag is off.\n * @param flaggedComponent The component to be used when the feature flag is on.\n * @param featureFlag The feature flag to evaluate\n * @param routeOptions The shared route options to apply to both components.\n */\ntype FeatureFlaggedRouteConfig = {\n defaultComponent: Type;\n flaggedComponent: Type;\n featureFlag: FeatureFlag;\n routeOptions: Omit;\n};\n\n/**\n * Swap between two routes at runtime based on the value of a feature flag.\n * The routes share a common path and configuration but load different components.\n * @param config See {@link FeatureFlaggedRouteConfig}\n * @returns A tuple containing the conditional configuration for the two routes. This should be unpacked into your existing Routes array.\n * @example\n * const routes: Routes = [\n * ...featureFlaggedRoute({\n * defaultComponent: GroupsComponent,\n * flaggedComponent: GroupsNewComponent,\n * featureFlag: FeatureFlag.GroupsComponentRefactor,\n * routeOptions: {\n * path: \"groups\",\n * canActivate: [OrganizationPermissionsGuard],\n * },\n * }),\n * ]\n */\nexport function featureFlaggedRoute(config: FeatureFlaggedRouteConfig): Routes {\n const canMatch$ = () =>\n inject(ConfigService)\n .getFeatureFlag$(config.featureFlag)\n .pipe(map((flagValue) => flagValue === true));\n\n return componentRouteSwap(\n config.defaultComponent,\n config.flaggedComponent,\n canMatch$,\n config.routeOptions,\n );\n}\n","import { Provider } from \"@angular/core\";\nimport { Constructor, Opaque } from \"type-fest\";\n\nimport { SafeInjectionToken } from \"../../services/injection-tokens\";\n\n/**\n * The return type of the {@link safeProvider} helper function.\n * Used to distinguish a type safe provider definition from a non-type safe provider definition.\n */\nexport type SafeProvider = Opaque;\n\n// TODO: type-fest also provides a type like this when we upgrade >= 3.7.0\ntype AbstractConstructor = abstract new (...args: any) => T;\n\ntype MapParametersToDeps = {\n [K in keyof T]: AbstractConstructor | SafeInjectionToken;\n};\n\ntype SafeInjectionTokenType = T extends SafeInjectionToken ? J : never;\n\n/**\n * Gets the instance type from a constructor, abstract constructor, or SafeInjectionToken\n */\ntype ProviderInstanceType =\n T extends SafeInjectionToken\n ? InstanceType>\n : T extends Constructor | AbstractConstructor\n ? InstanceType\n : never;\n\n/**\n * Represents a dependency provided with the useClass option.\n */\ntype SafeClassProvider<\n A extends AbstractConstructor | SafeInjectionToken,\n I extends Constructor>,\n D extends MapParametersToDeps>,\n> = {\n provide: A;\n useClass: I;\n deps: D;\n};\n\n/**\n * Represents a dependency provided with the useValue option.\n */\ntype SafeValueProvider, V extends SafeInjectionTokenType> = {\n provide: A;\n useValue: V;\n};\n\n/**\n * Represents a dependency provided with the useFactory option.\n */\ntype SafeFactoryProvider<\n A extends AbstractConstructor | SafeInjectionToken,\n I extends (...args: any) => ProviderInstanceType,\n D extends MapParametersToDeps>,\n> = {\n provide: A;\n useFactory: I;\n deps: D;\n multi?: boolean;\n};\n\n/**\n * Represents a dependency provided with the useExisting option.\n */\ntype SafeExistingProvider<\n A extends Constructor | AbstractConstructor | SafeInjectionToken,\n I extends Constructor> | AbstractConstructor>,\n> = {\n provide: A;\n useExisting: I;\n};\n\n/**\n * Represents a dependency where there is no abstract token, the token is the implementation\n */\ntype SafeConcreteProvider<\n I extends Constructor,\n D extends MapParametersToDeps>,\n> = {\n provide: I;\n deps: D;\n};\n\n/**\n * If useAngularDecorators: true is specified, do not require a deps array.\n * This is a manual override for where @Injectable decorators are used\n */\ntype UseAngularDecorators = Omit & {\n useAngularDecorators: true;\n};\n\n/**\n * Represents a type with a deps array that may optionally be overridden with useAngularDecorators\n */\ntype AllowAngularDecorators = T | UseAngularDecorators;\n\n/**\n * A factory function that creates a provider for the ngModule providers array.\n * This (almost) guarantees type safety for your provider definition. It does nothing at runtime.\n * Warning: the useAngularDecorators option provides an override where your class uses the Injectable decorator,\n * however this cannot be enforced by the type system and will not cause an error if the decorator is not used.\n * @example safeProvider({ provide: MyService, useClass: DefaultMyService, deps: [AnotherService] })\n * @param provider Your provider object in the usual shape (e.g. using useClass, useValue, useFactory, etc.)\n * @returns The exact same object without modification (pass-through).\n */\nexport const safeProvider = <\n // types for useClass\n AClass extends AbstractConstructor | SafeInjectionToken,\n IClass extends Constructor>,\n DClass extends MapParametersToDeps>,\n // types for useValue\n AValue extends SafeInjectionToken,\n VValue extends SafeInjectionTokenType,\n // types for useFactory\n AFactory extends AbstractConstructor | SafeInjectionToken,\n IFactory extends (...args: any) => ProviderInstanceType,\n DFactory extends MapParametersToDeps>,\n // types for useExisting\n AExisting extends Constructor | AbstractConstructor | SafeInjectionToken,\n IExisting extends\n | Constructor>\n | AbstractConstructor>,\n // types for no token\n IConcrete extends Constructor,\n DConcrete extends MapParametersToDeps>,\n>(\n provider:\n | AllowAngularDecorators>\n | SafeValueProvider\n | AllowAngularDecorators>\n | SafeExistingProvider\n | AllowAngularDecorators>\n | Constructor,\n): SafeProvider => provider as SafeProvider;\n","import { InjectionToken } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport {\n AbstractStorageService,\n ObservableStorageService,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { StateFactory } from \"@bitwarden/common/platform/factories/state-factory\";\nimport { Message } from \"@bitwarden/common/platform/messaging\";\nimport { VaultTimeout } from \"@bitwarden/common/types/vault-timeout.type\";\n\ndeclare const tag: unique symbol;\n/**\n * A (more) typesafe version of InjectionToken which will more strictly enforce the generic type parameter.\n * @remarks The default angular implementation does not use the generic type to define the structure of the object,\n * so the structural type system will not complain about a mismatch in the type parameter.\n * This is solved by assigning T to an arbitrary private property.\n */\nexport class SafeInjectionToken extends InjectionToken {\n private readonly [tag]: T;\n}\n\nexport const WINDOW = new SafeInjectionToken(\"WINDOW\");\nexport const OBSERVABLE_MEMORY_STORAGE = new SafeInjectionToken<\n AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_MEMORY_STORAGE\");\nexport const OBSERVABLE_DISK_STORAGE = new SafeInjectionToken<\n AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_DISK_STORAGE\");\nexport const OBSERVABLE_DISK_LOCAL_STORAGE = new SafeInjectionToken<\n AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_DISK_LOCAL_STORAGE\");\nexport const MEMORY_STORAGE = new SafeInjectionToken(\"MEMORY_STORAGE\");\nexport const SECURE_STORAGE = new SafeInjectionToken(\"SECURE_STORAGE\");\nexport const STATE_FACTORY = new SafeInjectionToken(\"STATE_FACTORY\");\nexport const LOGOUT_CALLBACK = new SafeInjectionToken<\n (logoutReason: LogoutReason, userId?: string) => Promise\n>(\"LOGOUT_CALLBACK\");\nexport const LOCKED_CALLBACK = new SafeInjectionToken<(userId?: string) => Promise>(\n \"LOCKED_CALLBACK\",\n);\nexport const SUPPORTS_SECURE_STORAGE = new SafeInjectionToken(\"SUPPORTS_SECURE_STORAGE\");\nexport const LOCALES_DIRECTORY = new SafeInjectionToken(\"LOCALES_DIRECTORY\");\nexport const SYSTEM_LANGUAGE = new SafeInjectionToken(\"SYSTEM_LANGUAGE\");\nexport const LOG_MAC_FAILURES = new SafeInjectionToken(\"LOG_MAC_FAILURES\");\nexport const SYSTEM_THEME_OBSERVABLE = new SafeInjectionToken>(\n \"SYSTEM_THEME_OBSERVABLE\",\n);\nexport const DEFAULT_VAULT_TIMEOUT = new SafeInjectionToken(\"DEFAULT_VAULT_TIMEOUT\");\nexport const INTRAPROCESS_MESSAGING_SUBJECT = new SafeInjectionToken<\n Subject>>\n>(\"INTRAPROCESS_MESSAGING_SUBJECT\");\nexport const CLIENT_TYPE = new SafeInjectionToken(\"CLIENT_TYPE\");\n\nexport const REFRESH_ACCESS_TOKEN_ERROR_CALLBACK = new SafeInjectionToken<() => void>(\n \"REFRESH_ACCESS_TOKEN_ERROR_CALLBACK\",\n);\n","import { Observable, Subject } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nexport class ModalRef {\n onCreated: Observable; // Modal added to the DOM.\n onClose: Observable; // Initiated close.\n onClosed: Observable; // Modal was closed (Remove element from DOM)\n onShow: Observable; // Start showing modal\n onShown: Observable; // Modal is fully visible\n\n private readonly _onCreated = new Subject();\n private readonly _onClose = new Subject();\n private readonly _onClosed = new Subject();\n private readonly _onShow = new Subject();\n private readonly _onShown = new Subject();\n private lastResult: any;\n\n constructor() {\n this.onCreated = this._onCreated.asObservable();\n this.onClose = this._onClose.asObservable();\n this.onClosed = this._onClosed.asObservable();\n this.onShow = this._onShow.asObservable();\n this.onShown = this._onShow.asObservable();\n }\n\n show() {\n this._onShow.next();\n }\n\n shown() {\n this._onShown.next();\n }\n\n close(result?: any) {\n this.lastResult = result;\n this._onClose.next(result);\n }\n\n closed() {\n this._onClosed.next(this.lastResult);\n }\n\n created(el: HTMLElement) {\n this._onCreated.next(el);\n }\n\n onClosedPromise(): Promise {\n return this.onClosed.pipe(first()).toPromise();\n }\n}\n","import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from \"@angular/cdk/a11y\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n OnDestroy,\n Type,\n ViewChild,\n ViewContainerRef,\n} from \"@angular/core\";\n\nimport { ModalRef } from \"./modal.ref\";\n\n@Component({\n selector: \"app-modal\",\n template: \"\",\n})\nexport class DynamicModalComponent implements AfterViewInit, OnDestroy {\n componentRef: ComponentRef;\n\n @ViewChild(\"modalContent\", { read: ViewContainerRef, static: true })\n modalContentRef: ViewContainerRef;\n\n childComponentType: Type;\n setComponentParameters: (component: any) => void;\n\n private focusTrap: ConfigurableFocusTrap;\n\n constructor(\n private cd: ChangeDetectorRef,\n private el: ElementRef,\n private focusTrapFactory: ConfigurableFocusTrapFactory,\n public modalRef: ModalRef,\n ) {}\n\n ngAfterViewInit() {\n this.loadChildComponent(this.childComponentType);\n if (this.setComponentParameters != null) {\n this.setComponentParameters(this.componentRef.instance);\n }\n this.cd.detectChanges();\n\n this.modalRef.created(this.el.nativeElement);\n this.focusTrap = this.focusTrapFactory.create(\n this.el.nativeElement.querySelector(\".modal-dialog\"),\n );\n if (this.el.nativeElement.querySelector(\"[appAutoFocus]\") == null) {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.focusTrap.focusFirstTabbableElementWhenReady();\n }\n }\n\n loadChildComponent(componentType: Type) {\n this.modalContentRef.clear();\n this.componentRef = this.modalContentRef.createComponent(componentType);\n }\n\n ngOnDestroy() {\n if (this.componentRef) {\n this.componentRef.destroy();\n }\n this.focusTrap.destroy();\n }\n\n close() {\n this.modalRef.close();\n }\n\n getFocus() {\n const autoFocusEl = this.el.nativeElement.querySelector(\"[appAutoFocus]\") as HTMLElement;\n autoFocusEl?.focus();\n }\n}\n","import { InjectFlags, InjectOptions, Injector, ProviderToken } from \"@angular/core\";\n\nexport class ModalInjector implements Injector {\n constructor(\n private _parentInjector: Injector,\n private _additionalTokens: WeakMap,\n ) {}\n\n get(\n token: ProviderToken,\n notFoundValue: undefined,\n options: InjectOptions & { optional?: false },\n ): T;\n get(token: ProviderToken, notFoundValue: null, options: InjectOptions): T;\n get(token: ProviderToken, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;\n get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags?: any): any {\n return this._additionalTokens.get(token) ?? this._parentInjector.get(token, notFoundValue);\n }\n}\n","import { ComponentRef, Injectable, Injector, Type, ViewContainerRef } from \"@angular/core\";\nimport { first } from \"rxjs/operators\";\n\nimport { DynamicModalComponent } from \"../components/modal/dynamic-modal.component\";\nimport { ModalInjector } from \"../components/modal/modal-injector\";\nimport { ModalRef } from \"../components/modal/modal.ref\";\n\n/**\n * @deprecated Use the Component Library's `DialogService` instead.\n */\n@Injectable()\nexport class ModalService {\n protected modalList: ComponentRef[] = [];\n\n constructor(private injector: Injector) {\n document.addEventListener(\"keyup\", (event) => {\n if (event.key === \"Escape\" && this.modalCount > 0) {\n this.topModal.instance.close();\n }\n });\n }\n\n get modalCount() {\n return this.modalList.length;\n }\n\n private get topModal() {\n return this.modalList[this.modalCount - 1];\n }\n\n /**\n * @deprecated Use `dialogService.open` instead.\n * If replacing an existing call to this method, also remove any `@ViewChild` and `` associated with the\n * existing usage.\n */\n async openViewRef(\n componentType: Type,\n viewContainerRef: ViewContainerRef,\n setComponentParameters: (component: T) => void = null,\n ): Promise<[ModalRef, T]> {\n const [modalRef, modalComponentRef] = this.openInternal(viewContainerRef, componentType);\n modalComponentRef.instance.setComponentParameters = setComponentParameters;\n\n viewContainerRef.insert(modalComponentRef.hostView);\n\n await modalRef.onCreated.pipe(first()).toPromise();\n\n return [modalRef, modalComponentRef.instance.componentRef.instance];\n }\n\n closeAll(): void {\n this.modalList.forEach((modal) => modal.instance.close());\n }\n\n protected openInternal(\n viewContainerRef: ViewContainerRef,\n componentType: Type,\n ): [ModalRef, ComponentRef] {\n const [modalRef, componentRef] = this.createModalComponent(viewContainerRef);\n componentRef.instance.childComponentType = componentType;\n\n modalRef.onClosed.pipe(first()).subscribe(() => {\n componentRef.destroy();\n\n this.modalList.pop();\n if (this.modalCount > 0) {\n this.topModal.instance.getFocus();\n }\n });\n\n this.setupHandlers(modalRef);\n\n this.modalList.push(componentRef);\n\n return [modalRef, componentRef];\n }\n\n protected setupHandlers(modalRef: ModalRef) {\n let backdrop: HTMLElement = null;\n\n // Add backdrop, setup [data-dismiss] handler.\n modalRef.onCreated.pipe(first()).subscribe((el) => {\n document.body.classList.add(\"modal-open\");\n\n const modalEl: HTMLElement = el.querySelector(\".modal\");\n const dialogEl = modalEl.querySelector(\".modal-dialog\") as HTMLElement;\n\n backdrop = document.createElement(\"div\");\n backdrop.className = \"modal-backdrop fade\";\n backdrop.style.zIndex = `${this.modalCount}040`;\n modalEl.prepend(backdrop);\n\n dialogEl.addEventListener(\"click\", (e: Event) => {\n e.stopPropagation();\n });\n dialogEl.style.zIndex = `${this.modalCount}050`;\n\n const modals = Array.from(\n el.querySelectorAll('.modal-backdrop, .modal *[data-dismiss=\"modal\"]'),\n );\n for (const closeElement of modals) {\n closeElement.addEventListener(\"click\", () => {\n modalRef.close();\n });\n }\n });\n\n // onClose is used in Web to hook into bootstrap. On other projects we pipe it directly to closed.\n modalRef.onClose.pipe(first()).subscribe(() => {\n modalRef.closed();\n\n if (this.modalCount === 0) {\n document.body.classList.remove(\"modal-open\");\n }\n });\n }\n\n protected createModalComponent(\n viewContainerRef: ViewContainerRef,\n ): [ModalRef, ComponentRef] {\n const modalRef = new ModalRef();\n\n const map = new WeakMap();\n map.set(ModalRef, modalRef);\n\n const injector = new ModalInjector(this.injector, map);\n const componentRef = viewContainerRef.createComponent(DynamicModalComponent, { injector });\n\n return [modalRef, componentRef];\n }\n}\n","
    \n \n \n {{ text }}\n \n
    \n\n","import { Component, EventEmitter, Input, OnChanges, Output } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\n\nexport interface PasswordColorText {\n color: string;\n text: string;\n}\n\n/**\n * @deprecated July 2024: Use new PasswordStrengthV2Component instead\n */\n@Component({\n selector: \"app-password-strength\",\n templateUrl: \"password-strength.component.html\",\n})\nexport class PasswordStrengthComponent implements OnChanges {\n @Input() showText = false;\n @Input() email: string;\n @Input() name: string;\n @Input() set password(value: string) {\n this.updatePasswordStrength(value);\n }\n @Output() passwordStrengthResult = new EventEmitter();\n @Output() passwordScoreColor = new EventEmitter();\n\n masterPasswordScore: number;\n scoreWidth = 0;\n color = \"bg-danger\";\n text: string;\n\n private masterPasswordStrengthTimeout: any;\n\n //used by desktop and browser to display strength text color\n get masterPasswordScoreColor() {\n switch (this.masterPasswordScore) {\n case 4:\n return \"success\";\n case 3:\n return \"primary\";\n case 2:\n return \"warning\";\n default:\n return \"danger\";\n }\n }\n\n //used by desktop and browser to display strength text\n get masterPasswordScoreText() {\n switch (this.masterPasswordScore) {\n case 4:\n return this.i18nService.t(\"strong\");\n case 3:\n return this.i18nService.t(\"good\");\n case 2:\n return this.i18nService.t(\"weak\");\n default:\n return this.masterPasswordScore != null ? this.i18nService.t(\"weak\") : null;\n }\n }\n\n constructor(\n private i18nService: I18nService,\n private passwordStrengthService: PasswordStrengthServiceAbstraction,\n ) {}\n\n ngOnChanges(): void {\n this.masterPasswordStrengthTimeout = setTimeout(() => {\n this.scoreWidth = this.masterPasswordScore == null ? 0 : (this.masterPasswordScore + 1) * 20;\n\n switch (this.masterPasswordScore) {\n case 4:\n this.color = \"bg-success\";\n this.text = this.i18nService.t(\"strong\");\n break;\n case 3:\n this.color = \"bg-primary\";\n this.text = this.i18nService.t(\"good\");\n break;\n case 2:\n this.color = \"bg-warning\";\n this.text = this.i18nService.t(\"weak\");\n break;\n default:\n this.color = \"bg-danger\";\n this.text = this.masterPasswordScore != null ? this.i18nService.t(\"weak\") : null;\n break;\n }\n\n this.setPasswordScoreText(this.color, this.text);\n }, 300);\n }\n\n updatePasswordStrength(password: string) {\n const masterPassword = password;\n\n if (this.masterPasswordStrengthTimeout != null) {\n clearTimeout(this.masterPasswordStrengthTimeout);\n }\n\n const strengthResult = this.passwordStrengthService.getPasswordStrength(\n masterPassword,\n this.email,\n this.name?.trim().toLowerCase().split(\" \"),\n );\n this.passwordStrengthResult.emit(strengthResult);\n this.masterPasswordScore = strengthResult == null ? null : strengthResult.score;\n }\n\n setPasswordScoreText(color: string, text: string) {\n color = color.slice(3);\n this.passwordScoreColor.emit({ color: color, text: text });\n }\n}\n","import { Type } from \"@angular/core\";\nimport { CanMatchFn, Route, Routes } from \"@angular/router\";\n\n/**\n * Helper function to swap between two components based on an async condition. The async condition is evaluated\n * as an `CanMatchFn` and supports Angular dependency injection via `inject()`.\n *\n * @example\n * ```ts\n * const routes = [\n * ...componentRouteSwap(\n * defaultComponent,\n * altComponent,\n * async () => {\n * const configService = inject(ConfigService);\n * return configService.getFeatureFlag(FeatureFlag.SomeFlag);\n * },\n * {\n * path: 'some-path'\n * }\n * ),\n * // Other routes...\n * ];\n * ```\n *\n * @param defaultComponent - The default component to render.\n * @param altComponent - The alternate component to render when the condition is met.\n * @param shouldSwapFn - The async function to determine if the alternate component should be rendered.\n * @param options - The shared route options to apply to the default component, and to the alt component if altOptions is not provided.\n * @param altOptions - The alt route options to apply to the alt component.\n */\nexport function componentRouteSwap(\n defaultComponent: Type,\n altComponent: Type,\n shouldSwapFn: CanMatchFn,\n options: Route,\n altOptions?: Route,\n): Routes {\n const defaultRoute = {\n ...options,\n component: defaultComponent,\n };\n\n const selectedAltOptions = altOptions ?? options;\n\n const altRoute: Route = {\n ...selectedAltOptions,\n component: altComponent,\n canMatch: [shouldSwapFn, ...(selectedAltOptions.canMatch ?? [])],\n };\n\n // Return the alternate route first, so it is evaluated first.\n return [altRoute, defaultRoute];\n}\n","import { AbstractControl, FormArray } from \"@angular/forms\";\n\nexport type SelectionItemId = {\n id: string;\n};\n\nfunction findSortedIndex(sortedArray: T[], val: T, compareFn: (a: T, b: T) => number) {\n let low = 0;\n let high = sortedArray.length || 0;\n let mid = -1,\n c = 0;\n while (low < high) {\n mid = Math.floor((low + high) / 2);\n c = compareFn(sortedArray[mid], val);\n if (c < 0) {\n low = mid + 1;\n } else if (c > 0) {\n high = mid;\n } else {\n return mid;\n }\n }\n return low;\n}\n\n/**\n * Utility to help manage a list of selectable items for use with Reactive Angular forms and FormArrays.\n *\n * It supports selecting/deselecting items, keeping items sorted, and synchronizing the selected items\n * with an array of FormControl.\n *\n * The first type parameter TItem represents the item being selected/deselected, it must have an `id`\n * property for identification/comparison. The second type parameter TControlValue represents the value\n * type of the form control.\n */\nexport class FormSelectionList<\n TItem extends SelectionItemId,\n TControlValue extends SelectionItemId,\n> {\n allItems: TItem[] = [];\n /**\n * Sorted list of selected items\n * Immutable and should be recreated whenever a modification is made\n */\n selectedItems: TItem[] = [];\n\n /**\n * Sorted list of deselected items\n * Immutable and should be recreated whenever a modification is made\n */\n deselectedItems: TItem[] = [];\n\n /**\n * Sorted FormArray that corresponds and stays in sync with the selectedItems\n */\n formArray: FormArray, TControlValue>> = new FormArray([]);\n\n /**\n * Construct a new FormSelectionList\n * @param controlFactory - Factory responsible for creating initial form controls for each selected item. It is\n * provided a copy of the selected item for any form control initialization logic. Specify any additional form\n * control options or validators here.\n * @param compareFn - Comparison function used for sorting the items.\n */\n constructor(\n private controlFactory: (item: TItem) => AbstractControl, TControlValue>,\n private compareFn: (a: TItem, b: TItem) => number,\n ) {}\n\n /**\n * Select multiple items by their ids at once. Optionally provide an initial form control value.\n * @param ids - List of ids to select\n * @param initialValue - Value that will be applied to the corresponding form controls\n * The provided `id` arguments will be automatically assigned to each form control value\n */\n selectItems(ids: string[], initialValue?: Partial | undefined) {\n for (const id of ids) {\n this.selectItem(id, initialValue);\n }\n }\n\n /**\n * Deselect multiple items by their ids at once\n * @param ids - List of ids to deselect\n */\n deselectItems(ids: string[]) {\n for (const id of ids) {\n this.deselectItem(id);\n }\n }\n\n deselectAll() {\n this.formArray.clear();\n this.selectedItems = [];\n this.deselectedItems = [...this.allItems];\n }\n\n /**\n * Select a single item by id.\n *\n * Maintains list order for both selected items, deselected items, and the FormArray.\n *\n * @param id - Id of the item to select\n * @param initialValue - Value that will be applied to the corresponding form control for the selected item.\n * The provided `id` argument will be automatically assigned unless explicitly set in the initialValue.\n */\n selectItem(id: string, initialValue?: Partial) {\n const index = this.deselectedItems.findIndex((o) => o.id === id);\n\n if (index === -1) {\n return;\n }\n\n const selectedOption = this.deselectedItems[index];\n\n // Note: Changes to the deselected/selected arrays must create a new copy of the array\n // in order for Angular's Change Detection to pick up the modification (i.e. treat the arrays as immutable)\n\n // Remove from the list of deselected options\n this.deselectedItems = [\n ...this.deselectedItems.slice(0, index),\n ...this.deselectedItems.slice(index + 1),\n ];\n\n // Insert into the sorted selected options list\n const sortedInsertIndex = findSortedIndex(this.selectedItems, selectedOption, this.compareFn);\n\n this.selectedItems = [\n ...this.selectedItems.slice(0, sortedInsertIndex),\n selectedOption,\n ...this.selectedItems.slice(sortedInsertIndex),\n ];\n\n const newControl = this.controlFactory(selectedOption);\n\n // Patch the value and ensure the `id` is set\n newControl.patchValue({\n id,\n ...initialValue,\n });\n\n this.formArray.insert(sortedInsertIndex, newControl);\n }\n\n /**\n * Deselect a single item by id.\n *\n * Maintains list order for both selected items, deselected items, and the FormArray.\n *\n * @param id - Id of the item to deselect\n */\n deselectItem(id: string) {\n const index = this.selectedItems.findIndex((o) => o.id === id);\n\n if (index === -1) {\n return;\n }\n\n const deselectedOption = this.selectedItems[index];\n\n // Note: Changes to the deselected/selected arrays must create a new copy of the array\n // in order for Angular's Change Detection to pick up the modification (i.e. treat the arrays as immutable)\n\n // Remove from the list of selected items (and FormArray)\n this.selectedItems = [\n ...this.selectedItems.slice(0, index),\n ...this.selectedItems.slice(index + 1),\n ];\n this.formArray.removeAt(index);\n\n // Insert into the sorted deselected array\n const sortedInsertIndex = findSortedIndex(\n this.deselectedItems,\n deselectedOption,\n this.compareFn,\n );\n\n this.deselectedItems = [\n ...this.deselectedItems.slice(0, sortedInsertIndex),\n deselectedOption,\n ...this.deselectedItems.slice(sortedInsertIndex),\n ];\n }\n\n /**\n * Populate the list of deselected items, and optional specify which items should be selected and with what initial\n * value for their Form Control\n * @param items - A list of all items. (Will be sorted internally)\n * @param selectedItems - The items to select initially\n */\n populateItems(items: TItem[], selectedItems: TControlValue[] = []) {\n this.formArray.clear();\n this.allItems = [...items].sort(this.compareFn);\n this.selectedItems = [];\n this.deselectedItems = [...this.allItems];\n\n for (const selectedItem of selectedItems) {\n this.selectItem(selectedItem.id, selectedItem);\n }\n }\n\n /**\n * Helper method to iterate over each \"selected\" form control and its corresponding item\n * @param fn - The function to call for each form control and its corresponding item\n */\n forEachControlItem(\n fn: (control: AbstractControl, TControlValue>, value: TItem) => void,\n ) {\n for (let i = 0; i < this.formArray.length; i++) {\n // The selectedItems array and formArray are explicitly kept in sync,\n // so we can safely assume the index of the form control and item are the same\n fn(this.formArray.at(i), this.selectedItems[i]);\n }\n }\n}\n","import { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Directive()\nexport class AttachmentsComponent implements OnInit {\n @Input() cipherId: string;\n @Input() viewOnly: boolean;\n @Output() onUploadedAttachment = new EventEmitter();\n @Output() onDeletedAttachment = new EventEmitter();\n @Output() onReuploadedAttachment = new EventEmitter();\n\n cipher: CipherView;\n cipherDomain: Cipher;\n canAccessAttachments: boolean;\n formPromise: Promise;\n deletePromises: { [id: string]: Promise } = {};\n reuploadPromises: { [id: string]: Promise } = {};\n emergencyAccessId?: string = null;\n protected componentName = \"\";\n\n constructor(\n protected cipherService: CipherService,\n protected i18nService: I18nService,\n protected cryptoService: CryptoService,\n protected platformUtilsService: PlatformUtilsService,\n protected apiService: ApiService,\n protected win: Window,\n protected logService: LogService,\n protected stateService: StateService,\n protected fileDownloadService: FileDownloadService,\n protected dialogService: DialogService,\n protected billingAccountProfileStateService: BillingAccountProfileStateService,\n ) {}\n\n async ngOnInit() {\n await this.init();\n }\n\n async submit() {\n const fileEl = document.getElementById(\"file\") as HTMLInputElement;\n const files = fileEl.files;\n if (files == null || files.length === 0) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"selectFile\"),\n );\n return;\n }\n\n if (files[0].size > 524288000) {\n // 500 MB\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"errorOccurred\"),\n this.i18nService.t(\"maxFileSize\"),\n );\n return;\n }\n\n try {\n this.formPromise = this.saveCipherAttachment(files[0]);\n this.cipherDomain = await this.formPromise;\n this.cipher = await this.cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),\n );\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"attachmentSaved\"));\n this.onUploadedAttachment.emit();\n } catch (e) {\n this.logService.error(e);\n }\n\n // reset file input\n // ref: https://stackoverflow.com/a/20552042\n fileEl.type = \"\";\n fileEl.type = \"file\";\n fileEl.value = \"\";\n }\n\n async delete(attachment: AttachmentView) {\n if (this.deletePromises[attachment.id] != null) {\n return;\n }\n\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"deleteAttachment\" },\n content: { key: \"deleteAttachmentConfirmation\" },\n type: \"warning\",\n });\n\n if (!confirmed) {\n return;\n }\n\n try {\n this.deletePromises[attachment.id] = this.deleteCipherAttachment(attachment.id);\n await this.deletePromises[attachment.id];\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deletedAttachment\"));\n const i = this.cipher.attachments.indexOf(attachment);\n if (i > -1) {\n this.cipher.attachments.splice(i, 1);\n }\n } catch (e) {\n this.logService.error(e);\n }\n\n this.deletePromises[attachment.id] = null;\n this.onDeletedAttachment.emit();\n }\n\n async download(attachment: AttachmentView) {\n const a = attachment as any;\n if (a.downloading) {\n return;\n }\n\n if (!this.canAccessAttachments) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"premiumRequired\"),\n this.i18nService.t(\"premiumRequiredDesc\"),\n );\n return;\n }\n\n let url: string;\n try {\n const attachmentDownloadResponse = await this.apiService.getAttachmentData(\n this.cipher.id,\n attachment.id,\n this.emergencyAccessId,\n );\n url = attachmentDownloadResponse.url;\n } catch (e) {\n if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {\n url = attachment.url;\n } else if (e instanceof ErrorResponse) {\n throw new Error((e as ErrorResponse).getSingleMessage());\n } else {\n throw e;\n }\n }\n\n a.downloading = true;\n const response = await fetch(new Request(url, { cache: \"no-store\" }));\n if (response.status !== 200) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n a.downloading = false;\n return;\n }\n\n try {\n const encBuf = await EncArrayBuffer.fromResponse(response);\n const key =\n attachment.key != null\n ? attachment.key\n : await this.cryptoService.getOrgKey(this.cipher.organizationId);\n const decBuf = await this.cryptoService.decryptFromBytes(encBuf, key);\n this.fileDownloadService.download({\n fileName: attachment.fileName,\n blobData: decBuf,\n });\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n }\n\n a.downloading = false;\n }\n\n protected async init() {\n this.cipherDomain = await this.loadCipher();\n this.cipher = await this.cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),\n );\n\n const canAccessPremium = await firstValueFrom(\n this.billingAccountProfileStateService.hasPremiumFromAnySource$,\n );\n this.canAccessAttachments = canAccessPremium || this.cipher.organizationId != null;\n\n if (!this.canAccessAttachments) {\n const confirmed = await this.dialogService.openSimpleDialog({\n title: { key: \"premiumRequired\" },\n content: { key: \"premiumRequiredDesc\" },\n acceptButtonText: { key: \"learnMore\" },\n type: \"success\",\n });\n\n if (confirmed) {\n this.platformUtilsService.launchUri(\n \"https://vault.bitwarden.com/#/settings/subscription/premium\",\n );\n }\n }\n }\n\n protected async reuploadCipherAttachment(attachment: AttachmentView, admin: boolean) {\n const a = attachment as any;\n if (attachment.key != null || a.downloading || this.reuploadPromises[attachment.id] != null) {\n return;\n }\n\n try {\n this.reuploadPromises[attachment.id] = Promise.resolve().then(async () => {\n // 1. Download\n a.downloading = true;\n const response = await fetch(new Request(attachment.url, { cache: \"no-store\" }));\n if (response.status !== 200) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n a.downloading = false;\n return;\n }\n\n try {\n // 2. Resave\n const encBuf = await EncArrayBuffer.fromResponse(response);\n const key =\n attachment.key != null\n ? attachment.key\n : await this.cryptoService.getOrgKey(this.cipher.organizationId);\n const decBuf = await this.cryptoService.decryptFromBytes(encBuf, key);\n this.cipherDomain = await this.cipherService.saveAttachmentRawWithServer(\n this.cipherDomain,\n attachment.fileName,\n decBuf,\n admin,\n );\n this.cipher = await this.cipherDomain.decrypt(\n await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),\n );\n\n // 3. Delete old\n this.deletePromises[attachment.id] = this.deleteCipherAttachment(attachment.id);\n await this.deletePromises[attachment.id];\n const foundAttachment = this.cipher.attachments.filter((a2) => a2.id === attachment.id);\n if (foundAttachment.length > 0) {\n const i = this.cipher.attachments.indexOf(foundAttachment[0]);\n if (i > -1) {\n this.cipher.attachments.splice(i, 1);\n }\n }\n\n this.platformUtilsService.showToast(\n \"success\",\n null,\n this.i18nService.t(\"attachmentSaved\"),\n );\n this.onReuploadedAttachment.emit();\n } catch (e) {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n }\n\n a.downloading = false;\n });\n await this.reuploadPromises[attachment.id];\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n protected loadCipher() {\n return this.cipherService.get(this.cipherId);\n }\n\n protected saveCipherAttachment(file: File) {\n return this.cipherService.saveAttachmentWithServer(this.cipherDomain, file);\n }\n\n protected deleteCipherAttachment(attachmentId: string) {\n return this.cipherService.deleteAttachmentWithServer(this.cipher.id, attachmentId);\n }\n\n protected async reupload(attachment: AttachmentView) {\n // TODO: This should be removed but is needed since we re-use the same template\n }\n}\n","import { Directive, ElementRef, HostListener, Input } from \"@angular/core\";\n\n@Directive({\n selector: \"[appFallbackSrc]\",\n})\nexport class FallbackSrcDirective {\n @Input(\"appFallbackSrc\") appFallbackSrc: string;\n\n /** Only try setting the fallback once. This prevents an infinite loop if the fallback itself is missing. */\n private tryFallback = true;\n\n constructor(private el: ElementRef) {}\n\n @HostListener(\"error\") onError() {\n if (this.tryFallback) {\n this.el.nativeElement.src = this.appFallbackSrc;\n this.tryFallback = false;\n }\n }\n}\n","
    \n \n \n \n \n
    \n","import { ChangeDetectionStrategy, Component, Input, OnInit } from \"@angular/core\";\nimport {\n BehaviorSubject,\n combineLatest,\n distinctUntilChanged,\n filter,\n map,\n Observable,\n} from \"rxjs\";\n\nimport { DomainSettingsService } from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { buildCipherIcon } from \"@bitwarden/common/vault/icon/build-cipher-icon\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\n@Component({\n selector: \"app-vault-icon\",\n templateUrl: \"icon.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent implements OnInit {\n @Input()\n set cipher(value: CipherView) {\n this.cipher$.next(value);\n }\n\n protected data$: Observable<{\n imageEnabled: boolean;\n image?: string;\n fallbackImage: string;\n icon?: string;\n }>;\n\n private cipher$ = new BehaviorSubject(undefined);\n\n constructor(\n private environmentService: EnvironmentService,\n private domainSettingsService: DomainSettingsService,\n ) {}\n\n async ngOnInit() {\n this.data$ = combineLatest([\n this.environmentService.environment$.pipe(map((e) => e.getIconsUrl())),\n this.domainSettingsService.showFavicons$.pipe(distinctUntilChanged()),\n this.cipher$.pipe(filter((c) => c !== undefined)),\n ]).pipe(\n map(([iconsUrl, showFavicon, cipher]) => buildCipherIcon(iconsUrl, cipher, showFavicon)),\n );\n }\n}\n","import { Utils } from \"../../platform/misc/utils\";\nimport { CipherType } from \"../enums/cipher-type\";\nimport { CipherView } from \"../models/view/cipher.view\";\n\nexport function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, showFavicon: boolean) {\n let icon;\n let image;\n let fallbackImage = \"\";\n const cardIcons: Record = {\n Visa: \"card-visa\",\n Mastercard: \"card-mastercard\",\n Amex: \"card-amex\",\n Discover: \"card-discover\",\n \"Diners Club\": \"card-diners-club\",\n JCB: \"card-jcb\",\n Maestro: \"card-maestro\",\n UnionPay: \"card-union-pay\",\n RuPay: \"card-ru-pay\",\n };\n\n switch (cipher.type) {\n case CipherType.Login:\n icon = \"bwi-globe\";\n\n if (cipher.login.uri) {\n let hostnameUri = cipher.login.uri;\n let isWebsite = false;\n\n if (hostnameUri.indexOf(\"androidapp://\") === 0) {\n icon = \"bwi-android\";\n image = null;\n } else if (hostnameUri.indexOf(\"iosapp://\") === 0) {\n icon = \"bwi-apple\";\n image = null;\n } else if (\n showFavicon &&\n hostnameUri.indexOf(\"://\") === -1 &&\n hostnameUri.indexOf(\".\") > -1\n ) {\n hostnameUri = `http://${hostnameUri}`;\n isWebsite = true;\n } else if (showFavicon) {\n isWebsite = hostnameUri.indexOf(\"http\") === 0 && hostnameUri.indexOf(\".\") > -1;\n }\n\n if (showFavicon && isWebsite) {\n try {\n image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;\n fallbackImage = \"images/bwi-globe.png\";\n } catch (e) {\n // Ignore error since the fallback icon will be shown if image is null.\n }\n }\n } else {\n image = null;\n }\n break;\n case CipherType.SecureNote:\n icon = \"bwi-sticky-note\";\n break;\n case CipherType.Card:\n icon = \"bwi-credit-card\";\n if (showFavicon && cipher.card.brand in cardIcons) {\n icon = `credit-card-icon ${cardIcons[cipher.card.brand]}`;\n }\n break;\n case CipherType.Identity:\n icon = \"bwi-id-card\";\n break;\n default:\n break;\n }\n\n return {\n imageEnabled: showFavicon,\n image,\n fallbackImage,\n icon,\n };\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const BitwardenLogoPrimary = svgIcon`\n \n Bitwarden\n \n \n \n`;\n\nexport const BitwardenLogoWhite = svgIcon`\n \n Bitwarden\n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const LockIcon = svgIcon`\n \n \n \n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const UserVerificationBiometricsIcon = svgIcon`\n\n \n \n \n \n \n \n\n`;\n","\n
    \n
    \n
    \n \n
    \n \n
    \n

    \n {{ title }}\n

    \n

    {{ subtitle }}

    \n
    \n \n \n \n \n \n \n
    \n
    {{ \"accessing\" | i18n }} {{ hostname }}
    \n \n \n \n \n
    © {{ year }} Bitwarden Inc.
    \n
    {{ version }}
    \n
    \n
    \n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ThemeStateService } from \"@bitwarden/common/platform/theming/theme-state.service\";\n\nimport { IconModule, Icon } from \"../../../../components/src/icon\";\nimport { SharedModule } from \"../../../../components/src/shared\";\nimport { TypographyModule } from \"../../../../components/src/typography\";\nimport { BitwardenLogoPrimary, BitwardenLogoWhite } from \"../icons/bitwarden-logo.icon\";\n\n@Component({\n standalone: true,\n selector: \"auth-anon-layout\",\n templateUrl: \"./anon-layout.component.html\",\n imports: [IconModule, CommonModule, TypographyModule, SharedModule],\n})\nexport class AnonLayoutComponent {\n @Input() title: string;\n @Input() subtitle: string;\n @Input() icon: Icon;\n @Input() showReadonlyHostname: boolean;\n\n protected logo: Icon;\n\n protected year = \"2024\";\n protected clientType: ClientType;\n protected hostname: string;\n protected version: string;\n protected theme: string;\n\n protected showYearAndVersion = true;\n\n constructor(\n private environmentService: EnvironmentService,\n private platformUtilsService: PlatformUtilsService,\n private themeStateService: ThemeStateService,\n ) {\n this.year = new Date().getFullYear().toString();\n this.clientType = this.platformUtilsService.getClientType();\n this.showYearAndVersion = this.clientType === ClientType.Web;\n }\n\n async ngOnInit() {\n this.hostname = (await firstValueFrom(this.environmentService.environment$)).getHostname();\n this.version = await this.platformUtilsService.getApplicationVersion();\n this.theme = await firstValueFrom(this.themeStateService.selectedTheme$);\n\n if (this.theme === \"dark\") {\n this.logo = BitwardenLogoWhite;\n } else {\n this.logo = BitwardenLogoPrimary;\n }\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Data, NavigationEnd, Router, RouterModule } from \"@angular/router\";\nimport { Subject, filter, switchMap, takeUntil, tap } from \"rxjs\";\n\nimport { AnonLayoutComponent } from \"@bitwarden/auth/angular\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Icon } from \"@bitwarden/components\";\n\nexport interface AnonLayoutWrapperData {\n pageTitle?: string;\n pageSubtitle?: string;\n pageIcon?: Icon;\n showReadonlyHostname?: boolean;\n}\n\n@Component({\n standalone: true,\n templateUrl: \"anon-layout-wrapper.component.html\",\n imports: [AnonLayoutComponent, RouterModule],\n})\nexport class AnonLayoutWrapperComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n protected pageTitle: string;\n protected pageSubtitle: string;\n protected pageIcon: Icon;\n protected showReadonlyHostname: boolean;\n\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n private i18nService: I18nService,\n ) {}\n\n ngOnInit(): void {\n // Set the initial page data on load\n this.setAnonLayoutWrapperData(this.route.snapshot.firstChild?.data);\n\n // Listen for page changes and update the page data appropriately\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n // reset page data on page changes\n tap(() => this.resetPageData()),\n switchMap(() => this.route.firstChild?.data || null),\n takeUntil(this.destroy$),\n )\n .subscribe((firstChildRouteData: Data | null) => {\n this.setAnonLayoutWrapperData(firstChildRouteData);\n });\n }\n\n private setAnonLayoutWrapperData(firstChildRouteData: Data | null) {\n if (!firstChildRouteData) {\n return;\n }\n\n if (firstChildRouteData[\"pageTitle\"] !== undefined) {\n this.pageTitle = this.i18nService.t(firstChildRouteData[\"pageTitle\"]);\n }\n\n if (firstChildRouteData[\"pageSubtitle\"] !== undefined) {\n this.pageSubtitle = this.i18nService.t(firstChildRouteData[\"pageSubtitle\"]);\n }\n\n this.pageIcon = firstChildRouteData[\"pageIcon\"];\n this.showReadonlyHostname = firstChildRouteData[\"showReadonlyHostname\"];\n }\n\n private resetPageData() {\n this.pageTitle = null;\n this.pageSubtitle = null;\n this.pageIcon = null;\n this.showReadonlyHostname = null;\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","\n \n \n \n\n","import { DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ButtonModule, DialogModule, DialogService } from \"@bitwarden/components\";\n\nexport type FingerprintDialogData = {\n fingerprint: string[];\n};\n\n@Component({\n templateUrl: \"fingerprint-dialog.component.html\",\n standalone: true,\n imports: [JslibModule, ButtonModule, DialogModule],\n})\nexport class FingerprintDialogComponent {\n constructor(@Inject(DIALOG_DATA) protected data: FingerprintDialogData) {}\n\n static open(dialogService: DialogService, data: FingerprintDialogData) {\n return dialogService.open(FingerprintDialogComponent, { data });\n }\n}\n","\n \n {{ \"yourAccountsFingerprint\" | i18n }}:\n \n {{ data.fingerprint.join(\"-\") }}\n \n \n \n {{ \"learnMore\" | i18n }}\n \n
    \n \n \n\n","\n \n\n
    \n \n {{ \"masterPassword\" | i18n }}\n \n \n \n {{ \"important\" | i18n }} \n {{ \"masterPassImportant\" | i18n }}\n {{ minPasswordMsg }}.\n \n \n\n \n
    \n\n \n {{ \"confirmMasterPassword\" | i18n }}\n \n \n \n\n \n {{ \"masterPassHintLabel\" | i18n }}\n \n \n {{ \"masterPassHintText\" | i18n: formGroup.value.hint.length : maxHintLength.toString() }}\n \n \n\n \n \n {{ \"checkForBreaches\" | i18n }}\n \n\n \n {{ buttonText || (\"setMasterPassword\" | i18n) }}\n \n\n \n\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormBuilder, Validators } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { DEFAULT_KDF_CONFIG } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n CheckboxModule,\n DialogService,\n FormFieldModule,\n IconButtonModule,\n InputModule,\n ToastService,\n} from \"@bitwarden/components\";\n\nimport { InputsFieldMatch } from \"../../../../angular/src/auth/validators/inputs-field-match.validator\";\nimport { SharedModule } from \"../../../../components/src/shared\";\nimport { PasswordCalloutComponent } from \"../password-callout/password-callout.component\";\n\nimport { PasswordInputResult } from \"./password-input-result\";\n\n@Component({\n standalone: true,\n selector: \"auth-input-password\",\n templateUrl: \"./input-password.component.html\",\n imports: [\n AsyncActionsModule,\n ButtonModule,\n CheckboxModule,\n FormFieldModule,\n IconButtonModule,\n InputModule,\n ReactiveFormsModule,\n SharedModule,\n PasswordCalloutComponent,\n JslibModule,\n ],\n})\nexport class InputPasswordComponent implements OnInit {\n @Output() onPasswordFormSubmit = new EventEmitter();\n\n @Input({ required: true }) email: string;\n @Input() protected buttonText: string;\n @Input() masterPasswordPolicyOptions: MasterPasswordPolicyOptions | null = null;\n @Input() loading: boolean = false;\n\n private minHintLength = 0;\n protected maxHintLength = 50;\n\n protected minPasswordLength = Utils.minimumPasswordLength;\n protected minPasswordMsg = \"\";\n protected passwordStrengthResult: any;\n protected showErrorSummary = false;\n protected showPassword = false;\n\n protected formGroup = this.formBuilder.group(\n {\n password: [\"\", [Validators.required, Validators.minLength(this.minPasswordLength)]],\n confirmedPassword: [\"\", Validators.required],\n hint: [\n \"\", // must be string (not null) because we check length in validation\n [Validators.minLength(this.minHintLength), Validators.maxLength(this.maxHintLength)],\n ],\n checkForBreaches: true,\n },\n {\n validators: [\n InputsFieldMatch.compareInputs(\n \"match\",\n \"password\",\n \"confirmedPassword\",\n this.i18nService.t(\"masterPassDoesntMatch\"),\n ),\n InputsFieldMatch.compareInputs(\n \"doNotMatch\",\n \"password\",\n \"hint\",\n this.i18nService.t(\"hintEqualsPassword\"),\n ),\n ],\n },\n );\n\n constructor(\n private auditService: AuditService,\n private cryptoService: CryptoService,\n private dialogService: DialogService,\n private formBuilder: FormBuilder,\n private i18nService: I18nService,\n private policyService: PolicyService,\n private toastService: ToastService,\n ) {}\n\n async ngOnInit() {\n if (\n this.masterPasswordPolicyOptions != null &&\n this.masterPasswordPolicyOptions.minLength > 0\n ) {\n this.minPasswordMsg = this.i18nService.t(\n \"characterMinimum\",\n this.masterPasswordPolicyOptions.minLength,\n );\n } else {\n this.minPasswordMsg = this.i18nService.t(\"characterMinimum\", this.minPasswordLength);\n }\n }\n\n getPasswordStrengthResult(result: any) {\n this.passwordStrengthResult = result;\n }\n\n protected submit = async () => {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n this.showErrorSummary = true;\n return;\n }\n\n const password = this.formGroup.controls.password.value;\n\n // Check if password is breached (if breached, user chooses to accept and continue or not)\n const passwordIsBreached =\n this.formGroup.controls.checkForBreaches.value &&\n (await this.auditService.passwordLeaked(password));\n\n if (passwordIsBreached) {\n const userAcceptedDialog = await this.dialogService.openSimpleDialog({\n title: { key: \"exposedMasterPassword\" },\n content: { key: \"exposedMasterPasswordDesc\" },\n type: \"warning\",\n });\n\n if (!userAcceptedDialog) {\n return;\n }\n }\n\n // Check if password meets org policy requirements\n if (\n this.masterPasswordPolicyOptions != null &&\n !this.policyService.evaluateMasterPassword(\n this.passwordStrengthResult.score,\n password,\n this.masterPasswordPolicyOptions,\n )\n ) {\n this.toastService.showToast({\n variant: \"error\",\n title: this.i18nService.t(\"errorOccurred\"),\n message: this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n });\n\n return;\n }\n\n // Create and hash new master key\n const kdfConfig = DEFAULT_KDF_CONFIG;\n\n if (this.email == null) {\n throw new Error(\"Email is required to create master key.\");\n }\n\n const masterKey = await this.cryptoService.makeMasterKey(\n password,\n this.email.trim().toLowerCase(),\n kdfConfig,\n );\n\n const masterKeyHash = await this.cryptoService.hashMasterKey(password, masterKey);\n\n this.onPasswordFormSubmit.emit({\n masterKey,\n masterKeyHash,\n kdfConfig,\n hint: this.formGroup.controls.hint.value,\n });\n };\n}\n","
    \n \n \n {{\n dialogOptions.title ? (dialogOptions.title | i18n) : (\"verificationRequired\" | i18n)\n }}\n \n \n \n

    \n {{ dialogOptions.bodyText | i18n }}\n

    \n\n \n {{ dialogOptions.calloutOptions.text | i18n }}\n \n
    \n\n \n \n

    \n {{ \"verificationRequiredForActionSetPinToContinue\" | i18n }}\n

    \n \n\n \n \n \n \n \n \n \n \n \n {{ \"submit\" | i18n }}\n \n\n \n \n {{ dialogOptions.confirmButtonOptions.text | i18n }}\n \n \n\n \n \n \n \n \n\n \n \n
    \n
    \n","import { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n CalloutModule,\n DialogModule,\n DialogService,\n} from \"@bitwarden/components\";\n\nimport { ActiveClientVerificationOption } from \"./active-client-verification-option.enum\";\nimport {\n UserVerificationDialogOptions,\n UserVerificationDialogResult,\n} from \"./user-verification-dialog.types\";\nimport { UserVerificationFormInputComponent } from \"./user-verification-form-input.component\";\n\n@Component({\n templateUrl: \"user-verification-dialog.component.html\",\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n JslibModule,\n ButtonModule,\n DialogModule,\n AsyncActionsModule,\n UserVerificationFormInputComponent,\n CalloutModule,\n ],\n})\nexport class UserVerificationDialogComponent {\n verificationForm = this.formBuilder.group({\n secret: this.formBuilder.control(null),\n });\n\n get secret() {\n return this.verificationForm.controls.secret;\n }\n\n invalidSecret = false;\n activeClientVerificationOption: ActiveClientVerificationOption;\n readonly ActiveClientVerificationOption = ActiveClientVerificationOption;\n\n constructor(\n @Inject(DIALOG_DATA) public dialogOptions: UserVerificationDialogOptions,\n private dialogRef: DialogRef,\n private formBuilder: FormBuilder,\n private userVerificationService: UserVerificationService,\n private platformUtilsService: PlatformUtilsService,\n private i18nService: I18nService,\n ) {}\n\n /**\n * Opens the user verification dialog.\n *\n * @param {DialogService} dialogService - The service used to open the dialog.\n * @param {UserVerificationDialogOptions} data - Parameters for configuring the dialog.\n * @returns {Promise} A promise that resolves to the result of the user verification process.\n *\n * @example\n * // Example 1: Default, simple scenario\n * const result = await UserVerificationDialogComponent.open(\n * this.dialogService,\n * {}\n * );\n *\n * // Handle the result of the dialog based on user action and verification success\n * if (result.userAction === 'cancel') {\n * // User cancelled the dialog\n * return;\n * }\n *\n * // User confirmed the dialog so check verification success\n * if (!result.verificationSuccess) {\n * // verification failed\n * return;\n * }\n *\n * ----------------------------------------------------------\n *\n * @example\n * // Example 2: Custom scenario\n * const result = await UserVerificationDialogComponent.open(\n * this.dialogService,\n * {\n * title: 'customTitle',\n * bodyText: 'customBodyText',\n * calloutOptions: {\n * text: 'customCalloutText',\n * type: 'warning',\n * },\n * confirmButtonOptions: {\n * text: 'customConfirmButtonText',\n * type: 'danger',\n * }\n * }\n * );\n *\n * // Handle the result of the dialog based on user action and verification success\n * if (result.userAction === 'cancel') {\n * // User cancelled the dialog\n * return;\n * }\n *\n * // User confirmed the dialog so check verification success\n * if (!result.verificationSuccess) {\n * // verification failed\n * return;\n * }\n *\n * ----------------------------------------------------------\n *\n * @example\n * // Example 3: Client side verification scenario only\n * const result = await UserVerificationDialogComponent.open(\n * this.dialogService,\n * { clientSideOnlyVerification: true }\n * );\n *\n * // Handle the result of the dialog based on user action and verification success\n * if (result.userAction === 'cancel') {\n * // User cancelled the dialog\n * return;\n * }\n *\n * // User confirmed the dialog so check verification success\n * if (!result.verificationSuccess) {\n * if (result.noAvailableClientVerificationMethods) {\n * // No client-side verification methods are available\n * // Could send user to configure a verification method like PIN or biometrics\n * }\n * return;\n * }\n *\n * ----------------------------------------------------------\n *\n * @example\n * // Example 4: Custom user verification validation\n *\n * const result = await UserVerificationDialogComponent.open(dialogService, {\n * verificationType: {\n * type: \"custom\",\n * // Pass in a function that will be used to validate the input of the\n * // verification dialog, returning true when finished.\n * verificationFn: async (secret: VerificationWithSecret) => {\n * const request = await userVerificationService.buildRequest(secret);\n *\n * // ... Do something with the custom request type\n *\n * await someServicer.sendMyRequestThatVerfiesUserIdentity(\n * // ... Some other data\n * request,\n * );\n * return true;\n * },\n * },\n * });\n *\n * // ... Evaluate the result as usual\n */\n static async open(\n dialogService: DialogService,\n data: UserVerificationDialogOptions,\n ): Promise {\n const dialogRef = dialogService.open(\n UserVerificationDialogComponent,\n {\n data,\n },\n );\n\n const dialogResult = await firstValueFrom(dialogRef.closed);\n\n // An empty string is returned when the user hits the x to close the dialog.\n // Undefined is returned when the users hits the escape key to close the dialog.\n if (typeof dialogResult === \"string\" || dialogResult === undefined) {\n // User used x to close dialog\n return {\n userAction: \"cancel\",\n verificationSuccess: false,\n };\n } else {\n return dialogResult;\n }\n }\n\n handleActiveClientVerificationOptionChange(\n activeClientVerificationOption: ActiveClientVerificationOption,\n ) {\n this.activeClientVerificationOption = activeClientVerificationOption;\n }\n\n handleBiometricsVerificationResultChange(biometricsVerificationResult: boolean) {\n if (biometricsVerificationResult) {\n this.close({\n userAction: \"confirm\",\n verificationSuccess: true,\n noAvailableClientVerificationMethods: false,\n });\n }\n }\n\n submit = async () => {\n if (this.activeClientVerificationOption === ActiveClientVerificationOption.None) {\n this.close({\n userAction: \"confirm\",\n verificationSuccess: false,\n noAvailableClientVerificationMethods: true,\n });\n return;\n }\n\n this.verificationForm.markAllAsTouched();\n\n if (this.verificationForm.invalid) {\n return;\n }\n\n try {\n if (\n typeof this.dialogOptions.verificationType === \"object\" &&\n this.dialogOptions.verificationType.type === \"custom\"\n ) {\n const success = await this.dialogOptions.verificationType.verificationFn(this.secret.value);\n this.close({\n userAction: \"confirm\",\n verificationSuccess: success,\n });\n return;\n }\n\n // TODO: once we migrate all user verification scenarios to use this new implementation,\n // we should consider refactoring the user verification service handling of the\n // OTP and MP flows to not throw errors on verification failure.\n const verificationResult = await this.userVerificationService.verifyUser(this.secret.value);\n\n if (verificationResult) {\n this.invalidSecret = false;\n this.close({\n userAction: \"confirm\",\n verificationSuccess: true,\n noAvailableClientVerificationMethods: false,\n });\n } else {\n this.invalidSecret = true;\n\n // Only pin should ever get here, but added this check to be safe.\n if (this.activeClientVerificationOption === ActiveClientVerificationOption.Pin) {\n this.platformUtilsService.showToast(\n \"error\",\n this.i18nService.t(\"error\"),\n this.i18nService.t(\"invalidPin\"),\n );\n } else {\n this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"unexpectedError\"));\n }\n }\n } catch (e) {\n // Catch handles OTP and MP verification scenarios as those throw errors on verification failure instead of returning false like PIN and biometrics.\n this.invalidSecret = true;\n this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"error\"), e.message);\n return;\n }\n };\n\n cancel() {\n this.close({\n userAction: \"cancel\",\n verificationSuccess: false,\n });\n }\n\n close(dialogResult: UserVerificationDialogResult) {\n this.dialogRef.close(dialogResult);\n }\n}\n","export class RegisterSendVerificationEmailRequest {\n constructor(\n public email: string,\n public name: string,\n public receiveMarketingEmails: boolean,\n ) {}\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RegistrationCheckEmailIcon = svgIcon`\n\n\n \n \n \n \n \n \n`;\n","
    \n \n Self-hosted environment\n \n \n {{ \"baseUrl\" | i18n }}\n \n {{ \"selfHostedBaseUrlHint\" | i18n }}\n \n\n \n\n \n

    \n {{ \"selfHostedCustomEnvHeader\" | i18n }}\n

    \n\n \n {{ \"webVaultUrl\" | i18n }}\n \n \n\n \n {{ \"apiUrl\" | i18n }}\n \n \n\n \n {{ \"identityUrl\" | i18n }}\n \n \n\n \n {{ \"notificationsUrl\" | i18n }}\n \n \n\n \n {{ \"iconsUrl\" | i18n }}\n \n \n
    \n\n \n {{ \"selfHostedEnvFormInvalid\" | i18n }}\n \n
    \n \n \n\n \n \n
    \n
    \n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n AbstractControl,\n FormBuilder,\n FormControl,\n FormGroup,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n} from \"@angular/forms\";\nimport { Subject, firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n EnvironmentService,\n Region,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n DialogModule,\n DialogService,\n FormFieldModule,\n LinkModule,\n TypographyModule,\n} from \"@bitwarden/components\";\n\n/**\n * Validator for self-hosted environment settings form.\n * It enforces that at least one URL is provided.\n */\nfunction selfHostedEnvSettingsFormValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const formGroup = control as FormGroup;\n const baseUrl = formGroup.get(\"baseUrl\")?.value;\n const webVaultUrl = formGroup.get(\"webVaultUrl\")?.value;\n const apiUrl = formGroup.get(\"apiUrl\")?.value;\n const identityUrl = formGroup.get(\"identityUrl\")?.value;\n const iconsUrl = formGroup.get(\"iconsUrl\")?.value;\n const notificationsUrl = formGroup.get(\"notificationsUrl\")?.value;\n\n if (baseUrl || webVaultUrl || apiUrl || identityUrl || iconsUrl || notificationsUrl) {\n return null; // valid\n } else {\n return { atLeastOneUrlIsRequired: true }; // invalid\n }\n };\n}\n\n/**\n * Dialog for configuring self-hosted environment settings.\n */\n@Component({\n standalone: true,\n selector: \"auth-registration-self-hosted-env-config-dialog\",\n templateUrl: \"registration-self-hosted-env-config-dialog.component.html\",\n imports: [\n CommonModule,\n JslibModule,\n DialogModule,\n ButtonModule,\n LinkModule,\n TypographyModule,\n ReactiveFormsModule,\n FormFieldModule,\n AsyncActionsModule,\n ],\n})\nexport class RegistrationSelfHostedEnvConfigDialogComponent implements OnInit, OnDestroy {\n /**\n * Opens the dialog.\n * @param dialogService - Dialog service.\n * @returns Promise that resolves to true if the dialog was closed with a successful result, false otherwise.\n */\n static async open(dialogService: DialogService): Promise {\n const dialogRef = dialogService.open(RegistrationSelfHostedEnvConfigDialogComponent, {\n disableClose: false,\n });\n\n const dialogResult = await firstValueFrom(dialogRef.closed);\n\n return dialogResult;\n }\n\n formGroup = this.formBuilder.group(\n {\n baseUrl: [null],\n webVaultUrl: [null],\n apiUrl: [null],\n identityUrl: [null],\n iconsUrl: [null],\n notificationsUrl: [null],\n },\n { validators: selfHostedEnvSettingsFormValidator() },\n );\n\n get baseUrl(): FormControl {\n return this.formGroup.get(\"baseUrl\") as FormControl;\n }\n\n get webVaultUrl(): FormControl {\n return this.formGroup.get(\"webVaultUrl\") as FormControl;\n }\n\n get apiUrl(): FormControl {\n return this.formGroup.get(\"apiUrl\") as FormControl;\n }\n\n get identityUrl(): FormControl {\n return this.formGroup.get(\"identityUrl\") as FormControl;\n }\n\n get iconsUrl(): FormControl {\n return this.formGroup.get(\"iconsUrl\") as FormControl;\n }\n\n get notificationsUrl(): FormControl {\n return this.formGroup.get(\"notificationsUrl\") as FormControl;\n }\n\n showCustomEnv = false;\n showErrorSummary = false;\n\n private destroy$ = new Subject();\n\n constructor(\n private dialogRef: DialogRef,\n private formBuilder: FormBuilder,\n private environmentService: EnvironmentService,\n ) {}\n\n ngOnInit() {}\n\n submit = async () => {\n this.showErrorSummary = false;\n\n if (this.formGroup.invalid) {\n this.showErrorSummary = true;\n return;\n }\n\n await this.environmentService.setEnvironment(Region.SelfHosted, {\n base: this.baseUrl.value,\n api: this.apiUrl.value,\n identity: this.identityUrl.value,\n webVault: this.webVaultUrl.value,\n icons: this.iconsUrl.value,\n notifications: this.notificationsUrl.value,\n });\n\n this.dialogRef.close(true);\n };\n\n async cancel() {\n this.dialogRef.close(false);\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","
    \n \n {{ \"creatingAccountOn\" | i18n }}\n \n \n \n \n \n
    \n","import { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { Subject, from, map, of, pairwise, startWith, switchMap, takeUntil, tap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport {\n Environment,\n EnvironmentService,\n Region,\n RegionConfig,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, FormFieldModule, SelectModule, ToastService } from \"@bitwarden/components\";\n\nimport { RegistrationSelfHostedEnvConfigDialogComponent } from \"./registration-self-hosted-env-config-dialog.component\";\n\n/**\n * Component for selecting the environment to register with in the email verification registration flow.\n * Outputs the selected region to the parent component so it can respond as necessary.\n */\n@Component({\n standalone: true,\n selector: \"auth-registration-env-selector\",\n templateUrl: \"registration-env-selector.component.html\",\n imports: [CommonModule, JslibModule, ReactiveFormsModule, FormFieldModule, SelectModule],\n})\nexport class RegistrationEnvSelectorComponent implements OnInit, OnDestroy {\n @Output() selectedRegionChange = new EventEmitter();\n\n ServerEnvironmentType = Region;\n\n formGroup = this.formBuilder.group({\n selectedRegion: [null as RegionConfig | Region.SelfHosted | null, Validators.required],\n });\n\n get selectedRegion(): FormControl {\n return this.formGroup.get(\"selectedRegion\") as FormControl;\n }\n\n availableRegionConfigs: RegionConfig[] = this.environmentService.availableRegions();\n\n private selectedRegionFromEnv: RegionConfig | Region.SelfHosted;\n\n isDesktopOrBrowserExtension = false;\n\n private destroy$ = new Subject();\n\n constructor(\n private formBuilder: FormBuilder,\n private environmentService: EnvironmentService,\n private dialogService: DialogService,\n private i18nService: I18nService,\n private toastService: ToastService,\n private platformUtilsService: PlatformUtilsService,\n ) {\n const clientType = platformUtilsService.getClientType();\n this.isDesktopOrBrowserExtension =\n clientType === ClientType.Desktop || clientType === ClientType.Browser;\n }\n\n async ngOnInit() {\n await this.initSelectedRegionAndListenForEnvChanges();\n this.listenForSelectedRegionChanges();\n }\n\n private async initSelectedRegionAndListenForEnvChanges() {\n this.environmentService.environment$\n .pipe(\n map((env: Environment) => {\n const region: Region = env.getRegion();\n const regionConfig: RegionConfig = this.availableRegionConfigs.find(\n (availableRegionConfig) => availableRegionConfig.key === region,\n );\n\n if (regionConfig === undefined) {\n // Self hosted does not have a region config.\n return Region.SelfHosted;\n }\n\n return regionConfig;\n }),\n tap((selectedRegionFromEnv: RegionConfig | Region.SelfHosted) => {\n // Only set the value if it is different from the current value.\n if (selectedRegionFromEnv !== this.selectedRegion.value) {\n // Don't emit to avoid triggering the selectedRegion valueChanges subscription\n // which could loop back to this code.\n this.selectedRegion.setValue(selectedRegionFromEnv, { emitEvent: false });\n }\n\n // Save this off so we can reset the value to the previously selected region\n // if the self hosted settings are closed without saving.\n this.selectedRegionFromEnv = selectedRegionFromEnv;\n\n // Emit the initial value\n this.selectedRegionChange.emit(selectedRegionFromEnv);\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private listenForSelectedRegionChanges() {\n this.selectedRegion.valueChanges\n .pipe(\n startWith(null), // required so that first user choice is not ignored\n pairwise(),\n switchMap(\n ([prevSelectedRegion, selectedRegion]: [\n RegionConfig | Region.SelfHosted | null,\n RegionConfig | Region.SelfHosted | null,\n ]) => {\n if (selectedRegion === null) {\n this.selectedRegionChange.emit(selectedRegion);\n return of(null);\n }\n\n if (selectedRegion === Region.SelfHosted) {\n return from(\n RegistrationSelfHostedEnvConfigDialogComponent.open(this.dialogService),\n ).pipe(\n tap((result: boolean | undefined) =>\n this.handleSelfHostedEnvConfigDialogResult(result, prevSelectedRegion),\n ),\n );\n }\n\n this.selectedRegionChange.emit(selectedRegion);\n return from(this.environmentService.setEnvironment(selectedRegion.key));\n },\n ),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private handleSelfHostedEnvConfigDialogResult(\n result: boolean | undefined,\n prevSelectedRegion: RegionConfig | Region.SelfHosted | null,\n ) {\n if (result === true) {\n this.selectedRegionChange.emit(Region.SelfHosted);\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"environmentSaved\"),\n });\n return;\n }\n\n // Reset the value to the previously selected region or the current env setting\n // if the self hosted env settings dialog is closed without saving.\n if (\n (result === false || result === undefined) &&\n prevSelectedRegion !== null &&\n prevSelectedRegion !== Region.SelfHosted\n ) {\n this.selectedRegionChange.emit(prevSelectedRegion);\n this.selectedRegion.setValue(prevSelectedRegion, { emitEvent: false });\n } else {\n this.selectedRegionChange.emit(this.selectedRegionFromEnv);\n this.selectedRegion.setValue(this.selectedRegionFromEnv, { emitEvent: false });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterSendVerificationEmailRequest } from \"@bitwarden/common/auth/models/request/registration/register-send-verification-email.request\";\nimport { RegionConfig, Region } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n CheckboxModule,\n FormFieldModule,\n IconModule,\n LinkModule,\n} from \"@bitwarden/components\";\n\nimport { RegistrationCheckEmailIcon } from \"../../icons/registration-check-email.icon\";\nimport { RegistrationEnvSelectorComponent } from \"../registration-env-selector/registration-env-selector.component\";\n\nexport enum RegistrationStartState {\n USER_DATA_ENTRY = \"UserDataEntry\",\n CHECK_EMAIL = \"CheckEmail\",\n}\n\nconst DEFAULT_MARKETING_EMAILS_PREF_BY_REGION: Record = {\n [Region.US]: true,\n [Region.EU]: false,\n [Region.SelfHosted]: false,\n};\n\n@Component({\n standalone: true,\n selector: \"auth-registration-start\",\n templateUrl: \"./registration-start.component.html\",\n imports: [\n CommonModule,\n ReactiveFormsModule,\n JslibModule,\n FormFieldModule,\n AsyncActionsModule,\n CheckboxModule,\n ButtonModule,\n LinkModule,\n IconModule,\n RegistrationEnvSelectorComponent,\n ],\n})\nexport class RegistrationStartComponent implements OnInit, OnDestroy {\n @Output() registrationStartStateChange = new EventEmitter();\n\n state: RegistrationStartState = RegistrationStartState.USER_DATA_ENTRY;\n RegistrationStartState = RegistrationStartState;\n readonly Icons = { RegistrationCheckEmailIcon };\n\n isSelfHost = false;\n\n formGroup = this.formBuilder.group({\n email: [\"\", [Validators.required, Validators.email]],\n name: [\"\"],\n receiveMarketingEmails: [false],\n });\n\n get email() {\n return this.formGroup.controls.email;\n }\n\n get name() {\n return this.formGroup.controls.name;\n }\n\n get receiveMarketingEmails() {\n return this.formGroup.controls.receiveMarketingEmails;\n }\n\n emailReadonly: boolean = false;\n\n showErrorSummary = false;\n\n private destroy$ = new Subject();\n\n constructor(\n private formBuilder: FormBuilder,\n private route: ActivatedRoute,\n private platformUtilsService: PlatformUtilsService,\n private accountApiService: AccountApiService,\n private router: Router,\n ) {\n this.isSelfHost = platformUtilsService.isSelfHost();\n }\n\n async ngOnInit() {\n // Emit the initial state\n this.registrationStartStateChange.emit(this.state);\n\n this.listenForQueryParamChanges();\n }\n\n private listenForQueryParamChanges() {\n this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n this.email?.setValue(qParams.email);\n this.emailReadonly = qParams.emailReadonly === \"true\";\n }\n });\n }\n\n setReceiveMarketingEmailsByRegion(region: RegionConfig | Region.SelfHosted) {\n let defaultValue;\n if (region === Region.SelfHosted) {\n defaultValue = DEFAULT_MARKETING_EMAILS_PREF_BY_REGION[region];\n } else {\n const regionKey = (region as RegionConfig).key;\n defaultValue = DEFAULT_MARKETING_EMAILS_PREF_BY_REGION[regionKey];\n }\n\n this.receiveMarketingEmails.setValue(defaultValue);\n }\n\n submit = async () => {\n const valid = this.validateForm();\n\n if (!valid) {\n return;\n }\n\n const request: RegisterSendVerificationEmailRequest = new RegisterSendVerificationEmailRequest(\n this.email.value,\n this.name.value,\n this.receiveMarketingEmails.value,\n );\n\n const result = await this.accountApiService.registerSendVerificationEmail(request);\n\n if (typeof result === \"string\") {\n // we received a token, so the env doesn't support email verification\n // send the user directly to the finish registration page with the token as a query param\n await this.router.navigate([\"/finish-signup\"], {\n queryParams: { token: result, email: this.email.value },\n });\n }\n\n // Result is null, so email verification is required\n this.state = RegistrationStartState.CHECK_EMAIL;\n this.registrationStartStateChange.emit(this.state);\n };\n\n handleSelectedRegionChange(region: RegionConfig | Region.SelfHosted | null) {\n this.isSelfHost = region === Region.SelfHosted;\n\n if (region !== null) {\n this.setReceiveMarketingEmailsByRegion(region);\n }\n }\n\n private validateForm(): boolean {\n this.formGroup.markAllAsTouched();\n\n if (this.formGroup.invalid) {\n this.showErrorSummary = true;\n }\n\n return this.formGroup.valid;\n }\n\n goBack() {\n this.state = RegistrationStartState.USER_DATA_ENTRY;\n this.registrationStartStateChange.emit(this.state);\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","\n
    \n \n\n \n {{ \"emailAddress\" | i18n }}\n \n \n\n \n {{ \"name\" | i18n }}\n \n \n\n \n \n \n {{ \"receiveMarketingEmails\" | i18n }}\n {{ \"unsubscribe\" | i18n }}\n {{ \"atAnyTime\" | i18n }}\n \n \n\n \n {{ \"continue\" | i18n }}\n \n\n

    \n {{ \"byContinuingYouAgreeToThe\" | i18n }}\n {{ \"termsOfService\" | i18n }}\n {{ \"and\" | i18n }}\n {{ \"privacyPolicy\" | i18n }}\n

    \n\n \n\n\n
    \n \n\n \n {{ \"checkYourEmail\" | i18n }}\n \n\n \n\n

    \n {{ \"noEmail\" | i18n }}\n \n {{ \"goBack\" | i18n }}\n \n {{ \"toEditYourEmailAddress\" | i18n }}\n

    \n
    \n
    \n","import { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\n\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nexport abstract class RegistrationFinishService {\n /**\n * Gets the master password policy options from an organization invite if it exits.\n * Organization invites can currently only be accepted on the web.\n */\n abstract getMasterPasswordPolicyOptsFromOrgInvite(): Promise;\n\n /**\n * Finishes the registration process by creating a new user account.\n *\n * @param email The email address of the user.\n * @param passwordInputResult The password input result.\n * @param emailVerificationToken The optional email verification token. Not present in org invite scenarios.\n * Returns a promise which resolves to the captcha bypass token string upon a successful account creation.\n */\n abstract finishRegistration(\n email: string,\n passwordInputResult: PasswordInputResult,\n emailVerificationToken?: string,\n ): Promise;\n}\n","
    \n \n
    \n\n\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router, RouterModule } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { InputPasswordComponent } from \"../../input-password/input-password.component\";\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nimport { RegistrationFinishService } from \"./registration-finish.service\";\n\n@Component({\n standalone: true,\n selector: \"auth-registration-finish\",\n templateUrl: \"./registration-finish.component.html\",\n imports: [CommonModule, JslibModule, RouterModule, InputPasswordComponent],\n})\nexport class RegistrationFinishComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject();\n\n loading = true;\n submitting = false;\n email: string;\n\n // Note: this token is the email verification token. It is always supplied as a query param, but\n // it either comes from the email verification email or, if email verification is disabled server side\n // via global settings, it comes directly from the registration-start component directly.\n emailVerificationToken: string;\n\n masterPasswordPolicyOptions: MasterPasswordPolicyOptions | null = null;\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private router: Router,\n private toastService: ToastService,\n private i18nService: I18nService,\n private registrationFinishService: RegistrationFinishService,\n private validationService: ValidationService,\n ) {}\n\n async ngOnInit() {\n this.listenForQueryParamChanges();\n this.masterPasswordPolicyOptions =\n await this.registrationFinishService.getMasterPasswordPolicyOptsFromOrgInvite();\n this.loading = false;\n }\n\n private listenForQueryParamChanges() {\n this.activatedRoute.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams: Params) => {\n if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n this.email = qParams.email;\n }\n\n if (qParams.token != null) {\n this.emailVerificationToken = qParams.token;\n }\n\n if (qParams.fromEmail && qParams.fromEmail === \"true\") {\n this.toastService.showToast({\n title: null,\n message: this.i18nService.t(\"emailVerifiedV2\"),\n variant: \"success\",\n });\n }\n });\n }\n\n async handlePasswordFormSubmit(passwordInputResult: PasswordInputResult) {\n this.submitting = true;\n try {\n await this.registrationFinishService.finishRegistration(\n this.email,\n passwordInputResult,\n this.emailVerificationToken,\n );\n } catch (e) {\n this.validationService.showError(e);\n this.submitting = false;\n return;\n }\n\n this.toastService.showToast({\n variant: \"success\",\n title: null,\n message: this.i18nService.t(\"newAccountCreated\"),\n });\n\n this.submitting = false;\n await this.router.navigate([\"/login\"], { queryParams: { email: this.email } });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\n\n/**\n * RegistrationStartSecondaryComponentData\n * @loginRoute: string - The client specific route to the login page - configured at the app-routing.module level.\n */\nexport interface RegistrationStartSecondaryComponentData {\n loginRoute: string;\n}\n\n@Component({\n standalone: true,\n selector: \"auth-registration-start-secondary\",\n templateUrl: \"./registration-start-secondary.component.html\",\n imports: [CommonModule, JslibModule, RouterModule],\n})\nexport class RegistrationStartSecondaryComponent implements OnInit {\n loginRoute: string;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n async ngOnInit() {\n const routeData = await firstValueFrom(this.activatedRoute.data);\n\n this.loginRoute = routeData[\"loginRoute\"];\n }\n}\n","{{ \"alreadyHaveAccount\" | i18n }} {{ \"logIn\" | i18n }}\n","import { KeysRequest } from \"../../../../models/request/keys.request\";\nimport { KdfType } from \"../../../../platform/enums\";\nimport { EncryptedString } from \"../../../../platform/models/domain/enc-string\";\n\nexport class RegisterFinishRequest {\n constructor(\n public email: string,\n public emailVerificationToken: string,\n\n public masterPasswordHash: string,\n public masterPasswordHint: string,\n\n public userSymmetricKey: EncryptedString,\n public userAsymmetricKeys: KeysRequest,\n\n public kdf: KdfType,\n public kdfIterations: number,\n public kdfMemory?: number,\n public kdfParallelism?: number,\n\n // Org Invite data (only applies on web)\n public organizationUserId?: string,\n public orgInviteToken?: string,\n ) {}\n}\n","import { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterFinishRequest } from \"@bitwarden/common/auth/models/request/registration/register-finish.request\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nimport { RegistrationFinishService } from \"./registration-finish.service\";\n\nexport class DefaultRegistrationFinishService implements RegistrationFinishService {\n constructor(\n protected cryptoService: CryptoService,\n protected accountApiService: AccountApiService,\n ) {}\n\n getMasterPasswordPolicyOptsFromOrgInvite(): Promise {\n return null;\n }\n\n async finishRegistration(\n email: string,\n passwordInputResult: PasswordInputResult,\n emailVerificationToken?: string,\n ): Promise {\n const [newUserKey, newEncUserKey] = await this.cryptoService.makeUserKey(\n passwordInputResult.masterKey,\n );\n\n if (!newUserKey || !newEncUserKey) {\n throw new Error(\"User key could not be created\");\n }\n const userAsymmetricKeys = await this.cryptoService.makeKeyPair(newUserKey);\n\n const registerRequest = await this.buildRegisterRequest(\n email,\n emailVerificationToken,\n passwordInputResult,\n newEncUserKey.encryptedString,\n userAsymmetricKeys,\n );\n\n const capchaBypassToken = await this.accountApiService.registerFinish(registerRequest);\n\n return capchaBypassToken;\n }\n\n protected async buildRegisterRequest(\n email: string,\n emailVerificationToken: string,\n passwordInputResult: PasswordInputResult,\n encryptedUserKey: EncryptedString,\n userAsymmetricKeys: [string, EncString],\n ): Promise {\n const userAsymmetricKeysRequest = new KeysRequest(\n userAsymmetricKeys[0],\n userAsymmetricKeys[1].encryptedString,\n );\n\n return new RegisterFinishRequest(\n email,\n emailVerificationToken,\n passwordInputResult.masterKeyHash,\n passwordInputResult.hint,\n encryptedUserKey,\n userAsymmetricKeysRequest,\n passwordInputResult.kdfConfig.kdfType,\n passwordInputResult.kdfConfig.iterations,\n );\n }\n}\n","\n {{ message | i18n }}\n\n
      \n
    • 0\">\n {{ \"policyInEffectMinComplexity\" | i18n: getPasswordScoreAlertDisplay() }}\n
    • \n
    • 0\">\n {{ \"policyInEffectMinLength\" | i18n: policy?.minLength.toString() }}\n
    • \n
    • \n {{ \"policyInEffectUppercase\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectLowercase\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectNumbers\" | i18n }}\n
    • \n
    • \n {{ \"policyInEffectSpecial\" | i18n: \"!@#$%^&*\" }}\n
    • \n
    \n
    \n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CalloutModule } from \"@bitwarden/components\";\n\n@Component({\n selector: \"auth-password-callout\",\n templateUrl: \"password-callout.component.html\",\n standalone: true,\n imports: [CommonModule, JslibModule, CalloutModule],\n})\nexport class PasswordCalloutComponent {\n @Input() message = \"masterPasswordPolicyInEffect\";\n @Input() policy: MasterPasswordPolicyOptions;\n\n constructor(private i18nService: I18nService) {}\n\n getPasswordScoreAlertDisplay() {\n let str: string;\n switch (this.policy.minComplexity) {\n case 4:\n str = this.i18nService.t(\"strong\");\n break;\n case 3:\n str = this.i18nService.t(\"good\");\n break;\n default:\n str = this.i18nService.t(\"weak\");\n break;\n }\n return str + \" (\" + this.policy.minComplexity + \")\";\n }\n}\n","export enum ActiveClientVerificationOption {\n MasterPassword = \"masterPassword\",\n Pin = \"pin\",\n Biometrics = \"biometrics\",\n None = \"none\",\n}\n","\n
    \n \n \n \n \n\n \n \n \n {{ \"pin\" | i18n }}\n \n \n {{ \"confirmIdentity\" | i18n }}\n \n \n\n \n \n
    \n \n

    {{ \"verifyWithBiometrics\" | i18n }}

    \n
    \n \n {{ \"awaitingConfirmation\" | i18n }}\n
    \n
    \n\n \n {{ \"couldNotCompleteBiometrics\" | i18n }}\n \n \n \n\n \n \n

    {{ \"needADifferentMethod\" | i18n }}

    \n\n \n {{ \"useBiometrics\" | i18n }}\n \n\n \n {{ \"usePin\" | i18n }}\n \n\n \n {{ \"useMasterPassword\" | i18n }}\n \n
    \n \n
    \n\n\n \n \n \n \n
    \n \n
    \n\n
    \n {{ \"enterVerificationCodeSentToEmail\" | i18n }}\n\n

    \n \n\n \n \n {{ \"codeSent\" | i18n }}\n \n

    \n
    \n\n \n {{ \"verificationCode\" | i18n }}\n \n {{ \"confirmIdentity\" | i18n }}\n \n
    \n
    \n\n\n \n {{ \"masterPass\" | i18n }}\n \n \n {{ \"confirmIdentity\" | i18n }}\n \n\n","import { animate, style, transition, trigger } from \"@angular/animations\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport {\n ControlValueAccessor,\n FormControl,\n Validators,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from \"@angular/forms\";\nimport { BehaviorSubject, Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { UserVerificationOptions } from \"@bitwarden/common/auth/types/user-verification-options\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n AsyncActionsModule,\n ButtonModule,\n CalloutModule,\n FormFieldModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n} from \"@bitwarden/components\";\n\nimport { UserVerificationBiometricsIcon } from \"../icons\";\n\nimport { ActiveClientVerificationOption } from \"./active-client-verification-option.enum\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Collects the user's master password, or if they are not using a password, prompts for an OTP via email.\n * This is exposed to the parent component via the ControlValueAccessor interface (e.g. bind it to a FormControl).\n * Use UserVerificationService to verify the user's input.\n */\n@Component({\n selector: \"app-user-verification-form-input\",\n templateUrl: \"user-verification-form-input.component.html\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: UserVerificationFormInputComponent,\n },\n ],\n animations: [\n trigger(\"sent\", [\n transition(\":enter\", [style({ opacity: 0 }), animate(\"100ms\", style({ opacity: 1 }))]),\n ]),\n ],\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n JslibModule,\n FormFieldModule,\n AsyncActionsModule,\n IconButtonModule,\n IconModule,\n LinkModule,\n ButtonModule,\n CalloutModule,\n ],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class UserVerificationFormInputComponent implements ControlValueAccessor, OnInit, OnDestroy {\n @Input() verificationType: \"server\" | \"client\" = \"server\"; // server represents original behavior\n private _invalidSecret = false;\n @Input()\n get invalidSecret() {\n return this._invalidSecret;\n }\n set invalidSecret(value: boolean) {\n this._invalidSecret = value;\n this.invalidSecretChange.emit(value);\n\n // ISSUE: This is pretty hacky but unfortunately there is no way of knowing if the parent\n // control has been marked as touched, see: https://github.com/angular/angular/issues/10887\n // When that functionality has been added we should also look into forwarding reactive form\n // controls errors so that we don't need a separate input/output `invalidSecret`.\n if (value) {\n this.secret.markAsTouched();\n }\n this.secret.updateValueAndValidity({ emitEvent: false });\n }\n @Output() invalidSecretChange = new EventEmitter();\n\n @Output() activeClientVerificationOptionChange =\n new EventEmitter();\n\n @Output() biometricsVerificationResultChange = new EventEmitter();\n\n readonly Icons = { UserVerificationBiometricsIcon };\n\n // default to false to avoid null checks in template\n userVerificationOptions: UserVerificationOptions = {\n client: {\n masterPassword: false,\n pin: false,\n biometrics: false,\n },\n server: {\n masterPassword: false,\n otp: false,\n },\n };\n\n ActiveClientVerificationOption = ActiveClientVerificationOption;\n\n private _activeClientVerificationOptionSubject =\n new BehaviorSubject(null);\n\n activeClientVerificationOption$ = this._activeClientVerificationOptionSubject.asObservable();\n\n set activeClientVerificationOption(value: ActiveClientVerificationOption) {\n this._activeClientVerificationOptionSubject.next(value);\n }\n\n get activeClientVerificationOption(): ActiveClientVerificationOption {\n return this._activeClientVerificationOptionSubject.getValue();\n }\n\n get hasMultipleClientVerificationOptions(): boolean {\n let optionsCount = 0;\n if (this.userVerificationOptions.client.masterPassword) {\n optionsCount++;\n }\n if (this.userVerificationOptions.client.pin) {\n optionsCount++;\n }\n if (this.userVerificationOptions.client.biometrics) {\n optionsCount++;\n }\n return optionsCount >= 2;\n }\n\n biometricsVerificationFailed = false;\n\n disableRequestOTP = false;\n sentInitialCode = false;\n sentCode = false;\n\n secret = new FormControl(\"\", [\n Validators.required,\n () => {\n if (this.invalidSecret) {\n return {\n invalidSecret: {\n message: this.getInvalidSecretErrorMessage(),\n },\n };\n }\n },\n ]);\n\n private getInvalidSecretErrorMessage(): string {\n // must determine client or server\n if (this.verificationType === \"server\") {\n return this.userVerificationOptions.server.masterPassword\n ? this.i18nService.t(\"incorrectPassword\")\n : this.i18nService.t(\"incorrectCode\");\n } else {\n // client\n if (this.activeClientVerificationOption === ActiveClientVerificationOption.MasterPassword) {\n return this.i18nService.t(\"incorrectPassword\");\n } else if (this.activeClientVerificationOption === ActiveClientVerificationOption.Pin) {\n return this.i18nService.t(\"incorrectPin\");\n }\n }\n }\n\n private onChange: (value: VerificationWithSecret) => void;\n private destroy$ = new Subject();\n\n constructor(\n private userVerificationService: UserVerificationService,\n private i18nService: I18nService,\n ) {}\n\n async ngOnInit() {\n this.userVerificationOptions =\n await this.userVerificationService.getAvailableVerificationOptions(this.verificationType);\n\n if (this.verificationType === \"client\") {\n this.setDefaultActiveClientVerificationOption();\n this.setupClientVerificationOptionChangeHandler();\n } else {\n if (this.userVerificationOptions.server.otp) {\n // New design requires requesting on load to prevent user from having to click send code\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.requestOTP();\n }\n }\n\n // Executing secret changes for all non biometrics verification. Biometrics doesn't have a user entered secret.\n if (this.activeClientVerificationOption !== ActiveClientVerificationOption.Biometrics) {\n this.processSecretChanges(this.secret.value);\n }\n\n this.secret.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((secret: string) => this.processSecretChanges(secret));\n }\n\n private setDefaultActiveClientVerificationOption(): void {\n // Priorities should be Bio > Pin > Master Password for speed based on design\n if (this.userVerificationOptions.client.biometrics) {\n this.activeClientVerificationOption = ActiveClientVerificationOption.Biometrics;\n } else if (this.userVerificationOptions.client.pin) {\n this.activeClientVerificationOption = ActiveClientVerificationOption.Pin;\n } else if (this.userVerificationOptions.client.masterPassword) {\n this.activeClientVerificationOption = ActiveClientVerificationOption.MasterPassword;\n } else {\n this.activeClientVerificationOption = ActiveClientVerificationOption.None;\n }\n }\n\n private setupClientVerificationOptionChangeHandler(): void {\n this.activeClientVerificationOption$\n .pipe(takeUntil(this.destroy$))\n .subscribe((activeClientVerificationOption: ActiveClientVerificationOption) => {\n // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleActiveClientVerificationOptionChange(activeClientVerificationOption);\n });\n }\n\n private async handleActiveClientVerificationOptionChange(\n activeClientVerificationOption: ActiveClientVerificationOption,\n ): Promise {\n // Emit to parent component so it can implement behavior if needed.\n this.activeClientVerificationOptionChange.emit(activeClientVerificationOption);\n\n // clear secret value when switching verification methods\n this.secret.setValue(null);\n\n // Reset validation errors when swapping active client verification options\n this.secret.markAsUntouched();\n this.secret.updateValueAndValidity({ emitEvent: false });\n\n // if changing to biometrics, we need to prompt for biometrics\n if (activeClientVerificationOption === \"biometrics\") {\n // reset biometrics failed\n this.biometricsVerificationFailed = false;\n await this.verifyUserViaBiometrics();\n }\n }\n\n async verifyUserViaBiometrics() {\n this.biometricsVerificationFailed = false;\n\n const biometricsResult = await this.userVerificationService.verifyUser({\n type: VerificationType.Biometrics,\n });\n\n this.biometricsVerificationResultChange.emit(biometricsResult);\n\n this.biometricsVerificationFailed = !biometricsResult;\n }\n\n requestOTP = async () => {\n if (!this.userVerificationOptions.server.masterPassword) {\n this.disableRequestOTP = true;\n try {\n await this.userVerificationService.requestOTP();\n this.sentCode = true;\n this.sentInitialCode = true;\n\n // after 3 seconds reset sentCode to false\n setTimeout(() => {\n this.sentCode = false;\n }, 3000);\n } finally {\n this.disableRequestOTP = false;\n }\n }\n };\n\n writeValue(obj: any): void {\n this.secret.setValue(obj);\n }\n\n /** Required for NG_VALUE_ACCESSOR */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Required for NG_VALUE_ACCESSOR */\n registerOnTouched(fn: any): void {\n // Not implemented\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disableRequestOTP = isDisabled;\n if (isDisabled) {\n this.secret.disable();\n } else {\n this.secret.enable();\n }\n }\n\n processSecretChanges(secret: string) {\n this.invalidSecret = false;\n\n // Short circuit secret change handling when biometrics is chosen as biometrics has no secret\n if (this.activeClientVerificationOption === ActiveClientVerificationOption.Biometrics) {\n return;\n }\n\n if (this.onChange == null) {\n return;\n }\n\n this.onChange({\n type: this.determineVerificationWithSecretType(),\n secret: Utils.isNullOrWhitespace(secret) ? null : secret,\n });\n }\n\n private determineVerificationWithSecretType():\n | VerificationType.MasterPassword\n | VerificationType.OTP\n | VerificationType.PIN {\n if (this.verificationType === \"server\") {\n return this.userVerificationOptions.server.masterPassword\n ? VerificationType.MasterPassword\n : VerificationType.OTP;\n } else {\n // client\n return this.userVerificationOptions.client.masterPassword &&\n this.activeClientVerificationOption === ActiveClientVerificationOption.MasterPassword\n ? VerificationType.MasterPassword\n : VerificationType.PIN;\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","
    \n \n {{ \"vaultTimeout\" | i18n }}\n \n \n \n {{\n ((canLockVault$ | async) ? \"vaultTimeoutDesc\" : \"vaultTimeoutLogoutDesc\") | i18n\n }}\n \n
    \n \n {{ \"customVaultTimeout\" | i18n }}\n \n {{ \"hours\" | i18n }}\n \n \n \n {{ \"minutes\" | i18n }}\n \n
    \n \n {{ \"vaultCustomTimeoutMinimum\" | i18n }}\n \n
    \n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnChanges, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormBuilder,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { filter, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { VaultTimeout, VaultTimeoutOption } from \"@bitwarden/common/types/vault-timeout.type\";\nimport { FormFieldModule, SelectModule } from \"@bitwarden/components\";\n\ninterface VaultTimeoutFormValue {\n vaultTimeout: VaultTimeout | null;\n custom: {\n hours: number | null;\n minutes: number | null;\n };\n}\n\n@Component({\n selector: \"auth-vault-timeout-input\",\n templateUrl: \"vault-timeout-input.component.html\",\n standalone: true,\n imports: [CommonModule, JslibModule, ReactiveFormsModule, FormFieldModule, SelectModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: VaultTimeoutInputComponent,\n },\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: VaultTimeoutInputComponent,\n },\n ],\n})\nexport class VaultTimeoutInputComponent\n implements ControlValueAccessor, Validator, OnInit, OnDestroy, OnChanges\n{\n get showCustom() {\n return this.form.get(\"vaultTimeout\").value === VaultTimeoutInputComponent.CUSTOM_VALUE;\n }\n\n get exceedsMinimumTimout(): boolean {\n return (\n !this.showCustom || this.customTimeInMinutes() > VaultTimeoutInputComponent.MIN_CUSTOM_MINUTES\n );\n }\n\n static CUSTOM_VALUE = -100;\n static MIN_CUSTOM_MINUTES = 0;\n\n form = this.formBuilder.group({\n vaultTimeout: [null],\n custom: this.formBuilder.group({\n hours: [null],\n minutes: [null],\n }),\n });\n\n @Input() vaultTimeoutOptions: VaultTimeoutOption[];\n vaultTimeoutPolicy: Policy;\n vaultTimeoutPolicyHours: number;\n vaultTimeoutPolicyMinutes: number;\n\n protected canLockVault$: Observable;\n\n private onChange: (vaultTimeout: VaultTimeout) => void;\n private validatorChange: () => void;\n private destroy$ = new Subject();\n\n constructor(\n private formBuilder: FormBuilder,\n private policyService: PolicyService,\n private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n private i18nService: I18nService,\n ) {}\n\n async ngOnInit() {\n this.policyService\n .get$(PolicyType.MaximumVaultTimeout)\n .pipe(\n filter((policy) => policy != null),\n takeUntil(this.destroy$),\n )\n .subscribe((policy) => {\n this.vaultTimeoutPolicy = policy;\n this.applyVaultTimeoutPolicy();\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((value: VaultTimeoutFormValue) => {\n if (this.onChange) {\n this.onChange(this.getVaultTimeout(value));\n }\n });\n\n // Assign the current value to the custom fields\n // so that if the user goes from a numeric value to custom\n // we can initialize the custom fields with the current value\n // ex: user picks 5 min, goes to custom, we want to show 0 hr, 5 min in the custom fields\n this.form.controls.vaultTimeout.valueChanges\n .pipe(\n filter((value) => value !== VaultTimeoutInputComponent.CUSTOM_VALUE),\n takeUntil(this.destroy$),\n )\n .subscribe((value) => {\n const current = Math.max(value, 0);\n\n // This cannot emit an event b/c it would cause form.valueChanges to fire again\n // and we are already handling that above so just silently update\n // custom fields when vaultTimeout changes to a non-custom value\n this.form.patchValue(\n {\n custom: {\n hours: Math.floor(current / 60),\n minutes: current % 60,\n },\n },\n { emitEvent: false },\n );\n });\n\n this.canLockVault$ = this.vaultTimeoutSettingsService\n .availableVaultTimeoutActions$()\n .pipe(map((actions) => actions.includes(VaultTimeoutAction.Lock)));\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngOnChanges() {\n if (\n !this.vaultTimeoutOptions.find((p) => p.value === VaultTimeoutInputComponent.CUSTOM_VALUE)\n ) {\n this.vaultTimeoutOptions.push({\n name: this.i18nService.t(\"custom\"),\n value: VaultTimeoutInputComponent.CUSTOM_VALUE,\n });\n }\n }\n\n getVaultTimeout(value: VaultTimeoutFormValue) {\n if (value.vaultTimeout !== VaultTimeoutInputComponent.CUSTOM_VALUE) {\n return value.vaultTimeout;\n }\n\n return value.custom.hours * 60 + value.custom.minutes;\n }\n\n writeValue(value: number): void {\n if (value == null) {\n return;\n }\n\n if (this.vaultTimeoutOptions.every((p) => p.value !== value)) {\n this.form.setValue({\n vaultTimeout: VaultTimeoutInputComponent.CUSTOM_VALUE,\n custom: {\n hours: Math.floor(value / 60),\n minutes: value % 60,\n },\n });\n return;\n }\n\n this.form.patchValue({\n vaultTimeout: value,\n });\n }\n\n registerOnChange(onChange: any): void {\n this.onChange = onChange;\n }\n\n registerOnTouched(onTouched: any): void {\n // Empty\n }\n\n setDisabledState?(isDisabled: boolean): void {\n // Empty\n }\n\n validate(control: AbstractControl): ValidationErrors {\n if (this.vaultTimeoutPolicy && this.vaultTimeoutPolicy?.data?.minutes < control.value) {\n return { policyError: true };\n }\n\n if (!this.exceedsMinimumTimout) {\n return { minTimeoutError: true };\n }\n\n return null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.validatorChange = fn;\n }\n\n private customTimeInMinutes() {\n return this.form.value.custom.hours * 60 + this.form.value.custom.minutes;\n }\n\n private applyVaultTimeoutPolicy() {\n this.vaultTimeoutPolicyHours = Math.floor(this.vaultTimeoutPolicy.data.minutes / 60);\n this.vaultTimeoutPolicyMinutes = this.vaultTimeoutPolicy.data.minutes % 60;\n\n this.vaultTimeoutOptions = this.vaultTimeoutOptions.filter((vaultTimeoutOption) => {\n // Always include the custom option\n if (vaultTimeoutOption.value === VaultTimeoutInputComponent.CUSTOM_VALUE) {\n return true;\n }\n\n if (typeof vaultTimeoutOption.value === \"number\") {\n // Include numeric values that are less than or equal to the policy minutes\n return vaultTimeoutOption.value <= this.vaultTimeoutPolicy.data.minutes;\n }\n\n // Exclude all string cases when there's a numeric policy defined\n return false;\n });\n\n // Only call validator change if it's been set\n if (this.validatorChange) {\n this.validatorChange();\n }\n }\n}\n","import { Observable } from \"rxjs\";\n\nexport abstract class LoginEmailServiceAbstraction {\n /**\n * An observable that monitors the storedEmail on disk.\n * This will return null if an account is being added.\n */\n storedEmail$: Observable;\n /**\n * Gets the current email being used in the login process from memory.\n * @returns A string of the email.\n */\n getEmail: () => string;\n /**\n * Sets the current email being used in the login process in memory.\n * @param email The email to be set.\n */\n setEmail: (email: string) => void;\n /**\n * Gets from memory whether or not the email should be stored on disk when `saveEmailSettings` is called.\n * @returns A boolean stating whether or not the email should be stored on disk.\n */\n getRememberEmail: () => boolean;\n /**\n * Sets in memory whether or not the email should be stored on disk when\n * `saveEmailSettings` is called.\n */\n setRememberEmail: (value: boolean) => void;\n /**\n * Sets the email and rememberEmail properties in memory to null.\n */\n clearValues: () => void;\n /**\n * Saves or clears the email on disk\n * - If an account is being added, only changes the stored email when rememberEmail is true.\n * - If rememberEmail is true, sets the email on disk to the current email.\n * - If rememberEmail is false, sets the email on disk to null.\n * Always clears the email and rememberEmail properties from memory.\n * @returns A promise that resolves once the email settings are saved.\n */\n saveEmailSettings: () => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\n\nimport {\n UserApiLoginCredentials,\n PasswordLoginCredentials,\n SsoLoginCredentials,\n AuthRequestLoginCredentials,\n WebAuthnLoginCredentials,\n} from \"../models/domain/login-credentials\";\n\nexport abstract class LoginStrategyServiceAbstraction {\n /**\n * The current strategy being used to authenticate.\n * Emits null if the session has timed out.\n */\n currentAuthType$: Observable;\n /**\n * If the login strategy uses the email address of the user, this\n * will return it. Otherwise, it will return null.\n */\n getEmail: () => Promise;\n /**\n * If the user is logging in with a master password, this will return\n * the master password hash. Otherwise, it will return null.\n */\n getMasterPasswordHash: () => Promise;\n /**\n * If the user is logging in with SSO, this will return\n * the email auth token. Otherwise, it will return null.\n * @see {@link SsoLoginStrategyData.ssoEmail2FaSessionToken}\n */\n getSsoEmail2FaSessionToken: () => Promise;\n /**\n * Returns the access code if the user is logging in with an\n * Auth Request. Otherwise, it will return null.\n */\n getAccessCode: () => Promise;\n /**\n * Returns the auth request ID if the user is logging in with an\n * Auth Request. Otherwise, it will return null.\n */\n getAuthRequestId: () => Promise;\n\n /**\n * Sends a token request to the server using the provided credentials.\n */\n logIn: (\n credentials:\n | UserApiLoginCredentials\n | PasswordLoginCredentials\n | SsoLoginCredentials\n | AuthRequestLoginCredentials\n | WebAuthnLoginCredentials,\n ) => Promise;\n /**\n * Sends a token request to the server with the provided two factor token\n * and captcha response. This uses data stored from {@link LoginStrategyServiceAbstraction.logIn},\n * so that must be called first.\n * Returns an error if no session data is found.\n */\n logInTwoFactor: (\n twoFactor: TokenTwoFactorRequest,\n captchaResponse: string,\n ) => Promise;\n /**\n * Creates a master key from the provided master password and email.\n */\n makePreloginKey: (masterPassword: string, email: string) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserDecryptionOptions } from \"../models\";\n\nexport abstract class UserDecryptionOptionsServiceAbstraction {\n /**\n * Returns what decryption options are available for the current user.\n * @remark This is sent from the server on authentication.\n */\n abstract userDecryptionOptions$: Observable;\n /**\n * Uses user decryption options to determine if current user has a master password.\n * @remark This is sent from the server, and does not indicate if the master password\n * was used to login and/or if a master key is saved locally.\n */\n abstract hasMasterPassword$: Observable;\n\n /**\n * Returns the user decryption options for the given user id.\n * @param userId The user id to check.\n */\n abstract userDecryptionOptionsById$(userId: string): Observable;\n}\n\nexport abstract class InternalUserDecryptionOptionsServiceAbstraction extends UserDecryptionOptionsServiceAbstraction {\n /**\n * Sets the current decryption options for the user, contains the current configuration\n * of the users account related to how they can decrypt their vault.\n * @remark Intended to be used when user decryption options are received from server, does\n * not update the server. Consider syncing instead of updating locally.\n * @param userDecryptionOptions Current user decryption options received from server.\n */\n abstract setUserDecryptionOptions(userDecryptionOptions: UserDecryptionOptions): Promise;\n}\n","import { KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { EncString, EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { PinKey, UserKey } from \"@bitwarden/common/types/key\";\n\nimport { PinLockType } from \"../services\";\n\n/**\n * The PinService is used for PIN-based unlocks. Below is a very basic overview of the PIN flow:\n *\n * -- Setting the PIN via {@link SetPinComponent} --\n *\n * When the user submits the setPinForm:\n\n * 1. We encrypt the PIN with the UserKey and store it on disk as `userKeyEncryptedPin`.\n *\n * 2. We create a PinKey from the PIN, and then use that PinKey to encrypt the UserKey, resulting in\n * a `pinKeyEncryptedUserKey`, which can be stored in one of two ways depending on what the user selects\n * for the `requireMasterPasswordOnClientReset` checkbox.\n *\n * If `requireMasterPasswordOnClientReset` is:\n * - TRUE, store in memory as `pinKeyEncryptedUserKeyEphemeral` (does NOT persist through a client reset)\n * - FALSE, store on disk as `pinKeyEncryptedUserKeyPersistent` (persists through a client reset)\n *\n * -- Unlocking with the PIN via {@link LockComponent} --\n *\n * When the user enters their PIN, we decrypt their UserKey with the PIN and set that UserKey to state.\n */\nexport abstract class PinServiceAbstraction {\n /**\n * Gets the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n */\n abstract getPinKeyEncryptedUserKeyPersistent: (userId: UserId) => Promise;\n\n /**\n * Clears the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n */\n abstract clearPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise;\n\n /**\n * Gets the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n */\n abstract getPinKeyEncryptedUserKeyEphemeral: (userId: UserId) => Promise;\n\n /**\n * Clears the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n */\n abstract clearPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise;\n\n /**\n * Creates a pinKeyEncryptedUserKey from the provided PIN and UserKey.\n */\n abstract createPinKeyEncryptedUserKey: (\n pin: string,\n userKey: UserKey,\n userId: UserId,\n ) => Promise;\n\n /**\n * Stores the UserKey, encrypted by the PinKey.\n * @param storeEphemeralVersion If true, stores an ephemeral version via the private {@link setPinKeyEncryptedUserKeyEphemeral} method.\n * If false, stores a persistent version via the private {@link setPinKeyEncryptedUserKeyPersistent} method.\n */\n abstract storePinKeyEncryptedUserKey: (\n pinKeyEncryptedUserKey: EncString,\n storeEphemeralVersion: boolean,\n userId: UserId,\n ) => Promise;\n\n /**\n * Gets the user's PIN, encrypted by the UserKey.\n */\n abstract getUserKeyEncryptedPin: (userId: UserId) => Promise;\n\n /**\n * Sets the user's PIN, encrypted by the UserKey.\n */\n abstract setUserKeyEncryptedPin: (\n userKeyEncryptedPin: EncString,\n userId: UserId,\n ) => Promise;\n\n /**\n * Creates a PIN, encrypted by the UserKey.\n */\n abstract createUserKeyEncryptedPin: (pin: string, userKey: UserKey) => Promise;\n\n /**\n * Clears the user's PIN, encrypted by the UserKey.\n */\n abstract clearUserKeyEncryptedPin(userId: UserId): Promise;\n\n /**\n * Gets the old MasterKey, encrypted by the PinKey (formerly called `pinProtected`).\n * Deprecated and used for migration purposes only.\n */\n abstract getOldPinKeyEncryptedMasterKey: (userId: UserId) => Promise;\n\n /**\n * Clears the old MasterKey, encrypted by the PinKey.\n */\n abstract clearOldPinKeyEncryptedMasterKey: (userId: UserId) => Promise;\n\n /**\n * Makes a PinKey from the provided PIN.\n */\n abstract makePinKey: (pin: string, salt: string, kdfConfig: KdfConfig) => Promise;\n\n /**\n * Gets the user's PinLockType {@link PinLockType}.\n */\n abstract getPinLockType: (userId: UserId) => Promise;\n\n /**\n * Declares whether or not the user has a PIN set (either persistent or ephemeral).\n */\n abstract isPinSet: (userId: UserId) => Promise;\n\n /**\n * Decrypts the UserKey with the provided PIN.\n *\n * @remarks - If the user has an old pinKeyEncryptedMasterKey (formerly called `pinProtected`), the UserKey\n * will be obtained via the private {@link decryptAndMigrateOldPinKeyEncryptedMasterKey} method.\n * - If the user does not have an old pinKeyEncryptedMasterKey, the UserKey will be obtained via the\n * private {@link decryptUserKey} method.\n * @returns UserKey\n */\n abstract decryptUserKeyWithPin: (pin: string, userId: UserId) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { AuthRequestPushNotification } from \"@bitwarden/common/models/response/notification.response\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\n\nexport abstract class AuthRequestServiceAbstraction {\n /** Emits an auth request id when an auth request has been approved. */\n authRequestPushNotification$: Observable;\n\n /**\n * Returns an admin auth request for the given user if it exists.\n * @param userId The user id.\n * @throws If `userId` is not provided.\n */\n abstract getAdminAuthRequest: (userId: UserId) => Promise;\n /**\n * Sets an admin auth request for the given user.\n * Note: use {@link clearAdminAuthRequest} to clear the request.\n * @param authRequest The admin auth request.\n * @param userId The user id.\n * @throws If `authRequest` or `userId` is not provided.\n */\n abstract setAdminAuthRequest: (\n authRequest: AdminAuthRequestStorable,\n userId: UserId,\n ) => Promise;\n /**\n * Clears an admin auth request for the given user.\n * @param userId The user id.\n * @throws If `userId` is not provided.\n */\n abstract clearAdminAuthRequest: (userId: UserId) => Promise;\n /**\n * Approve or deny an auth request.\n * @param approve True to approve, false to deny.\n * @param authRequest The auth request to approve or deny, must have an id and key.\n * @returns The updated auth request, the `requestApproved` field will be true if\n * approval was successful.\n * @throws If the auth request is missing an id or key.\n */\n abstract approveOrDenyAuthRequest: (\n approve: boolean,\n authRequest: AuthRequestResponse,\n ) => Promise;\n /**\n * Sets the `UserKey` from an auth request. Auth request must have a `UserKey`.\n * @param authReqResponse The auth request.\n * @param authReqPrivateKey The private key corresponding to the public key sent in the auth request.\n */\n abstract setUserKeyAfterDecryptingSharedUserKey: (\n authReqResponse: AuthRequestResponse,\n authReqPrivateKey: ArrayBuffer,\n ) => Promise;\n /**\n * Sets the `MasterKey` and `MasterKeyHash` from an auth request. Auth request must have a `MasterKey` and `MasterKeyHash`.\n * @param authReqResponse The auth request.\n * @param authReqPrivateKey The private key corresponding to the public key sent in the auth request.\n */\n abstract setKeysAfterDecryptingSharedMasterKeyAndHash: (\n authReqResponse: AuthRequestResponse,\n authReqPrivateKey: ArrayBuffer,\n ) => Promise;\n /**\n * Decrypts a `UserKey` from a public key encrypted `UserKey`.\n * @param pubKeyEncryptedUserKey The public key encrypted `UserKey`.\n * @param privateKey The private key corresponding to the public key used to encrypt the `UserKey`.\n * @returns The decrypted `UserKey`.\n */\n abstract decryptPubKeyEncryptedUserKey: (\n pubKeyEncryptedUserKey: string,\n privateKey: ArrayBuffer,\n ) => Promise;\n /**\n * Decrypts a `MasterKey` and `MasterKeyHash` from a public key encrypted `MasterKey` and `MasterKeyHash`.\n * @param pubKeyEncryptedMasterKey The public key encrypted `MasterKey`.\n * @param pubKeyEncryptedMasterKeyHash The public key encrypted `MasterKeyHash`.\n * @param privateKey The private key corresponding to the public key used to encrypt the `MasterKey` and `MasterKeyHash`.\n * @returns The decrypted `MasterKey` and `MasterKeyHash`.\n */\n abstract decryptPubKeyEncryptedMasterKeyAndHash: (\n pubKeyEncryptedMasterKey: string,\n pubKeyEncryptedMasterKeyHash: string,\n privateKey: ArrayBuffer,\n ) => Promise<{ masterKey: MasterKey; masterKeyHash: string }>;\n\n /**\n * Handles incoming auth request push notifications.\n * @param notification push notification.\n * @remark We should only be receiving approved push notifications to prevent enumeration.\n */\n abstract sendAuthRequestPushNotification: (notification: AuthRequestPushNotification) => void;\n}\n","import { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { PrfKey } from \"@bitwarden/common/types/key\";\n\ndeclare const tag: unique symbol;\n\n/**\n * A set of keys where a `UserKey` is protected by an encrypted public/private key-pair.\n * The `UserKey` is used to encrypt/decrypt data, while the public/private key-pair is\n * used to rotate the `UserKey`.\n *\n * The `PrivateKey` is protected by an `ExternalKey`, such as a `DeviceKey`, or `PrfKey`,\n * and the `PublicKey` is protected by the `UserKey`. This setup allows:\n *\n * - Access to `UserKey` by knowing the `ExternalKey`\n * - Rotation to a `NewUserKey` by knowing the current `UserKey`,\n * without needing access to the `ExternalKey`\n */\nexport class RotateableKeySet {\n private readonly [tag]: ExternalKey;\n\n constructor(\n /** PublicKey encrypted UserKey */\n readonly encryptedUserKey: EncString,\n\n /** UserKey encrypted PublicKey */\n readonly encryptedPublicKey: EncString,\n\n /** ExternalKey encrypted PrivateKey */\n readonly encryptedPrivateKey?: EncString,\n ) {}\n}\n\nexport type PrfKeySet = RotateableKeySet;\n","import { Jsonify } from \"type-fest\";\n\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { WebAuthnLoginAssertionResponseRequest } from \"@bitwarden/common/auth/services/webauthn-login/request/webauthn-login-assertion-response.request\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\n\nexport class PasswordLoginCredentials {\n readonly type = AuthenticationType.Password;\n\n constructor(\n public email: string,\n public masterPassword: string,\n public captchaToken?: string,\n public twoFactor?: TokenTwoFactorRequest,\n ) {}\n}\n\nexport class SsoLoginCredentials {\n readonly type = AuthenticationType.Sso;\n\n constructor(\n public code: string,\n public codeVerifier: string,\n public redirectUrl: string,\n public orgId: string,\n /**\n * Optional email address for SSO login.\n * Used for looking up 2FA token on clients that support remembering 2FA token.\n */\n public email?: string,\n public twoFactor?: TokenTwoFactorRequest,\n ) {}\n}\n\nexport class UserApiLoginCredentials {\n readonly type = AuthenticationType.UserApiKey;\n\n constructor(\n public clientId: string,\n public clientSecret: string,\n ) {}\n}\n\nexport class AuthRequestLoginCredentials {\n readonly type = AuthenticationType.AuthRequest;\n\n constructor(\n public email: string,\n public accessCode: string,\n public authRequestId: string,\n public decryptedUserKey: UserKey,\n public decryptedMasterKey: MasterKey,\n public decryptedMasterKeyHash: string,\n public twoFactor?: TokenTwoFactorRequest,\n ) {}\n\n static fromJSON(json: Jsonify) {\n return Object.assign(\n new AuthRequestLoginCredentials(\n json.email,\n json.accessCode,\n json.authRequestId,\n null,\n null,\n json.decryptedMasterKeyHash,\n json.twoFactor\n ? new TokenTwoFactorRequest(\n json.twoFactor.provider,\n json.twoFactor.token,\n json.twoFactor.remember,\n )\n : json.twoFactor,\n ),\n {\n decryptedUserKey: SymmetricCryptoKey.fromJSON(json.decryptedUserKey) as UserKey,\n decryptedMasterKey: SymmetricCryptoKey.fromJSON(json.decryptedMasterKey) as MasterKey,\n },\n );\n }\n}\n\nexport class WebAuthnLoginCredentials {\n readonly type = AuthenticationType.WebAuthn;\n\n constructor(\n public token: string,\n public deviceResponse: WebAuthnLoginAssertionResponseRequest,\n public prfKey?: SymmetricCryptoKey,\n ) {}\n\n static fromJSON(json: Jsonify) {\n return new WebAuthnLoginCredentials(\n json.token,\n Object.assign(\n Object.create(WebAuthnLoginAssertionResponseRequest.prototype),\n json.deviceResponse,\n ),\n SymmetricCryptoKey.fromJSON(json.prfKey),\n );\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { KeyConnectorUserDecryptionOptionResponse } from \"@bitwarden/common/auth/models/response/user-decryption-options/key-connector-user-decryption-option.response\";\nimport { TrustedDeviceUserDecryptionOptionResponse } from \"@bitwarden/common/auth/models/response/user-decryption-options/trusted-device-user-decryption-option.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/src/auth/models/response/identity-token.response\";\n\n/**\n * Key Connector decryption options. Intended to be sent to the client for use after authentication.\n * @see {@link UserDecryptionOptions}\n */\nexport class KeyConnectorUserDecryptionOption {\n /** The URL of the key connector configured for this user. */\n keyConnectorUrl: string;\n\n /**\n * Initializes a new instance of the KeyConnectorUserDecryptionOption from a response object.\n * @param response The key connector user decryption option response object.\n * @returns A new instance of the KeyConnectorUserDecryptionOption or undefined if `response` is nullish.\n */\n static fromResponse(\n response: KeyConnectorUserDecryptionOptionResponse,\n ): KeyConnectorUserDecryptionOption | undefined {\n if (response == null) {\n return undefined;\n }\n const options = new KeyConnectorUserDecryptionOption();\n options.keyConnectorUrl = response?.keyConnectorUrl ?? null;\n return options;\n }\n\n /**\n * Initializes a new instance of a KeyConnectorUserDecryptionOption from a JSON object.\n * @param obj JSON object to deserialize.\n * @returns A new instance of the KeyConnectorUserDecryptionOption or undefined if `obj` is nullish.\n */\n static fromJSON(\n obj: Jsonify,\n ): KeyConnectorUserDecryptionOption | undefined {\n if (obj == null) {\n return undefined;\n }\n return Object.assign(new KeyConnectorUserDecryptionOption(), obj);\n }\n}\n\n/**\n * Trusted device decryption options. Intended to be sent to the client for use after authentication.\n * @see {@link UserDecryptionOptions}\n */\nexport class TrustedDeviceUserDecryptionOption {\n /** True if an admin has approved an admin auth request previously made from this device. */\n hasAdminApproval: boolean;\n /** True if the user has a device capable of approving an auth request. */\n hasLoginApprovingDevice: boolean;\n /** True if the user has manage reset password permission, as these users must be forced to have a master password. */\n hasManageResetPasswordPermission: boolean;\n\n /**\n * Initializes a new instance of the TrustedDeviceUserDecryptionOption from a response object.\n * @param response The trusted device user decryption option response object.\n * @returns A new instance of the TrustedDeviceUserDecryptionOption or undefined if `response` is nullish.\n */\n static fromResponse(\n response: TrustedDeviceUserDecryptionOptionResponse,\n ): TrustedDeviceUserDecryptionOption | undefined {\n if (response == null) {\n return undefined;\n }\n const options = new TrustedDeviceUserDecryptionOption();\n options.hasAdminApproval = response?.hasAdminApproval ?? false;\n options.hasLoginApprovingDevice = response?.hasLoginApprovingDevice ?? false;\n options.hasManageResetPasswordPermission = response?.hasManageResetPasswordPermission ?? false;\n return options;\n }\n\n /**\n * Initializes a new instance of the TrustedDeviceUserDecryptionOption from a JSON object.\n * @param obj JSON object to deserialize.\n * @returns A new instance of the TrustedDeviceUserDecryptionOption or undefined if `obj` is nullish.\n */\n static fromJSON(\n obj: Jsonify,\n ): TrustedDeviceUserDecryptionOption | undefined {\n if (obj == null) {\n return undefined;\n }\n return Object.assign(new TrustedDeviceUserDecryptionOption(), obj);\n }\n}\n\n/**\n * Represents the decryption options the user has configured on the server. This is intended to be sent\n * to the client on authentication, and can be used to determine how to decrypt the user's vault.\n */\nexport class UserDecryptionOptions {\n /** True if the user has a master password configured on the server. */\n hasMasterPassword: boolean;\n /** {@link TrustedDeviceUserDecryptionOption} */\n trustedDeviceOption?: TrustedDeviceUserDecryptionOption;\n /** {@link KeyConnectorUserDecryptionOption} */\n keyConnectorOption?: KeyConnectorUserDecryptionOption;\n\n /**\n * Initializes a new instance of the UserDecryptionOptions from a response object.\n * @param response user decryption options response object\n * @returns A new instance of the UserDecryptionOptions.\n * @throws If the response is nullish, this method will throw an error. User decryption options\n * are required for client initialization.\n */\n // TODO: Change response type to `UserDecryptionOptionsResponse` after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n static fromResponse(response: IdentityTokenResponse): UserDecryptionOptions {\n if (response == null) {\n throw new Error(\"User Decryption Options are required for client initialization.\");\n }\n\n const decryptionOptions = new UserDecryptionOptions();\n\n if (response.userDecryptionOptions) {\n // If the response has userDecryptionOptions, this means it's on a post-TDE server version and can interrogate\n // the new decryption options.\n const responseOptions = response.userDecryptionOptions;\n decryptionOptions.hasMasterPassword = responseOptions.hasMasterPassword;\n\n decryptionOptions.trustedDeviceOption = TrustedDeviceUserDecryptionOption.fromResponse(\n responseOptions.trustedDeviceOption,\n );\n\n decryptionOptions.keyConnectorOption = KeyConnectorUserDecryptionOption.fromResponse(\n responseOptions.keyConnectorOption,\n );\n } else {\n // If the response does not have userDecryptionOptions, this means it's on a pre-TDE server version and so\n // we must base our decryption options on the presence of the keyConnectorUrl.\n // Note that the presence of keyConnectorUrl implies that the user does not have a master password, as in pre-TDE\n // server versions, a master password short-circuited the addition of the keyConnectorUrl to the response.\n // TODO: remove this check after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n const usingKeyConnector = response.keyConnectorUrl != null;\n decryptionOptions.hasMasterPassword = !usingKeyConnector;\n if (usingKeyConnector) {\n decryptionOptions.keyConnectorOption = new KeyConnectorUserDecryptionOption();\n decryptionOptions.keyConnectorOption.keyConnectorUrl = response.keyConnectorUrl;\n }\n }\n return decryptionOptions;\n }\n\n /**\n * Initializes a new instance of the UserDecryptionOptions from a JSON object.\n * @param obj JSON object to deserialize.\n * @returns A new instance of the UserDecryptionOptions. Will initialize even if the JSON object is nullish.\n */\n static fromJSON(obj: Jsonify): UserDecryptionOptions {\n const decryptionOptions = Object.assign(new UserDecryptionOptions(), obj);\n\n decryptionOptions.trustedDeviceOption = TrustedDeviceUserDecryptionOption.fromJSON(\n obj?.trustedDeviceOption,\n );\n\n decryptionOptions.keyConnectorOption = KeyConnectorUserDecryptionOption.fromJSON(\n obj?.keyConnectorOption,\n );\n\n return decryptionOptions;\n }\n}\n","import { firstValueFrom, map } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { MasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"@bitwarden/common/platform/abstractions/key-generation.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString, EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport {\n PIN_DISK,\n PIN_MEMORY,\n StateProvider,\n UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, PinKey, UserKey } from \"@bitwarden/common/types/key\";\n\nimport { PinServiceAbstraction } from \"../../abstractions/pin.service.abstraction\";\n\n/**\n * - DISABLED : No PIN set.\n * - PERSISTENT : PIN is set and persists through client reset.\n * - EPHEMERAL : PIN is set, but does NOT persist through client reset. This means that\n * after client reset the master password is required to unlock.\n */\nexport type PinLockType = \"DISABLED\" | \"PERSISTENT\" | \"EPHEMERAL\";\n\n/**\n * The persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n *\n * @remarks Persists through a client reset. Used when `requireMasterPasswordOnClientRestart` is disabled.\n * @see SetPinComponent.setPinForm.requireMasterPasswordOnClientRestart\n */\nexport const PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT = new UserKeyDefinition(\n PIN_DISK,\n \"pinKeyEncryptedUserKeyPersistent\",\n {\n deserializer: (jsonValue) => jsonValue,\n clearOn: [\"logout\"],\n },\n);\n\n/**\n * The ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n *\n * @remarks Does NOT persist through a client reset. Used when `requireMasterPasswordOnClientRestart` is enabled.\n * @see SetPinComponent.setPinForm.requireMasterPasswordOnClientRestart\n */\nexport const PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL = new UserKeyDefinition(\n PIN_MEMORY,\n \"pinKeyEncryptedUserKeyEphemeral\",\n {\n deserializer: (jsonValue) => jsonValue,\n clearOn: [\"logout\"],\n },\n);\n\n/**\n * The PIN, encrypted by the UserKey.\n */\nexport const USER_KEY_ENCRYPTED_PIN = new UserKeyDefinition(\n PIN_DISK,\n \"userKeyEncryptedPin\",\n {\n deserializer: (jsonValue) => jsonValue,\n clearOn: [\"logout\"],\n },\n);\n\n/**\n * The old MasterKey, encrypted by the PinKey (formerly called `pinProtected`).\n * Deprecated and used for migration purposes only.\n */\nexport const OLD_PIN_KEY_ENCRYPTED_MASTER_KEY = new UserKeyDefinition(\n PIN_DISK,\n \"oldPinKeyEncryptedMasterKey\",\n {\n deserializer: (jsonValue) => jsonValue,\n clearOn: [\"logout\"],\n },\n);\n\nexport class PinService implements PinServiceAbstraction {\n constructor(\n private accountService: AccountService,\n private cryptoFunctionService: CryptoFunctionService,\n private encryptService: EncryptService,\n private kdfConfigService: KdfConfigService,\n private keyGenerationService: KeyGenerationService,\n private logService: LogService,\n private masterPasswordService: MasterPasswordServiceAbstraction,\n private stateProvider: StateProvider,\n private stateService: StateService,\n ) {}\n\n async getPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot get pinKeyEncryptedUserKeyPersistent.\");\n\n return EncString.fromJSON(\n await firstValueFrom(\n this.stateProvider.getUserState$(PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, userId),\n ),\n );\n }\n\n /**\n * Sets the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n */\n private async setPinKeyEncryptedUserKeyPersistent(\n pinKeyEncryptedUserKey: EncString,\n userId: UserId,\n ): Promise {\n this.validateUserId(userId, \"Cannot set pinKeyEncryptedUserKeyPersistent.\");\n\n if (pinKeyEncryptedUserKey == null) {\n throw new Error(\n \"No pinKeyEncryptedUserKey provided. Cannot set pinKeyEncryptedUserKeyPersistent.\",\n );\n }\n\n await this.stateProvider.setUserState(\n PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n pinKeyEncryptedUserKey?.encryptedString,\n userId,\n );\n }\n\n async clearPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot clear pinKeyEncryptedUserKeyPersistent.\");\n\n await this.stateProvider.setUserState(PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, null, userId);\n }\n\n async getPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot get pinKeyEncryptedUserKeyEphemeral.\");\n\n return EncString.fromJSON(\n await firstValueFrom(\n this.stateProvider.getUserState$(PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL, userId),\n ),\n );\n }\n\n /**\n * Sets the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n */\n private async setPinKeyEncryptedUserKeyEphemeral(\n pinKeyEncryptedUserKey: EncString,\n userId: UserId,\n ): Promise {\n this.validateUserId(userId, \"Cannot set pinKeyEncryptedUserKeyEphemeral.\");\n\n if (pinKeyEncryptedUserKey == null) {\n throw new Error(\n \"No pinKeyEncryptedUserKey provided. Cannot set pinKeyEncryptedUserKeyEphemeral.\",\n );\n }\n\n await this.stateProvider.setUserState(\n PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL,\n pinKeyEncryptedUserKey?.encryptedString,\n userId,\n );\n }\n\n async clearPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot clear pinKeyEncryptedUserKeyEphemeral.\");\n\n await this.stateProvider.setUserState(PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL, null, userId);\n }\n\n async createPinKeyEncryptedUserKey(\n pin: string,\n userKey: UserKey,\n userId: UserId,\n ): Promise {\n this.validateUserId(userId, \"Cannot create pinKeyEncryptedUserKey.\");\n\n if (!userKey) {\n throw new Error(\"No UserKey provided. Cannot create pinKeyEncryptedUserKey.\");\n }\n\n const email = await firstValueFrom(\n this.accountService.accounts$.pipe(map((accounts) => accounts[userId].email)),\n );\n const kdfConfig = await this.kdfConfigService.getKdfConfig();\n\n const pinKey = await this.makePinKey(pin, email, kdfConfig);\n\n return await this.encryptService.encrypt(userKey.key, pinKey);\n }\n\n async storePinKeyEncryptedUserKey(\n pinKeyEncryptedUserKey: EncString,\n storeAsEphemeral: boolean,\n userId: UserId,\n ): Promise {\n this.validateUserId(userId, \"Cannot store pinKeyEncryptedUserKey.\");\n\n if (storeAsEphemeral) {\n await this.setPinKeyEncryptedUserKeyEphemeral(pinKeyEncryptedUserKey, userId);\n } else {\n await this.setPinKeyEncryptedUserKeyPersistent(pinKeyEncryptedUserKey, userId);\n }\n }\n\n async getUserKeyEncryptedPin(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot get userKeyEncryptedPin.\");\n\n return EncString.fromJSON(\n await firstValueFrom(this.stateProvider.getUserState$(USER_KEY_ENCRYPTED_PIN, userId)),\n );\n }\n\n async setUserKeyEncryptedPin(userKeyEncryptedPin: EncString, userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot set userKeyEncryptedPin.\");\n\n await this.stateProvider.setUserState(\n USER_KEY_ENCRYPTED_PIN,\n userKeyEncryptedPin?.encryptedString,\n userId,\n );\n }\n\n async clearUserKeyEncryptedPin(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot clear userKeyEncryptedPin.\");\n\n await this.stateProvider.setUserState(USER_KEY_ENCRYPTED_PIN, null, userId);\n }\n\n async createUserKeyEncryptedPin(pin: string, userKey: UserKey): Promise {\n if (!userKey) {\n throw new Error(\"No UserKey provided. Cannot create userKeyEncryptedPin.\");\n }\n\n return await this.encryptService.encrypt(pin, userKey);\n }\n\n async getOldPinKeyEncryptedMasterKey(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot get oldPinKeyEncryptedMasterKey.\");\n\n return await firstValueFrom(\n this.stateProvider.getUserState$(OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, userId),\n );\n }\n\n async clearOldPinKeyEncryptedMasterKey(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot clear oldPinKeyEncryptedMasterKey.\");\n\n await this.stateProvider.setUserState(OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, null, userId);\n }\n\n async makePinKey(pin: string, salt: string, kdfConfig: KdfConfig): Promise {\n const pinKey = await this.keyGenerationService.deriveKeyFromPassword(pin, salt, kdfConfig);\n return (await this.keyGenerationService.stretchKey(pinKey)) as PinKey;\n }\n\n async getPinLockType(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot get PinLockType.\");\n\n /**\n * We can't check the `userKeyEncryptedPin` (formerly called `protectedPin`) for both because old\n * accounts only used it for MP on Restart\n */\n const aUserKeyEncryptedPinIsSet = !!(await this.getUserKeyEncryptedPin(userId));\n const aPinKeyEncryptedUserKeyPersistentIsSet =\n !!(await this.getPinKeyEncryptedUserKeyPersistent(userId));\n const anOldPinKeyEncryptedMasterKeyIsSet =\n !!(await this.getOldPinKeyEncryptedMasterKey(userId));\n\n if (aPinKeyEncryptedUserKeyPersistentIsSet || anOldPinKeyEncryptedMasterKeyIsSet) {\n return \"PERSISTENT\";\n } else if (\n aUserKeyEncryptedPinIsSet &&\n !aPinKeyEncryptedUserKeyPersistentIsSet &&\n !anOldPinKeyEncryptedMasterKeyIsSet\n ) {\n return \"EPHEMERAL\";\n } else {\n return \"DISABLED\";\n }\n }\n\n async isPinSet(userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot determine if PIN is set.\");\n\n return (await this.getPinLockType(userId)) !== \"DISABLED\";\n }\n\n async decryptUserKeyWithPin(pin: string, userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot decrypt user key with PIN.\");\n\n try {\n const pinLockType = await this.getPinLockType(userId);\n const requireMasterPasswordOnClientRestart = pinLockType === \"EPHEMERAL\";\n\n const { pinKeyEncryptedUserKey, oldPinKeyEncryptedMasterKey } =\n await this.getPinKeyEncryptedKeys(pinLockType, userId);\n\n const email = await firstValueFrom(\n this.accountService.accounts$.pipe(map((accounts) => accounts[userId].email)),\n );\n const kdfConfig = await this.kdfConfigService.getKdfConfig();\n\n let userKey: UserKey;\n\n if (oldPinKeyEncryptedMasterKey) {\n userKey = await this.decryptAndMigrateOldPinKeyEncryptedMasterKey(\n userId,\n pin,\n email,\n kdfConfig,\n requireMasterPasswordOnClientRestart,\n oldPinKeyEncryptedMasterKey,\n );\n } else {\n userKey = await this.decryptUserKey(userId, pin, email, kdfConfig, pinKeyEncryptedUserKey);\n }\n\n if (!userKey) {\n this.logService.warning(`User key null after pin key decryption.`);\n return null;\n }\n\n if (!(await this.validatePin(userKey, pin, userId))) {\n this.logService.warning(`Pin key decryption successful but pin validation failed.`);\n return null;\n }\n\n return userKey;\n } catch (error) {\n this.logService.error(`Error decrypting user key with pin: ${error}`);\n return null;\n }\n }\n\n /**\n * Decrypts the UserKey with the provided PIN.\n */\n private async decryptUserKey(\n userId: UserId,\n pin: string,\n salt: string,\n kdfConfig: KdfConfig,\n pinKeyEncryptedUserKey?: EncString,\n ): Promise {\n this.validateUserId(userId, \"Cannot decrypt user key.\");\n\n pinKeyEncryptedUserKey ||= await this.getPinKeyEncryptedUserKeyPersistent(userId);\n pinKeyEncryptedUserKey ||= await this.getPinKeyEncryptedUserKeyEphemeral(userId);\n\n if (!pinKeyEncryptedUserKey) {\n throw new Error(\"No pinKeyEncryptedUserKey found.\");\n }\n\n const pinKey = await this.makePinKey(pin, salt, kdfConfig);\n const userKey = await this.encryptService.decryptToBytes(pinKeyEncryptedUserKey, pinKey);\n\n return new SymmetricCryptoKey(userKey) as UserKey;\n }\n\n /**\n * Creates a new `pinKeyEncryptedUserKey` and clears the `oldPinKeyEncryptedMasterKey`.\n * @returns UserKey\n */\n private async decryptAndMigrateOldPinKeyEncryptedMasterKey(\n userId: UserId,\n pin: string,\n email: string,\n kdfConfig: KdfConfig,\n requireMasterPasswordOnClientRestart: boolean,\n oldPinKeyEncryptedMasterKey: EncString,\n ): Promise {\n this.validateUserId(userId, \"Cannot decrypt and migrate oldPinKeyEncryptedMasterKey.\");\n\n const masterKey = await this.decryptMasterKeyWithPin(\n userId,\n pin,\n email,\n kdfConfig,\n oldPinKeyEncryptedMasterKey,\n );\n\n const encUserKey = await this.stateService.getEncryptedCryptoSymmetricKey({ userId: userId });\n\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n masterKey,\n encUserKey ? new EncString(encUserKey) : undefined,\n );\n\n const pinKeyEncryptedUserKey = await this.createPinKeyEncryptedUserKey(pin, userKey, userId);\n await this.storePinKeyEncryptedUserKey(\n pinKeyEncryptedUserKey,\n requireMasterPasswordOnClientRestart,\n userId,\n );\n\n const userKeyEncryptedPin = await this.createUserKeyEncryptedPin(pin, userKey);\n await this.setUserKeyEncryptedPin(userKeyEncryptedPin, userId);\n\n await this.clearOldPinKeyEncryptedMasterKey(userId);\n\n // This also clears the old Biometrics key since the new Biometrics key will be created when the user key is set.\n await this.stateService.setCryptoMasterKeyBiometric(null, { userId: userId });\n\n return userKey;\n }\n\n // Only for migration purposes\n private async decryptMasterKeyWithPin(\n userId: UserId,\n pin: string,\n salt: string,\n kdfConfig: KdfConfig,\n oldPinKeyEncryptedMasterKey?: EncString,\n ): Promise {\n this.validateUserId(userId, \"Cannot decrypt master key with PIN.\");\n\n if (!oldPinKeyEncryptedMasterKey) {\n const oldPinKeyEncryptedMasterKeyString = await this.getOldPinKeyEncryptedMasterKey(userId);\n\n if (oldPinKeyEncryptedMasterKeyString == null) {\n throw new Error(\"No oldPinKeyEncrytedMasterKey found.\");\n }\n\n oldPinKeyEncryptedMasterKey = new EncString(oldPinKeyEncryptedMasterKeyString);\n }\n\n const pinKey = await this.makePinKey(pin, salt, kdfConfig);\n const masterKey = await this.encryptService.decryptToBytes(oldPinKeyEncryptedMasterKey, pinKey);\n\n return new SymmetricCryptoKey(masterKey) as MasterKey;\n }\n\n /**\n * Gets the user's `pinKeyEncryptedUserKey` (persistent or ephemeral) and `oldPinKeyEncryptedMasterKey`\n * (if one exists) based on the user's PinLockType.\n *\n * @remarks The `oldPinKeyEncryptedMasterKey` (formerly `pinProtected`) is only used for migration and\n * will be null for all migrated accounts.\n * @throws If PinLockType is 'DISABLED' or if userId is not provided\n */\n private async getPinKeyEncryptedKeys(\n pinLockType: PinLockType,\n userId: UserId,\n ): Promise<{ pinKeyEncryptedUserKey: EncString; oldPinKeyEncryptedMasterKey?: EncString }> {\n this.validateUserId(userId, \"Cannot get PinKey encrypted keys.\");\n\n switch (pinLockType) {\n case \"PERSISTENT\": {\n const pinKeyEncryptedUserKey = await this.getPinKeyEncryptedUserKeyPersistent(userId);\n const oldPinKeyEncryptedMasterKey = await this.getOldPinKeyEncryptedMasterKey(userId);\n\n return {\n pinKeyEncryptedUserKey,\n oldPinKeyEncryptedMasterKey: oldPinKeyEncryptedMasterKey\n ? new EncString(oldPinKeyEncryptedMasterKey)\n : undefined,\n };\n }\n case \"EPHEMERAL\": {\n const pinKeyEncryptedUserKey = await this.getPinKeyEncryptedUserKeyEphemeral(userId);\n\n return {\n pinKeyEncryptedUserKey,\n oldPinKeyEncryptedMasterKey: undefined, // Going forward, we only migrate non-ephemeral version\n };\n }\n case \"DISABLED\":\n throw new Error(\"Pin is disabled\");\n default: {\n // Compile-time check for exhaustive switch\n const _exhaustiveCheck: never = pinLockType;\n return _exhaustiveCheck;\n }\n }\n }\n\n private async validatePin(userKey: UserKey, pin: string, userId: UserId): Promise {\n this.validateUserId(userId, \"Cannot validate PIN.\");\n\n const userKeyEncryptedPin = await this.getUserKeyEncryptedPin(userId);\n const decryptedPin = await this.encryptService.decryptToUtf8(userKeyEncryptedPin, userKey);\n\n const isPinValid = this.cryptoFunctionService.compareFast(decryptedPin, pin);\n return isPinValid;\n }\n\n /**\n * Throws a custom error message if user ID is not provided.\n */\n private validateUserId(userId: UserId, errorMessage: string = \"\") {\n if (!userId) {\n throw new Error(`User ID is required. ${errorMessage}`);\n }\n }\n}\n","import { Observable, firstValueFrom, switchMap } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\n\nimport {\n GlobalState,\n KeyDefinition,\n LOGIN_EMAIL_DISK,\n StateProvider,\n} from \"../../../../../common/src/platform/state\";\nimport { LoginEmailServiceAbstraction } from \"../../abstractions/login-email.service\";\n\nexport const STORED_EMAIL = new KeyDefinition(LOGIN_EMAIL_DISK, \"storedEmail\", {\n deserializer: (value: string) => value,\n});\n\nexport class LoginEmailService implements LoginEmailServiceAbstraction {\n private email: string | null;\n private rememberEmail: boolean;\n\n // True if an account is currently being added through account switching\n private readonly addingAccount$: Observable;\n\n private readonly storedEmailState: GlobalState;\n storedEmail$: Observable;\n\n constructor(\n private accountService: AccountService,\n private authService: AuthService,\n private stateProvider: StateProvider,\n ) {\n this.storedEmailState = this.stateProvider.getGlobal(STORED_EMAIL);\n\n // In order to determine if an account is being added, we check if any account is not logged out\n this.addingAccount$ = this.authService.authStatuses$.pipe(\n switchMap(async (statuses) => {\n // We don't want to consider the active account since it may have just changed auth status to logged in\n // which would make this observable think an account is being added\n const activeUser = await firstValueFrom(this.accountService.activeAccount$);\n if (activeUser) {\n delete statuses[activeUser.id];\n }\n return Object.values(statuses).some((status) => status !== AuthenticationStatus.LoggedOut);\n }),\n );\n\n this.storedEmail$ = this.storedEmailState.state$.pipe(\n switchMap(async (storedEmail) => {\n // When adding an account, we don't show the stored email\n if (await firstValueFrom(this.addingAccount$)) {\n return null;\n }\n return storedEmail;\n }),\n );\n }\n\n getEmail() {\n return this.email;\n }\n\n setEmail(email: string) {\n this.email = email;\n }\n\n getRememberEmail() {\n return this.rememberEmail;\n }\n\n setRememberEmail(value: boolean) {\n this.rememberEmail = value ?? false;\n }\n\n // Note: only clear values on successful login or you are sure they are not needed.\n // Browser uses these values to maintain the email between login and 2fa components so\n // we do not want to clear them too early.\n clearValues() {\n this.email = null;\n this.rememberEmail = false;\n }\n\n async saveEmailSettings() {\n const addingAccount = await firstValueFrom(this.addingAccount$);\n await this.storedEmailState.update((storedEmail) => {\n // If we're adding an account, only overwrite the stored email when rememberEmail is true\n if (addingAccount) {\n if (this.rememberEmail) {\n return this.email;\n }\n return storedEmail;\n }\n\n // Saving with rememberEmail set to false will clear the stored email\n if (this.rememberEmail) {\n return this.email;\n }\n return null;\n });\n }\n}\n","export class PreloginRequest {\n email: string;\n\n constructor(email: string) {\n this.email = email;\n }\n}\n","import { ClientType } from \"../../../../enums\";\nimport { Utils } from \"../../../../platform/misc/utils\";\nimport { CaptchaProtectedRequest } from \"../captcha-protected.request\";\n\nimport { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class PasswordTokenRequest extends TokenRequest implements CaptchaProtectedRequest {\n constructor(\n public email: string,\n public masterPasswordHash: string,\n public captchaResponse: string,\n protected twoFactor: TokenTwoFactorRequest,\n device?: DeviceRequest,\n ) {\n super(twoFactor, device);\n }\n\n toIdentityToken(clientId: ClientType) {\n const obj = super.toIdentityToken(clientId);\n\n obj.grant_type = \"password\";\n obj.username = this.email;\n obj.password = this.masterPasswordHash;\n\n if (this.captchaResponse != null) {\n obj.captchaResponse = this.captchaResponse;\n }\n\n return obj;\n }\n\n alterIdentityTokenHeaders(headers: Headers) {\n headers.set(\"Auth-Email\", Utils.fromUtf8ToUrlB64(this.email));\n }\n\n static fromJSON(json: any) {\n return Object.assign(Object.create(PasswordTokenRequest.prototype), json, {\n device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n twoFactor: json.twoFactor\n ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n : undefined,\n });\n }\n}\n","import { Utils } from \"../../../platform/misc/utils\";\nimport { UserId } from \"../../../types/guid\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { ForceSetPasswordReason } from \"./force-set-password-reason\";\n\nexport class AuthResult {\n userId: UserId;\n captchaSiteKey = \"\";\n // TODO: PM-3287 - Remove this after 3 releases of backwards compatibility. - Target release 2023.12 for removal\n /**\n * @deprecated\n * Replace with using UserDecryptionOptions to determine if the user does\n * not have a master password and is not using Key Connector.\n * */\n resetMasterPassword = false;\n\n forcePasswordReset: ForceSetPasswordReason = ForceSetPasswordReason.None;\n twoFactorProviders: Partial>> = null;\n ssoEmail2FaSessionToken?: string;\n email: string;\n requiresEncryptionKeyMigration: boolean;\n\n get requiresCaptcha() {\n return !Utils.isNullOrWhitespace(this.captchaSiteKey);\n }\n\n get requiresTwoFactor() {\n return this.twoFactorProviders != null;\n }\n}\n","import { BehaviorSubject, filter, firstValueFrom, timeout } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { Argon2KdfConfig, PBKDF2KdfConfig } from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { DeviceRequest } from \"@bitwarden/common/auth/models/request/identity-token/device.request\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/sso-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { UserApiTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/webauthn-login-token.request\";\nimport { IdentityCaptchaResponse } from \"@bitwarden/common/auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"@bitwarden/common/auth/models/response/identity-two-factor.response\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums\";\nimport { Account, AccountProfile } from \"@bitwarden/common/platform/models/domain/account\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../abstractions/user-decryption-options.service.abstraction\";\nimport {\n UserApiLoginCredentials,\n PasswordLoginCredentials,\n SsoLoginCredentials,\n AuthRequestLoginCredentials,\n WebAuthnLoginCredentials,\n} from \"../models/domain/login-credentials\";\nimport { UserDecryptionOptions } from \"../models/domain/user-decryption-options\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\ntype IdentityResponse = IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse;\n\nexport abstract class LoginStrategyData {\n tokenRequest:\n | UserApiTokenRequest\n | PasswordTokenRequest\n | SsoTokenRequest\n | WebAuthnLoginTokenRequest;\n captchaBypassToken?: string;\n\n /** User's entered email obtained pre-login. */\n abstract userEnteredEmail?: string;\n}\n\nexport abstract class LoginStrategy {\n protected abstract cache: BehaviorSubject;\n\n constructor(\n protected accountService: AccountService,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected cryptoService: CryptoService,\n protected apiService: ApiService,\n protected tokenService: TokenService,\n protected appIdService: AppIdService,\n protected platformUtilsService: PlatformUtilsService,\n protected messagingService: MessagingService,\n protected logService: LogService,\n protected stateService: StateService,\n protected twoFactorService: TwoFactorService,\n protected userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n protected billingAccountProfileStateService: BillingAccountProfileStateService,\n protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n protected KdfConfigService: KdfConfigService,\n ) {}\n\n abstract exportCache(): CacheData;\n\n abstract logIn(\n credentials:\n | UserApiLoginCredentials\n | PasswordLoginCredentials\n | SsoLoginCredentials\n | AuthRequestLoginCredentials\n | WebAuthnLoginCredentials,\n ): Promise;\n\n async logInTwoFactor(\n twoFactor: TokenTwoFactorRequest,\n captchaResponse: string = null,\n ): Promise {\n const data = this.cache.value;\n data.tokenRequest.setTwoFactor(twoFactor);\n this.cache.next(data);\n const [authResult] = await this.startLogIn();\n return authResult;\n }\n\n protected async startLogIn(): Promise<[AuthResult, IdentityResponse]> {\n await this.twoFactorService.clearSelectedProvider();\n\n const tokenRequest = this.cache.value.tokenRequest;\n const response = await this.apiService.postIdentityToken(tokenRequest);\n\n if (response instanceof IdentityTwoFactorResponse) {\n return [await this.processTwoFactorResponse(response), response];\n } else if (response instanceof IdentityCaptchaResponse) {\n return [await this.processCaptchaResponse(response), response];\n } else if (response instanceof IdentityTokenResponse) {\n return [await this.processTokenResponse(response), response];\n }\n\n throw new Error(\"Invalid response object.\");\n }\n\n protected async buildDeviceRequest() {\n const appId = await this.appIdService.getAppId();\n return new DeviceRequest(appId, this.platformUtilsService);\n }\n\n /**\n * Builds the TokenTwoFactorRequest to be used within other login strategies token requests\n * to the server.\n * If the user provided a 2FA token in an already created TokenTwoFactorRequest, it will be used.\n * If not, and the user has previously remembered a 2FA token, it will be used.\n * If neither of these are true, an empty TokenTwoFactorRequest will be returned.\n * @param userProvidedTwoFactor - optional - The 2FA token request provided by the caller\n * @param email - optional - ensure that email is provided for any login strategies that support remember 2FA functionality\n * @returns a promise which resolves to a TokenTwoFactorRequest to be sent to the server\n */\n protected async buildTwoFactor(\n userProvidedTwoFactor?: TokenTwoFactorRequest,\n email?: string,\n ): Promise {\n if (userProvidedTwoFactor != null) {\n return userProvidedTwoFactor;\n }\n\n if (email) {\n const storedTwoFactorToken = await this.tokenService.getTwoFactorToken(email);\n if (storedTwoFactorToken != null) {\n return new TokenTwoFactorRequest(\n TwoFactorProviderType.Remember,\n storedTwoFactorToken,\n false,\n );\n }\n }\n\n return new TokenTwoFactorRequest();\n }\n\n /**\n * Initializes the account with information from the IdTokenResponse after successful login.\n * It also sets the access token and refresh token in the token service.\n *\n * @param {IdentityTokenResponse} tokenResponse - The response from the server containing the identity token.\n * @returns {Promise} - A promise that resolves the the UserId when the account information has been successfully saved.\n */\n protected async saveAccountInformation(tokenResponse: IdentityTokenResponse): Promise {\n const accountInformation = await this.tokenService.decodeAccessToken(tokenResponse.accessToken);\n const userId = accountInformation.sub as UserId;\n\n await this.accountService.addAccount(userId, {\n name: accountInformation.name,\n email: accountInformation.email,\n emailVerified: accountInformation.email_verified,\n });\n\n await this.accountService.switchAccount(userId);\n\n await this.stateService.addAccount(\n new Account({\n profile: {\n ...new AccountProfile(),\n ...{\n userId,\n name: accountInformation.name,\n email: accountInformation.email,\n },\n },\n }),\n );\n\n await this.verifyAccountAdded(userId);\n\n // We must set user decryption options before retrieving vault timeout settings\n // as the user decryption options help determine the available timeout actions.\n await this.userDecryptionOptionsService.setUserDecryptionOptions(\n UserDecryptionOptions.fromResponse(tokenResponse),\n );\n\n const vaultTimeoutAction = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n );\n const vaultTimeout = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n );\n\n // User id will be derived from the access token.\n await this.tokenService.setTokens(\n tokenResponse.accessToken,\n vaultTimeoutAction as VaultTimeoutAction,\n vaultTimeout,\n tokenResponse.refreshToken, // Note: CLI login via API key sends undefined for refresh token.\n );\n\n await this.KdfConfigService.setKdfConfig(\n userId as UserId,\n tokenResponse.kdf === KdfType.PBKDF2_SHA256\n ? new PBKDF2KdfConfig(tokenResponse.kdfIterations)\n : new Argon2KdfConfig(\n tokenResponse.kdfIterations,\n tokenResponse.kdfMemory,\n tokenResponse.kdfParallelism,\n ),\n );\n\n await this.billingAccountProfileStateService.setHasPremium(accountInformation.premium, false);\n return userId;\n }\n\n protected async processTokenResponse(response: IdentityTokenResponse): Promise {\n const result = new AuthResult();\n\n // Old encryption keys must be migrated, but is currently only available on web.\n // Other clients shouldn't continue the login process.\n if (this.encryptionKeyMigrationRequired(response)) {\n result.requiresEncryptionKeyMigration = true;\n if (this.platformUtilsService.getClientType() !== ClientType.Web) {\n return result;\n }\n }\n\n result.resetMasterPassword = response.resetMasterPassword;\n\n // Convert boolean to enum\n if (response.forcePasswordReset) {\n result.forcePasswordReset = ForceSetPasswordReason.AdminForcePasswordReset;\n }\n\n // Must come before setting keys, user key needs email to update additional keys\n const userId = await this.saveAccountInformation(response);\n result.userId = userId;\n\n if (response.twoFactorToken != null) {\n // note: we can read email from access token b/c it was saved in saveAccountInformation\n const userEmail = await this.tokenService.getEmail();\n\n await this.tokenService.setTwoFactorToken(userEmail, response.twoFactorToken);\n }\n\n await this.setMasterKey(response, userId);\n await this.setUserKey(response, userId);\n await this.setPrivateKey(response, userId);\n\n this.messagingService.send(\"loggedIn\");\n\n return result;\n }\n\n // The keys comes from different sources depending on the login strategy\n protected abstract setMasterKey(response: IdentityTokenResponse, userId: UserId): Promise;\n protected abstract setUserKey(response: IdentityTokenResponse, userId: UserId): Promise;\n protected abstract setPrivateKey(response: IdentityTokenResponse, userId: UserId): Promise;\n\n // Old accounts used master key for encryption. We are forcing migrations but only need to\n // check on password logins\n protected encryptionKeyMigrationRequired(response: IdentityTokenResponse): boolean {\n return false;\n }\n\n protected async createKeyPairForOldAccount(userId: UserId) {\n try {\n const userKey = await this.cryptoService.getUserKeyWithLegacySupport(userId);\n const [publicKey, privateKey] = await this.cryptoService.makeKeyPair(userKey);\n await this.apiService.postAccountKeys(new KeysRequest(publicKey, privateKey.encryptedString));\n return privateKey.encryptedString;\n } catch (e) {\n this.logService.error(e);\n }\n }\n\n /**\n * Handles the response from the server when a 2FA is required.\n * It clears any existing 2FA token, as it's no longer valid, and sets up the necessary data for the 2FA process.\n *\n * @param {IdentityTwoFactorResponse} response - The response from the server indicating that 2FA is required.\n * @returns {Promise} - A promise that resolves to an AuthResult object\n */\n private async processTwoFactorResponse(response: IdentityTwoFactorResponse): Promise {\n // If we get a 2FA required response, then we should clear the 2FA token\n // just in case as it is no longer valid.\n await this.clearTwoFactorToken();\n\n const result = new AuthResult();\n result.twoFactorProviders = response.twoFactorProviders2;\n\n await this.twoFactorService.setProviders(response);\n this.cache.next({ ...this.cache.value, captchaBypassToken: response.captchaToken ?? null });\n result.ssoEmail2FaSessionToken = response.ssoEmail2faSessionToken;\n result.email = response.email;\n return result;\n }\n\n /**\n * Clears the 2FA token from the token service using the user's email if it exists\n */\n private async clearTwoFactorToken() {\n const email = this.cache.value.userEnteredEmail;\n if (email) {\n await this.tokenService.clearTwoFactorToken(email);\n }\n }\n\n private async processCaptchaResponse(response: IdentityCaptchaResponse): Promise {\n const result = new AuthResult();\n result.captchaSiteKey = response.siteKey;\n return result;\n }\n\n /**\n * Verifies that the active account is set after initialization.\n * Note: In browser there is a slight delay between when active account emits in background,\n * and when it emits in foreground. We're giving the foreground 1 second to catch up.\n * If nothing is emitted, we throw an error.\n */\n private async verifyAccountAdded(expectedUserId: UserId) {\n await firstValueFrom(\n this.accountService.activeAccount$.pipe(\n filter((account) => account?.id === expectedUserId),\n timeout({\n first: 1000,\n with: () => {\n throw new Error(\"Expected user never made active user after initialization.\");\n },\n }),\n ),\n );\n }\n}\n","import { firstValueFrom, Observable, map, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { AuthRequestLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class AuthRequestLoginStrategyData implements LoginStrategyData {\n tokenRequest: PasswordTokenRequest;\n captchaBypassToken: string;\n authRequestCredentials: AuthRequestLoginCredentials;\n\n static fromJSON(obj: Jsonify): AuthRequestLoginStrategyData {\n const data = Object.assign(new AuthRequestLoginStrategyData(), obj, {\n tokenRequest: PasswordTokenRequest.fromJSON(obj.tokenRequest),\n authRequestCredentials: AuthRequestLoginCredentials.fromJSON(obj.authRequestCredentials),\n });\n return data;\n }\n}\n\nexport class AuthRequestLoginStrategy extends LoginStrategy {\n email$: Observable;\n accessCode$: Observable;\n authRequestId$: Observable;\n\n protected cache: BehaviorSubject;\n\n constructor(\n data: AuthRequestLoginStrategyData,\n private deviceTrustService: DeviceTrustServiceAbstraction,\n ...sharedDeps: ConstructorParameters\n ) {\n super(...sharedDeps);\n\n this.cache = new BehaviorSubject(data);\n this.email$ = this.cache.pipe(map((data) => data.tokenRequest.email));\n this.accessCode$ = this.cache.pipe(map((data) => data.authRequestCredentials.accessCode));\n this.authRequestId$ = this.cache.pipe(map((data) => data.authRequestCredentials.authRequestId));\n }\n\n override async logIn(credentials: AuthRequestLoginCredentials) {\n const data = new AuthRequestLoginStrategyData();\n data.tokenRequest = new PasswordTokenRequest(\n credentials.email,\n credentials.accessCode,\n null,\n await this.buildTwoFactor(credentials.twoFactor, credentials.email),\n await this.buildDeviceRequest(),\n );\n data.tokenRequest.setAuthRequestAccessCode(credentials.authRequestId);\n data.authRequestCredentials = credentials;\n this.cache.next(data);\n\n const [authResult] = await this.startLogIn();\n return authResult;\n }\n\n override async logInTwoFactor(\n twoFactor: TokenTwoFactorRequest,\n captchaResponse: string,\n ): Promise {\n const data = this.cache.value;\n data.tokenRequest.captchaResponse = captchaResponse ?? data.captchaBypassToken;\n this.cache.next(data);\n\n return super.logInTwoFactor(twoFactor);\n }\n\n protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n const authRequestCredentials = this.cache.value.authRequestCredentials;\n if (\n authRequestCredentials.decryptedMasterKey &&\n authRequestCredentials.decryptedMasterKeyHash\n ) {\n await this.masterPasswordService.setMasterKey(\n authRequestCredentials.decryptedMasterKey,\n userId,\n );\n await this.masterPasswordService.setMasterKeyHash(\n authRequestCredentials.decryptedMasterKeyHash,\n userId,\n );\n }\n }\n\n protected override async setUserKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n const authRequestCredentials = this.cache.value.authRequestCredentials;\n // User now may or may not have a master password\n // but set the master key encrypted user key if it exists regardless\n await this.cryptoService.setMasterKeyEncryptedUserKey(response.key);\n\n if (authRequestCredentials.decryptedUserKey) {\n await this.cryptoService.setUserKey(authRequestCredentials.decryptedUserKey);\n } else {\n await this.trySetUserKeyWithMasterKey(userId);\n\n // Establish trust if required after setting user key\n await this.deviceTrustService.trustDeviceIfRequired(userId);\n }\n }\n\n private async trySetUserKeyWithMasterKey(userId: UserId): Promise {\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n if (masterKey) {\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n await this.cryptoService.setUserKey(userKey);\n }\n }\n\n protected override async setPrivateKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n await this.cryptoService.setPrivateKey(\n response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n userId,\n );\n }\n\n exportCache(): CacheData {\n return {\n authRequest: this.cache.value,\n };\n }\n}\n","import { BehaviorSubject, firstValueFrom, map, Observable } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { IdentityCaptchaResponse } from \"@bitwarden/common/auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"@bitwarden/common/auth/models/response/identity-two-factor.response\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\n\nimport { LoginStrategyServiceAbstraction } from \"../abstractions\";\nimport { PasswordLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class PasswordLoginStrategyData implements LoginStrategyData {\n tokenRequest: PasswordTokenRequest;\n\n /** User's entered email obtained pre-login. Always present in MP login. */\n userEnteredEmail: string;\n /** If 2fa is required, token is returned to bypass captcha */\n captchaBypassToken?: string;\n /** The local version of the user's master key hash */\n localMasterKeyHash: string;\n /** The user's master key */\n masterKey: MasterKey;\n /**\n * Tracks if the user needs to update their password due to\n * a password that does not meet an organization's master password policy.\n */\n forcePasswordResetReason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n\n static fromJSON(obj: Jsonify): PasswordLoginStrategyData {\n const data = Object.assign(new PasswordLoginStrategyData(), obj, {\n tokenRequest: PasswordTokenRequest.fromJSON(obj.tokenRequest),\n masterKey: SymmetricCryptoKey.fromJSON(obj.masterKey),\n });\n return data;\n }\n}\n\nexport class PasswordLoginStrategy extends LoginStrategy {\n /** The email address of the user attempting to log in. */\n email$: Observable;\n /** The master key hash used for authentication */\n serverMasterKeyHash$: Observable;\n /** The local master key hash we store client side */\n localMasterKeyHash$: Observable;\n\n protected cache: BehaviorSubject;\n\n constructor(\n data: PasswordLoginStrategyData,\n private passwordStrengthService: PasswordStrengthServiceAbstraction,\n private policyService: PolicyService,\n private loginStrategyService: LoginStrategyServiceAbstraction,\n ...sharedDeps: ConstructorParameters\n ) {\n super(...sharedDeps);\n\n this.cache = new BehaviorSubject(data);\n this.email$ = this.cache.pipe(map((state) => state.tokenRequest.email));\n this.serverMasterKeyHash$ = this.cache.pipe(\n map((state) => state.tokenRequest.masterPasswordHash),\n );\n this.localMasterKeyHash$ = this.cache.pipe(map((state) => state.localMasterKeyHash));\n }\n\n override async logIn(credentials: PasswordLoginCredentials) {\n const { email, masterPassword, captchaToken, twoFactor } = credentials;\n\n const data = new PasswordLoginStrategyData();\n data.masterKey = await this.loginStrategyService.makePreloginKey(masterPassword, email);\n data.userEnteredEmail = email;\n\n // Hash the password early (before authentication) so we don't persist it in memory in plaintext\n data.localMasterKeyHash = await this.cryptoService.hashMasterKey(\n masterPassword,\n data.masterKey,\n HashPurpose.LocalAuthorization,\n );\n const serverMasterKeyHash = await this.cryptoService.hashMasterKey(\n masterPassword,\n data.masterKey,\n );\n\n data.tokenRequest = new PasswordTokenRequest(\n email,\n serverMasterKeyHash,\n captchaToken,\n await this.buildTwoFactor(twoFactor, email),\n await this.buildDeviceRequest(),\n );\n\n this.cache.next(data);\n\n const [authResult, identityResponse] = await this.startLogIn();\n\n if (identityResponse instanceof IdentityCaptchaResponse) {\n return authResult;\n }\n\n const masterPasswordPolicyOptions =\n this.getMasterPasswordPolicyOptionsFromResponse(identityResponse);\n\n // The identity result can contain master password policies for the user's organizations\n if (masterPasswordPolicyOptions?.enforceOnLogin) {\n // If there is a policy active, evaluate the supplied password before its no longer in memory\n const meetsRequirements = this.evaluateMasterPassword(\n credentials,\n masterPasswordPolicyOptions,\n );\n if (meetsRequirements) {\n return authResult;\n }\n\n if (identityResponse instanceof IdentityTwoFactorResponse) {\n // Save the flag to this strategy for use in 2fa login as the master password is about to pass out of scope\n this.cache.next({\n ...this.cache.value,\n forcePasswordResetReason: ForceSetPasswordReason.WeakMasterPassword,\n });\n } else {\n // Authentication was successful, save the force update password options with the state service\n await this.masterPasswordService.setForceSetPasswordReason(\n ForceSetPasswordReason.WeakMasterPassword,\n authResult.userId, // userId is only available on successful login\n );\n authResult.forcePasswordReset = ForceSetPasswordReason.WeakMasterPassword;\n }\n }\n return authResult;\n }\n\n override async logInTwoFactor(\n twoFactor: TokenTwoFactorRequest,\n captchaResponse: string,\n ): Promise {\n const data = this.cache.value;\n data.tokenRequest.captchaResponse = captchaResponse ?? data.captchaBypassToken;\n this.cache.next(data);\n\n const result = await super.logInTwoFactor(twoFactor);\n\n // 2FA was successful, save the force update password options with the state service if defined\n const forcePasswordResetReason = this.cache.value.forcePasswordResetReason;\n if (\n !result.requiresTwoFactor &&\n !result.requiresCaptcha &&\n forcePasswordResetReason != ForceSetPasswordReason.None\n ) {\n await this.masterPasswordService.setForceSetPasswordReason(\n forcePasswordResetReason,\n result.userId,\n );\n result.forcePasswordReset = forcePasswordResetReason;\n }\n\n return result;\n }\n\n protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n const { masterKey, localMasterKeyHash } = this.cache.value;\n await this.masterPasswordService.setMasterKey(masterKey, userId);\n await this.masterPasswordService.setMasterKeyHash(localMasterKeyHash, userId);\n }\n\n protected override async setUserKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n // If migration is required, we won't have a user key to set yet.\n if (this.encryptionKeyMigrationRequired(response)) {\n return;\n }\n await this.cryptoService.setMasterKeyEncryptedUserKey(response.key, userId);\n\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n if (masterKey) {\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n await this.cryptoService.setUserKey(userKey, userId);\n }\n }\n\n protected override async setPrivateKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n await this.cryptoService.setPrivateKey(\n response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n userId,\n );\n }\n\n protected override encryptionKeyMigrationRequired(response: IdentityTokenResponse): boolean {\n return !response.key;\n }\n\n private getMasterPasswordPolicyOptionsFromResponse(\n response: IdentityTokenResponse | IdentityTwoFactorResponse,\n ): MasterPasswordPolicyOptions {\n if (response == null) {\n return null;\n }\n return MasterPasswordPolicyOptions.fromResponse(response.masterPasswordPolicy);\n }\n\n private evaluateMasterPassword(\n { masterPassword, email }: PasswordLoginCredentials,\n options: MasterPasswordPolicyOptions,\n ): boolean {\n const passwordStrength = this.passwordStrengthService.getPasswordStrength(\n masterPassword,\n email,\n )?.score;\n\n return this.policyService.evaluateMasterPassword(passwordStrength, masterPassword, options);\n }\n\n exportCache(): CacheData {\n return {\n password: this.cache.value,\n };\n }\n}\n","import { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class SsoTokenRequest extends TokenRequest {\n constructor(\n public code: string,\n public codeVerifier: string,\n public redirectUri: string,\n protected twoFactor: TokenTwoFactorRequest,\n device?: DeviceRequest,\n ) {\n super(twoFactor, device);\n }\n\n toIdentityToken(clientId: string) {\n const obj = super.toIdentityToken(clientId);\n\n obj.grant_type = \"authorization_code\";\n obj.code = this.code;\n obj.code_verifier = this.codeVerifier;\n obj.redirect_uri = this.redirectUri;\n\n return obj;\n }\n\n static fromJSON(json: any) {\n return Object.assign(Object.create(SsoTokenRequest.prototype), json, {\n device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n twoFactor: json.twoFactor\n ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n : undefined,\n });\n }\n}\n","import { firstValueFrom, Observable, map, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SsoTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/sso-token.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { AuthRequestServiceAbstraction } from \"../abstractions\";\nimport { SsoLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategyData, LoginStrategy } from \"./login.strategy\";\n\nexport class SsoLoginStrategyData implements LoginStrategyData {\n captchaBypassToken: string;\n tokenRequest: SsoTokenRequest;\n /**\n * User's entered email obtained pre-login. Present in most SSO flows, but not CLI + SSO Flow.\n */\n userEnteredEmail?: string;\n /**\n * User email address. Only available after authentication.\n */\n email?: string;\n /**\n * The organization ID that the user is logging into. Used for Key Connector\n * purposes after authentication.\n */\n orgId: string;\n /**\n * A token provided by the server as an authentication factor for sending\n * email OTPs to the user's configured 2FA email address. This is required\n * as we don't have a master password hash or other verifiable secret when using SSO.\n */\n ssoEmail2FaSessionToken?: string;\n\n static fromJSON(obj: Jsonify): SsoLoginStrategyData {\n return Object.assign(new SsoLoginStrategyData(), obj, {\n tokenRequest: SsoTokenRequest.fromJSON(obj.tokenRequest),\n });\n }\n}\n\nexport class SsoLoginStrategy extends LoginStrategy {\n /**\n * @see {@link SsoLoginStrategyData.email}\n */\n email$: Observable;\n /**\n * @see {@link SsoLoginStrategyData.orgId}\n */\n orgId$: Observable;\n /**\n * @see {@link SsoLoginStrategyData.ssoEmail2FaSessionToken}\n */\n ssoEmail2FaSessionToken$: Observable;\n\n protected cache: BehaviorSubject;\n\n constructor(\n data: SsoLoginStrategyData,\n private keyConnectorService: KeyConnectorService,\n private deviceTrustService: DeviceTrustServiceAbstraction,\n private authRequestService: AuthRequestServiceAbstraction,\n private i18nService: I18nService,\n ...sharedDeps: ConstructorParameters\n ) {\n super(...sharedDeps);\n\n this.cache = new BehaviorSubject(data);\n this.email$ = this.cache.pipe(map((state) => state.email));\n this.orgId$ = this.cache.pipe(map((state) => state.orgId));\n this.ssoEmail2FaSessionToken$ = this.cache.pipe(map((state) => state.ssoEmail2FaSessionToken));\n }\n\n async logIn(credentials: SsoLoginCredentials): Promise {\n const data = new SsoLoginStrategyData();\n data.orgId = credentials.orgId;\n\n data.userEnteredEmail = credentials.email;\n\n const deviceRequest = await this.buildDeviceRequest();\n\n this.logService.info(\"Logging in with appId %s.\", deviceRequest.identifier);\n\n data.tokenRequest = new SsoTokenRequest(\n credentials.code,\n credentials.codeVerifier,\n credentials.redirectUrl,\n await this.buildTwoFactor(credentials.twoFactor, credentials.email),\n deviceRequest,\n );\n\n this.cache.next(data);\n\n const [ssoAuthResult] = await this.startLogIn();\n\n const email = ssoAuthResult.email;\n const ssoEmail2FaSessionToken = ssoAuthResult.ssoEmail2FaSessionToken;\n\n // Auth guard currently handles redirects for this.\n if (ssoAuthResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n await this.masterPasswordService.setForceSetPasswordReason(\n ssoAuthResult.forcePasswordReset,\n ssoAuthResult.userId,\n );\n }\n\n this.cache.next({\n ...this.cache.value,\n email,\n ssoEmail2FaSessionToken,\n });\n\n return ssoAuthResult;\n }\n\n protected override async setMasterKey(tokenResponse: IdentityTokenResponse, userId: UserId) {\n // The only way we can be setting a master key at this point is if we are using Key Connector.\n // First, check to make sure that we should do so based on the token response.\n if (this.shouldSetMasterKeyFromKeyConnector(tokenResponse)) {\n // If we're here, we know that the user should use Key Connector (they have a KeyConnectorUrl) and does not have a master password.\n // We can now check the key on the token response to see whether they are a brand new user or an existing user.\n // The presence of a masterKeyEncryptedUserKey indicates that the user has already been provisioned in Key Connector.\n const newSsoUser = tokenResponse.key == null;\n if (newSsoUser) {\n await this.keyConnectorService.convertNewSsoUserToKeyConnector(\n tokenResponse,\n this.cache.value.orgId,\n userId,\n );\n } else {\n const keyConnectorUrl = this.getKeyConnectorUrl(tokenResponse);\n await this.keyConnectorService.setMasterKeyFromUrl(keyConnectorUrl, userId);\n }\n }\n }\n\n /**\n * Determines if it is possible set the `masterKey` from Key Connector.\n * @param tokenResponse\n * @returns `true` if the master key can be set from Key Connector, `false` otherwise\n */\n private shouldSetMasterKeyFromKeyConnector(tokenResponse: IdentityTokenResponse): boolean {\n const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n\n if (userDecryptionOptions != null) {\n const userHasMasterPassword = userDecryptionOptions.hasMasterPassword;\n const userHasKeyConnectorUrl =\n userDecryptionOptions.keyConnectorOption?.keyConnectorUrl != null;\n\n // In order for us to set the master key from Key Connector, we need to have a Key Connector URL\n // and the user must not have a master password.\n return userHasKeyConnectorUrl && !userHasMasterPassword;\n } else {\n // In pre-TDE versions of the server, the userDecryptionOptions will not be present.\n // In this case, we can determine if the user has a master password and has a Key Connector URL by\n // just checking the keyConnectorUrl property. This is because the server short-circuits on the response\n // and will not pass back the URL in the response if the user has a master password.\n // TODO: remove compatibility check after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n return tokenResponse.keyConnectorUrl != null;\n }\n }\n\n private getKeyConnectorUrl(tokenResponse: IdentityTokenResponse): string {\n // TODO: remove tokenResponse.keyConnectorUrl reference after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n return (\n tokenResponse.keyConnectorUrl ?? userDecryptionOptions?.keyConnectorOption?.keyConnectorUrl\n );\n }\n\n // TODO: future passkey login strategy will need to support setting user key (decrypting via TDE or admin approval request)\n // so might be worth moving this logic to a common place (base login strategy or a separate service?)\n protected override async setUserKey(\n tokenResponse: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n const masterKeyEncryptedUserKey = tokenResponse.key;\n\n // Note: masterKeyEncryptedUserKey is undefined for SSO JIT provisioned users\n // on account creation and subsequent logins (confirmed or unconfirmed)\n // but that is fine for TDE so we cannot return if it is undefined\n\n if (masterKeyEncryptedUserKey) {\n // set the master key encrypted user key if it exists\n await this.cryptoService.setMasterKeyEncryptedUserKey(masterKeyEncryptedUserKey, userId);\n }\n\n const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n\n // Note: TDE and key connector are mutually exclusive\n if (userDecryptionOptions?.trustedDeviceOption) {\n this.logService.info(\"Attempting to set user key with approved admin auth request.\");\n\n // Try to use the user key from an approved admin request if it exists.\n // Using it will clear it from state and future requests will use the device key.\n await this.trySetUserKeyWithApprovedAdminRequestIfExists(userId);\n\n const hasUserKey = await this.cryptoService.hasUserKey(userId);\n\n // Only try to set user key with device key if admin approval request was not successful.\n if (!hasUserKey) {\n this.logService.info(\"Attempting to set user key with device key.\");\n\n await this.trySetUserKeyWithDeviceKey(tokenResponse, userId);\n }\n } else if (\n masterKeyEncryptedUserKey != null &&\n this.getKeyConnectorUrl(tokenResponse) != null\n ) {\n // Key connector enabled for user\n await this.trySetUserKeyWithMasterKey(userId);\n }\n\n // Note: In the traditional SSO flow with MP without key connector, the lock component\n // is responsible for deriving master key from MP entry and then decrypting the user key\n }\n\n private async trySetUserKeyWithApprovedAdminRequestIfExists(userId: UserId): Promise {\n // At this point a user could have an admin auth request that has been approved\n const adminAuthReqStorable = await this.authRequestService.getAdminAuthRequest(userId);\n\n if (!adminAuthReqStorable) {\n return;\n }\n\n // Call server to see if admin auth request has been approved\n let adminAuthReqResponse: AuthRequestResponse;\n\n try {\n adminAuthReqResponse = await this.apiService.getAuthRequest(adminAuthReqStorable.id);\n } catch (error) {\n if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n // if we get a 404, it means the auth request has been deleted so clear it from storage\n await this.authRequestService.clearAdminAuthRequest(userId);\n }\n\n // Always return on an error here as we don't want to block the user from logging in\n return;\n }\n\n if (adminAuthReqResponse?.requestApproved) {\n // if masterPasswordHash has a value, we will always receive authReqResponse.key\n // as authRequestPublicKey(masterKey) + authRequestPublicKey(masterPasswordHash)\n if (adminAuthReqResponse.masterPasswordHash) {\n await this.authRequestService.setKeysAfterDecryptingSharedMasterKeyAndHash(\n adminAuthReqResponse,\n adminAuthReqStorable.privateKey,\n );\n } else {\n // if masterPasswordHash is null, we will always receive authReqResponse.key\n // as authRequestPublicKey(userKey)\n await this.authRequestService.setUserKeyAfterDecryptingSharedUserKey(\n adminAuthReqResponse,\n adminAuthReqStorable.privateKey,\n );\n }\n\n if (await this.cryptoService.hasUserKey()) {\n // Now that we have a decrypted user key in memory, we can check if we\n // need to establish trust on the current device\n await this.deviceTrustService.trustDeviceIfRequired(userId);\n\n // if we successfully decrypted the user key, we can delete the admin auth request out of state\n // TODO: eventually we post and clean up DB as well once consumed on client\n await this.authRequestService.clearAdminAuthRequest(userId);\n\n this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"loginApproved\"));\n }\n }\n }\n\n private async trySetUserKeyWithDeviceKey(\n tokenResponse: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n const trustedDeviceOption = tokenResponse.userDecryptionOptions?.trustedDeviceOption;\n\n if (!trustedDeviceOption) {\n this.logService.error(\"Unable to set user key due to missing trustedDeviceOption.\");\n return;\n }\n\n const deviceKey = await this.deviceTrustService.getDeviceKey(userId);\n const encDevicePrivateKey = trustedDeviceOption?.encryptedPrivateKey;\n const encUserKey = trustedDeviceOption?.encryptedUserKey;\n\n if (!deviceKey || !encDevicePrivateKey || !encUserKey) {\n if (!deviceKey) {\n await this.logService.warning(\"Unable to set user key due to missing device key.\");\n }\n if (!encDevicePrivateKey) {\n await this.logService.warning(\n \"Unable to set user key due to missing encrypted device private key.\",\n );\n }\n if (!encUserKey) {\n await this.logService.warning(\"Unable to set user key due to missing encrypted user key.\");\n }\n return;\n }\n\n const userKey = await this.deviceTrustService.decryptUserKeyWithDeviceKey(\n userId,\n encDevicePrivateKey,\n encUserKey,\n deviceKey,\n );\n\n if (userKey) {\n await this.cryptoService.setUserKey(userKey);\n }\n }\n\n private async trySetUserKeyWithMasterKey(userId: UserId): Promise {\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n\n // There is a scenario in which the master key is not set here. That will occur if the user\n // has a master password and is using Key Connector. In that case, we cannot set the master key\n // because the user hasn't entered their master password yet.\n // Instead, we'll return here and let the migration to Key Connector handle setting the master key.\n if (!masterKey) {\n return;\n }\n\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n await this.cryptoService.setUserKey(userKey);\n }\n\n protected override async setPrivateKey(\n tokenResponse: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n const newSsoUser = tokenResponse.key == null;\n\n if (!newSsoUser) {\n await this.cryptoService.setPrivateKey(\n tokenResponse.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n userId,\n );\n }\n }\n\n exportCache(): CacheData {\n return {\n sso: this.cache.value,\n };\n }\n}\n","import { firstValueFrom, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { UserApiTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/user-api-token.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { UserApiLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class UserApiLoginStrategyData implements LoginStrategyData {\n tokenRequest: UserApiTokenRequest;\n captchaBypassToken: string;\n\n static fromJSON(obj: Jsonify): UserApiLoginStrategyData {\n return Object.assign(new UserApiLoginStrategyData(), obj, {\n tokenRequest: UserApiTokenRequest.fromJSON(obj.tokenRequest),\n });\n }\n}\n\nexport class UserApiLoginStrategy extends LoginStrategy {\n protected cache: BehaviorSubject;\n\n constructor(\n data: UserApiLoginStrategyData,\n private environmentService: EnvironmentService,\n private keyConnectorService: KeyConnectorService,\n ...sharedDeps: ConstructorParameters\n ) {\n super(...sharedDeps);\n\n this.cache = new BehaviorSubject(data);\n }\n\n override async logIn(credentials: UserApiLoginCredentials) {\n const data = new UserApiLoginStrategyData();\n data.tokenRequest = new UserApiTokenRequest(\n credentials.clientId,\n credentials.clientSecret,\n await this.buildTwoFactor(),\n await this.buildDeviceRequest(),\n );\n this.cache.next(data);\n\n const [authResult] = await this.startLogIn();\n return authResult;\n }\n\n protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n if (response.apiUseKeyConnector) {\n const env = await firstValueFrom(this.environmentService.environment$);\n const keyConnectorUrl = env.getKeyConnectorUrl();\n await this.keyConnectorService.setMasterKeyFromUrl(keyConnectorUrl, userId);\n }\n }\n\n protected override async setUserKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n await this.cryptoService.setMasterKeyEncryptedUserKey(response.key);\n\n if (response.apiUseKeyConnector) {\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n if (masterKey) {\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n await this.cryptoService.setUserKey(userKey, userId);\n }\n }\n }\n\n protected override async setPrivateKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n await this.cryptoService.setPrivateKey(\n response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n userId,\n );\n }\n\n // Overridden to save client ID and secret to token service\n protected async saveAccountInformation(tokenResponse: IdentityTokenResponse): Promise {\n const userId = await super.saveAccountInformation(tokenResponse);\n\n const vaultTimeoutAction = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n );\n const vaultTimeout = await firstValueFrom(\n this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n );\n\n const tokenRequest = this.cache.value.tokenRequest;\n\n await this.tokenService.setClientId(\n tokenRequest.clientId,\n vaultTimeoutAction as VaultTimeoutAction,\n vaultTimeout,\n );\n await this.tokenService.setClientSecret(\n tokenRequest.clientSecret,\n vaultTimeoutAction as VaultTimeoutAction,\n vaultTimeout,\n );\n return userId;\n }\n\n exportCache(): CacheData {\n return {\n userApiKey: this.cache.value,\n };\n }\n}\n","import { WebAuthnLoginAssertionResponseRequest } from \"../../../services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\nimport { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class WebAuthnLoginTokenRequest extends TokenRequest {\n constructor(\n public token: string,\n public deviceResponse: WebAuthnLoginAssertionResponseRequest,\n device?: DeviceRequest,\n ) {\n super(undefined, device);\n }\n\n toIdentityToken(clientId: string) {\n const obj = super.toIdentityToken(clientId);\n\n obj.grant_type = \"webauthn\";\n obj.token = this.token;\n // must be a string b/c sending as form encoded data\n obj.deviceResponse = JSON.stringify(this.deviceResponse);\n\n return obj;\n }\n\n static fromJSON(json: any) {\n return Object.assign(Object.create(WebAuthnLoginTokenRequest.prototype), json, {\n deviceResponse: WebAuthnLoginAssertionResponseRequest.fromJSON(json.deviceResponse),\n device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n twoFactor: json.twoFactor\n ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n : undefined,\n });\n }\n}\n","import { BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { WebAuthnLoginTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/webauthn-login-token.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\n\nimport { WebAuthnLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class WebAuthnLoginStrategyData implements LoginStrategyData {\n tokenRequest: WebAuthnLoginTokenRequest;\n captchaBypassToken?: string;\n credentials: WebAuthnLoginCredentials;\n\n static fromJSON(obj: Jsonify): WebAuthnLoginStrategyData {\n return Object.assign(new WebAuthnLoginStrategyData(), obj, {\n tokenRequest: WebAuthnLoginTokenRequest.fromJSON(obj.tokenRequest),\n credentials: WebAuthnLoginCredentials.fromJSON(obj.credentials),\n });\n }\n}\n\nexport class WebAuthnLoginStrategy extends LoginStrategy {\n protected cache: BehaviorSubject;\n\n constructor(\n data: WebAuthnLoginStrategyData,\n ...sharedDeps: ConstructorParameters\n ) {\n super(...sharedDeps);\n\n this.cache = new BehaviorSubject(data);\n }\n\n async logIn(credentials: WebAuthnLoginCredentials) {\n const data = new WebAuthnLoginStrategyData();\n data.credentials = credentials;\n data.tokenRequest = new WebAuthnLoginTokenRequest(\n credentials.token,\n credentials.deviceResponse,\n await this.buildDeviceRequest(),\n );\n this.cache.next(data);\n\n const [authResult] = await this.startLogIn();\n return authResult;\n }\n\n async logInTwoFactor(): Promise {\n throw new Error(\"2FA not supported yet for WebAuthn Login.\");\n }\n\n protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n return Promise.resolve();\n }\n\n protected override async setUserKey(idTokenResponse: IdentityTokenResponse, userId: UserId) {\n const masterKeyEncryptedUserKey = idTokenResponse.key;\n\n if (masterKeyEncryptedUserKey) {\n // set the master key encrypted user key if it exists\n await this.cryptoService.setMasterKeyEncryptedUserKey(masterKeyEncryptedUserKey, userId);\n }\n\n const userDecryptionOptions = idTokenResponse?.userDecryptionOptions;\n\n if (userDecryptionOptions?.webAuthnPrfOption) {\n const webAuthnPrfOption = idTokenResponse.userDecryptionOptions?.webAuthnPrfOption;\n\n const credentials = this.cache.value.credentials;\n // confirm we still have the prf key\n if (!credentials.prfKey) {\n return;\n }\n\n // decrypt prf encrypted private key\n const privateKey = await this.cryptoService.decryptToBytes(\n webAuthnPrfOption.encryptedPrivateKey,\n credentials.prfKey,\n );\n\n // decrypt user key with private key\n const userKey = await this.cryptoService.rsaDecrypt(\n webAuthnPrfOption.encryptedUserKey.encryptedString,\n privateKey,\n );\n\n if (userKey) {\n await this.cryptoService.setUserKey(new SymmetricCryptoKey(userKey) as UserKey, userId);\n }\n }\n }\n\n protected override async setPrivateKey(\n response: IdentityTokenResponse,\n userId: UserId,\n ): Promise {\n await this.cryptoService.setPrivateKey(\n response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n userId,\n );\n }\n\n exportCache(): CacheData {\n return {\n webAuthn: this.cache.value,\n };\n }\n}\n","import { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { KeyDefinition, LOGIN_STRATEGY_MEMORY } from \"@bitwarden/common/platform/state\";\n\nimport { AuthRequestLoginStrategyData } from \"../../login-strategies/auth-request-login.strategy\";\nimport { PasswordLoginStrategyData } from \"../../login-strategies/password-login.strategy\";\nimport { SsoLoginStrategyData } from \"../../login-strategies/sso-login.strategy\";\nimport { UserApiLoginStrategyData } from \"../../login-strategies/user-api-login.strategy\";\nimport { WebAuthnLoginStrategyData } from \"../../login-strategies/webauthn-login.strategy\";\n\n/**\n * The current login strategy in use.\n */\nexport const CURRENT_LOGIN_STRATEGY_KEY = new KeyDefinition(\n LOGIN_STRATEGY_MEMORY,\n \"currentLoginStrategy\",\n {\n deserializer: (data) => data,\n },\n);\n\n/**\n * The expiration date for the login strategy cache.\n * Used as a backup to the timer set on the service.\n */\nexport const CACHE_EXPIRATION_KEY = new KeyDefinition(\n LOGIN_STRATEGY_MEMORY,\n \"loginStrategyCacheExpiration\",\n {\n deserializer: (data) => (data ? null : new Date(data)),\n },\n);\n\n/**\n * Auth Request notification for all instances of the login strategy service.\n * Note: this isn't an ideal approach, but allows both a background and\n * foreground instance to send out the notification.\n * TODO: Move to Auth Request service.\n */\nexport const AUTH_REQUEST_PUSH_NOTIFICATION_KEY = new KeyDefinition(\n LOGIN_STRATEGY_MEMORY,\n \"authRequestPushNotification\",\n {\n deserializer: (data) => data,\n },\n);\n\nexport type CacheData = {\n password?: PasswordLoginStrategyData;\n sso?: SsoLoginStrategyData;\n userApiKey?: UserApiLoginStrategyData;\n authRequest?: AuthRequestLoginStrategyData;\n webAuthn?: WebAuthnLoginStrategyData;\n};\n\n/**\n * A cache for login strategies to use for data persistence through\n * the login process.\n */\nexport const CACHE_KEY = new KeyDefinition(\n LOGIN_STRATEGY_MEMORY,\n \"loginStrategyCache\",\n {\n deserializer: (data) => {\n if (data == null) {\n return null;\n }\n return {\n password: data.password ? PasswordLoginStrategyData.fromJSON(data.password) : undefined,\n sso: data.sso ? SsoLoginStrategyData.fromJSON(data.sso) : undefined,\n userApiKey: data.userApiKey\n ? UserApiLoginStrategyData.fromJSON(data.userApiKey)\n : undefined,\n authRequest: data.authRequest\n ? AuthRequestLoginStrategyData.fromJSON(data.authRequest)\n : undefined,\n webAuthn: data.webAuthn ? WebAuthnLoginStrategyData.fromJSON(data.webAuthn) : undefined,\n };\n },\n },\n);\n","import {\n combineLatestWith,\n distinctUntilChanged,\n firstValueFrom,\n map,\n Observable,\n shareReplay,\n Subscription,\n} from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfConfigService } from \"@bitwarden/common/auth/abstractions/kdf-config.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport {\n Argon2KdfConfig,\n KdfConfig,\n PBKDF2KdfConfig,\n} from \"@bitwarden/common/auth/models/domain/kdf-config\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { PreloginRequest } from \"@bitwarden/common/models/request/prelogin.request\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { KdfType } from \"@bitwarden/common/platform/enums/kdf-type.enum\";\nimport { TaskSchedulerService, ScheduledTaskNames } from \"@bitwarden/common/platform/scheduling\";\nimport { GlobalState, GlobalStateProvider } from \"@bitwarden/common/platform/state\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/src/auth/abstractions/device-trust.service.abstraction\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\n\nimport { AuthRequestServiceAbstraction, LoginStrategyServiceAbstraction } from \"../../abstractions\";\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../../abstractions/user-decryption-options.service.abstraction\";\nimport { AuthRequestLoginStrategy } from \"../../login-strategies/auth-request-login.strategy\";\nimport { LoginStrategy } from \"../../login-strategies/login.strategy\";\nimport { PasswordLoginStrategy } from \"../../login-strategies/password-login.strategy\";\nimport { SsoLoginStrategy } from \"../../login-strategies/sso-login.strategy\";\nimport { UserApiLoginStrategy } from \"../../login-strategies/user-api-login.strategy\";\nimport { WebAuthnLoginStrategy } from \"../../login-strategies/webauthn-login.strategy\";\nimport {\n UserApiLoginCredentials,\n PasswordLoginCredentials,\n SsoLoginCredentials,\n AuthRequestLoginCredentials,\n WebAuthnLoginCredentials,\n} from \"../../models\";\n\nimport {\n AUTH_REQUEST_PUSH_NOTIFICATION_KEY,\n CURRENT_LOGIN_STRATEGY_KEY,\n CacheData,\n CACHE_EXPIRATION_KEY,\n CACHE_KEY,\n} from \"./login-strategy.state\";\n\nconst sessionTimeoutLength = 2 * 60 * 1000; // 2 minutes\n\nexport class LoginStrategyService implements LoginStrategyServiceAbstraction {\n private sessionTimeoutSubscription: Subscription;\n private currentAuthnTypeState: GlobalState;\n private loginStrategyCacheState: GlobalState;\n private loginStrategyCacheExpirationState: GlobalState;\n private authRequestPushNotificationState: GlobalState;\n\n private loginStrategy$: Observable<\n | UserApiLoginStrategy\n | PasswordLoginStrategy\n | SsoLoginStrategy\n | AuthRequestLoginStrategy\n | WebAuthnLoginStrategy\n | null\n >;\n\n currentAuthType$: Observable;\n\n constructor(\n protected accountService: AccountService,\n protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n protected cryptoService: CryptoService,\n protected apiService: ApiService,\n protected tokenService: TokenService,\n protected appIdService: AppIdService,\n protected platformUtilsService: PlatformUtilsService,\n protected messagingService: MessagingService,\n protected logService: LogService,\n protected keyConnectorService: KeyConnectorService,\n protected environmentService: EnvironmentService,\n protected stateService: StateService,\n protected twoFactorService: TwoFactorService,\n protected i18nService: I18nService,\n protected encryptService: EncryptService,\n protected passwordStrengthService: PasswordStrengthServiceAbstraction,\n protected policyService: PolicyService,\n protected deviceTrustService: DeviceTrustServiceAbstraction,\n protected authRequestService: AuthRequestServiceAbstraction,\n protected userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n protected stateProvider: GlobalStateProvider,\n protected billingAccountProfileStateService: BillingAccountProfileStateService,\n protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n protected kdfConfigService: KdfConfigService,\n protected taskSchedulerService: TaskSchedulerService,\n ) {\n this.currentAuthnTypeState = this.stateProvider.get(CURRENT_LOGIN_STRATEGY_KEY);\n this.loginStrategyCacheState = this.stateProvider.get(CACHE_KEY);\n this.loginStrategyCacheExpirationState = this.stateProvider.get(CACHE_EXPIRATION_KEY);\n this.authRequestPushNotificationState = this.stateProvider.get(\n AUTH_REQUEST_PUSH_NOTIFICATION_KEY,\n );\n this.taskSchedulerService.registerTaskHandler(\n ScheduledTaskNames.loginStrategySessionTimeout,\n () => this.clearCache(),\n );\n\n this.currentAuthType$ = this.currentAuthnTypeState.state$;\n this.loginStrategy$ = this.currentAuthnTypeState.state$.pipe(\n distinctUntilChanged(),\n combineLatestWith(this.loginStrategyCacheState.state$),\n this.initializeLoginStrategy.bind(this),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n }\n\n async getEmail(): Promise {\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n if (\"email$\" in strategy) {\n return await firstValueFrom(strategy.email$);\n }\n return null;\n }\n\n async getMasterPasswordHash(): Promise {\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n if (\"serverMasterKeyHash$\" in strategy) {\n return await firstValueFrom(strategy.serverMasterKeyHash$);\n }\n return null;\n }\n\n async getSsoEmail2FaSessionToken(): Promise {\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n if (\"ssoEmail2FaSessionToken$\" in strategy) {\n return await firstValueFrom(strategy.ssoEmail2FaSessionToken$);\n }\n return null;\n }\n\n async getAccessCode(): Promise {\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n if (\"accessCode$\" in strategy) {\n return await firstValueFrom(strategy.accessCode$);\n }\n return null;\n }\n\n async getAuthRequestId(): Promise {\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n if (\"authRequestId$\" in strategy) {\n return await firstValueFrom(strategy.authRequestId$);\n }\n return null;\n }\n\n async logIn(\n credentials:\n | UserApiLoginCredentials\n | PasswordLoginCredentials\n | SsoLoginCredentials\n | AuthRequestLoginCredentials\n | WebAuthnLoginCredentials,\n ): Promise {\n await this.clearCache();\n\n await this.currentAuthnTypeState.update((_) => credentials.type);\n\n const strategy = await firstValueFrom(this.loginStrategy$);\n\n // Note: We aren't passing the credentials directly to the strategy since they are\n // created in the popup and can cause DeadObject references on Firefox.\n // This is a shallow copy, but use deep copy in future if objects are added to credentials\n // that were created in popup.\n // If the popup uses its own instance of this service, this can be removed.\n const ownedCredentials = { ...credentials };\n\n const result = await strategy.logIn(ownedCredentials as any);\n\n if (result != null && !result.requiresTwoFactor) {\n await this.clearCache();\n } else {\n // Cache the strategy data so we can attempt again later with 2fa. Cache supports different contexts\n await this.loginStrategyCacheState.update((_) => strategy.exportCache());\n await this.startSessionTimeout();\n }\n\n return result;\n }\n\n async logInTwoFactor(\n twoFactor: TokenTwoFactorRequest,\n captchaResponse: string,\n ): Promise {\n if (!(await this.isSessionValid())) {\n throw new Error(this.i18nService.t(\"sessionTimeout\"));\n }\n\n const strategy = await firstValueFrom(this.loginStrategy$);\n if (strategy == null) {\n throw new Error(\"No login strategy found.\");\n }\n\n try {\n const result = await strategy.logInTwoFactor(twoFactor, captchaResponse);\n\n // Only clear cache if 2FA token has been accepted, otherwise we need to be able to try again\n if (result != null && !result.requiresTwoFactor && !result.requiresCaptcha) {\n await this.clearCache();\n }\n return result;\n } catch (e) {\n // API exceptions are okay, but if there are any unhandled client-side errors then clear cache to be safe\n if (!(e instanceof ErrorResponse)) {\n await this.clearCache();\n }\n throw e;\n }\n }\n\n async makePreloginKey(masterPassword: string, email: string): Promise {\n email = email.trim().toLowerCase();\n let kdfConfig: KdfConfig = null;\n try {\n const preloginResponse = await this.apiService.postPrelogin(new PreloginRequest(email));\n if (preloginResponse != null) {\n kdfConfig =\n preloginResponse.kdf === KdfType.PBKDF2_SHA256\n ? new PBKDF2KdfConfig(preloginResponse.kdfIterations)\n : new Argon2KdfConfig(\n preloginResponse.kdfIterations,\n preloginResponse.kdfMemory,\n preloginResponse.kdfParallelism,\n );\n }\n } catch (e) {\n if (e == null || e.statusCode !== 404) {\n throw e;\n }\n }\n return await this.cryptoService.makeMasterKey(masterPassword, email, kdfConfig);\n }\n\n private async clearCache(): Promise {\n await this.currentAuthnTypeState.update((_) => null);\n await this.loginStrategyCacheState.update((_) => null);\n await this.clearSessionTimeout();\n }\n\n private async startSessionTimeout(): Promise {\n await this.clearSessionTimeout();\n\n // This Login Strategy Cache Expiration State value set here is used to clear the cache on re-init\n // of the application in the case where the timeout is terminated due to a closure of the application\n // window. The browser extension popup in particular is susceptible to this concern, as the user\n // is almost always likely to close the popup window before the session timeout is reached.\n await this.loginStrategyCacheExpirationState.update(\n (_) => new Date(Date.now() + sessionTimeoutLength),\n );\n this.sessionTimeoutSubscription = this.taskSchedulerService.setTimeout(\n ScheduledTaskNames.loginStrategySessionTimeout,\n sessionTimeoutLength,\n );\n }\n\n private async clearSessionTimeout(): Promise {\n await this.loginStrategyCacheExpirationState.update((_) => null);\n this.sessionTimeoutSubscription?.unsubscribe();\n }\n\n private async isSessionValid(): Promise {\n const cache = await firstValueFrom(this.loginStrategyCacheState.state$);\n if (cache == null) {\n return false;\n }\n\n // If the Login Strategy Cache Expiration State value is less than the current\n // datetime stamp, then the cache is invalid and should be cleared.\n const expiration = await firstValueFrom(this.loginStrategyCacheExpirationState.state$);\n if (expiration != null && expiration < new Date()) {\n await this.clearCache();\n return false;\n }\n return true;\n }\n\n private initializeLoginStrategy(\n source: Observable<[AuthenticationType | null, CacheData | null]>,\n ) {\n const sharedDeps: ConstructorParameters = [\n this.accountService,\n this.masterPasswordService,\n this.cryptoService,\n this.apiService,\n this.tokenService,\n this.appIdService,\n this.platformUtilsService,\n this.messagingService,\n this.logService,\n this.stateService,\n this.twoFactorService,\n this.userDecryptionOptionsService,\n this.billingAccountProfileStateService,\n this.vaultTimeoutSettingsService,\n this.kdfConfigService,\n ];\n\n return source.pipe(\n map(([strategy, data]) => {\n if (strategy == null) {\n return null;\n }\n switch (strategy) {\n case AuthenticationType.Password:\n return new PasswordLoginStrategy(\n data?.password,\n this.passwordStrengthService,\n this.policyService,\n this,\n ...sharedDeps,\n );\n case AuthenticationType.Sso:\n return new SsoLoginStrategy(\n data?.sso,\n this.keyConnectorService,\n this.deviceTrustService,\n this.authRequestService,\n this.i18nService,\n ...sharedDeps,\n );\n case AuthenticationType.UserApiKey:\n return new UserApiLoginStrategy(\n data?.userApiKey,\n this.environmentService,\n this.keyConnectorService,\n ...sharedDeps,\n );\n case AuthenticationType.AuthRequest:\n return new AuthRequestLoginStrategy(\n data?.authRequest,\n this.deviceTrustService,\n ...sharedDeps,\n );\n case AuthenticationType.WebAuthn:\n return new WebAuthnLoginStrategy(data?.webAuthn, ...sharedDeps);\n }\n }),\n );\n }\n}\n","import { map } from \"rxjs\";\n\nimport {\n ActiveUserState,\n StateProvider,\n USER_DECRYPTION_OPTIONS_DISK,\n UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/src/types/guid\";\n\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../../abstractions/user-decryption-options.service.abstraction\";\nimport { UserDecryptionOptions } from \"../../models\";\n\nexport const USER_DECRYPTION_OPTIONS = new UserKeyDefinition(\n USER_DECRYPTION_OPTIONS_DISK,\n \"decryptionOptions\",\n {\n deserializer: (decryptionOptions) => UserDecryptionOptions.fromJSON(decryptionOptions),\n clearOn: [\"logout\"],\n },\n);\n\nexport class UserDecryptionOptionsService\n implements InternalUserDecryptionOptionsServiceAbstraction\n{\n private userDecryptionOptionsState: ActiveUserState;\n\n userDecryptionOptions$;\n hasMasterPassword$;\n\n constructor(private stateProvider: StateProvider) {\n this.userDecryptionOptionsState = this.stateProvider.getActive(USER_DECRYPTION_OPTIONS);\n\n this.userDecryptionOptions$ = this.userDecryptionOptionsState.state$;\n this.hasMasterPassword$ = this.userDecryptionOptions$.pipe(\n map((options) => options?.hasMasterPassword ?? false),\n );\n }\n\n userDecryptionOptionsById$(userId: UserId) {\n return this.stateProvider.getUser(userId, USER_DECRYPTION_OPTIONS).state$;\n }\n\n async setUserDecryptionOptions(userDecryptionOptions: UserDecryptionOptions): Promise {\n await this.userDecryptionOptionsState.update((_) => userDecryptionOptions);\n }\n}\n","export class PasswordlessAuthRequest {\n constructor(\n readonly key: string,\n readonly masterPasswordHash: string,\n readonly deviceIdentifier: string,\n readonly requestApproved: boolean,\n ) {}\n}\n","import { Observable, Subject, firstValueFrom } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { PasswordlessAuthRequest } from \"@bitwarden/common/auth/models/request/passwordless-auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { AuthRequestPushNotification } from \"@bitwarden/common/models/response/notification.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoService } from \"@bitwarden/common/platform/abstractions/crypto.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport {\n AUTH_REQUEST_DISK_LOCAL,\n StateProvider,\n UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\n\nimport { AuthRequestServiceAbstraction } from \"../../abstractions/auth-request.service.abstraction\";\n\n/**\n * Disk-local to maintain consistency between tabs. We don't want to\n * clear this on logout since admin auth requests are long-lived.\n */\nexport const ADMIN_AUTH_REQUEST_KEY = new UserKeyDefinition>(\n AUTH_REQUEST_DISK_LOCAL,\n \"adminAuthRequest\",\n {\n deserializer: (value) => value,\n clearOn: [],\n },\n);\n\nexport class AuthRequestService implements AuthRequestServiceAbstraction {\n private authRequestPushNotificationSubject = new Subject();\n authRequestPushNotification$: Observable;\n\n constructor(\n private appIdService: AppIdService,\n private accountService: AccountService,\n private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n private cryptoService: CryptoService,\n private apiService: ApiService,\n private stateProvider: StateProvider,\n ) {\n this.authRequestPushNotification$ = this.authRequestPushNotificationSubject.asObservable();\n }\n\n async getAdminAuthRequest(userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required\");\n }\n\n const authRequestSerialized = await firstValueFrom(\n this.stateProvider.getUser(userId, ADMIN_AUTH_REQUEST_KEY).state$,\n );\n const adminAuthRequestStorable = AdminAuthRequestStorable.fromJSON(authRequestSerialized);\n return adminAuthRequestStorable;\n }\n\n async setAdminAuthRequest(authRequest: AdminAuthRequestStorable, userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required\");\n }\n if (authRequest == null) {\n throw new Error(\"Auth request is required\");\n }\n\n await this.stateProvider.setUserState(ADMIN_AUTH_REQUEST_KEY, authRequest.toJSON(), userId);\n }\n\n async clearAdminAuthRequest(userId: UserId): Promise {\n if (userId == null) {\n throw new Error(\"User ID is required\");\n }\n\n await this.stateProvider.setUserState(ADMIN_AUTH_REQUEST_KEY, null, userId);\n }\n\n async approveOrDenyAuthRequest(\n approve: boolean,\n authRequest: AuthRequestResponse,\n ): Promise {\n if (!authRequest.id) {\n throw new Error(\"Auth request has no id\");\n }\n if (!authRequest.publicKey) {\n throw new Error(\"Auth request has no public key\");\n }\n const pubKey = Utils.fromB64ToArray(authRequest.publicKey);\n\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n const masterKeyHash = await firstValueFrom(this.masterPasswordService.masterKeyHash$(userId));\n let encryptedMasterKeyHash;\n let keyToEncrypt;\n\n if (masterKey && masterKeyHash) {\n // Only encrypt the master password hash if masterKey exists as\n // we won't have a masterKeyHash without a masterKey\n encryptedMasterKeyHash = await this.cryptoService.rsaEncrypt(\n Utils.fromUtf8ToArray(masterKeyHash),\n pubKey,\n );\n keyToEncrypt = masterKey.encKey;\n } else {\n const userKey = await this.cryptoService.getUserKey();\n keyToEncrypt = userKey.key;\n }\n\n const encryptedKey = await this.cryptoService.rsaEncrypt(keyToEncrypt, pubKey);\n\n const response = new PasswordlessAuthRequest(\n encryptedKey.encryptedString,\n encryptedMasterKeyHash?.encryptedString,\n await this.appIdService.getAppId(),\n approve,\n );\n return await this.apiService.putAuthRequest(authRequest.id, response);\n }\n\n async setUserKeyAfterDecryptingSharedUserKey(\n authReqResponse: AuthRequestResponse,\n authReqPrivateKey: Uint8Array,\n ) {\n const userKey = await this.decryptPubKeyEncryptedUserKey(\n authReqResponse.key,\n authReqPrivateKey,\n );\n await this.cryptoService.setUserKey(userKey);\n }\n\n async setKeysAfterDecryptingSharedMasterKeyAndHash(\n authReqResponse: AuthRequestResponse,\n authReqPrivateKey: Uint8Array,\n ) {\n const { masterKey, masterKeyHash } = await this.decryptPubKeyEncryptedMasterKeyAndHash(\n authReqResponse.key,\n authReqResponse.masterPasswordHash,\n authReqPrivateKey,\n );\n\n // Decrypt and set user key in state\n const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey);\n\n // Set masterKey + masterKeyHash in state after decryption (in case decryption fails)\n const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n await this.masterPasswordService.setMasterKey(masterKey, userId);\n await this.masterPasswordService.setMasterKeyHash(masterKeyHash, userId);\n\n await this.cryptoService.setUserKey(userKey);\n }\n\n // Decryption helpers\n async decryptPubKeyEncryptedUserKey(\n pubKeyEncryptedUserKey: string,\n privateKey: Uint8Array,\n ): Promise {\n const decryptedUserKeyBytes = await this.cryptoService.rsaDecrypt(\n pubKeyEncryptedUserKey,\n privateKey,\n );\n\n return new SymmetricCryptoKey(decryptedUserKeyBytes) as UserKey;\n }\n\n async decryptPubKeyEncryptedMasterKeyAndHash(\n pubKeyEncryptedMasterKey: string,\n pubKeyEncryptedMasterKeyHash: string,\n privateKey: Uint8Array,\n ): Promise<{ masterKey: MasterKey; masterKeyHash: string }> {\n const decryptedMasterKeyArrayBuffer = await this.cryptoService.rsaDecrypt(\n pubKeyEncryptedMasterKey,\n privateKey,\n );\n\n const decryptedMasterKeyHashArrayBuffer = await this.cryptoService.rsaDecrypt(\n pubKeyEncryptedMasterKeyHash,\n privateKey,\n );\n\n const masterKey = new SymmetricCryptoKey(decryptedMasterKeyArrayBuffer) as MasterKey;\n const masterKeyHash = Utils.fromBufferToUtf8(decryptedMasterKeyHashArrayBuffer);\n\n return {\n masterKey,\n masterKeyHash,\n };\n }\n\n sendAuthRequestPushNotification(notification: AuthRequestPushNotification): void {\n if (notification.id != null) {\n this.authRequestPushNotificationSubject.next(notification.id);\n }\n }\n}\n","import { Observable, map } from \"rxjs\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\n// This is a temporary service to determine the correct route to use for registration based on the email verification feature flag.\nexport class RegisterRouteService {\n constructor(private configService: ConfigService) {}\n\n registerRoute$(): Observable {\n return this.configService.getFeatureFlag$(FeatureFlag.EmailVerification).pipe(\n map((emailVerificationEnabled) => {\n if (emailVerificationEnabled) {\n return \"/signup\";\n } else {\n return \"/register\";\n }\n }),\n );\n }\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nexport function decodeJwtTokenToJson(jwtToken: string): any {\n if (jwtToken == null) {\n throw new Error(\"JWT token not found\");\n }\n\n const parts = jwtToken.split(\".\");\n if (parts.length !== 3) {\n throw new Error(\"JWT must have 3 parts\");\n }\n\n // JWT has 3 parts: header, payload, signature separated by '.'\n // So, grab the payload to decode\n const encodedPayload = parts[1];\n\n let decodedPayloadJSON: string;\n try {\n // Attempt to decode from URL-safe Base64 to UTF-8\n decodedPayloadJSON = Utils.fromUrlB64ToUtf8(encodedPayload);\n } catch (decodingError) {\n throw new Error(\"Cannot decode the token\");\n }\n\n try {\n // Attempt to parse the JSON payload\n const decodedToken = JSON.parse(decodedPayloadJSON);\n return decodedToken;\n } catch (jsonError) {\n throw new Error(\"Cannot parse the token's payload into JSON\");\n }\n}\n","import { OrganizationConnectionType } from \"../admin-console/enums\";\nimport { OrganizationSponsorshipCreateRequest } from \"../admin-console/models/request/organization/organization-sponsorship-create.request\";\nimport { OrganizationSponsorshipRedeemRequest } from \"../admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { OrganizationConnectionRequest } from \"../admin-console/models/request/organization-connection.request\";\nimport { ProviderAddOrganizationRequest } from \"../admin-console/models/request/provider/provider-add-organization.request\";\nimport { ProviderOrganizationCreateRequest } from \"../admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderUserAcceptRequest } from \"../admin-console/models/request/provider/provider-user-accept.request\";\nimport { ProviderUserBulkConfirmRequest } from \"../admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"../admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"../admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserInviteRequest } from \"../admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"../admin-console/models/request/provider/provider-user-update.request\";\nimport { SelectionReadOnlyRequest } from \"../admin-console/models/request/selection-read-only.request\";\nimport {\n OrganizationConnectionConfigApis,\n OrganizationConnectionResponse,\n} from \"../admin-console/models/response/organization-connection.response\";\nimport { OrganizationExportResponse } from \"../admin-console/models/response/organization-export.response\";\nimport { OrganizationSponsorshipSyncStatusResponse } from \"../admin-console/models/response/organization-sponsorship-sync-status.response\";\nimport {\n ProviderOrganizationOrganizationDetailsResponse,\n ProviderOrganizationResponse,\n} from \"../admin-console/models/response/provider/provider-organization.response\";\nimport { ProviderUserBulkPublicKeyResponse } from \"../admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"../admin-console/models/response/provider/provider-user-bulk.response\";\nimport {\n ProviderUserResponse,\n ProviderUserUserDetailsResponse,\n} from \"../admin-console/models/response/provider/provider-user.response\";\nimport { SelectionReadOnlyResponse } from \"../admin-console/models/response/selection-read-only.response\";\nimport { CreateAuthRequest } from \"../auth/models/request/create-auth.request\";\nimport { DeviceVerificationRequest } from \"../auth/models/request/device-verification.request\";\nimport { EmailTokenRequest } from \"../auth/models/request/email-token.request\";\nimport { EmailRequest } from \"../auth/models/request/email.request\";\nimport { PasswordTokenRequest } from \"../auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"../auth/models/request/identity-token/sso-token.request\";\nimport { UserApiTokenRequest } from \"../auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"../auth/models/request/identity-token/webauthn-login-token.request\";\nimport { KeyConnectorUserKeyRequest } from \"../auth/models/request/key-connector-user-key.request\";\nimport { PasswordHintRequest } from \"../auth/models/request/password-hint.request\";\nimport { PasswordRequest } from \"../auth/models/request/password.request\";\nimport { PasswordlessAuthRequest } from \"../auth/models/request/passwordless-auth.request\";\nimport { SecretVerificationRequest } from \"../auth/models/request/secret-verification.request\";\nimport { SetKeyConnectorKeyRequest } from \"../auth/models/request/set-key-connector-key.request\";\nimport { SetPasswordRequest } from \"../auth/models/request/set-password.request\";\nimport { TwoFactorEmailRequest } from \"../auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviderRequest } from \"../auth/models/request/two-factor-provider.request\";\nimport { TwoFactorRecoveryRequest } from \"../auth/models/request/two-factor-recovery.request\";\nimport { UpdateProfileRequest } from \"../auth/models/request/update-profile.request\";\nimport { UpdateTempPasswordRequest } from \"../auth/models/request/update-temp-password.request\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"../auth/models/request/update-two-factor-authenticator.request\";\nimport { UpdateTwoFactorDuoRequest } from \"../auth/models/request/update-two-factor-duo.request\";\nimport { UpdateTwoFactorEmailRequest } from \"../auth/models/request/update-two-factor-email.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"../auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"../auth/models/request/update-two-factor-web-authn.request\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"../auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { ApiKeyResponse } from \"../auth/models/response/api-key.response\";\nimport { AuthRequestResponse } from \"../auth/models/response/auth-request.response\";\nimport { DeviceVerificationResponse } from \"../auth/models/response/device-verification.response\";\nimport { IdentityCaptchaResponse } from \"../auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"../auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"../auth/models/response/identity-two-factor.response\";\nimport { KeyConnectorUserKeyResponse } from \"../auth/models/response/key-connector-user-key.response\";\nimport { PreloginResponse } from \"../auth/models/response/prelogin.response\";\nimport { RegisterResponse } from \"../auth/models/response/register.response\";\nimport { SsoPreValidateResponse } from \"../auth/models/response/sso-pre-validate.response\";\nimport { TwoFactorAuthenticatorResponse } from \"../auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"../auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"../auth/models/response/two-factor-email.response\";\nimport { TwoFactorProviderResponse } from \"../auth/models/response/two-factor-provider.response\";\nimport { TwoFactorRecoverResponse } from \"../auth/models/response/two-factor-recover.response\";\nimport {\n ChallengeResponse,\n TwoFactorWebAuthnResponse,\n} from \"../auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"../auth/models/response/two-factor-yubi-key.response\";\nimport { BitPayInvoiceRequest } from \"../billing/models/request/bit-pay-invoice.request\";\nimport { PaymentRequest } from \"../billing/models/request/payment.request\";\nimport { TaxInfoUpdateRequest } from \"../billing/models/request/tax-info-update.request\";\nimport { BillingHistoryResponse } from \"../billing/models/response/billing-history.response\";\nimport { BillingPaymentResponse } from \"../billing/models/response/billing-payment.response\";\nimport { PaymentResponse } from \"../billing/models/response/payment.response\";\nimport { PlanResponse } from \"../billing/models/response/plan.response\";\nimport { SubscriptionResponse } from \"../billing/models/response/subscription.response\";\nimport { TaxInfoResponse } from \"../billing/models/response/tax-info.response\";\nimport { TaxRateResponse } from \"../billing/models/response/tax-rate.response\";\nimport { DeleteRecoverRequest } from \"../models/request/delete-recover.request\";\nimport { EventRequest } from \"../models/request/event.request\";\nimport { KdfRequest } from \"../models/request/kdf.request\";\nimport { KeysRequest } from \"../models/request/keys.request\";\nimport { OrganizationImportRequest } from \"../models/request/organization-import.request\";\nimport { PreloginRequest } from \"../models/request/prelogin.request\";\nimport { RegisterRequest } from \"../models/request/register.request\";\nimport { StorageRequest } from \"../models/request/storage.request\";\nimport { UpdateAvatarRequest } from \"../models/request/update-avatar.request\";\nimport { UpdateDomainsRequest } from \"../models/request/update-domains.request\";\nimport { VerifyDeleteRecoverRequest } from \"../models/request/verify-delete-recover.request\";\nimport { VerifyEmailRequest } from \"../models/request/verify-email.request\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { DomainsResponse } from \"../models/response/domains.response\";\nimport { EventResponse } from \"../models/response/event.response\";\nimport { ListResponse } from \"../models/response/list.response\";\nimport { ProfileResponse } from \"../models/response/profile.response\";\nimport { UserKeyResponse } from \"../models/response/user-key.response\";\nimport { SyncResponse } from \"../platform/sync\";\nimport { UserId } from \"../types/guid\";\nimport { AttachmentRequest } from \"../vault/models/request/attachment.request\";\nimport { CipherBulkDeleteRequest } from \"../vault/models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../vault/models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../vault/models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../vault/models/request/cipher-bulk-share.request\";\nimport { CipherCollectionsRequest } from \"../vault/models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../vault/models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../vault/models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../vault/models/request/cipher-share.request\";\nimport { CipherRequest } from \"../vault/models/request/cipher.request\";\nimport { CollectionRequest } from \"../vault/models/request/collection.request\";\nimport { AttachmentUploadDataResponse } from \"../vault/models/response/attachment-upload-data.response\";\nimport { AttachmentResponse } from \"../vault/models/response/attachment.response\";\nimport { CipherResponse } from \"../vault/models/response/cipher.response\";\nimport {\n CollectionAccessDetailsResponse,\n CollectionDetailsResponse,\n CollectionResponse,\n} from \"../vault/models/response/collection.response\";\nimport { OptionalCipherResponse } from \"../vault/models/response/optional-cipher.response\";\n\n/**\n * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual\n * api services. The `send` method is still allowed to be used within api services. For background\n * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service.\n */\nexport abstract class ApiService {\n send: (\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\",\n path: string,\n body: any,\n authed: boolean,\n hasResponse: boolean,\n apiUrl?: string,\n alterHeaders?: (headers: Headers) => void,\n ) => Promise;\n\n postIdentityToken: (\n request:\n | PasswordTokenRequest\n | SsoTokenRequest\n | UserApiTokenRequest\n | WebAuthnLoginTokenRequest,\n ) => Promise;\n refreshIdentityToken: () => Promise;\n\n getProfile: () => Promise;\n getUserSubscription: () => Promise;\n getTaxInfo: () => Promise;\n putProfile: (request: UpdateProfileRequest) => Promise;\n putAvatar: (request: UpdateAvatarRequest) => Promise;\n putTaxInfo: (request: TaxInfoUpdateRequest) => Promise;\n postPrelogin: (request: PreloginRequest) => Promise;\n postEmailToken: (request: EmailTokenRequest) => Promise;\n postEmail: (request: EmailRequest) => Promise;\n postPassword: (request: PasswordRequest) => Promise;\n setPassword: (request: SetPasswordRequest) => Promise;\n postSetKeyConnectorKey: (request: SetKeyConnectorKeyRequest) => Promise;\n postSecurityStamp: (request: SecretVerificationRequest) => Promise;\n getAccountRevisionDate: () => Promise;\n postPasswordHint: (request: PasswordHintRequest) => Promise;\n postRegister: (request: RegisterRequest) => Promise;\n postPremium: (data: FormData) => Promise;\n postReinstatePremium: () => Promise;\n postAccountStorage: (request: StorageRequest) => Promise;\n postAccountPayment: (request: PaymentRequest) => Promise;\n postAccountLicense: (data: FormData) => Promise;\n postAccountKeys: (request: KeysRequest) => Promise;\n postAccountVerifyEmail: () => Promise;\n postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise;\n postAccountRecoverDelete: (request: DeleteRecoverRequest) => Promise;\n postAccountRecoverDeleteToken: (request: VerifyDeleteRecoverRequest) => Promise;\n postAccountKdf: (request: KdfRequest) => Promise;\n postUserApiKey: (id: string, request: SecretVerificationRequest) => Promise;\n postUserRotateApiKey: (id: string, request: SecretVerificationRequest) => Promise;\n putUpdateTempPassword: (request: UpdateTempPasswordRequest) => Promise;\n postConvertToKeyConnector: () => Promise;\n //passwordless\n postAuthRequest: (request: CreateAuthRequest) => Promise;\n postAdminAuthRequest: (request: CreateAuthRequest) => Promise;\n getAuthResponse: (id: string, accessCode: string) => Promise;\n getAuthRequest: (id: string) => Promise;\n putAuthRequest: (id: string, request: PasswordlessAuthRequest) => Promise;\n getAuthRequests: () => Promise>;\n getLastAuthRequest: () => Promise;\n\n getUserBillingHistory: () => Promise;\n getUserBillingPayment: () => Promise;\n\n getCipher: (id: string) => Promise;\n getFullCipherDetails: (id: string) => Promise;\n getCipherAdmin: (id: string) => Promise;\n getAttachmentData: (\n cipherId: string,\n attachmentId: string,\n emergencyAccessId?: string,\n ) => Promise;\n getCiphersOrganization: (organizationId: string) => Promise>;\n postCipher: (request: CipherRequest) => Promise;\n postCipherCreate: (request: CipherCreateRequest) => Promise;\n postCipherAdmin: (request: CipherCreateRequest) => Promise;\n putCipher: (id: string, request: CipherRequest) => Promise;\n putPartialCipher: (id: string, request: CipherPartialRequest) => Promise;\n putCipherAdmin: (id: string, request: CipherRequest) => Promise;\n deleteCipher: (id: string) => Promise;\n deleteCipherAdmin: (id: string) => Promise;\n deleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise;\n deleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise;\n putMoveCiphers: (request: CipherBulkMoveRequest) => Promise;\n putShareCipher: (id: string, request: CipherShareRequest) => Promise;\n putShareCiphers: (request: CipherBulkShareRequest) => Promise;\n putCipherCollections: (\n id: string,\n request: CipherCollectionsRequest,\n ) => Promise;\n putCipherCollectionsAdmin: (id: string, request: CipherCollectionsRequest) => Promise;\n postPurgeCiphers: (request: SecretVerificationRequest, organizationId?: string) => Promise;\n putDeleteCipher: (id: string) => Promise;\n putDeleteCipherAdmin: (id: string) => Promise;\n putDeleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise;\n putDeleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise;\n putRestoreCipher: (id: string) => Promise;\n putRestoreCipherAdmin: (id: string) => Promise;\n putRestoreManyCiphers: (\n request: CipherBulkRestoreRequest,\n ) => Promise>;\n putRestoreManyCiphersAdmin: (\n request: CipherBulkRestoreRequest,\n ) => Promise>;\n\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n postCipherAttachmentLegacy: (id: string, data: FormData) => Promise;\n /**\n * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n * This method still exists for backward compatibility with old server versions.\n */\n postCipherAttachmentAdminLegacy: (id: string, data: FormData) => Promise;\n postCipherAttachment: (\n id: string,\n request: AttachmentRequest,\n ) => Promise;\n deleteCipherAttachment: (id: string, attachmentId: string) => Promise;\n deleteCipherAttachmentAdmin: (id: string, attachmentId: string) => Promise;\n postShareCipherAttachment: (\n id: string,\n attachmentId: string,\n data: FormData,\n organizationId: string,\n ) => Promise;\n renewAttachmentUploadUrl: (\n id: string,\n attachmentId: string,\n ) => Promise;\n postAttachmentFile: (id: string, attachmentId: string, data: FormData) => Promise;\n\n getUserCollections: () => Promise>;\n getCollections: (organizationId: string) => Promise>;\n getCollectionUsers: (organizationId: string, id: string) => Promise;\n getCollectionAccessDetails: (\n organizationId: string,\n id: string,\n ) => Promise;\n getManyCollectionsWithAccessDetails: (\n orgId: string,\n ) => Promise>;\n postCollection: (\n organizationId: string,\n request: CollectionRequest,\n ) => Promise;\n putCollectionUsers: (\n organizationId: string,\n id: string,\n request: SelectionReadOnlyRequest[],\n ) => Promise;\n putCollection: (\n organizationId: string,\n id: string,\n request: CollectionRequest,\n ) => Promise;\n deleteCollection: (organizationId: string, id: string) => Promise;\n deleteManyCollections: (organizationId: string, collectionIds: string[]) => Promise;\n deleteCollectionUser: (\n organizationId: string,\n id: string,\n organizationUserId: string,\n ) => Promise;\n\n getGroupUsers: (organizationId: string, id: string) => Promise;\n deleteGroupUser: (organizationId: string, id: string, organizationUserId: string) => Promise;\n\n getSync: () => Promise;\n postPublicImportDirectory: (request: OrganizationImportRequest) => Promise;\n\n getSettingsDomains: () => Promise;\n putSettingsDomains: (request: UpdateDomainsRequest) => Promise;\n\n getTwoFactorProviders: () => Promise>;\n getTwoFactorOrganizationProviders: (\n organizationId: string,\n ) => Promise>;\n getTwoFactorAuthenticator: (\n request: SecretVerificationRequest,\n ) => Promise;\n getTwoFactorEmail: (request: SecretVerificationRequest) => Promise;\n getTwoFactorDuo: (request: SecretVerificationRequest) => Promise;\n getTwoFactorOrganizationDuo: (\n organizationId: string,\n request: SecretVerificationRequest,\n ) => Promise;\n getTwoFactorYubiKey: (request: SecretVerificationRequest) => Promise;\n getTwoFactorWebAuthn: (request: SecretVerificationRequest) => Promise;\n getTwoFactorWebAuthnChallenge: (request: SecretVerificationRequest) => Promise;\n getTwoFactorRecover: (request: SecretVerificationRequest) => Promise;\n putTwoFactorAuthenticator: (\n request: UpdateTwoFactorAuthenticatorRequest,\n ) => Promise;\n putTwoFactorEmail: (request: UpdateTwoFactorEmailRequest) => Promise;\n putTwoFactorDuo: (request: UpdateTwoFactorDuoRequest) => Promise;\n putTwoFactorOrganizationDuo: (\n organizationId: string,\n request: UpdateTwoFactorDuoRequest,\n ) => Promise;\n putTwoFactorYubiKey: (\n request: UpdateTwoFactorYubikeyOtpRequest,\n ) => Promise;\n putTwoFactorWebAuthn: (\n request: UpdateTwoFactorWebAuthnRequest,\n ) => Promise;\n deleteTwoFactorWebAuthn: (\n request: UpdateTwoFactorWebAuthnDeleteRequest,\n ) => Promise;\n putTwoFactorDisable: (request: TwoFactorProviderRequest) => Promise;\n putTwoFactorOrganizationDisable: (\n organizationId: string,\n request: TwoFactorProviderRequest,\n ) => Promise;\n postTwoFactorRecover: (request: TwoFactorRecoveryRequest) => Promise;\n postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise;\n postTwoFactorEmail: (request: TwoFactorEmailRequest) => Promise;\n getDeviceVerificationSettings: () => Promise;\n putDeviceVerificationSettings: (\n request: DeviceVerificationRequest,\n ) => Promise;\n\n getCloudCommunicationsEnabled: () => Promise;\n abstract getOrganizationConnection(\n id: string,\n type: OrganizationConnectionType,\n configType: { new (response: any): TConfig },\n ): Promise>;\n abstract createOrganizationConnection(\n request: OrganizationConnectionRequest,\n configType: { new (response: any): TConfig },\n ): Promise>;\n abstract updateOrganizationConnection(\n request: OrganizationConnectionRequest,\n configType: { new (response: any): TConfig },\n organizationConnectionId: string,\n ): Promise>;\n deleteOrganizationConnection: (id: string) => Promise;\n getPlans: () => Promise>;\n getTaxRates: () => Promise>;\n\n getProviderUsers: (providerId: string) => Promise>;\n getProviderUser: (providerId: string, id: string) => Promise;\n postProviderUserInvite: (providerId: string, request: ProviderUserInviteRequest) => Promise;\n postProviderUserReinvite: (providerId: string, id: string) => Promise;\n postManyProviderUserReinvite: (\n providerId: string,\n request: ProviderUserBulkRequest,\n ) => Promise>;\n postProviderUserAccept: (\n providerId: string,\n id: string,\n request: ProviderUserAcceptRequest,\n ) => Promise;\n postProviderUserConfirm: (\n providerId: string,\n id: string,\n request: ProviderUserConfirmRequest,\n ) => Promise;\n postProviderUsersPublicKey: (\n providerId: string,\n request: ProviderUserBulkRequest,\n ) => Promise>;\n postProviderUserBulkConfirm: (\n providerId: string,\n request: ProviderUserBulkConfirmRequest,\n ) => Promise>;\n putProviderUser: (\n providerId: string,\n id: string,\n request: ProviderUserUpdateRequest,\n ) => Promise;\n deleteProviderUser: (organizationId: string, id: string) => Promise;\n deleteManyProviderUsers: (\n providerId: string,\n request: ProviderUserBulkRequest,\n ) => Promise>;\n getProviderClients: (\n providerId: string,\n ) => Promise>;\n postProviderAddOrganization: (\n providerId: string,\n request: ProviderAddOrganizationRequest,\n ) => Promise;\n postProviderCreateOrganization: (\n providerId: string,\n request: ProviderOrganizationCreateRequest,\n ) => Promise;\n deleteProviderOrganization: (providerId: string, organizationId: string) => Promise;\n\n getEvents: (start: string, end: string, token: string) => Promise>;\n getEventsCipher: (\n id: string,\n start: string,\n end: string,\n token: string,\n ) => Promise>;\n getEventsOrganization: (\n id: string,\n start: string,\n end: string,\n token: string,\n ) => Promise>;\n getEventsOrganizationUser: (\n organizationId: string,\n id: string,\n start: string,\n end: string,\n token: string,\n ) => Promise>;\n getEventsProvider: (\n id: string,\n start: string,\n end: string,\n token: string,\n ) => Promise>;\n getEventsProviderUser: (\n providerId: string,\n id: string,\n start: string,\n end: string,\n token: string,\n ) => Promise>;\n\n /**\n * Posts events for a user\n * @param request The array of events to upload\n * @param userId The optional user id the events belong to. If no user id is provided the active user id is used.\n */\n postEventsCollect: (request: EventRequest[], userId?: UserId) => Promise;\n\n deleteSsoUser: (organizationId: string) => Promise;\n getSsoUserIdentifier: () => Promise;\n\n getUserPublicKey: (id: string) => Promise;\n\n getHibpBreach: (username: string) => Promise;\n\n postBitPayInvoice: (request: BitPayInvoiceRequest) => Promise;\n postSetupPayment: () => Promise;\n\n getActiveBearerToken: () => Promise;\n fetch: (request: Request) => Promise;\n nativeFetch: (request: Request) => Promise;\n\n preValidateSso: (identifier: string) => Promise;\n\n postCreateSponsorship: (\n sponsorshipOrgId: string,\n request: OrganizationSponsorshipCreateRequest,\n ) => Promise;\n getSponsorshipSyncStatus: (\n sponsoredOrgId: string,\n ) => Promise;\n deleteRevokeSponsorship: (sponsoringOrganizationId: string) => Promise;\n deleteRemoveSponsorship: (sponsoringOrgId: string) => Promise;\n postPreValidateSponsorshipToken: (sponsorshipToken: string) => Promise;\n postRedeemSponsorship: (\n sponsorshipToken: string,\n request: OrganizationSponsorshipRedeemRequest,\n ) => Promise;\n postResendSponsorshipOffer: (sponsoringOrgId: string) => Promise;\n\n getMasterKeyFromKeyConnector: (keyConnectorUrl: string) => Promise;\n postUserKeyToKeyConnector: (\n keyConnectorUrl: string,\n request: KeyConnectorUserKeyRequest,\n ) => Promise;\n getKeyConnectorAlive: (keyConnectorUrl: string) => Promise;\n getOrganizationExport: (organizationId: string) => Promise;\n}\n","import { BreachAccountResponse } from \"../models/response/breach-account.response\";\n\nexport abstract class AuditService {\n passwordLeaked: (password: string) => Promise;\n breachedAccounts: (username: string) => Promise;\n}\n","import { EventType } from \"../../enums\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nexport abstract class EventCollectionService {\n collectMany: (\n eventType: EventType,\n ciphers: CipherView[],\n uploadImmediately?: boolean,\n ) => Promise;\n collect: (\n eventType: EventType,\n cipherId?: string,\n uploadImmediately?: boolean,\n organizationId?: string,\n ) => Promise;\n}\n","import { UserId } from \"../../types/guid\";\n\nexport abstract class EventUploadService {\n uploadEvents: (userId?: UserId) => Promise;\n}\n","export abstract class NotificationsService {\n init: () => Promise;\n updateConnection: (sync?: boolean) => Promise;\n reconnectFromActivity: () => Promise;\n disconnectFromInactivity: () => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { SendView } from \"../tools/send/models/view/send.view\";\nimport { IndexedEntityId } from \"../types/guid\";\nimport { CipherView } from \"../vault/models/view/cipher.view\";\n\nexport abstract class SearchService {\n indexedEntityId$: Observable;\n\n clearIndex: () => Promise;\n isSearchable: (query: string) => Promise;\n indexCiphers: (ciphersToIndex: CipherView[], indexedEntityGuid?: string) => Promise;\n searchCiphers: (\n query: string,\n filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],\n ciphers?: CipherView[],\n ) => Promise;\n searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];\n searchSends: (sends: SendView[], query: string) => SendView[];\n}\n","import { Observable } from \"rxjs\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\n\nexport abstract class VaultTimeoutSettingsService {\n /**\n * Set the vault timeout options for the user\n * @param vaultTimeout The vault timeout in minutes\n * @param vaultTimeoutAction The vault timeout action\n * @param userId The user id to set the data for.\n */\n setVaultTimeoutOptions: (\n userId: UserId,\n vaultTimeout: VaultTimeout,\n vaultTimeoutAction: VaultTimeoutAction,\n ) => Promise;\n\n /**\n * Get the available vault timeout actions for the current user\n *\n * **NOTE:** This observable is not yet connected to the state service, so it will not update when the state changes\n * @param userId The user id to check. If not provided, the current user is used\n */\n availableVaultTimeoutActions$: (userId?: string) => Observable;\n\n /**\n * Gets the vault timeout action for the given user id. The returned value is\n * calculated based on the current state, if a max vault timeout policy applies to the user,\n * and what the user's available unlock methods are.\n *\n * A new action will be emitted if the current state changes or if the user's policy changes and the new policy affects the action.\n * @param userId - the user id to get the vault timeout action for\n */\n getVaultTimeoutActionByUserId$: (userId: string) => Observable;\n\n /**\n * Get the vault timeout for the given user id. The returned value is calculated based on the current state\n * and if a max vault timeout policy applies to the user.\n *\n * A new timeout will be emitted if the current state changes or if the user's policy changes and the new policy affects the timeout.\n * @param userId The user id to get the vault timeout for\n */\n getVaultTimeoutByUserId$: (userId: string) => Observable;\n\n /**\n * Has the user enabled unlock with Biometric.\n * @param userId The user id to check. If not provided, the current user is used\n * @returns boolean true if biometric lock is set\n */\n isBiometricLockSet: (userId?: string) => Promise;\n\n clear: (userId?: string) => Promise;\n}\n","export abstract class VaultTimeoutService {\n checkVaultTimeout: () => Promise;\n lock: (userId?: string) => Promise;\n logOut: (userId?: string) => Promise;\n}\n","import { OrganizationDomainRequest } from \"../../services/organization-domain/requests/organization-domain.request\";\n\nimport { OrganizationDomainSsoDetailsResponse } from \"./responses/organization-domain-sso-details.response\";\nimport { OrganizationDomainResponse } from \"./responses/organization-domain.response\";\n\nexport abstract class OrgDomainApiServiceAbstraction {\n getAllByOrgId: (orgId: string) => Promise>;\n getByOrgIdAndOrgDomainId: (\n orgId: string,\n orgDomainId: string,\n ) => Promise;\n post: (\n orgId: string,\n orgDomain: OrganizationDomainRequest,\n ) => Promise;\n verify: (orgId: string, orgDomainId: string) => Promise;\n delete: (orgId: string, orgDomainId: string) => Promise;\n getClaimedOrgDomainByEmail: (email: string) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { OrganizationDomainResponse } from \"./responses/organization-domain.response\";\n\nexport abstract class OrgDomainServiceAbstraction {\n orgDomains$: Observable;\n\n get: (orgDomainId: string) => OrganizationDomainResponse;\n\n copyDnsTxt: (dnsTxt: string) => void;\n}\n\n// Note: this separate class is designed to hold methods that are not\n// meant to be used in components (e.g., data write methods)\nexport abstract class OrgDomainInternalServiceAbstraction extends OrgDomainServiceAbstraction {\n upsert: (orgDomains: OrganizationDomainResponse[]) => void;\n replace: (orgDomains: OrganizationDomainResponse[]) => void;\n clearCache: () => void;\n delete: (orgDomainIds: string[]) => void;\n}\n","import { Observable } from \"rxjs\";\n\n/**\n * Manages the state of a single organization management preference.\n * Can be used to subscribe to or update a given property.\n */\nexport class OrganizationManagementPreference {\n state$: Observable;\n set: (value: T) => Promise;\n\n constructor(state$: Observable, setFn: (value: T) => Promise) {\n this.state$ = state$;\n this.set = setFn;\n }\n}\n\n/**\n * Publishes state of a given user's personal settings relating to the user experience of managing an organization.\n */\nexport abstract class OrganizationManagementPreferencesService {\n autoConfirmFingerPrints: OrganizationManagementPreference;\n}\n","import { ListResponse } from \"../../../models/response/list.response\";\n\nimport {\n OrganizationUserAcceptInitRequest,\n OrganizationUserAcceptRequest,\n OrganizationUserBulkConfirmRequest,\n OrganizationUserConfirmRequest,\n OrganizationUserInviteRequest,\n OrganizationUserResetPasswordEnrollmentRequest,\n OrganizationUserResetPasswordRequest,\n OrganizationUserUpdateRequest,\n} from \"./requests\";\nimport {\n OrganizationUserBulkPublicKeyResponse,\n OrganizationUserBulkResponse,\n OrganizationUserDetailsResponse,\n OrganizationUserResetPasswordDetailsResponse,\n OrganizationUserUserDetailsResponse,\n} from \"./responses\";\n\n/**\n * Service for interacting with Organization Users via the API\n */\nexport abstract class OrganizationUserService {\n /**\n * Retrieve a single organization user by Id\n * @param organizationId - Identifier for the user's organization\n * @param id - Organization user identifier\n * @param options - Options for the request\n */\n abstract getOrganizationUser(\n organizationId: string,\n id: string,\n options?: {\n includeGroups?: boolean;\n },\n ): Promise;\n\n /**\n * Retrieve a list of groups Ids the specified organization user belongs to\n * @param organizationId - Identifier for the user's organization\n * @param id - Organization user identifier\n */\n abstract getOrganizationUserGroups(organizationId: string, id: string): Promise;\n\n /**\n * Retrieve a list of all users that belong to the specified organization\n * @param organizationId - Identifier for the organization\n * @param options - Options for the request\n */\n abstract getAllUsers(\n organizationId: string,\n options?: {\n includeCollections?: boolean;\n includeGroups?: boolean;\n },\n ): Promise>;\n\n /**\n * Retrieve reset password details for the specified organization user\n * @param organizationId - Identifier for the user's organization\n * @param id - Organization user identifier\n */\n abstract getOrganizationUserResetPasswordDetails(\n organizationId: string,\n id: string,\n ): Promise;\n\n /**\n * Retrieve reset password details for many organization users\n * @param organizationId - Identifier for the organization\n * @param ids - A list of organization user identifiers\n */\n abstract getManyOrganizationUserAccountRecoveryDetails(\n organizationId: string,\n ids: string[],\n ): Promise>;\n\n /**\n * Create new organization user invite(s) for the specified organization\n * @param organizationId - Identifier for the organization\n * @param request - New user invitation request details\n */\n abstract postOrganizationUserInvite(\n organizationId: string,\n request: OrganizationUserInviteRequest,\n ): Promise;\n\n /**\n * Re-invite the specified organization user\n * @param organizationId - Identifier for the user's organization\n * @param id - Organization user identifier\n */\n abstract postOrganizationUserReinvite(organizationId: string, id: string): Promise;\n\n /**\n * Re-invite many organization users for the specified organization\n * @param organizationId - Identifier for the organization\n * @param ids - A list of organization user identifiers\n * @return List of user ids, including both those that were successfully re-invited and those that had an error\n */\n abstract postManyOrganizationUserReinvite(\n organizationId: string,\n ids: string[],\n ): Promise>;\n\n /**\n * Accept an invitation to initialize and join an organization created via the Admin Portal **only**.\n * This is only used once for the initial Owner, because it also creates the organization's encryption keys.\n * This should not be used for organizations created via the Web client.\n * @param organizationId - Identifier for the organization to accept\n * @param id - Organization user identifier\n * @param request - Request details for accepting the invitation\n */\n abstract postOrganizationUserAcceptInit(\n organizationId: string,\n id: string,\n request: OrganizationUserAcceptInitRequest,\n ): Promise;\n\n /**\n * Accept an organization user invitation\n * @param organizationId - Identifier for the organization to accept\n * @param id - Organization user identifier\n * @param request - Request details for accepting the invitation\n */\n abstract postOrganizationUserAccept(\n organizationId: string,\n id: string,\n request: OrganizationUserAcceptRequest,\n ): Promise;\n\n /**\n * Confirm an organization user that has accepted their invitation\n * @param organizationId - Identifier for the organization to confirm\n * @param id - Organization user identifier\n * @param request - Request details for confirming the user\n */\n abstract postOrganizationUserConfirm(\n organizationId: string,\n id: string,\n request: OrganizationUserConfirmRequest,\n ): Promise;\n\n /**\n * Retrieve a list of the specified users' public keys\n * @param organizationId - Identifier for the organization to accept\n * @param ids - A list of organization user identifiers to retrieve public keys for\n */\n abstract postOrganizationUsersPublicKey(\n organizationId: string,\n ids: string[],\n ): Promise>;\n\n /**\n * Confirm many organization users that have accepted their invitations\n * @param organizationId - Identifier for the organization to confirm users\n * @param request - Bulk request details for confirming the user\n */\n abstract postOrganizationUserBulkConfirm(\n organizationId: string,\n request: OrganizationUserBulkConfirmRequest,\n ): Promise>;\n\n /**\n * Update an organization users\n * @param organizationId - Identifier for the organization the user belongs to\n * @param id - Organization user identifier\n * @param request - Request details for updating the user\n */\n abstract putOrganizationUser(\n organizationId: string,\n id: string,\n request: OrganizationUserUpdateRequest,\n ): Promise;\n\n /**\n * Update an organization user's reset password enrollment\n * @param organizationId - Identifier for the organization the user belongs to\n * @param userId - Organization user identifier\n * @param request - Reset password enrollment details\n */\n abstract putOrganizationUserResetPasswordEnrollment(\n organizationId: string,\n userId: string,\n request: OrganizationUserResetPasswordEnrollmentRequest,\n ): Promise;\n\n /**\n * Reset an organization user's password\n * @param organizationId - Identifier for the organization the user belongs to\n * @param id - Organization user identifier\n * @param request - Reset password details\n */\n abstract putOrganizationUserResetPassword(\n organizationId: string,\n id: string,\n request: OrganizationUserResetPasswordRequest,\n ): Promise;\n\n /**\n * Enable Secrets Manager for many users\n * @param organizationId - Identifier for the organization the user belongs to\n * @param ids - List of organization user identifiers to enable\n * @return List of user ids, including both those that were successfully enabled and those that had an error\n */\n abstract putOrganizationUserBulkEnableSecretsManager(\n organizationId: string,\n ids: string[],\n ): Promise;\n\n /**\n * Delete an organization user\n * @param organizationId - Identifier for the organization the user belongs to\n * @param id - Organization user identifier\n */\n abstract deleteOrganizationUser(organizationId: string, id: string): Promise;\n\n /**\n * Delete many organization users\n * @param organizationId - Identifier for the organization the users belongs to\n * @param ids - List of organization user identifiers to delete\n * @return List of user ids, including both those that were successfully deleted and those that had an error\n */\n abstract deleteManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise>;\n\n /**\n * Revoke an organization user's access to the organization\n * @param organizationId - Identifier for the organization the user belongs to\n * @param id - Organization user identifier\n */\n abstract revokeOrganizationUser(organizationId: string, id: string): Promise;\n\n /**\n * Revoke many organization users' access to the organization\n * @param organizationId - Identifier for the organization the users belongs to\n * @param ids - List of organization user identifiers to revoke\n * @return List of user ids, including both those that were successfully revoked and those that had an error\n */\n abstract revokeManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise>;\n\n /**\n * Restore an organization user's access to the organization\n * @param organizationId - Identifier for the organization the user belongs to\n * @param id - Organization user identifier\n */\n abstract restoreOrganizationUser(organizationId: string, id: string): Promise;\n\n /**\n * Restore many organization users' access to the organization\n * @param organizationId - Identifier for the organization the users belongs to\n * @param ids - List of organization user identifiers to restore\n * @return List of user ids, including both those that were successfully restored and those that had an error\n */\n abstract restoreManyOrganizationUsers(\n organizationId: string,\n ids: string[],\n ): Promise>;\n}\n","import { SecretVerificationRequest } from \"../../../../auth/models/request/secret-verification.request\";\n\nexport class OrganizationUserResetPasswordEnrollmentRequest extends SecretVerificationRequest {\n resetPasswordKey: string;\n}\n\nexport class OrganizationUserResetPasswordWithIdRequest extends OrganizationUserResetPasswordEnrollmentRequest {\n organizationId: string;\n}\n","export class OrganizationUserResetPasswordRequest {\n newMasterPasswordHash: string;\n key: string;\n}\n","import { BillingHistoryResponse } from \"@bitwarden/common/billing/models/response/billing-history.response\";\n\nimport { OrganizationApiKeyRequest } from \"../../../admin-console/models/request/organization-api-key.request\";\nimport { OrganizationSsoRequest } from \"../../../auth/models/request/organization-sso.request\";\nimport { SecretVerificationRequest } from \"../../../auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"../../../auth/models/response/api-key.response\";\nimport { OrganizationSsoResponse } from \"../../../auth/models/response/organization-sso.response\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../../billing/models/request/expanded-tax-info-update.request\";\nimport { OrganizationSmSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-sm-subscription-update.request\";\nimport { OrganizationSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-subscription-update.request\";\nimport { PaymentRequest } from \"../../../billing/models/request/payment.request\";\nimport { SecretsManagerSubscribeRequest } from \"../../../billing/models/request/sm-subscribe.request\";\nimport { BillingResponse } from \"../../../billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"../../../billing/models/response/organization-subscription.response\";\nimport { PaymentResponse } from \"../../../billing/models/response/payment.response\";\nimport { TaxInfoResponse } from \"../../../billing/models/response/tax-info.response\";\nimport { ImportDirectoryRequest } from \"../../../models/request/import-directory.request\";\nimport { SeatRequest } from \"../../../models/request/seat.request\";\nimport { StorageRequest } from \"../../../models/request/storage.request\";\nimport { VerifyBankRequest } from \"../../../models/request/verify-bank.request\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { OrganizationApiKeyType } from \"../../enums\";\nimport { OrganizationCollectionManagementUpdateRequest } from \"../../models/request/organization-collection-management-update.request\";\nimport { OrganizationCreateRequest } from \"../../models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../models/request/organization-keys.request\";\nimport { OrganizationUpdateRequest } from \"../../models/request/organization-update.request\";\nimport { OrganizationUpgradeRequest } from \"../../models/request/organization-upgrade.request\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"../../models/request/organization-verify-delete-recover.request\";\nimport { OrganizationApiKeyInformationResponse } from \"../../models/response/organization-api-key-information.response\";\nimport { OrganizationAutoEnrollStatusResponse } from \"../../models/response/organization-auto-enroll-status.response\";\nimport { OrganizationKeysResponse } from \"../../models/response/organization-keys.response\";\nimport { OrganizationResponse } from \"../../models/response/organization.response\";\nimport { ProfileOrganizationResponse } from \"../../models/response/profile-organization.response\";\n\nexport class OrganizationApiServiceAbstraction {\n get: (id: string) => Promise;\n getBilling: (id: string) => Promise;\n getBillingHistory: (id: string) => Promise;\n getSubscription: (id: string) => Promise;\n getLicense: (id: string, installationId: string) => Promise;\n getAutoEnrollStatus: (identifier: string) => Promise;\n create: (request: OrganizationCreateRequest) => Promise;\n createLicense: (data: FormData) => Promise;\n save: (id: string, request: OrganizationUpdateRequest) => Promise;\n updatePayment: (id: string, request: PaymentRequest) => Promise;\n upgrade: (id: string, request: OrganizationUpgradeRequest) => Promise;\n updatePasswordManagerSeats: (\n id: string,\n request: OrganizationSubscriptionUpdateRequest,\n ) => Promise;\n updateSecretsManagerSubscription: (\n id: string,\n request: OrganizationSmSubscriptionUpdateRequest,\n ) => Promise;\n updateSeats: (id: string, request: SeatRequest) => Promise;\n updateStorage: (id: string, request: StorageRequest) => Promise;\n verifyBank: (id: string, request: VerifyBankRequest) => Promise;\n reinstate: (id: string) => Promise;\n leave: (id: string) => Promise;\n delete: (id: string, request: SecretVerificationRequest) => Promise;\n deleteUsingToken: (\n organizationId: string,\n request: OrganizationVerifyDeleteRecoverRequest,\n ) => Promise;\n updateLicense: (id: string, data: FormData) => Promise;\n importDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise;\n getOrCreateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise;\n getApiKeyInformation: (\n id: string,\n organizationApiKeyType?: OrganizationApiKeyType,\n ) => Promise>;\n rotateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise;\n getTaxInfo: (id: string) => Promise;\n updateTaxInfo: (id: string, request: ExpandedTaxInfoUpdateRequest) => Promise;\n getKeys: (id: string) => Promise;\n updateKeys: (id: string, request: OrganizationKeysRequest) => Promise;\n getSso: (id: string) => Promise;\n updateSso: (id: string, request: OrganizationSsoRequest) => Promise;\n selfHostedSyncLicense: (id: string) => Promise;\n subscribeToSecretsManager: (\n id: string,\n request: SecretsManagerSubscribeRequest,\n ) => Promise;\n updateCollectionManagement: (\n id: string,\n request: OrganizationCollectionManagementUpdateRequest,\n ) => Promise;\n}\n","import { map, Observable } from \"rxjs\";\n\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { UserId } from \"../../../types/guid\";\nimport { OrganizationData } from \"../../models/data/organization.data\";\nimport { Organization } from \"../../models/domain/organization\";\n\nexport function canAccessVaultTab(org: Organization): boolean {\n return org.canViewAllCollections;\n}\n\nexport function canAccessSettingsTab(org: Organization): boolean {\n return (\n org.isOwner ||\n org.canManagePolicies ||\n org.canManageSso ||\n org.canManageScim ||\n org.canAccessImportExport ||\n org.canManageDeviceApprovals\n );\n}\n\nexport function canAccessMembersTab(org: Organization): boolean {\n return org.canManageUsers || org.canManageUsersPassword;\n}\n\nexport function canAccessGroupsTab(org: Organization): boolean {\n return org.canManageGroups;\n}\n\nexport function canAccessReportingTab(org: Organization): boolean {\n return org.canAccessReports || org.canAccessEventLogs;\n}\n\nexport function canAccessBillingTab(org: Organization): boolean {\n return org.isOwner;\n}\n\nexport function canAccessOrgAdmin(org: Organization): boolean {\n // Admin console can only be accessed by Owners for disabled organizations\n if (!org.enabled && !org.isOwner) {\n return false;\n }\n return (\n canAccessMembersTab(org) ||\n canAccessGroupsTab(org) ||\n canAccessReportingTab(org) ||\n canAccessBillingTab(org) ||\n canAccessSettingsTab(org) ||\n canAccessVaultTab(org)\n );\n}\n\nexport function getOrganizationById(id: string) {\n return map((orgs) => orgs.find((o) => o.id === id));\n}\n\nexport function canAccessAdmin(i18nService: I18nService) {\n return map((orgs) =>\n orgs.filter(canAccessOrgAdmin).sort(Utils.getSortFunction(i18nService, \"name\")),\n );\n}\n\n/**\n * @deprecated\n * To be removed after Flexible Collections.\n **/\nexport function canAccessImportExport(i18nService: I18nService) {\n return map((orgs) =>\n orgs\n .filter((org) => org.canAccessImportExport)\n .sort(Utils.getSortFunction(i18nService, \"name\")),\n );\n}\n\nexport function canAccessImport(i18nService: I18nService) {\n return map((orgs) =>\n orgs\n .filter((org) => org.canAccessImportExport || org.canCreateNewCollections)\n .sort(Utils.getSortFunction(i18nService, \"name\")),\n );\n}\n\n/**\n * Returns `true` if a user is a member of an organization (rather than only being a ProviderUser)\n * @deprecated Use organizationService.organizations$ with a filter instead\n */\nexport function isMember(org: Organization): boolean {\n return org.isMember;\n}\n\n/**\n * Publishes an observable stream of organizations. This service is meant to\n * be used widely across Bitwarden as the primary way of fetching organizations.\n * Risky operations like updates are isolated to the\n * internal extension `InternalOrganizationServiceAbstraction`.\n */\nexport abstract class OrganizationService {\n /**\n * Publishes state for all organizations under the active user.\n * @returns An observable list of organizations\n */\n organizations$: Observable;\n\n // @todo Clean these up. Continuing to expand them is not recommended.\n // @see https://bitwarden.atlassian.net/browse/AC-2252\n memberOrganizations$: Observable;\n /**\n * @deprecated This is currently only used in the CLI, and should not be\n * used in any new calls. Use get$ instead for the time being, and we'll be\n * removing this method soon. See Jira for details:\n * https://bitwarden.atlassian.net/browse/AC-2252.\n */\n getFromState: (id: string) => Promise;\n canManageSponsorships$: Observable;\n hasOrganizations: () => Promise;\n get$: (id: string) => Observable;\n get: (id: string) => Promise;\n /**\n * @deprecated This method is only used in key connector and will be removed soon as part of https://bitwarden.atlassian.net/browse/AC-2252.\n */\n getAll: (userId?: string) => Promise;\n\n /**\n * Publishes state for all organizations for the given user id or the active user.\n */\n getAll$: (userId?: UserId) => Observable;\n}\n\n/**\n * Big scary buttons that **update** organization state. These should only be\n * called from within admin-console scoped code. Extends the base\n * `OrganizationService` for easy access to `get` calls.\n * @internal\n */\nexport abstract class InternalOrganizationServiceAbstraction extends OrganizationService {\n /**\n * Replaces state for the provided organization, or creates it if not found.\n * @param organization The organization state being saved.\n * @param userId The userId to replace state for. Defaults to the active\n * user.\n */\n upsert: (OrganizationData: OrganizationData) => Promise;\n\n /**\n * Replaces state for the entire registered organization list for the active user.\n * You probably don't want this unless you're calling from a full sync\n * operation or a logout. See `upsert` for creating & updating a single\n * organization in the state.\n * @param organizations A complete list of all organization state for the active\n * user.\n * @param userId The userId to replace state for. Defaults to the active\n * user.\n */\n replace: (organizations: { [id: string]: OrganizationData }, userId?: UserId) => Promise;\n}\n","import { ListResponse } from \"../../../models/response/list.response\";\nimport { PolicyType } from \"../../enums\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { PolicyRequest } from \"../../models/request/policy.request\";\nimport { PolicyResponse } from \"../../models/response/policy.response\";\n\nexport class PolicyApiServiceAbstraction {\n getPolicy: (organizationId: string, type: PolicyType) => Promise;\n getPolicies: (organizationId: string) => Promise>;\n\n getPoliciesByToken: (\n organizationId: string,\n token: string,\n email: string,\n organizationUserId: string,\n ) => Promise;\n\n getMasterPasswordPolicyOptsForOrgUser: (orgId: string) => Promise;\n putPolicy: (organizationId: string, type: PolicyType, request: PolicyRequest) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { ResetPasswordPolicyOptions } from \"../../models/domain/reset-password-policy-options\";\n\nexport abstract class PolicyService {\n /**\n * All policies for the active user from sync data.\n * May include policies that are disabled or otherwise do not apply to the user. Be careful using this!\n * Consider using {@link get$} or {@link getAll$} instead, which will only return policies that should be enforced against the user.\n */\n policies$: Observable;\n\n /**\n * @returns the first {@link Policy} found that applies to the active user.\n * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n * @param policyType the {@link PolicyType} to search for\n * @see {@link getAll$} if you need all policies of a given type\n */\n get$: (policyType: PolicyType) => Observable;\n\n /**\n * @returns all {@link Policy} objects of a given type that apply to the specified user (or the active user if not specified).\n * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n * @param policyType the {@link PolicyType} to search for\n */\n getAll$: (policyType: PolicyType, userId?: UserId) => Observable;\n\n /**\n * All {@link Policy} objects for the specified user (from sync data).\n * May include policies that are disabled or otherwise do not apply to the user.\n * Consider using {@link getAll$} instead, which will only return policies that should be enforced against the user.\n */\n getAll: (policyType: PolicyType) => Promise;\n\n /**\n * @returns true if a policy of the specified type applies to the active user, otherwise false.\n * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n * This does not take into account the policy's configuration - if that is important, use {@link getAll$} to get the\n * {@link Policy} objects and then filter by Policy.data.\n */\n policyAppliesToActiveUser$: (policyType: PolicyType) => Observable;\n\n policyAppliesToUser: (policyType: PolicyType) => Promise;\n\n // Policy specific interfaces\n\n /**\n * Combines all Master Password policies that apply to the user.\n * @returns a set of options which represent the minimum Master Password settings that the user must\n * comply with in order to comply with **all** Master Password policies.\n */\n masterPasswordPolicyOptions$: (policies?: Policy[]) => Observable;\n\n /**\n * Evaluates whether a proposed Master Password complies with all Master Password policies that apply to the user.\n */\n evaluateMasterPassword: (\n passwordStrength: number,\n newPassword: string,\n enforcedPolicyOptions?: MasterPasswordPolicyOptions,\n ) => boolean;\n\n /**\n * @returns Reset Password policy options for the specified organization and a boolean indicating whether the policy\n * is enabled\n */\n getResetPasswordPolicyOptions: (\n policies: Policy[],\n orgId: string,\n ) => [ResetPasswordPolicyOptions, boolean];\n}\n\nexport abstract class InternalPolicyService extends PolicyService {\n upsert: (policy: PolicyData) => Promise;\n replace: (policies: { [id: string]: PolicyData }) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { ProviderData } from \"../models/data/provider.data\";\nimport { Provider } from \"../models/domain/provider\";\n\nexport abstract class ProviderService {\n get$: (id: string) => Observable;\n get: (id: string) => Promise;\n getAll: () => Promise;\n save: (providers: { [id: string]: ProviderData }, userId?: UserId) => Promise;\n}\n","import { ProviderSetupRequest } from \"../../models/request/provider/provider-setup.request\";\nimport { ProviderUpdateRequest } from \"../../models/request/provider/provider-update.request\";\nimport { ProviderVerifyRecoverDeleteRequest } from \"../../models/request/provider/provider-verify-recover-delete.request\";\nimport { ProviderResponse } from \"../../models/response/provider/provider.response\";\n\nexport class ProviderApiServiceAbstraction {\n postProviderSetup: (id: string, request: ProviderSetupRequest) => Promise;\n getProvider: (id: string) => Promise;\n putProvider: (id: string, request: ProviderUpdateRequest) => Promise;\n providerRecoverDeleteToken: (\n organizationId: string,\n request: ProviderVerifyRecoverDeleteRequest,\n ) => Promise;\n deleteProvider: (id: string) => Promise;\n}\n","export enum OrganizationApiKeyType {\n Default = 0,\n BillingSync = 1,\n Scim = 2,\n}\n","export enum OrganizationConnectionType {\n CloudBillingSync = 1,\n Scim = 2,\n}\n","export enum OrganizationUserStatusType {\n Invited = 0,\n Accepted = 1,\n Confirmed = 2,\n Revoked = -1,\n}\n","export enum OrganizationUserType {\n Owner = 0,\n Admin = 1,\n User = 2,\n // Manager = 3 has been intentionally permanently deleted\n Custom = 4,\n}\n","export enum PolicyType {\n TwoFactorAuthentication = 0, // Requires users to have 2fa enabled\n MasterPassword = 1, // Sets minimum requirements for master password complexity\n PasswordGenerator = 2, // Sets minimum requirements/default type for generated passwords/passphrases\n SingleOrg = 3, // Allows users to only be apart of one organization\n RequireSso = 4, // Requires users to authenticate with SSO\n PersonalOwnership = 5, // Disables personal vault ownership for adding/cloning items\n DisableSend = 6, // Disables the ability to create and edit Bitwarden Sends\n SendOptions = 7, // Sets restrictions or defaults for Bitwarden Sends\n ResetPassword = 8, // Allows orgs to use reset password : also can enable auto-enrollment during invite flow\n MaximumVaultTimeout = 9, // Sets the maximum allowed vault timeout\n DisablePersonalVaultExport = 10, // Disable personal vault export\n ActivateAutofill = 11, // Activates autofill with page load on the browser extension\n}\n","export enum ProviderType {\n Msp = 0,\n Reseller = 1,\n}\n","export enum ProviderUserStatusType {\n Invited = 0,\n Accepted = 1,\n Confirmed = 2,\n Revoked = -1, // Not used, compile-time support only\n}\n","export enum ProviderUserType {\n ProviderAdmin = 0,\n ServiceUser = 1,\n}\n","export enum ScimProviderType {\n Default = 0,\n AzureAd = 1,\n Okta = 2,\n OneLogin = 3,\n JumpCloud = 4,\n GoogleWorkspace = 5,\n Rippling = 6,\n}\n","export enum ProviderStatusType {\n Pending = 0,\n Created = 1,\n Billable = 2,\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PermissionsApi extends BaseResponse {\n accessEventLogs: boolean;\n accessImportExport: boolean;\n accessReports: boolean;\n createNewCollections: boolean;\n editAnyCollection: boolean;\n deleteAnyCollection: boolean;\n editAssignedCollections: boolean;\n deleteAssignedCollections: boolean;\n manageCiphers: boolean;\n manageGroups: boolean;\n manageSso: boolean;\n managePolicies: boolean;\n manageUsers: boolean;\n manageResetPassword: boolean;\n manageScim: boolean;\n\n constructor(data: any = null) {\n super(data);\n if (data == null) {\n return this;\n }\n this.accessEventLogs = this.getResponseProperty(\"AccessEventLogs\");\n this.accessImportExport = this.getResponseProperty(\"AccessImportExport\");\n this.accessReports = this.getResponseProperty(\"AccessReports\");\n\n this.createNewCollections = this.getResponseProperty(\"CreateNewCollections\");\n this.editAnyCollection = this.getResponseProperty(\"EditAnyCollection\");\n this.deleteAnyCollection = this.getResponseProperty(\"DeleteAnyCollection\");\n this.editAssignedCollections = this.getResponseProperty(\"EditAssignedCollections\");\n this.deleteAssignedCollections = this.getResponseProperty(\"DeleteAssignedCollections\");\n\n this.manageCiphers = this.getResponseProperty(\"ManageCiphers\");\n this.manageGroups = this.getResponseProperty(\"ManageGroups\");\n this.manageSso = this.getResponseProperty(\"ManageSso\");\n this.managePolicies = this.getResponseProperty(\"ManagePolicies\");\n this.manageUsers = this.getResponseProperty(\"ManageUsers\");\n this.manageResetPassword = this.getResponseProperty(\"ManageResetPassword\");\n this.manageScim = this.getResponseProperty(\"ManageScim\");\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { ProductTierType } from \"../../../billing/enums\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\nimport { ProfileOrganizationResponse } from \"../response/profile-organization.response\";\n\nexport class OrganizationData {\n id: string;\n name: string;\n status: OrganizationUserStatusType;\n type: OrganizationUserType;\n enabled: boolean;\n usePolicies: boolean;\n useGroups: boolean;\n useDirectory: boolean;\n useEvents: boolean;\n useTotp: boolean;\n use2fa: boolean;\n useApi: boolean;\n useSso: boolean;\n useKeyConnector: boolean;\n useScim: boolean;\n useCustomPermissions: boolean;\n useResetPassword: boolean;\n useSecretsManager: boolean;\n usePasswordManager: boolean;\n useActivateAutofillPolicy: boolean;\n selfHost: boolean;\n usersGetPremium: boolean;\n seats: number;\n maxCollections: number;\n maxStorageGb?: number;\n ssoBound: boolean;\n identifier: string;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n userId: string;\n organizationUserId: string;\n hasPublicAndPrivateKeys: boolean;\n providerId: string;\n providerName: string;\n providerType?: ProviderType;\n isProviderUser: boolean;\n isMember: boolean;\n familySponsorshipFriendlyName: string;\n familySponsorshipAvailable: boolean;\n productTierType: ProductTierType;\n keyConnectorEnabled: boolean;\n keyConnectorUrl: string;\n familySponsorshipLastSyncDate?: Date;\n familySponsorshipValidUntil?: Date;\n familySponsorshipToDelete?: boolean;\n accessSecretsManager: boolean;\n limitCollectionCreationDeletion: boolean;\n allowAdminAccessToAllCollectionItems: boolean;\n flexibleCollections: boolean;\n\n constructor(\n response?: ProfileOrganizationResponse,\n options?: {\n isMember: boolean;\n isProviderUser: boolean;\n },\n ) {\n if (response == null) {\n return;\n }\n\n this.id = response.id;\n this.name = response.name;\n this.status = response.status;\n this.type = response.type;\n this.enabled = response.enabled;\n this.usePolicies = response.usePolicies;\n this.useGroups = response.useGroups;\n this.useDirectory = response.useDirectory;\n this.useEvents = response.useEvents;\n this.useTotp = response.useTotp;\n this.use2fa = response.use2fa;\n this.useApi = response.useApi;\n this.useSso = response.useSso;\n this.useKeyConnector = response.useKeyConnector;\n this.useScim = response.useScim;\n this.useCustomPermissions = response.useCustomPermissions;\n this.useResetPassword = response.useResetPassword;\n this.useSecretsManager = response.useSecretsManager;\n this.usePasswordManager = response.usePasswordManager;\n this.useActivateAutofillPolicy = response.useActivateAutofillPolicy;\n this.selfHost = response.selfHost;\n this.usersGetPremium = response.usersGetPremium;\n this.seats = response.seats;\n this.maxCollections = response.maxCollections;\n this.maxStorageGb = response.maxStorageGb;\n this.ssoBound = response.ssoBound;\n this.identifier = response.identifier;\n this.permissions = response.permissions;\n this.resetPasswordEnrolled = response.resetPasswordEnrolled;\n this.userId = response.userId;\n this.organizationUserId = response.organizationUserId;\n this.hasPublicAndPrivateKeys = response.hasPublicAndPrivateKeys;\n this.providerId = response.providerId;\n this.providerName = response.providerName;\n this.providerType = response.providerType;\n this.familySponsorshipFriendlyName = response.familySponsorshipFriendlyName;\n this.familySponsorshipAvailable = response.familySponsorshipAvailable;\n this.productTierType = response.productTierType;\n this.keyConnectorEnabled = response.keyConnectorEnabled;\n this.keyConnectorUrl = response.keyConnectorUrl;\n this.familySponsorshipLastSyncDate = response.familySponsorshipLastSyncDate;\n this.familySponsorshipValidUntil = response.familySponsorshipValidUntil;\n this.familySponsorshipToDelete = response.familySponsorshipToDelete;\n this.accessSecretsManager = response.accessSecretsManager;\n this.limitCollectionCreationDeletion = response.limitCollectionCreationDeletion;\n this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;\n this.flexibleCollections = response.flexibleCollections;\n\n this.isMember = options.isMember;\n this.isProviderUser = options.isProviderUser;\n }\n\n static fromJSON(obj: Jsonify) {\n return Object.assign(new OrganizationData(), obj, {\n familySponsorshipLastSyncDate:\n obj.familySponsorshipLastSyncDate != null\n ? new Date(obj.familySponsorshipLastSyncDate)\n : obj.familySponsorshipLastSyncDate,\n familySponsorshipValidUntil:\n obj.familySponsorshipValidUntil != null\n ? new Date(obj.familySponsorshipValidUntil)\n : obj.familySponsorshipValidUntil,\n });\n }\n}\n","import { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { Policy } from \"../domain/policy\";\nimport { PolicyResponse } from \"../response/policy.response\";\n\nexport class PolicyData {\n id: PolicyId;\n organizationId: string;\n type: PolicyType;\n data: Record;\n enabled: boolean;\n\n constructor(response?: PolicyResponse) {\n if (response == null) {\n return;\n }\n\n this.id = response.id;\n this.organizationId = response.organizationId;\n this.type = response.type;\n this.data = response.data;\n this.enabled = response.enabled;\n }\n\n static fromPolicy(policy: Policy): PolicyData {\n return Object.assign(new PolicyData(), policy);\n }\n}\n","import { MasterPasswordPolicyResponse } from \"../../../auth/models/response/master-password-policy.response\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\n\nexport class MasterPasswordPolicyOptions extends Domain {\n minComplexity = 0;\n minLength = 0;\n requireUpper = false;\n requireLower = false;\n requireNumbers = false;\n requireSpecial = false;\n\n /**\n * Flag to indicate if the policy should be enforced on login.\n * If true, and the user's password does not meet the policy requirements,\n * the user will be forced to update their password.\n */\n enforceOnLogin = false;\n\n static fromResponse(policy: MasterPasswordPolicyResponse): MasterPasswordPolicyOptions {\n if (policy == null) {\n return null;\n }\n const options = new MasterPasswordPolicyOptions();\n options.minComplexity = policy.minComplexity;\n options.minLength = policy.minLength;\n options.requireUpper = policy.requireUpper;\n options.requireLower = policy.requireLower;\n options.requireNumbers = policy.requireNumbers;\n options.requireSpecial = policy.requireSpecial;\n options.enforceOnLogin = policy.enforceOnLogin;\n return options;\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { ProductTierType } from \"../../../billing/enums\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\nimport { OrganizationData } from \"../data/organization.data\";\n\nexport class Organization {\n id: string;\n name: string;\n status: OrganizationUserStatusType;\n\n /**\n * The member's role in the organization.\n * Avoid using this for permission checks - use the getters instead (e.g. isOwner, isAdmin, canManageX), because they\n * properly handle permission inheritance and relationships.\n */\n type: OrganizationUserType;\n\n enabled: boolean;\n usePolicies: boolean;\n useGroups: boolean;\n useDirectory: boolean;\n useEvents: boolean;\n useTotp: boolean;\n use2fa: boolean;\n useApi: boolean;\n useSso: boolean;\n useKeyConnector: boolean;\n useScim: boolean;\n useCustomPermissions: boolean;\n useResetPassword: boolean;\n useSecretsManager: boolean;\n usePasswordManager: boolean;\n useActivateAutofillPolicy: boolean;\n selfHost: boolean;\n usersGetPremium: boolean;\n seats: number;\n maxCollections: number;\n maxStorageGb?: number;\n ssoBound: boolean;\n identifier: string;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n userId: string;\n organizationUserId: string;\n hasPublicAndPrivateKeys: boolean;\n providerId: string;\n providerName: string;\n providerType?: ProviderType;\n /**\n * Indicates that a user is a ProviderUser for the organization\n */\n isProviderUser: boolean;\n /**\n * Indicates that a user is a member for the organization (may be `false` if they have access via a Provider only)\n */\n isMember: boolean;\n familySponsorshipFriendlyName: string;\n familySponsorshipAvailable: boolean;\n productTierType: ProductTierType;\n keyConnectorEnabled: boolean;\n keyConnectorUrl: string;\n familySponsorshipLastSyncDate?: Date;\n familySponsorshipValidUntil?: Date;\n familySponsorshipToDelete?: boolean;\n accessSecretsManager: boolean;\n /**\n * Refers to the ability for an organization to limit collection creation and deletion to owners and admins only\n */\n limitCollectionCreationDeletion: boolean;\n /**\n * Refers to the ability for an owner/admin to access all collection items, regardless of assigned collections\n */\n allowAdminAccessToAllCollectionItems: boolean;\n /**\n * Returns true if this organization has enabled Flexible Collections (MVP) and their data has been migrated.\n * Generally, you should use this as the feature flag to gate Flexible Collections features.\n */\n flexibleCollections: boolean;\n\n constructor(obj?: OrganizationData) {\n if (obj == null) {\n return;\n }\n\n this.id = obj.id;\n this.name = obj.name;\n this.status = obj.status;\n this.type = obj.type;\n this.enabled = obj.enabled;\n this.usePolicies = obj.usePolicies;\n this.useGroups = obj.useGroups;\n this.useDirectory = obj.useDirectory;\n this.useEvents = obj.useEvents;\n this.useTotp = obj.useTotp;\n this.use2fa = obj.use2fa;\n this.useApi = obj.useApi;\n this.useSso = obj.useSso;\n this.useKeyConnector = obj.useKeyConnector;\n this.useScim = obj.useScim;\n this.useCustomPermissions = obj.useCustomPermissions;\n this.useResetPassword = obj.useResetPassword;\n this.useSecretsManager = obj.useSecretsManager;\n this.usePasswordManager = obj.usePasswordManager;\n this.useActivateAutofillPolicy = obj.useActivateAutofillPolicy;\n this.selfHost = obj.selfHost;\n this.usersGetPremium = obj.usersGetPremium;\n this.seats = obj.seats;\n this.maxCollections = obj.maxCollections;\n this.maxStorageGb = obj.maxStorageGb;\n this.ssoBound = obj.ssoBound;\n this.identifier = obj.identifier;\n this.permissions = obj.permissions;\n this.resetPasswordEnrolled = obj.resetPasswordEnrolled;\n this.userId = obj.userId;\n this.organizationUserId = obj.organizationUserId;\n this.hasPublicAndPrivateKeys = obj.hasPublicAndPrivateKeys;\n this.providerId = obj.providerId;\n this.providerName = obj.providerName;\n this.providerType = obj.providerType;\n this.isProviderUser = obj.isProviderUser;\n this.isMember = obj.isMember;\n this.familySponsorshipFriendlyName = obj.familySponsorshipFriendlyName;\n this.familySponsorshipAvailable = obj.familySponsorshipAvailable;\n this.productTierType = obj.productTierType;\n this.keyConnectorEnabled = obj.keyConnectorEnabled;\n this.keyConnectorUrl = obj.keyConnectorUrl;\n this.familySponsorshipLastSyncDate = obj.familySponsorshipLastSyncDate;\n this.familySponsorshipValidUntil = obj.familySponsorshipValidUntil;\n this.familySponsorshipToDelete = obj.familySponsorshipToDelete;\n this.accessSecretsManager = obj.accessSecretsManager;\n this.limitCollectionCreationDeletion = obj.limitCollectionCreationDeletion;\n this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;\n this.flexibleCollections = obj.flexibleCollections;\n }\n\n get canAccess() {\n if (this.isOwner) {\n return true;\n }\n return this.enabled && this.status === OrganizationUserStatusType.Confirmed;\n }\n\n /**\n * Whether a user has Admin permissions or greater\n */\n get isAdmin() {\n return this.type === OrganizationUserType.Admin || this.isOwner;\n }\n\n /**\n * Whether a user has Owner permissions (including ProviderUsers)\n */\n get isOwner() {\n return this.type === OrganizationUserType.Owner || this.isProviderUser;\n }\n\n get canAccessEventLogs() {\n return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;\n }\n\n get canAccessImportExport() {\n return this.isAdmin || this.permissions.accessImportExport;\n }\n\n get canAccessReports() {\n return this.isAdmin || this.permissions.accessReports;\n }\n\n get canCreateNewCollections() {\n return (\n !this.limitCollectionCreationDeletion || this.isAdmin || this.permissions.createNewCollections\n );\n }\n\n canEditAnyCollection(flexibleCollectionsV1Enabled: boolean) {\n if (!flexibleCollectionsV1Enabled) {\n // Pre-Flexible Collections v1 logic\n return this.isAdmin || this.permissions.editAnyCollection;\n }\n\n // Post Flexible Collections V1, the allowAdminAccessToAllCollectionItems flag can restrict admins\n // Providers and custom users with canEditAnyCollection are not affected by allowAdminAccessToAllCollectionItems flag\n return (\n this.isProviderUser ||\n (this.type === OrganizationUserType.Custom && this.permissions.editAnyCollection) ||\n (this.allowAdminAccessToAllCollectionItems && this.isAdmin)\n );\n }\n\n canEditUnmanagedCollections() {\n // Any admin or custom user with editAnyCollection permission can edit unmanaged collections\n return this.isAdmin || this.permissions.editAnyCollection;\n }\n\n canEditUnassignedCiphers(restrictProviderAccessFlagEnabled: boolean) {\n // Providers can access items until the restrictProviderAccess flag is enabled\n // After the flag is enabled and removed, this block will be deleted\n // so that they permanently lose access to items\n if (this.isProviderUser && !restrictProviderAccessFlagEnabled) {\n return true;\n }\n\n return (\n this.type === OrganizationUserType.Admin ||\n this.type === OrganizationUserType.Owner ||\n this.permissions.editAnyCollection\n );\n }\n\n canEditAllCiphers(\n flexibleCollectionsV1Enabled: boolean,\n restrictProviderAccessFlagEnabled: boolean,\n ) {\n // Before Flexible Collections V1, any admin or anyone with editAnyCollection permission could edit all ciphers\n if (!flexibleCollectionsV1Enabled) {\n return this.isAdmin || this.permissions.editAnyCollection;\n }\n\n // Providers can access items until the restrictProviderAccess flag is enabled\n // After the flag is enabled and removed, this block will be deleted\n // so that they permanently lose access to items\n if (this.isProviderUser && !restrictProviderAccessFlagEnabled) {\n return true;\n }\n\n // Post Flexible Collections V1, the allowAdminAccessToAllCollectionItems flag can restrict admins\n // Custom users with canEditAnyCollection are not affected by allowAdminAccessToAllCollectionItems flag\n return (\n (this.type === OrganizationUserType.Custom && this.permissions.editAnyCollection) ||\n (this.allowAdminAccessToAllCollectionItems &&\n (this.type === OrganizationUserType.Admin || this.type === OrganizationUserType.Owner))\n );\n }\n\n /**\n * @param flexibleCollectionsV1Enabled - Whether or not the V1 Flexible Collection feature flag is enabled\n * @returns True if the user can delete any collection\n */\n canDeleteAnyCollection(flexibleCollectionsV1Enabled: boolean) {\n // Providers and Users with DeleteAnyCollection permission can always delete collections\n if (this.isProviderUser || this.permissions.deleteAnyCollection) {\n return true;\n }\n\n // If AllowAdminAccessToAllCollectionItems is true, Owners and Admins can delete any collection, regardless of LimitCollectionCreationDeletion setting\n // Using explicit type checks because provider users are handled above and this mimics the server's permission checks closely\n if (!flexibleCollectionsV1Enabled || this.allowAdminAccessToAllCollectionItems) {\n return this.type == OrganizationUserType.Owner || this.type == OrganizationUserType.Admin;\n }\n\n return false;\n }\n\n /**\n * Whether the user can view all collection information, such as collection name and access.\n * This does not indicate that the user can view items inside any collection - for that, see {@link canEditAllCiphers}\n */\n get canViewAllCollections() {\n // Admins can always see all collections even if collection management settings prevent them from editing them or seeing items\n return (\n this.isAdmin || this.permissions.editAnyCollection || this.permissions.deleteAnyCollection\n );\n }\n\n get canManageGroups() {\n return (this.isAdmin || this.permissions.manageGroups) && this.useGroups;\n }\n\n get canManageSso() {\n return (this.isAdmin || this.permissions.manageSso) && this.useSso;\n }\n\n get canManageDomainVerification() {\n return (this.isAdmin || this.permissions.manageSso) && this.useSso;\n }\n\n get canManageScim() {\n return (this.isAdmin || this.permissions.manageScim) && this.useScim;\n }\n\n get canManagePolicies() {\n return (this.isAdmin || this.permissions.managePolicies) && this.usePolicies;\n }\n\n get canManageUsers() {\n return this.isAdmin || this.permissions.manageUsers;\n }\n\n get canManageUsersPassword() {\n return this.isAdmin || this.permissions.manageResetPassword;\n }\n\n get canManageDeviceApprovals() {\n return (this.isAdmin || this.permissions.manageResetPassword) && this.useSso;\n }\n\n get isExemptFromPolicies() {\n return this.canManagePolicies;\n }\n\n get canViewSubscription() {\n if (this.canEditSubscription) {\n return true;\n }\n\n return this.hasProvider && this.providerType === ProviderType.Msp\n ? this.isProviderUser\n : this.isOwner;\n }\n\n get canEditSubscription() {\n return this.hasProvider ? this.isProviderUser : this.isOwner;\n }\n\n get canEditPaymentMethods() {\n return this.canEditSubscription;\n }\n\n get canViewBillingHistory() {\n return this.canEditSubscription;\n }\n\n get hasProvider() {\n return this.providerId != null || this.providerName != null;\n }\n\n get hasReseller() {\n return this.hasProvider && this.providerType === ProviderType.Reseller;\n }\n\n get canAccessSecretsManager() {\n return this.useSecretsManager && this.accessSecretsManager;\n }\n\n get isFreeOrg() {\n // return true if organization needs to be upgraded from a free org\n return !this.useTotp;\n }\n\n get canManageSponsorships() {\n return this.familySponsorshipAvailable || this.familySponsorshipFriendlyName !== null;\n }\n\n static fromJSON(json: Jsonify) {\n if (json == null) {\n return null;\n }\n\n return Object.assign(new Organization(), json, {\n familySponsorshipLastSyncDate: new Date(json.familySponsorshipLastSyncDate),\n familySponsorshipValidUntil: new Date(json.familySponsorshipValidUntil),\n });\n }\n}\n","import { ListResponse } from \"../../../models/response/list.response\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../data/policy.data\";\nimport { PolicyResponse } from \"../response/policy.response\";\n\nexport class Policy extends Domain {\n id: PolicyId;\n organizationId: string;\n type: PolicyType;\n data: any;\n\n /**\n * Warning: a user can be exempt from a policy even if the policy is enabled.\n * @see {@link PolicyService} has methods to tell you whether a policy applies to a user.\n */\n enabled: boolean;\n\n constructor(obj?: PolicyData) {\n super();\n if (obj == null) {\n return;\n }\n\n this.id = obj.id;\n this.organizationId = obj.organizationId;\n this.type = obj.type;\n this.data = obj.data;\n this.enabled = obj.enabled;\n }\n\n static fromResponse(response: PolicyResponse): Policy {\n return new Policy(new PolicyData(response));\n }\n\n static fromListResponse(response: ListResponse): Policy[] | undefined {\n return response.data?.map((d) => Policy.fromResponse(d)) ?? undefined;\n }\n}\n","import { SecretVerificationRequest } from \"../../../auth/models/request/secret-verification.request\";\nimport { OrganizationApiKeyType } from \"../../enums\";\n\nexport class OrganizationApiKeyRequest extends SecretVerificationRequest {\n type: OrganizationApiKeyType = OrganizationApiKeyType.Default;\n}\n","import { BillingSyncConfigRequest } from \"../../../billing/models/request/billing-sync-config.request\";\nimport { OrganizationConnectionType } from \"../../enums\";\n\nimport { ScimConfigRequest } from \"./scim-config.request\";\n\n/**API request config types for OrganizationConnectionRequest */\nexport type OrganizationConnectionRequestConfigs = BillingSyncConfigRequest | ScimConfigRequest;\n\nexport class OrganizationConnectionRequest {\n constructor(\n public organizationId: string,\n public type: OrganizationConnectionType,\n public enabled: boolean,\n public config: OrganizationConnectionRequestConfigs,\n ) {}\n}\n","import { PaymentMethodType, PlanType } from \"../../../billing/enums\";\nimport { InitiationPath } from \"../../../models/request/reference-event.request\";\n\nimport { OrganizationKeysRequest } from \"./organization-keys.request\";\n\nexport class OrganizationCreateRequest {\n name: string;\n businessName: string;\n billingEmail: string;\n planType: PlanType;\n key: string;\n keys: OrganizationKeysRequest;\n paymentMethodType: PaymentMethodType;\n paymentToken: string;\n additionalSeats: number;\n maxAutoscaleSeats: number;\n additionalStorageGb: number;\n premiumAccessAddon: boolean;\n collectionName: string;\n taxIdNumber: string;\n billingAddressLine1: string;\n billingAddressLine2: string;\n billingAddressCity: string;\n billingAddressState: string;\n billingAddressPostalCode: string;\n billingAddressCountry: string;\n useSecretsManager: boolean;\n additionalSmSeats: number;\n additionalServiceAccounts: number;\n isFromSecretsManagerTrial: boolean;\n initiationPath: InitiationPath;\n}\n","import { KeysRequest } from \"../../../models/request/keys.request\";\n\nexport class OrganizationKeysRequest extends KeysRequest {\n constructor(publicKey: string, encryptedPrivateKey: string) {\n super(publicKey, encryptedPrivateKey);\n }\n}\n","export class SelectionReadOnlyRequest {\n id: string;\n readOnly: boolean;\n hidePasswords: boolean;\n manage: boolean;\n\n constructor(id: string, readOnly: boolean, hidePasswords: boolean, manage: boolean) {\n this.id = id;\n this.readOnly = readOnly;\n this.hidePasswords = hidePasswords;\n this.manage = manage;\n }\n}\n","import { PlanType } from \"../../../billing/enums\";\nimport { PlanResponse } from \"../../../billing/models/response/plan.response\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationResponse extends BaseResponse {\n id: string;\n name: string;\n businessName: string;\n businessAddress1: string;\n businessAddress2: string;\n businessAddress3: string;\n businessCountry: string;\n businessTaxNumber: string;\n billingEmail: string;\n plan: PlanResponse;\n planType: PlanType;\n seats: number;\n maxAutoscaleSeats: number;\n maxCollections: number;\n maxStorageGb: number;\n useGroups: boolean;\n useDirectory: boolean;\n useEvents: boolean;\n useTotp: boolean;\n use2fa: boolean;\n useApi: boolean;\n useResetPassword: boolean;\n useSecretsManager: boolean;\n hasPublicAndPrivateKeys: boolean;\n usePasswordManager: boolean;\n smSeats?: number;\n smServiceAccounts?: number;\n maxAutoscaleSmSeats?: number;\n maxAutoscaleSmServiceAccounts?: number;\n limitCollectionCreationDeletion: boolean;\n allowAdminAccessToAllCollectionItems: boolean;\n flexibleCollections: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.name = this.getResponseProperty(\"Name\");\n this.businessName = this.getResponseProperty(\"BusinessName\");\n this.businessAddress1 = this.getResponseProperty(\"BusinessAddress1\");\n this.businessAddress2 = this.getResponseProperty(\"BusinessAddress2\");\n this.businessAddress3 = this.getResponseProperty(\"BusinessAddress3\");\n this.businessCountry = this.getResponseProperty(\"BusinessCountry\");\n this.businessTaxNumber = this.getResponseProperty(\"BusinessTaxNumber\");\n this.billingEmail = this.getResponseProperty(\"BillingEmail\");\n\n const plan = this.getResponseProperty(\"Plan\");\n this.plan = plan == null ? null : new PlanResponse(plan);\n\n this.planType = this.getResponseProperty(\"PlanType\");\n this.seats = this.getResponseProperty(\"Seats\");\n this.maxAutoscaleSeats = this.getResponseProperty(\"MaxAutoscaleSeats\");\n this.maxCollections = this.getResponseProperty(\"MaxCollections\");\n this.maxStorageGb = this.getResponseProperty(\"MaxStorageGb\");\n this.useGroups = this.getResponseProperty(\"UseGroups\");\n this.useDirectory = this.getResponseProperty(\"UseDirectory\");\n this.useEvents = this.getResponseProperty(\"UseEvents\");\n this.useTotp = this.getResponseProperty(\"UseTotp\");\n this.use2fa = this.getResponseProperty(\"Use2fa\");\n this.useApi = this.getResponseProperty(\"UseApi\");\n this.useResetPassword = this.getResponseProperty(\"UseResetPassword\");\n this.useSecretsManager = this.getResponseProperty(\"UseSecretsManager\");\n this.hasPublicAndPrivateKeys = this.getResponseProperty(\"HasPublicAndPrivateKeys\");\n this.usePasswordManager = this.getResponseProperty(\"UsePasswordManager\");\n this.smSeats = this.getResponseProperty(\"SmSeats\");\n this.smServiceAccounts = this.getResponseProperty(\"SmServiceAccounts\");\n this.maxAutoscaleSmSeats = this.getResponseProperty(\"MaxAutoscaleSmSeats\");\n this.maxAutoscaleSmServiceAccounts = this.getResponseProperty(\"MaxAutoscaleSmServiceAccounts\");\n this.limitCollectionCreationDeletion = this.getResponseProperty(\n \"LimitCollectionCreationDeletion\",\n );\n this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(\n \"AllowAdminAccessToAllCollectionItems\",\n );\n this.flexibleCollections = this.getResponseProperty(\"FlexibleCollections\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\n\nexport class PolicyResponse extends BaseResponse {\n id: PolicyId;\n organizationId: string;\n type: PolicyType;\n data: any;\n enabled: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.organizationId = this.getResponseProperty(\"OrganizationId\");\n this.type = this.getResponseProperty(\"Type\");\n this.data = this.getResponseProperty(\"Data\");\n this.enabled = this.getResponseProperty(\"Enabled\");\n }\n}\n","import { ProductTierType } from \"../../../billing/enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\n\nexport class ProfileOrganizationResponse extends BaseResponse {\n id: string;\n name: string;\n usePolicies: boolean;\n useGroups: boolean;\n useDirectory: boolean;\n useEvents: boolean;\n useTotp: boolean;\n use2fa: boolean;\n useApi: boolean;\n useSso: boolean;\n useKeyConnector: boolean;\n useScim: boolean;\n useCustomPermissions: boolean;\n useResetPassword: boolean;\n useSecretsManager: boolean;\n usePasswordManager: boolean;\n useActivateAutofillPolicy: boolean;\n selfHost: boolean;\n usersGetPremium: boolean;\n seats: number;\n maxCollections: number;\n maxStorageGb?: number;\n key: string;\n hasPublicAndPrivateKeys: boolean;\n status: OrganizationUserStatusType;\n type: OrganizationUserType;\n enabled: boolean;\n ssoBound: boolean;\n identifier: string;\n permissions: PermissionsApi;\n resetPasswordEnrolled: boolean;\n userId: string;\n organizationUserId: string;\n providerId: string;\n providerName: string;\n providerType?: ProviderType;\n familySponsorshipFriendlyName: string;\n familySponsorshipAvailable: boolean;\n productTierType: ProductTierType;\n keyConnectorEnabled: boolean;\n keyConnectorUrl: string;\n familySponsorshipLastSyncDate?: Date;\n familySponsorshipValidUntil?: Date;\n familySponsorshipToDelete?: boolean;\n accessSecretsManager: boolean;\n limitCollectionCreationDeletion: boolean;\n allowAdminAccessToAllCollectionItems: boolean;\n flexibleCollections: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.name = this.getResponseProperty(\"Name\");\n this.usePolicies = this.getResponseProperty(\"UsePolicies\");\n this.useGroups = this.getResponseProperty(\"UseGroups\");\n this.useDirectory = this.getResponseProperty(\"UseDirectory\");\n this.useEvents = this.getResponseProperty(\"UseEvents\");\n this.useTotp = this.getResponseProperty(\"UseTotp\");\n this.use2fa = this.getResponseProperty(\"Use2fa\");\n this.useApi = this.getResponseProperty(\"UseApi\");\n this.useSso = this.getResponseProperty(\"UseSso\");\n this.useKeyConnector = this.getResponseProperty(\"UseKeyConnector\") ?? false;\n this.useScim = this.getResponseProperty(\"UseScim\") ?? false;\n this.useCustomPermissions = this.getResponseProperty(\"UseCustomPermissions\") ?? false;\n this.useResetPassword = this.getResponseProperty(\"UseResetPassword\");\n this.useSecretsManager = this.getResponseProperty(\"UseSecretsManager\");\n this.usePasswordManager = this.getResponseProperty(\"UsePasswordManager\");\n this.useActivateAutofillPolicy = this.getResponseProperty(\"UseActivateAutofillPolicy\");\n this.selfHost = this.getResponseProperty(\"SelfHost\");\n this.usersGetPremium = this.getResponseProperty(\"UsersGetPremium\");\n this.seats = this.getResponseProperty(\"Seats\");\n this.maxCollections = this.getResponseProperty(\"MaxCollections\");\n this.maxStorageGb = this.getResponseProperty(\"MaxStorageGb\");\n this.key = this.getResponseProperty(\"Key\");\n this.hasPublicAndPrivateKeys = this.getResponseProperty(\"HasPublicAndPrivateKeys\");\n this.status = this.getResponseProperty(\"Status\");\n this.type = this.getResponseProperty(\"Type\");\n this.enabled = this.getResponseProperty(\"Enabled\");\n this.ssoBound = this.getResponseProperty(\"SsoBound\");\n this.identifier = this.getResponseProperty(\"Identifier\");\n this.permissions = new PermissionsApi(this.getResponseProperty(\"permissions\"));\n this.resetPasswordEnrolled = this.getResponseProperty(\"ResetPasswordEnrolled\");\n this.userId = this.getResponseProperty(\"UserId\");\n this.organizationUserId = this.getResponseProperty(\"OrganizationUserId\");\n this.providerId = this.getResponseProperty(\"ProviderId\");\n this.providerName = this.getResponseProperty(\"ProviderName\");\n this.providerType = this.getResponseProperty(\"ProviderType\");\n this.familySponsorshipFriendlyName = this.getResponseProperty(\"FamilySponsorshipFriendlyName\");\n this.familySponsorshipAvailable = this.getResponseProperty(\"FamilySponsorshipAvailable\");\n this.productTierType = this.getResponseProperty(\"ProductTierType\");\n this.keyConnectorEnabled = this.getResponseProperty(\"KeyConnectorEnabled\") ?? false;\n this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n const familySponsorshipLastSyncDateString = this.getResponseProperty(\n \"FamilySponsorshipLastSyncDate\",\n );\n if (familySponsorshipLastSyncDateString) {\n this.familySponsorshipLastSyncDate = new Date(familySponsorshipLastSyncDateString);\n }\n const familySponsorshipValidUntilString = this.getResponseProperty(\n \"FamilySponsorshipValidUntil\",\n );\n if (familySponsorshipValidUntilString) {\n this.familySponsorshipValidUntil = new Date(familySponsorshipValidUntilString);\n }\n this.familySponsorshipToDelete = this.getResponseProperty(\"FamilySponsorshipToDelete\");\n this.accessSecretsManager = this.getResponseProperty(\"AccessSecretsManager\");\n this.limitCollectionCreationDeletion = this.getResponseProperty(\n \"LimitCollectionCreationDeletion\",\n );\n this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(\n \"AllowAdminAccessToAllCollectionItems\",\n );\n this.flexibleCollections = this.getResponseProperty(\"FlexibleCollections\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SelectionReadOnlyResponse extends BaseResponse {\n id: string;\n readOnly: boolean;\n hidePasswords: boolean;\n manage: boolean;\n\n constructor(response: any) {\n super(response);\n this.id = this.getResponseProperty(\"Id\");\n this.readOnly = this.getResponseProperty(\"ReadOnly\");\n this.hidePasswords = this.getResponseProperty(\"HidePasswords\");\n this.manage = this.getResponseProperty(\"Manage\");\n }\n}\n","import { RegisterFinishRequest } from \"../models/request/registration/register-finish.request\";\nimport { RegisterSendVerificationEmailRequest } from \"../models/request/registration/register-send-verification-email.request\";\nimport { Verification } from \"../types/verification\";\n\nexport abstract class AccountApiService {\n /**\n * Deletes an account that has confirmed the operation is authorized\n *\n * @param verification - authorizes the account deletion operation.\n * @returns A promise that resolves when the account is\n * successfully deleted.\n */\n abstract deleteAccount(verification: Verification): Promise;\n\n /**\n * Sends a verification email as part of the registration process.\n *\n * @param request - The request object containing\n * information needed to send the verification email, such as the user's email address.\n * @returns A promise that resolves to a string tokencontaining the user's encrypted\n * information which must be submitted to complete registration or `null` if\n * email verification is enabled (users must get the token by clicking a\n * link in the email that will be sent to them).\n */\n abstract registerSendVerificationEmail(\n request: RegisterSendVerificationEmailRequest,\n ): Promise;\n\n /**\n * Completes the registration process.\n *\n * @param request - The request object containing the user's email verification token,\n * the email, hashed MP, newly created user key, and new asymmetric user key pair along\n * with the KDF information used during the process.\n * @returns A promise that resolves to a string captcha bypass token when the\n * registration process is successfully completed.\n */\n abstract registerFinish(request: RegisterFinishRequest): Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\n/**\n * Holds information about an account for use in the AccountService\n * if more information is added, be sure to update the equality method.\n */\nexport type AccountInfo = {\n email: string;\n emailVerified: boolean;\n name: string | undefined;\n};\n\nexport function accountInfoEqual(a: AccountInfo, b: AccountInfo) {\n if (a == null && b == null) {\n return true;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n const keys = new Set([...Object.keys(a), ...Object.keys(b)]) as Set;\n for (const key of keys) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\nexport abstract class AccountService {\n accounts$: Observable>;\n activeAccount$: Observable<{ id: UserId | undefined } & AccountInfo>;\n\n /**\n * Observable of the last activity time for each account.\n */\n accountActivity$: Observable>;\n /** Account list in order of descending recency */\n sortedUserIds$: Observable;\n /** Next account that is not the current active account */\n nextUpAccount$: Observable<{ id: UserId } & AccountInfo>;\n /**\n * Updates the `accounts$` observable with the new account data.\n *\n * @note Also sets the last active date of the account to `now`.\n * @param userId\n * @param accountData\n */\n abstract addAccount(userId: UserId, accountData: AccountInfo): Promise;\n /**\n * updates the `accounts$` observable with the new preferred name for the account.\n * @param userId\n * @param name\n */\n abstract setAccountName(userId: UserId, name: string): Promise;\n /**\n * updates the `accounts$` observable with the new email for the account.\n * @param userId\n * @param email\n */\n abstract setAccountEmail(userId: UserId, email: string): Promise;\n /**\n * updates the `accounts$` observable with the new email verification status for the account.\n * @param userId\n * @param emailVerified\n */\n abstract setAccountEmailVerified(userId: UserId, emailVerified: boolean): Promise;\n /**\n * Updates the `activeAccount$` observable with the new active account.\n * @param userId\n */\n abstract switchAccount(userId: UserId): Promise;\n /**\n * Cleans personal information for the given account from the `accounts$` observable. Does not remove the userId from the observable.\n *\n * @note Also sets the last active date of the account to `null`.\n * @param userId\n */\n abstract clean(userId: UserId): Promise;\n /**\n * Updates the given user's last activity time.\n * @param userId\n * @param lastActivity\n */\n abstract setAccountActivity(userId: UserId, lastActivity: Date): Promise;\n}\n\nexport abstract class InternalAccountService extends AccountService {\n abstract delete(): void;\n}\n","export abstract class AnonymousHubService {\n createHubConnection: (token: string) => Promise;\n stopHubConnection: () => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { AuthenticationStatus } from \"../enums/authentication-status\";\n\nexport abstract class AuthService {\n /** Authentication status for the active user */\n abstract activeAccountStatus$: Observable;\n /** Authentication status for all known users */\n abstract authStatuses$: Observable>;\n /**\n * Returns an observable authentication status for the given user id.\n * @note userId is a required parameter, null values will always return `AuthenticationStatus.LoggedOut`\n * @param userId The user id to check for an access token.\n */\n abstract authStatusFor$(userId: UserId): Observable;\n /** @deprecated use {@link activeAccountStatus$} instead */\n abstract getAuthStatus: (userId?: string) => Promise;\n abstract logOut: (callback: () => void) => void;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nexport abstract class AvatarService {\n /**\n * An observable monitoring the active user's avatar color.\n * The observable updates when the avatar color changes.\n */\n avatarColor$: Observable;\n /**\n * Sets the avatar color of the active user\n *\n * @param color the color to set the avatar color to\n * @returns a promise that resolves when the avatar color is set\n */\n abstract setAvatarColor(color: string): Promise;\n /**\n * Sets the avatar color for the given user, meant to be used via sync.\n *\n * @remarks This is meant to be used for getting an updated avatar color from\n * the sync endpoint. If the user is changing their avatar color\n * on device, you should instead call {@link setAvatarColor}.\n *\n * @param userId The user id for the user to set the avatar color for\n * @param color The color to set the avatar color to\n */\n abstract setSyncAvatarColor(userId: UserId, color: string): Promise;\n /**\n * Gets the avatar color of the specified user.\n *\n * @remarks This is most useful for account switching where we show an\n * avatar for each account. If you only need the active user's\n * avatar color, use the avatarColor$ observable above instead.\n *\n * @param userId the userId of the user whose avatar color should be retreived\n * @return an Observable that emits a string of the avatar color of the specified user\n */\n abstract getUserAvatarColor$(userId: UserId): Observable;\n}\n","import { Observable } from \"rxjs\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { UserId } from \"../../types/guid\";\nimport { DeviceKey, UserKey } from \"../../types/key\";\n\nimport { DeviceResponse } from \"./devices/responses/device.response\";\n\nexport abstract class DeviceTrustServiceAbstraction {\n supportsDeviceTrust$: Observable;\n /**\n * @description Retrieves the users choice to trust the device which can only happen after decryption\n * Note: this value should only be used once and then reset\n */\n getShouldTrustDevice: (userId: UserId) => Promise;\n setShouldTrustDevice: (userId: UserId, value: boolean) => Promise;\n\n trustDeviceIfRequired: (userId: UserId) => Promise;\n\n trustDevice: (userId: UserId) => Promise;\n\n /** Retrieves the device key if it exists from state or secure storage if supported for the active user. */\n getDeviceKey: (userId: UserId) => Promise;\n decryptUserKeyWithDeviceKey: (\n userId: UserId,\n encryptedDevicePrivateKey: EncString,\n encryptedUserKey: EncString,\n deviceKey: DeviceKey,\n ) => Promise;\n rotateDevicesTrust: (\n userId: UserId,\n newUserKey: UserKey,\n masterPasswordHash: string,\n ) => Promise;\n}\n","import { ListResponse } from \"../../models/response/list.response\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport { UpdateDevicesTrustRequest } from \"../models/request/update-devices-trust.request\";\nimport { ProtectedDeviceResponse } from \"../models/response/protected-device.response\";\n\nexport abstract class DevicesApiServiceAbstraction {\n getKnownDevice: (email: string, deviceIdentifier: string) => Promise;\n\n getDeviceByIdentifier: (deviceIdentifier: string) => Promise;\n\n getDevices: () => Promise>;\n\n updateTrustedDeviceKeys: (\n deviceIdentifier: string,\n devicePublicKeyEncryptedUserKey: string,\n userKeyEncryptedDevicePublicKey: string,\n deviceKeyEncryptedDevicePrivateKey: string,\n ) => Promise;\n\n updateTrust: (\n updateDevicesTrustRequestModel: UpdateDevicesTrustRequest,\n deviceIdentifier: string,\n ) => Promise;\n\n getDeviceKeys: (\n deviceIdentifier: string,\n secretVerificationRequest: SecretVerificationRequest,\n ) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { DeviceView } from \"./views/device.view\";\n\nexport abstract class DevicesServiceAbstraction {\n getDevices$: () => Observable>;\n getDeviceByIdentifier$: (deviceIdentifier: string) => Observable;\n isDeviceKnownForUser$: (email: string, deviceIdentifier: string) => Observable;\n updateTrustedDeviceKeys$: (\n deviceIdentifier: string,\n devicePublicKeyEncryptedUserKey: string,\n userKeyEncryptedDevicePublicKey: string,\n deviceKeyEncryptedDevicePrivateKey: string,\n ) => Observable;\n}\n","import { UserId } from \"../../types/guid\";\nimport { KdfConfig } from \"../models/domain/kdf-config\";\n\nexport abstract class KdfConfigService {\n setKdfConfig: (userId: UserId, KdfConfig: KdfConfig) => Promise;\n getKdfConfig: () => Promise;\n}\n","import { Organization } from \"../../admin-console/models/domain/organization\";\nimport { UserId } from \"../../types/guid\";\nimport { IdentityTokenResponse } from \"../models/response/identity-token.response\";\n\nexport abstract class KeyConnectorService {\n setMasterKeyFromUrl: (url: string, userId: UserId) => Promise;\n getManagingOrganization: () => Promise;\n getUsesKeyConnector: () => Promise;\n migrateUser: () => Promise;\n userNeedsMigration: () => Promise;\n convertNewSsoUserToKeyConnector: (\n tokenResponse: IdentityTokenResponse,\n orgId: string,\n userId: UserId,\n ) => Promise;\n setUsesKeyConnector: (enabled: boolean) => Promise;\n setConvertAccountRequired: (status: boolean) => Promise;\n getConvertAccountRequired: () => Promise;\n removeConvertAccountRequired: () => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { UserId } from \"../../types/guid\";\nimport { MasterKey, UserKey } from \"../../types/key\";\nimport { ForceSetPasswordReason } from \"../models/domain/force-set-password-reason\";\n\nexport abstract class MasterPasswordServiceAbstraction {\n /**\n * An observable that emits if the user is being forced to set a password on login and why.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract forceSetPasswordReason$: (userId: UserId) => Observable;\n /**\n * An observable that emits the master key for the user.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract masterKey$: (userId: UserId) => Observable;\n /**\n * An observable that emits the master key hash for the user.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract masterKeyHash$: (userId: UserId) => Observable;\n /**\n * Returns the master key encrypted user key for the user.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract getMasterKeyEncryptedUserKey: (userId: UserId) => Promise;\n /**\n * Decrypts the user key with the provided master key\n * @param masterKey The user's master key\n * @param userKey The user's encrypted symmetric key\n * @param userId The desired user\n * @throws If either the MasterKey or UserKey are not resolved, or if the UserKey encryption type\n * is neither AesCbc256_B64 nor AesCbc256_HmacSha256_B64\n * @returns The user key\n */\n abstract decryptUserKeyWithMasterKey: (\n masterKey: MasterKey,\n userKey?: EncString,\n userId?: string,\n ) => Promise;\n}\n\nexport abstract class InternalMasterPasswordServiceAbstraction extends MasterPasswordServiceAbstraction {\n /**\n * Set the master key for the user.\n * Note: Use {@link clearMasterKey} to clear the master key.\n * @param masterKey The master key.\n * @param userId The user ID.\n * @throws If the user ID or master key is missing.\n */\n abstract setMasterKey: (masterKey: MasterKey, userId: UserId) => Promise;\n /**\n * Clear the master key for the user.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract clearMasterKey: (userId: UserId) => Promise;\n /**\n * Set the master key hash for the user.\n * Note: Use {@link clearMasterKeyHash} to clear the master key hash.\n * @param masterKeyHash The master key hash.\n * @param userId The user ID.\n * @throws If the user ID or master key hash is missing.\n */\n abstract setMasterKeyHash: (masterKeyHash: string, userId: UserId) => Promise;\n /**\n * Clear the master key hash for the user.\n * @param userId The user ID.\n * @throws If the user ID is missing.\n */\n abstract clearMasterKeyHash: (userId: UserId) => Promise;\n\n /**\n * Set the master key encrypted user key for the user.\n * @param encryptedKey The master key encrypted user key.\n * @param userId The user ID.\n * @throws If the user ID or encrypted key is missing.\n */\n abstract setMasterKeyEncryptedUserKey: (encryptedKey: EncString, userId: UserId) => Promise;\n /**\n * Set the force set password reason for the user.\n * @param reason The reason the user is being forced to set a password.\n * @param userId The user ID.\n * @throws If the user ID or reason is missing.\n */\n abstract setForceSetPasswordReason: (\n reason: ForceSetPasswordReason,\n userId: UserId,\n ) => Promise;\n}\n","import { UserKey } from \"../../types/key\";\n\nexport abstract class PasswordResetEnrollmentServiceAbstraction {\n /*\n * Checks the user's enrollment status and enrolls them if required\n * NOTE: Will also enroll the user in the organization if in the\n * invited status\n */\n abstract enrollIfRequired(organizationSsoIdentifier: string): Promise;\n\n /**\n * Enroll current user in password reset\n * NOTE: Will also enroll the user in the organization if in the\n * invited status\n * @param organizationId - Organization in which to enroll the user\n * @returns Promise that resolves when the user is enrolled\n * @throws Error if the action fails\n */\n abstract enroll(organizationId: string): Promise;\n\n /**\n * Enroll user in password reset\n * NOTE: Will also enroll the user in the organization if in the\n * invited status\n * @param organizationId - Organization in which to enroll the user\n * @param userId - User to enroll\n * @param userKey - User's symmetric key\n * @returns Promise that resolves when the user is enrolled\n * @throws Error if the action fails\n */\n abstract enroll(organizationId: string, userId: string, userKey: UserKey): Promise;\n}\n","export abstract class SsoLoginServiceAbstraction {\n /**\n * Gets the code verifier used for SSO.\n *\n * PKCE requires a `code_verifier` to be generated which is then used to derive a `code_challenge`.\n * While the `code_challenge` is verified upon return from the SSO provider, the `code_verifier` is\n * sent to the server with the `authorization_code` so that the server can derive the same `code_challenge`\n * and verify it matches the one sent in the request for the `authorization_code`.\n * @see https://datatracker.ietf.org/doc/html/rfc7636\n * @returns The code verifier used for SSO.\n */\n getCodeVerifier: () => Promise;\n /**\n * Sets the code verifier used for SSO.\n *\n * PKCE requires a `code_verifier` to be generated which is then used to derive a `code_challenge`.\n * While the `code_challenge` is verified upon return from the SSO provider, the `code_verifier` is\n * sent to the server with the `authorization_code` so that the server can derive the same `code_challenge`\n * and verify it matches the one sent in the request for the `authorization_code`.\n * @see https://datatracker.ietf.org/doc/html/rfc7636\n */\n setCodeVerifier: (codeVerifier: string) => Promise;\n /**\n * Gets the value of the SSO state.\n *\n * `state` is a parameter used in the Authorization Code Flow of OAuth 2.0 to prevent CSRF attacks. It is an\n * opaque value generated on the client and is sent to the authorization server. The authorization server\n * returns the `state` in the callback and the client verifies that the value returned matches the value sent.\n * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1\n * @returns The SSO state.\n */\n getSsoState: () => Promise;\n /**\n * Sets the value of the SSO state.\n *\n * `state` is a parameter used in the Authorization Code Flow of OAuth 2.0 to prevent CSRF attacks. It is an\n * opaque value generated on the client and is sent to the authorization server. The authorization server\n * returns the `state` in the callback and the client verifies that the value returned matches the value sent.\n * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1\n */\n setSsoState: (ssoState: string) => Promise;\n /**\n * Gets the value of the user's organization sso identifier.\n *\n * This should only be used during the SSO flow to identify the organization that the user is attempting to log in to.\n * Do not use this value outside of the SSO login flow.\n * @returns The user's organization identifier.\n */\n getOrganizationSsoIdentifier: () => Promise;\n /**\n * Sets the value of the user's organization sso identifier.\n *\n * This should only be used during the SSO flow to identify the organization that the user is attempting to log in to.\n * Do not use this value outside of the SSO login flow.\n */\n setOrganizationSsoIdentifier: (organizationIdentifier: string) => Promise;\n /**\n * Gets the user's email.\n * Note: This should only be used during the SSO flow to identify the user that is attempting to log in.\n * @returns The user's email.\n */\n getSsoEmail: () => Promise;\n /**\n * Sets the user's email.\n * Note: This should only be used during the SSO flow to identify the user that is attempting to log in.\n * @param email The user's email.\n * @returns A promise that resolves when the email has been set.\n *\n */\n setSsoEmail: (email: string) => Promise;\n /**\n * Gets the value of the active user's organization sso identifier.\n *\n * This should only be used post successful SSO login once the user is initialized.\n */\n getActiveUserOrganizationSsoIdentifier: () => Promise;\n /**\n * Sets the value of the active user's organization sso identifier.\n *\n * This should only be used post successful SSO login once the user is initialized.\n */\n setActiveUserOrganizationSsoIdentifier: (organizationIdentifier: string) => Promise;\n}\n","import { Observable } from \"rxjs\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\nimport { SetTokensResult } from \"../models/domain/set-tokens-result\";\nimport { DecodedAccessToken } from \"../services/token.service\";\n\nexport abstract class TokenService {\n /**\n * Returns an observable that emits a boolean indicating whether the user has an access token.\n * @param userId The user id to check for an access token.\n */\n abstract hasAccessToken$(userId: UserId): Observable;\n /**\n * Sets the access token, refresh token, API Key Client ID, and API Key Client Secret in memory or disk\n * based on the given vaultTimeoutAction and vaultTimeout and the derived access token user id.\n * Note: for platforms that support secure storage, the access & refresh tokens are stored in secure storage instead of on disk.\n * Note 2: this method also enforces always setting the access token and the refresh token together as\n * we can retrieve the user id required to set the refresh token from the access token for efficiency.\n * @param accessToken The access token to set.\n * @param vaultTimeoutAction The action to take when the vault times out.\n * @param vaultTimeout The timeout for the vault.\n * @param refreshToken The optional refresh token to set. Note: this is undefined when using the CLI Login Via API Key flow\n * @param clientIdClientSecret The API Key Client ID and Client Secret to set.\n *\n * @returns A promise that resolves with the SetTokensResult containing the tokens that were set.\n */\n setTokens: (\n accessToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n refreshToken?: string,\n clientIdClientSecret?: [string, string],\n ) => Promise;\n\n /**\n * Clears the access token, refresh token, API Key Client ID, and API Key Client Secret out of memory, disk, and secure storage if supported.\n * @param userId The optional user id to clear the tokens for; if not provided, the active user id is used.\n * @returns A promise that resolves when the tokens have been cleared.\n */\n clearTokens: (userId?: UserId) => Promise;\n\n /**\n * Sets the access token in memory or disk based on the given vaultTimeoutAction and vaultTimeout\n * and the user id read off the access token\n * Note: for platforms that support secure storage, the access & refresh tokens are stored in secure storage instead of on disk.\n * @param accessToken The access token to set.\n * @param vaultTimeoutAction The action to take when the vault times out.\n * @param vaultTimeout The timeout for the vault.\n * @returns A promise that resolves with the access token that has been set.\n */\n setAccessToken: (\n accessToken: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n ) => Promise;\n\n // TODO: revisit having this public clear method approach once the state service is fully deprecated.\n /**\n * Clears the access token for the given user id out of memory, disk, and secure storage if supported.\n * @param userId The optional user id to clear the access token for; if not provided, the active user id is used.\n * @returns A promise that resolves when the access token has been cleared.\n *\n * Note: This method is required so that the StateService doesn't have to inject the VaultTimeoutSettingsService to\n * pass in the vaultTimeoutAction and vaultTimeout.\n * This avoids a circular dependency between the StateService, TokenService, and VaultTimeoutSettingsService.\n */\n clearAccessToken: (userId?: UserId) => Promise;\n\n /**\n * Gets the access token\n * @param userId - The optional user id to get the access token for; if not provided, the active user is used.\n * @returns A promise that resolves with the access token or null.\n */\n getAccessToken: (userId?: UserId) => Promise;\n\n /**\n * Gets the refresh token.\n * @param userId - The optional user id to get the refresh token for; if not provided, the active user is used.\n * @returns A promise that resolves with the refresh token or null.\n */\n getRefreshToken: (userId?: UserId) => Promise;\n\n /**\n * Sets the API Key Client ID for the active user id in memory or disk based on the given vaultTimeoutAction and vaultTimeout.\n * @param clientId The API Key Client ID to set.\n * @param vaultTimeoutAction The action to take when the vault times out.\n * @param vaultTimeout The timeout for the vault.\n * @returns A promise that resolves with the API Key Client ID that has been set.\n */\n setClientId: (\n clientId: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId?: UserId,\n ) => Promise;\n\n /**\n * Gets the API Key Client ID for the active user.\n * @returns A promise that resolves with the API Key Client ID or undefined\n */\n getClientId: (userId?: UserId) => Promise;\n\n /**\n * Sets the API Key Client Secret for the active user id in memory or disk based on the given vaultTimeoutAction and vaultTimeout.\n * @param clientSecret The API Key Client Secret to set.\n * @param vaultTimeoutAction The action to take when the vault times out.\n * @param vaultTimeout The timeout for the vault.\n * @returns A promise that resolves with the client secret that has been set.\n */\n setClientSecret: (\n clientSecret: string,\n vaultTimeoutAction: VaultTimeoutAction,\n vaultTimeout: VaultTimeout,\n userId?: UserId,\n ) => Promise;\n\n /**\n * Gets the API Key Client Secret for the active user.\n * @returns A promise that resolves with the API Key Client Secret or undefined\n */\n getClientSecret: (userId?: UserId) => Promise;\n\n /**\n * Sets the two factor token for the given email in global state.\n * The two factor token is set when the user checks \"remember me\" when completing two factor\n * authentication and it is used to bypass two factor authentication for a period of time.\n * @param email The email to set the two factor token for.\n * @param twoFactorToken The two factor token to set.\n * @returns A promise that resolves when the two factor token has been set.\n */\n setTwoFactorToken: (email: string, twoFactorToken: string) => Promise;\n\n /**\n * Gets the two factor token for the given email.\n * @param email The email to get the two factor token for.\n * @returns A promise that resolves with the two factor token for the given email or null if it isn't found.\n */\n getTwoFactorToken: (email: string) => Promise;\n\n /**\n * Clears the two factor token for the given email out of global state.\n * @param email The email to clear the two factor token for.\n * @returns A promise that resolves when the two factor token has been cleared.\n */\n clearTwoFactorToken: (email: string) => Promise;\n\n /**\n * Decodes the access token.\n * @param token The access token to decode.\n * @returns A promise that resolves with the decoded access token.\n */\n decodeAccessToken: (token?: string) => Promise;\n\n /**\n * Gets the expiration date for the access token. Returns if token can't be decoded or has no expiration\n * @returns A promise that resolves with the expiration date for the access token.\n */\n getTokenExpirationDate: () => Promise;\n\n /**\n * Calculates the adjusted time in seconds until the access token expires, considering an optional offset.\n *\n * @param {number} [offsetSeconds=0] Optional seconds to subtract from the remaining time,\n * creating a buffer before actual expiration. Useful for preemptive actions\n * before token expiry. A value of 0 or omitting this parameter calculates time\n * based on the actual expiration.\n * @returns {Promise} Promise resolving to the adjusted seconds remaining.\n */\n tokenSecondsRemaining: (offsetSeconds?: number) => Promise;\n\n /**\n * Checks if the access token needs to be refreshed.\n * @param {number} [minutes=5] - Optional number of minutes before the access token expires to consider refreshing it.\n * @returns A promise that resolves with a boolean indicating if the access token needs to be refreshed.\n */\n tokenNeedsRefresh: (minutes?: number) => Promise;\n\n /**\n * Gets the user id for the active user from the access token.\n * @returns A promise that resolves with the user id for the active user.\n * @deprecated Use AccountService.activeAccount$ instead.\n */\n getUserId: () => Promise;\n\n /**\n * Gets the email for the active user from the access token.\n * @returns A promise that resolves with the email for the active user.\n * @deprecated Use AccountService.activeAccount$ instead.\n */\n getEmail: () => Promise;\n\n /**\n * Gets the email verified status for the active user from the access token.\n * @returns A promise that resolves with the email verified status for the active user.\n */\n getEmailVerified: () => Promise;\n\n /**\n * Gets the name for the active user from the access token.\n * @returns A promise that resolves with the name for the active user.\n * @deprecated Use AccountService.activeAccount$ instead.\n */\n getName: () => Promise;\n\n /**\n * Gets the issuer for the active user from the access token.\n * @returns A promise that resolves with the issuer for the active user.\n */\n getIssuer: () => Promise;\n\n /**\n * Gets whether or not the user authenticated via an external mechanism.\n * @returns A promise that resolves with a boolean representing the user's external authN status.\n */\n getIsExternal: () => Promise;\n\n /** Gets the active or passed in user's security stamp */\n getSecurityStamp: (userId?: UserId) => Promise;\n\n /** Sets the security stamp for the active or passed in user */\n setSecurityStamp: (securityStamp: string, userId?: UserId) => Promise;\n}\n","import { TwoFactorProviderType } from \"../enums/two-factor-provider-type\";\nimport { IdentityTwoFactorResponse } from \"../models/response/identity-two-factor.response\";\n\nexport interface TwoFactorProviderDetails {\n type: TwoFactorProviderType;\n name: string;\n description: string;\n priority: number;\n sort: number;\n premium: boolean;\n}\n\nexport abstract class TwoFactorService {\n init: () => void;\n getSupportedProviders: (win: Window) => Promise;\n getDefaultProvider: (webAuthnSupported: boolean) => Promise;\n setSelectedProvider: (type: TwoFactorProviderType) => Promise;\n clearSelectedProvider: () => Promise;\n\n setProviders: (response: IdentityTwoFactorResponse) => Promise;\n clearProviders: () => Promise;\n getProviders: () => Promise>;\n}\n","import { UserId } from \"../../../types/guid\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { UserVerificationOptions } from \"../../types/user-verification-options\";\nimport {\n MasterPasswordVerification,\n MasterPasswordVerificationResponse,\n Verification,\n} from \"../../types/verification\";\n\nexport abstract class UserVerificationService {\n /**\n * Returns the available verification options for the user, can be\n * restricted to a specific type of verification.\n * @param verificationType Type of verification to restrict the options to\n * @returns Available verification options for the user\n */\n getAvailableVerificationOptions: (\n verificationType: keyof UserVerificationOptions,\n ) => Promise;\n /**\n * Create a new request model to be used for server-side verification\n * @param verification User-supplied verification data (Master Password or OTP)\n * @param requestClass The request model to create\n * @param alreadyHashed Whether the master password is already hashed\n * @throws Error if the verification data is invalid\n */\n buildRequest: (\n verification: Verification,\n requestClass?: new () => T,\n alreadyHashed?: boolean,\n ) => Promise;\n /**\n * Verifies the user using the provided verification data.\n * PIN or biometrics are verified client-side.\n * OTP is sent to the server for verification (with no other data)\n * Master Password verifies client-side first if there is a MP hash, or server-side if not.\n * @param verification User-supplied verification data (OTP, MP, PIN, or biometrics)\n * @throws Error if the verification data is invalid or the verification fails\n */\n verifyUser: (verification: Verification) => Promise;\n /**\n * Request a one-time password (OTP) to be sent to the user's email\n */\n requestOTP: () => Promise;\n /**\n * Check if user has master password or can only use passwordless technologies to log in\n * Note: This only checks the server, not the local state\n * @param userId The user id to check. If not provided, the current user is used\n * @returns True if the user has a master password\n * @deprecated Use UserDecryptionOptionsService.hasMasterPassword$ instead\n */\n hasMasterPassword: (userId?: string) => Promise;\n /**\n * Check if the user has a master password and has used it during their current session\n * @param userId The user id to check. If not provided, the current user id used\n * @returns True if the user has a master password and has used it in the current session\n */\n hasMasterPasswordAndMasterKeyHash: (userId?: string) => Promise;\n /**\n * Verifies the user using the provided master password.\n * Attempts to verify client-side first, then server-side if necessary.\n * IMPORTANT: Will throw an error if the master password is invalid.\n * @param verification Master Password verification data\n * @param userId The user to verify\n * @param email The user's email\n * @throws Error if the master password is invalid\n * @returns An object containing the master key, and master password policy options if verified on server.\n */\n verifyUserByMasterPassword: (\n verification: MasterPasswordVerification,\n userId: UserId,\n email: string,\n ) => Promise;\n}\n","import { PrfKey } from \"../../../types/key\";\n\n/**\n * Contains methods for all crypto operations specific to the WebAuthn login flow.\n */\nexport abstract class WebAuthnLoginPrfCryptoServiceAbstraction {\n /**\n * Get the salt used to generate the PRF-output used when logging in with WebAuthn.\n */\n getLoginWithPrfSalt: () => Promise;\n\n /**\n * Create a symmetric key from the PRF-output by stretching it.\n * This should be used as `ExternalKey` with `RotateableKeySet`.\n */\n createSymmetricKeyFromPrf: (prf: ArrayBuffer) => Promise;\n}\n","import { AuthResult } from \"../../models/domain/auth-result\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion.view\";\n\n/**\n * Service for logging in with WebAuthnLogin credentials.\n */\nexport abstract class WebAuthnLoginServiceAbstraction {\n /**\n * Gets the credential assertion options needed for initiating the WebAuthn\n * authentication process. It should provide the challenge and other data\n * (whether FIDO2 user verification is required, the relying party id, timeout duration for the process to complete, etc.)\n * for the authenticator.\n */\n getCredentialAssertionOptions: () => Promise;\n\n /**\n * Asserts the credential. This involves user interaction with the authenticator\n * to sign a challenge with a private key (proving ownership of the private key).\n * This will trigger the browsers WebAuthn API to assert a credential. A PRF-output might\n * be included in the response if the authenticator supports it.\n *\n * @param {WebAuthnLoginCredentialAssertionOptionsView} credentialAssertionOptions - The options provided by the\n * `getCredentialAssertionOptions` method, including the challenge and other data.\n * @returns {WebAuthnLoginCredentialAssertionView} The assertion obtained from the authenticator.\n * If the assertion is not successfully obtained, it returns undefined.\n */\n assertCredential: (\n credentialAssertionOptions: WebAuthnLoginCredentialAssertionOptionsView,\n ) => Promise;\n\n /**\n * Logs the user in using the assertion obtained from the authenticator.\n * It completes the authentication process if the assertion is successfully validated server side:\n * the server verifies the signed challenge with the corresponding public key.\n *\n * @param {WebAuthnLoginCredentialAssertionView} assertion - The assertion obtained from the authenticator\n * that needs to be validated for login.\n */\n logIn: (assertion: WebAuthnLoginCredentialAssertionView) => Promise;\n}\n","export enum AuthenticationStatus {\n LoggedOut = 0,\n Locked = 1,\n Unlocked = 2,\n}\n","export enum AuthenticationType {\n Password = 0,\n Sso = 1,\n UserApiKey = 2,\n AuthRequest = 3,\n WebAuthn = 4,\n}\n","export enum SsoType {\n None = 0,\n OpenIdConnect = 1,\n Saml2 = 2,\n}\n\nexport enum MemberDecryptionType {\n MasterPassword = 0,\n KeyConnector = 1,\n TrustedDeviceEncryption = 2,\n}\n\nexport enum OpenIdConnectRedirectBehavior {\n RedirectGet = 0,\n FormPost = 1,\n}\n\nexport enum Saml2BindingType {\n HttpRedirect = 1,\n HttpPost = 2,\n}\n\nexport enum Saml2NameIdFormat {\n NotConfigured = 0,\n Unspecified = 1,\n EmailAddress = 2,\n X509SubjectName = 3,\n WindowsDomainQualifiedName = 4,\n KerberosPrincipalName = 5,\n EntityIdentifier = 6,\n Persistent = 7,\n Transient = 8,\n}\n\nexport enum Saml2SigningBehavior {\n IfIdpWantAuthnRequestsSigned = 0,\n Always = 1,\n Never = 3,\n}\n","export enum TwoFactorProviderType {\n Authenticator = 0,\n Email = 1,\n Duo = 2,\n Yubikey = 3,\n U2f = 4,\n Remember = 5,\n OrganizationDuo = 6,\n WebAuthn = 7,\n}\n","export enum VerificationType {\n MasterPassword = 0,\n OTP = 1,\n PIN = 2,\n Biometrics = 3,\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport {\n MemberDecryptionType,\n OpenIdConnectRedirectBehavior,\n Saml2BindingType,\n Saml2NameIdFormat,\n Saml2SigningBehavior,\n SsoType,\n} from \"../../enums/sso\";\nimport { SsoConfigView } from \"../view/sso-config.view\";\n\nexport class SsoConfigApi extends BaseResponse {\n static fromView(view: SsoConfigView, api = new SsoConfigApi()) {\n api.configType = view.configType;\n api.memberDecryptionType = view.memberDecryptionType;\n\n api.keyConnectorUrl = view.keyConnectorUrl;\n\n if (api.configType === SsoType.OpenIdConnect) {\n api.authority = view.openId.authority;\n api.clientId = view.openId.clientId;\n api.clientSecret = view.openId.clientSecret;\n api.metadataAddress = view.openId.metadataAddress;\n api.redirectBehavior = view.openId.redirectBehavior;\n api.getClaimsFromUserInfoEndpoint = view.openId.getClaimsFromUserInfoEndpoint;\n api.additionalScopes = view.openId.additionalScopes;\n api.additionalUserIdClaimTypes = view.openId.additionalUserIdClaimTypes;\n api.additionalEmailClaimTypes = view.openId.additionalEmailClaimTypes;\n api.additionalNameClaimTypes = view.openId.additionalNameClaimTypes;\n api.acrValues = view.openId.acrValues;\n api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;\n } else if (api.configType === SsoType.Saml2) {\n api.spUniqueEntityId = view.saml.spUniqueEntityId;\n api.spNameIdFormat = view.saml.spNameIdFormat;\n api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;\n api.spSigningBehavior = view.saml.spSigningBehavior;\n api.spMinIncomingSigningAlgorithm = view.saml.spMinIncomingSigningAlgorithm;\n api.spWantAssertionsSigned = view.saml.spWantAssertionsSigned;\n api.spValidateCertificates = view.saml.spValidateCertificates;\n\n api.idpEntityId = view.saml.idpEntityId;\n api.idpBindingType = view.saml.idpBindingType;\n api.idpSingleSignOnServiceUrl = view.saml.idpSingleSignOnServiceUrl;\n api.idpSingleLogoutServiceUrl = view.saml.idpSingleLogoutServiceUrl;\n api.idpX509PublicCert = view.saml.idpX509PublicCert;\n api.idpOutboundSigningAlgorithm = view.saml.idpOutboundSigningAlgorithm;\n api.idpAllowUnsolicitedAuthnResponse = view.saml.idpAllowUnsolicitedAuthnResponse;\n api.idpWantAuthnRequestsSigned = view.saml.idpWantAuthnRequestsSigned;\n\n // Value is inverted in the api model (disable instead of allow)\n api.idpDisableOutboundLogoutRequests = !view.saml.idpAllowOutboundLogoutRequests;\n }\n\n return api;\n }\n configType: SsoType;\n memberDecryptionType: MemberDecryptionType;\n\n keyConnectorUrl: string;\n\n // OpenId\n authority: string;\n clientId: string;\n clientSecret: string;\n metadataAddress: string;\n redirectBehavior: OpenIdConnectRedirectBehavior;\n getClaimsFromUserInfoEndpoint: boolean;\n additionalScopes: string;\n additionalUserIdClaimTypes: string;\n additionalEmailClaimTypes: string;\n additionalNameClaimTypes: string;\n acrValues: string;\n expectedReturnAcrValue: string;\n\n // SAML\n spUniqueEntityId: boolean;\n spNameIdFormat: Saml2NameIdFormat;\n spOutboundSigningAlgorithm: string;\n spSigningBehavior: Saml2SigningBehavior;\n spMinIncomingSigningAlgorithm: string;\n spWantAssertionsSigned: boolean;\n spValidateCertificates: boolean;\n\n idpEntityId: string;\n idpBindingType: Saml2BindingType;\n idpSingleSignOnServiceUrl: string;\n idpSingleLogoutServiceUrl: string;\n idpX509PublicCert: string;\n idpOutboundSigningAlgorithm: string;\n idpAllowUnsolicitedAuthnResponse: boolean;\n idpDisableOutboundLogoutRequests: boolean;\n idpWantAuthnRequestsSigned: boolean;\n\n constructor(data: any = null) {\n super(data);\n if (data == null) {\n return;\n }\n\n this.configType = this.getResponseProperty(\"ConfigType\");\n this.memberDecryptionType = this.getResponseProperty(\"MemberDecryptionType\");\n\n this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n\n this.authority = this.getResponseProperty(\"Authority\");\n this.clientId = this.getResponseProperty(\"ClientId\");\n this.clientSecret = this.getResponseProperty(\"ClientSecret\");\n this.metadataAddress = this.getResponseProperty(\"MetadataAddress\");\n this.redirectBehavior = this.getResponseProperty(\"RedirectBehavior\");\n this.getClaimsFromUserInfoEndpoint = this.getResponseProperty(\"GetClaimsFromUserInfoEndpoint\");\n this.additionalScopes = this.getResponseProperty(\"AdditionalScopes\");\n this.additionalUserIdClaimTypes = this.getResponseProperty(\"AdditionalUserIdClaimTypes\");\n this.additionalEmailClaimTypes = this.getResponseProperty(\"AdditionalEmailClaimTypes\");\n this.additionalNameClaimTypes = this.getResponseProperty(\"AdditionalNameClaimTypes\");\n this.acrValues = this.getResponseProperty(\"AcrValues\");\n this.expectedReturnAcrValue = this.getResponseProperty(\"ExpectedReturnAcrValue\");\n\n this.spUniqueEntityId = this.getResponseProperty(\"SpUniqueEntityId\");\n this.spNameIdFormat = this.getResponseProperty(\"SpNameIdFormat\");\n this.spOutboundSigningAlgorithm = this.getResponseProperty(\"SpOutboundSigningAlgorithm\");\n this.spSigningBehavior = this.getResponseProperty(\"SpSigningBehavior\");\n this.spMinIncomingSigningAlgorithm = this.getResponseProperty(\"SpMinIncomingSigningAlgorithm\");\n this.spWantAssertionsSigned = this.getResponseProperty(\"SpWantAssertionsSigned\");\n this.spValidateCertificates = this.getResponseProperty(\"SpValidateCertificates\");\n\n this.idpEntityId = this.getResponseProperty(\"IdpEntityId\");\n this.idpBindingType = this.getResponseProperty(\"IdpBindingType\");\n this.idpSingleSignOnServiceUrl = this.getResponseProperty(\"IdpSingleSignOnServiceUrl\");\n this.idpSingleLogoutServiceUrl = this.getResponseProperty(\"IdpSingleLogoutServiceUrl\");\n this.idpX509PublicCert = this.getResponseProperty(\"IdpX509PublicCert\");\n this.idpOutboundSigningAlgorithm = this.getResponseProperty(\"IdpOutboundSigningAlgorithm\");\n this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty(\n \"IdpAllowUnsolicitedAuthnResponse\",\n );\n this.idpDisableOutboundLogoutRequests = this.getResponseProperty(\n \"IdpDisableOutboundLogoutRequests\",\n );\n this.idpWantAuthnRequestsSigned = this.getResponseProperty(\"IdpWantAuthnRequestsSigned\");\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\n\nexport class AdminAuthRequestStorable {\n id: string;\n privateKey: Uint8Array;\n\n constructor(init?: Partial) {\n if (init) {\n Object.assign(this, init);\n }\n }\n\n toJSON() {\n return {\n id: this.id,\n privateKey: Utils.fromBufferToByteString(this.privateKey),\n };\n }\n\n static fromJSON(obj: Jsonify): AdminAuthRequestStorable {\n if (obj == null) {\n return null;\n }\n\n let privateKeyBuffer = null;\n if (obj.privateKey) {\n privateKeyBuffer = Utils.fromByteStringToArray(obj.privateKey);\n }\n\n return new AdminAuthRequestStorable({\n id: obj.id,\n privateKey: privateKeyBuffer,\n });\n }\n}\n","/*\n * This enum is used to determine if a user should be forced to initially set or reset their password\n * on login (server flag) or unlock via MP (client evaluation).\n */\nexport enum ForceSetPasswordReason {\n /**\n * A password reset should not be forced.\n */\n None,\n\n /**\n * Occurs when an organization admin forces a user to reset their password.\n * Communicated via server flag.\n */\n AdminForcePasswordReset,\n\n /**\n * Occurs when a user logs in / unlocks their vault with a master password that does not meet an organization's\n * master password policy that is enforced on login/unlock.\n * Only set client side b/c server can't evaluate MP.\n */\n WeakMasterPassword,\n\n /**\n * Occurs when a TDE user without a password obtains the password reset permission.\n * Set post login & decryption client side and by server in sync (to catch logged in users).\n */\n TdeUserWithoutPasswordHasPasswordResetPermission,\n}\n","/**\n * A range with a default value.\n *\n * Enforces constraints to ensure min > default > max.\n */\nexport class RangeWithDefault {\n constructor(\n readonly min: number,\n readonly max: number,\n readonly defaultValue: number,\n ) {\n if (min > max) {\n throw new Error(`${min} is greater than ${max}.`);\n }\n\n if (this.inRange(defaultValue) === false) {\n throw new Error(\"Default value is not in range.\");\n }\n }\n\n inRange(value: number): boolean {\n return value >= this.min && value <= this.max;\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { KdfType } from \"../../../platform/enums/kdf-type.enum\";\nimport { RangeWithDefault } from \"../../../platform/misc/range-with-default\";\n\n/**\n * Represents a type safe KDF configuration.\n */\nexport type KdfConfig = PBKDF2KdfConfig | Argon2KdfConfig;\n\n/**\n * Password-Based Key Derivation Function 2 (PBKDF2) KDF configuration.\n */\nexport class PBKDF2KdfConfig {\n static ITERATIONS = new RangeWithDefault(600_000, 2_000_000, 600_000);\n kdfType: KdfType.PBKDF2_SHA256 = KdfType.PBKDF2_SHA256;\n iterations: number;\n\n constructor(iterations?: number) {\n this.iterations = iterations ?? PBKDF2KdfConfig.ITERATIONS.defaultValue;\n }\n\n /**\n * Validates the PBKDF2 KDF configuration.\n * A Valid PBKDF2 KDF configuration has KDF iterations between the 600_000 and 2_000_000.\n */\n validateKdfConfig(): void {\n if (!PBKDF2KdfConfig.ITERATIONS.inRange(this.iterations)) {\n throw new Error(\n `PBKDF2 iterations must be between ${PBKDF2KdfConfig.ITERATIONS.min} and ${PBKDF2KdfConfig.ITERATIONS.max}`,\n );\n }\n }\n\n static fromJSON(json: Jsonify): PBKDF2KdfConfig {\n return new PBKDF2KdfConfig(json.iterations);\n }\n}\n\n/**\n * Argon2 KDF configuration.\n */\nexport class Argon2KdfConfig {\n static MEMORY = new RangeWithDefault(16, 1024, 64);\n static PARALLELISM = new RangeWithDefault(1, 16, 4);\n static ITERATIONS = new RangeWithDefault(2, 10, 3);\n kdfType: KdfType.Argon2id = KdfType.Argon2id;\n iterations: number;\n memory: number;\n parallelism: number;\n\n constructor(iterations?: number, memory?: number, parallelism?: number) {\n this.iterations = iterations ?? Argon2KdfConfig.ITERATIONS.defaultValue;\n this.memory = memory ?? Argon2KdfConfig.MEMORY.defaultValue;\n this.parallelism = parallelism ?? Argon2KdfConfig.PARALLELISM.defaultValue;\n }\n\n /**\n * Validates the Argon2 KDF configuration.\n * A Valid Argon2 KDF configuration has iterations between 2 and 10, memory between 16mb and 1024mb, and parallelism between 1 and 16.\n */\n validateKdfConfig(): void {\n if (!Argon2KdfConfig.ITERATIONS.inRange(this.iterations)) {\n throw new Error(\n `Argon2 iterations must be between ${Argon2KdfConfig.ITERATIONS.min} and ${Argon2KdfConfig.ITERATIONS.max}`,\n );\n }\n\n if (!Argon2KdfConfig.MEMORY.inRange(this.memory)) {\n throw new Error(\n `Argon2 memory must be between ${Argon2KdfConfig.MEMORY.min}mb and ${Argon2KdfConfig.MEMORY.max}mb`,\n );\n }\n\n if (!Argon2KdfConfig.PARALLELISM.inRange(this.parallelism)) {\n throw new Error(\n `Argon2 parallelism must be between ${Argon2KdfConfig.PARALLELISM.min} and ${Argon2KdfConfig.PARALLELISM.max}.`,\n );\n }\n }\n\n static fromJSON(json: Jsonify): Argon2KdfConfig {\n return new Argon2KdfConfig(json.iterations, json.memory, json.parallelism);\n }\n}\n\nexport const DEFAULT_KDF_CONFIG = new PBKDF2KdfConfig(PBKDF2KdfConfig.ITERATIONS.defaultValue);\n","import { Jsonify } from \"type-fest\";\n\nimport { DeviceType } from \"../../../../enums\";\nimport { PlatformUtilsService } from \"../../../../platform/abstractions/platform-utils.service\";\n\nexport class DeviceRequest {\n type: DeviceType;\n name: string;\n identifier: string;\n pushToken?: string;\n\n constructor(appId: string, platformUtilsService: PlatformUtilsService) {\n this.type = platformUtilsService.getDevice();\n this.name = platformUtilsService.getDeviceString();\n this.identifier = appId;\n this.pushToken = null;\n }\n\n static fromJSON(json: Jsonify) {\n return Object.assign(Object.create(DeviceRequest.prototype), json);\n }\n}\n","import { TwoFactorProviderType } from \"../../../enums/two-factor-provider-type\";\n\nexport class TokenTwoFactorRequest {\n constructor(\n public provider: TwoFactorProviderType = null,\n public token: string = null,\n public remember: boolean = false,\n ) {}\n}\n","import { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\n\nexport abstract class TokenRequest {\n protected device?: DeviceRequest;\n protected authRequest: string;\n\n constructor(\n protected twoFactor?: TokenTwoFactorRequest,\n device?: DeviceRequest,\n ) {\n this.device = device != null ? device : null;\n }\n\n // eslint-disable-next-line\n alterIdentityTokenHeaders(headers: Headers) {\n // Implemented in subclass if required\n }\n\n setTwoFactor(twoFactor: TokenTwoFactorRequest | undefined) {\n this.twoFactor = twoFactor;\n }\n\n setAuthRequestAccessCode(accessCode: string) {\n this.authRequest = accessCode;\n }\n\n protected toIdentityToken(clientId: string) {\n const obj: any = {\n scope: \"api offline_access\",\n client_id: clientId,\n };\n\n if (this.device) {\n obj.deviceType = this.device.type;\n obj.deviceIdentifier = this.device.identifier;\n obj.deviceName = this.device.name;\n // no push tokens for browser apps yet\n // obj.devicePushToken = this.device.pushToken;\n }\n\n //passswordless login\n if (this.authRequest) {\n obj.authRequest = this.authRequest;\n }\n\n if (this.twoFactor) {\n if (this.twoFactor.token && this.twoFactor.provider != null) {\n obj.twoFactorToken = this.twoFactor.token;\n obj.twoFactorProvider = this.twoFactor.provider;\n obj.twoFactorRemember = this.twoFactor.remember ? \"1\" : \"0\";\n }\n }\n\n return obj;\n }\n}\n","import { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class UserApiTokenRequest extends TokenRequest {\n constructor(\n public clientId: string,\n public clientSecret: string,\n protected twoFactor: TokenTwoFactorRequest,\n device?: DeviceRequest,\n ) {\n super(twoFactor, device);\n }\n\n toIdentityToken() {\n const obj = super.toIdentityToken(this.clientId);\n\n obj.scope = this.clientId.startsWith(\"organization\") ? \"api.organization\" : \"api\";\n obj.grant_type = \"client_credentials\";\n obj.client_secret = this.clientSecret;\n\n return obj;\n }\n\n static fromJSON(json: any) {\n return Object.assign(Object.create(UserApiTokenRequest.prototype), json, {\n device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n twoFactor: json.twoFactor\n ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n : undefined,\n });\n }\n}\n","export class SecretVerificationRequest {\n masterPasswordHash: string;\n otp: string;\n authRequestAccessCode: string;\n}\n","import { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorEmailRequest extends SecretVerificationRequest {\n email: string;\n deviceIdentifier: string;\n authRequestId: string;\n ssoEmail2FaSessionToken?: string;\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class IdentityCaptchaResponse extends BaseResponse {\n siteKey: string;\n\n constructor(response: any) {\n super(response);\n this.siteKey = this.getResponseProperty(\"HCaptcha_SiteKey\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport interface IKeyConnectorUserDecryptionOptionServerResponse {\n KeyConnectorUrl: string;\n}\n\nexport class KeyConnectorUserDecryptionOptionResponse extends BaseResponse {\n keyConnectorUrl: string;\n\n constructor(response: IKeyConnectorUserDecryptionOptionServerResponse) {\n super(response);\n this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\n\nexport interface ITrustedDeviceUserDecryptionOptionServerResponse {\n HasAdminApproval: boolean;\n HasLoginApprovingDevice: boolean;\n HasManageResetPasswordPermission: boolean;\n EncryptedPrivateKey?: string;\n EncryptedUserKey?: string;\n}\n\nexport class TrustedDeviceUserDecryptionOptionResponse extends BaseResponse {\n hasAdminApproval: boolean;\n hasLoginApprovingDevice: boolean;\n hasManageResetPasswordPermission: boolean;\n encryptedPrivateKey: EncString;\n encryptedUserKey: EncString;\n\n constructor(response: any) {\n super(response);\n this.hasAdminApproval = this.getResponseProperty(\"HasAdminApproval\");\n\n this.hasLoginApprovingDevice = this.getResponseProperty(\"HasLoginApprovingDevice\");\n this.hasManageResetPasswordPermission = this.getResponseProperty(\n \"HasManageResetPasswordPermission\",\n );\n\n if (response.EncryptedPrivateKey) {\n this.encryptedPrivateKey = new EncString(this.getResponseProperty(\"EncryptedPrivateKey\"));\n }\n if (response.EncryptedUserKey) {\n this.encryptedUserKey = new EncString(this.getResponseProperty(\"EncryptedUserKey\"));\n }\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\n\nexport interface IWebAuthnPrfDecryptionOptionServerResponse {\n EncryptedPrivateKey: string;\n EncryptedUserKey: string;\n}\n\nexport class WebAuthnPrfDecryptionOptionResponse extends BaseResponse {\n encryptedPrivateKey: EncString;\n encryptedUserKey: EncString;\n\n constructor(response: IWebAuthnPrfDecryptionOptionServerResponse) {\n super(response);\n if (response.EncryptedPrivateKey) {\n this.encryptedPrivateKey = new EncString(this.getResponseProperty(\"EncryptedPrivateKey\"));\n }\n if (response.EncryptedUserKey) {\n this.encryptedUserKey = new EncString(this.getResponseProperty(\"EncryptedUserKey\"));\n }\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nimport {\n IKeyConnectorUserDecryptionOptionServerResponse,\n KeyConnectorUserDecryptionOptionResponse,\n} from \"./key-connector-user-decryption-option.response\";\nimport {\n ITrustedDeviceUserDecryptionOptionServerResponse,\n TrustedDeviceUserDecryptionOptionResponse,\n} from \"./trusted-device-user-decryption-option.response\";\nimport {\n IWebAuthnPrfDecryptionOptionServerResponse,\n WebAuthnPrfDecryptionOptionResponse,\n} from \"./webauthn-prf-decryption-option.response\";\n\nexport interface IUserDecryptionOptionsServerResponse {\n HasMasterPassword: boolean;\n TrustedDeviceOption?: ITrustedDeviceUserDecryptionOptionServerResponse;\n KeyConnectorOption?: IKeyConnectorUserDecryptionOptionServerResponse;\n WebAuthnPrfOption?: IWebAuthnPrfDecryptionOptionServerResponse;\n}\n\nexport class UserDecryptionOptionsResponse extends BaseResponse {\n hasMasterPassword: boolean;\n trustedDeviceOption?: TrustedDeviceUserDecryptionOptionResponse;\n keyConnectorOption?: KeyConnectorUserDecryptionOptionResponse;\n webAuthnPrfOption?: WebAuthnPrfDecryptionOptionResponse;\n\n constructor(response: IUserDecryptionOptionsServerResponse) {\n super(response);\n\n this.hasMasterPassword = this.getResponseProperty(\"HasMasterPassword\");\n\n if (response.TrustedDeviceOption) {\n this.trustedDeviceOption = new TrustedDeviceUserDecryptionOptionResponse(\n this.getResponseProperty(\"TrustedDeviceOption\"),\n );\n }\n if (response.KeyConnectorOption) {\n this.keyConnectorOption = new KeyConnectorUserDecryptionOptionResponse(\n this.getResponseProperty(\"KeyConnectorOption\"),\n );\n }\n if (response.WebAuthnPrfOption) {\n this.webAuthnPrfOption = new WebAuthnPrfDecryptionOptionResponse(\n this.getResponseProperty(\"WebAuthnPrfOption\"),\n );\n }\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { KdfType } from \"../../../platform/enums\";\n\nimport { MasterPasswordPolicyResponse } from \"./master-password-policy.response\";\nimport { UserDecryptionOptionsResponse } from \"./user-decryption-options/user-decryption-options.response\";\n\nexport class IdentityTokenResponse extends BaseResponse {\n accessToken: string;\n expiresIn: number;\n refreshToken: string;\n tokenType: string;\n\n resetMasterPassword: boolean;\n privateKey: string;\n key: string;\n twoFactorToken: string;\n kdf: KdfType;\n kdfIterations: number;\n kdfMemory?: number;\n kdfParallelism?: number;\n forcePasswordReset: boolean;\n masterPasswordPolicy: MasterPasswordPolicyResponse;\n apiUseKeyConnector: boolean;\n keyConnectorUrl: string;\n\n userDecryptionOptions: UserDecryptionOptionsResponse;\n\n constructor(response: any) {\n super(response);\n this.accessToken = response.access_token;\n this.expiresIn = response.expires_in;\n this.refreshToken = response.refresh_token;\n this.tokenType = response.token_type;\n\n this.resetMasterPassword = this.getResponseProperty(\"ResetMasterPassword\");\n this.privateKey = this.getResponseProperty(\"PrivateKey\");\n this.key = this.getResponseProperty(\"Key\");\n this.twoFactorToken = this.getResponseProperty(\"TwoFactorToken\");\n this.kdf = this.getResponseProperty(\"Kdf\");\n this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n this.forcePasswordReset = this.getResponseProperty(\"ForcePasswordReset\");\n this.apiUseKeyConnector = this.getResponseProperty(\"ApiUseKeyConnector\");\n this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n this.masterPasswordPolicy = new MasterPasswordPolicyResponse(\n this.getResponseProperty(\"MasterPasswordPolicy\"),\n );\n\n if (response.UserDecryptionOptions) {\n this.userDecryptionOptions = new UserDecryptionOptionsResponse(\n this.getResponseProperty(\"UserDecryptionOptions\"),\n );\n }\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { MasterPasswordPolicyResponse } from \"./master-password-policy.response\";\n\nexport class IdentityTwoFactorResponse extends BaseResponse {\n // contains available two-factor providers\n twoFactorProviders: TwoFactorProviderType[];\n // a map of two-factor providers to necessary data for completion\n twoFactorProviders2: Record>;\n captchaToken: string;\n ssoEmail2faSessionToken: string;\n email?: string;\n masterPasswordPolicy?: MasterPasswordPolicyResponse;\n\n constructor(response: any) {\n super(response);\n this.captchaToken = this.getResponseProperty(\"CaptchaBypassToken\");\n this.twoFactorProviders = this.getResponseProperty(\"TwoFactorProviders\");\n this.twoFactorProviders2 = this.getResponseProperty(\"TwoFactorProviders2\");\n this.masterPasswordPolicy = new MasterPasswordPolicyResponse(\n this.getResponseProperty(\"MasterPasswordPolicy\"),\n );\n\n this.ssoEmail2faSessionToken = this.getResponseProperty(\"SsoEmail2faSessionToken\");\n this.email = this.getResponseProperty(\"Email\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class MasterPasswordPolicyResponse extends BaseResponse {\n minComplexity: number;\n minLength: number;\n requireUpper: boolean;\n requireLower: boolean;\n requireNumbers: boolean;\n requireSpecial: boolean;\n\n /**\n * Flag to indicate if the policy should be enforced on login.\n * If true, and the user's password does not meet the policy requirements,\n * the user will be forced to update their password.\n */\n enforceOnLogin: boolean;\n\n constructor(response: any) {\n super(response);\n\n this.minComplexity = this.getResponseProperty(\"MinComplexity\");\n this.minLength = this.getResponseProperty(\"MinLength\");\n this.requireUpper = this.getResponseProperty(\"RequireUpper\");\n this.requireLower = this.getResponseProperty(\"RequireLower\");\n this.requireNumbers = this.getResponseProperty(\"RequireNumbers\");\n this.requireSpecial = this.getResponseProperty(\"RequireSpecial\");\n this.enforceOnLogin = this.getResponseProperty(\"EnforceOnLogin\");\n }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { Utils } from \"../../../platform/misc/utils\";\n\nexport class TwoFactorWebAuthnResponse extends BaseResponse {\n enabled: boolean;\n keys: KeyResponse[];\n\n constructor(response: any) {\n super(response);\n this.enabled = this.getResponseProperty(\"Enabled\");\n const keys = this.getResponseProperty(\"Keys\");\n this.keys = keys == null ? null : keys.map((k: any) => new KeyResponse(k));\n }\n}\n\nexport class KeyResponse extends BaseResponse {\n name: string;\n id: number;\n migrated: boolean;\n\n constructor(response: any) {\n super(response);\n this.name = this.getResponseProperty(\"Name\");\n this.id = this.getResponseProperty(\"Id\");\n this.migrated = this.getResponseProperty(\"Migrated\");\n }\n}\n\nexport class ChallengeResponse extends BaseResponse implements PublicKeyCredentialCreationOptions {\n attestation?: AttestationConveyancePreference;\n authenticatorSelection?: AuthenticatorSelectionCriteria;\n challenge: BufferSource;\n excludeCredentials?: PublicKeyCredentialDescriptor[];\n extensions?: AuthenticationExtensionsClientInputs;\n pubKeyCredParams: PublicKeyCredentialParameters[];\n rp: PublicKeyCredentialRpEntity;\n timeout?: number;\n user: PublicKeyCredentialUserEntity;\n\n constructor(response: any) {\n super(response);\n this.attestation = this.getResponseProperty(\"attestation\");\n this.authenticatorSelection = this.getResponseProperty(\"authenticatorSelection\");\n this.challenge = Utils.fromUrlB64ToArray(this.getResponseProperty(\"challenge\"));\n this.excludeCredentials = this.getResponseProperty(\"excludeCredentials\").map((c: any) => {\n c.id = Utils.fromUrlB64ToArray(c.id).buffer;\n return c;\n });\n this.extensions = this.getResponseProperty(\"extensions\");\n this.pubKeyCredParams = this.getResponseProperty(\"pubKeyCredParams\");\n this.rp = this.getResponseProperty(\"rp\");\n this.timeout = this.getResponseProperty(\"timeout\");\n\n const user = this.getResponseProperty(\"user\");\n user.id = Utils.fromUrlB64ToArray(user.id);\n\n this.user = user;\n }\n}\n","import { AssertionOptionsResponse } from \"../../../services/webauthn-login/response/assertion-options.response\";\n\nexport class WebAuthnLoginCredentialAssertionOptionsView {\n constructor(\n readonly options: AssertionOptionsResponse,\n readonly token: string,\n ) {}\n}\n","import { firstValueFrom, map } from \"rxjs\";\n\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { GlobalStateProvider, KeyDefinition, TWO_FACTOR_MEMORY } from \"../../platform/state\";\nimport {\n TwoFactorProviderDetails,\n TwoFactorService as TwoFactorServiceAbstraction,\n} from \"../abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"../enums/two-factor-provider-type\";\nimport { IdentityTwoFactorResponse } from \"../models/response/identity-two-factor.response\";\n\nexport const TwoFactorProviders: Partial> =\n {\n [TwoFactorProviderType.Authenticator]: {\n type: TwoFactorProviderType.Authenticator,\n name: null as string,\n description: null as string,\n priority: 1,\n sort: 2,\n premium: false,\n },\n [TwoFactorProviderType.Yubikey]: {\n type: TwoFactorProviderType.Yubikey,\n name: null as string,\n description: null as string,\n priority: 3,\n sort: 4,\n premium: true,\n },\n [TwoFactorProviderType.Duo]: {\n type: TwoFactorProviderType.Duo,\n name: \"Duo\",\n description: null as string,\n priority: 2,\n sort: 5,\n premium: true,\n },\n [TwoFactorProviderType.OrganizationDuo]: {\n type: TwoFactorProviderType.OrganizationDuo,\n name: \"Duo (Organization)\",\n description: null as string,\n priority: 10,\n sort: 6,\n premium: false,\n },\n [TwoFactorProviderType.Email]: {\n type: TwoFactorProviderType.Email,\n name: null as string,\n description: null as string,\n priority: 0,\n sort: 1,\n premium: false,\n },\n [TwoFactorProviderType.WebAuthn]: {\n type: TwoFactorProviderType.WebAuthn,\n name: null as string,\n description: null as string,\n priority: 4,\n sort: 3,\n premium: false,\n },\n };\n\n// Memory storage as only required during authentication process\nexport const PROVIDERS = KeyDefinition.record, TwoFactorProviderType>(\n TWO_FACTOR_MEMORY,\n \"providers\",\n {\n deserializer: (obj) => obj,\n },\n);\n\n// Memory storage as only required during authentication process\nexport const SELECTED_PROVIDER = new KeyDefinition(\n TWO_FACTOR_MEMORY,\n \"selected\",\n {\n deserializer: (obj) => obj,\n },\n);\n\nexport class TwoFactorService implements TwoFactorServiceAbstraction {\n private providersState = this.globalStateProvider.get(PROVIDERS);\n private selectedState = this.globalStateProvider.get(SELECTED_PROVIDER);\n readonly providers$ = this.providersState.state$.pipe(\n map((providers) => Utils.recordToMap(providers)),\n );\n readonly selected$ = this.selectedState.state$;\n\n constructor(\n private i18nService: I18nService,\n private platformUtilsService: PlatformUtilsService,\n private globalStateProvider: GlobalStateProvider,\n ) {}\n\n init() {\n TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t(\"emailTitle\");\n TwoFactorProviders[TwoFactorProviderType.Email].description = this.i18nService.t(\"emailDescV2\");\n\n TwoFactorProviders[TwoFactorProviderType.Authenticator].name =\n this.i18nService.t(\"authenticatorAppTitle\");\n TwoFactorProviders[TwoFactorProviderType.Authenticator].description =\n this.i18nService.t(\"authenticatorAppDescV2\");\n\n TwoFactorProviders[TwoFactorProviderType.Duo].description = this.i18nService.t(\"duoDescV2\");\n\n TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].name =\n \"Duo (\" + this.i18nService.t(\"organization\") + \")\";\n TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].description =\n this.i18nService.t(\"duoOrganizationDesc\");\n\n TwoFactorProviders[TwoFactorProviderType.WebAuthn].name = this.i18nService.t(\"webAuthnTitle\");\n TwoFactorProviders[TwoFactorProviderType.WebAuthn].description =\n this.i18nService.t(\"webAuthnDesc\");\n\n TwoFactorProviders[TwoFactorProviderType.Yubikey].name = this.i18nService.t(\"yubiKeyTitleV2\");\n TwoFactorProviders[TwoFactorProviderType.Yubikey].description =\n this.i18nService.t(\"yubiKeyDesc\");\n }\n\n async getSupportedProviders(win: Window): Promise {\n const data = await firstValueFrom(this.providers$);\n const providers: any[] = [];\n if (data == null) {\n return providers;\n }\n\n if (\n data.has(TwoFactorProviderType.OrganizationDuo) &&\n this.platformUtilsService.supportsDuo()\n ) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.OrganizationDuo]);\n }\n\n if (data.has(TwoFactorProviderType.Authenticator)) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.Authenticator]);\n }\n\n if (data.has(TwoFactorProviderType.Yubikey)) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.Yubikey]);\n }\n\n if (data.has(TwoFactorProviderType.Duo) && this.platformUtilsService.supportsDuo()) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.Duo]);\n }\n\n if (\n data.has(TwoFactorProviderType.WebAuthn) &&\n this.platformUtilsService.supportsWebAuthn(win)\n ) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.WebAuthn]);\n }\n\n if (data.has(TwoFactorProviderType.Email)) {\n providers.push(TwoFactorProviders[TwoFactorProviderType.Email]);\n }\n\n return providers;\n }\n\n async getDefaultProvider(webAuthnSupported: boolean): Promise {\n const data = await firstValueFrom(this.providers$);\n const selected = await firstValueFrom(this.selected$);\n if (data == null) {\n return null;\n }\n\n if (selected != null && data.has(selected)) {\n return selected;\n }\n\n let providerType: TwoFactorProviderType = null;\n let providerPriority = -1;\n data.forEach((_value, type) => {\n const provider = (TwoFactorProviders as any)[type];\n if (provider != null && provider.priority > providerPriority) {\n if (type === TwoFactorProviderType.WebAuthn && !webAuthnSupported) {\n return;\n }\n\n providerType = type;\n providerPriority = provider.priority;\n }\n });\n\n return providerType;\n }\n\n async setSelectedProvider(type: TwoFactorProviderType): Promise {\n await this.selectedState.update(() => type);\n }\n\n async clearSelectedProvider(): Promise {\n await this.selectedState.update(() => null);\n }\n\n async setProviders(response: IdentityTwoFactorResponse): Promise {\n await this.providersState.update(() => response.twoFactorProviders2);\n }\n\n async clearProviders(): Promise {\n await this.providersState.update(() => null);\n }\n\n getProviders(): Promise> {\n return firstValueFrom(this.providers$);\n }\n}\n","import { Utils } from \"../../../../platform/misc/utils\";\n\nexport abstract class WebAuthnLoginResponseRequest {\n id: string;\n rawId: string;\n type: string;\n extensions: Record;\n\n constructor(credential: PublicKeyCredential) {\n this.id = credential.id;\n this.rawId = Utils.fromBufferToUrlB64(credential.rawId);\n this.type = credential.type;\n\n // WARNING: do not add PRF information here by mapping\n // credential.getClientExtensionResults() into the extensions property,\n // as it will be sent to the server (leaking credentials).\n this.extensions = {}; // Extensions are handled client-side\n }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../../platform/misc/utils\";\n\nimport { WebAuthnLoginResponseRequest } from \"./webauthn-login-response.request\";\n\n// base 64 strings\nexport interface WebAuthnLoginAssertionResponseData {\n authenticatorData: string;\n signature: string;\n clientDataJSON: string;\n userHandle: string;\n}\n\nexport class WebAuthnLoginAssertionResponseRequest extends WebAuthnLoginResponseRequest {\n response: WebAuthnLoginAssertionResponseData;\n\n constructor(credential: PublicKeyCredential) {\n super(credential);\n\n if (!(credential.response instanceof AuthenticatorAssertionResponse)) {\n throw new Error(\"Invalid authenticator response\");\n }\n\n this.response = {\n authenticatorData: Utils.fromBufferToUrlB64(credential.response.authenticatorData),\n signature: Utils.fromBufferToUrlB64(credential.response.signature),\n clientDataJSON: Utils.fromBufferToUrlB64(credential.response.clientDataJSON),\n userHandle: Utils.fromBufferToUrlB64(credential.response.userHandle),\n };\n }\n\n static fromJSON(json: Jsonify) {\n return Object.assign(Object.create(WebAuthnLoginAssertionResponseRequest.prototype), json);\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { Utils } from \"../../../../platform/misc/utils\";\n\nexport class AssertionOptionsResponse\n extends BaseResponse\n implements PublicKeyCredentialRequestOptions\n{\n /** A list of credentials that the authenticator is allowed to use; only used for non-discoverable flow */\n allowCredentials?: PublicKeyCredentialDescriptor[];\n challenge: BufferSource;\n extensions?: AuthenticationExtensionsClientInputs;\n rpId?: string;\n timeout?: number;\n userVerification?: UserVerificationRequirement;\n\n constructor(response: unknown) {\n super(response);\n this.allowCredentials = this.getResponseProperty(\"allowCredentials\")?.map((c: any) => ({\n ...c,\n id: Utils.fromUrlB64ToArray(c.id).buffer,\n }));\n this.challenge = Utils.fromUrlB64ToArray(this.getResponseProperty(\"challenge\"));\n this.extensions = this.getResponseProperty(\"extensions\");\n this.rpId = this.getResponseProperty(\"rpId\");\n this.timeout = this.getResponseProperty(\"timeout\");\n this.userVerification = this.getResponseProperty(\"userVerification\");\n }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nimport { AssertionOptionsResponse } from \"./assertion-options.response\";\n\nexport class CredentialAssertionOptionsResponse extends BaseResponse {\n options: AssertionOptionsResponse;\n token: string;\n\n constructor(response: unknown) {\n super(response);\n this.options = new AssertionOptionsResponse(this.getResponseProperty(\"options\"));\n this.token = this.getResponseProperty(\"token\");\n }\n}\n","import { map, Observable } from \"rxjs\";\n\nimport {\n NeverDomains,\n EquivalentDomains,\n UriMatchStrategySetting,\n UriMatchStrategy,\n} from \"../../models/domain/domain-service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport {\n DOMAIN_SETTINGS_DISK,\n ActiveUserState,\n GlobalState,\n KeyDefinition,\n StateProvider,\n UserKeyDefinition,\n} from \"../../platform/state\";\n\nconst SHOW_FAVICONS = new KeyDefinition(DOMAIN_SETTINGS_DISK, \"showFavicons\", {\n deserializer: (value: boolean) => value ?? true,\n});\n\nconst NEVER_DOMAINS = new KeyDefinition(DOMAIN_SETTINGS_DISK, \"neverDomains\", {\n deserializer: (value: NeverDomains) => value ?? null,\n});\n\nconst EQUIVALENT_DOMAINS = new UserKeyDefinition(DOMAIN_SETTINGS_DISK, \"equivalentDomains\", {\n deserializer: (value: EquivalentDomains) => value ?? null,\n clearOn: [\"logout\"],\n});\n\nconst DEFAULT_URI_MATCH_STRATEGY = new UserKeyDefinition(\n DOMAIN_SETTINGS_DISK,\n \"defaultUriMatchStrategy\",\n {\n deserializer: (value: UriMatchStrategySetting) => value ?? UriMatchStrategy.Domain,\n clearOn: [],\n },\n);\n\nexport abstract class DomainSettingsService {\n showFavicons$: Observable;\n setShowFavicons: (newValue: boolean) => Promise;\n neverDomains$: Observable;\n setNeverDomains: (newValue: NeverDomains) => Promise;\n equivalentDomains$: Observable;\n setEquivalentDomains: (newValue: EquivalentDomains) => Promise;\n defaultUriMatchStrategy$: Observable;\n setDefaultUriMatchStrategy: (newValue: UriMatchStrategySetting) => Promise;\n getUrlEquivalentDomains: (url: string) => Observable>;\n}\n\nexport class DefaultDomainSettingsService implements DomainSettingsService {\n private showFaviconsState: GlobalState;\n readonly showFavicons$: Observable;\n\n private neverDomainsState: GlobalState;\n readonly neverDomains$: Observable;\n\n private equivalentDomainsState: ActiveUserState;\n readonly equivalentDomains$: Observable;\n\n private defaultUriMatchStrategyState: ActiveUserState;\n readonly defaultUriMatchStrategy$: Observable;\n\n constructor(private stateProvider: StateProvider) {\n this.showFaviconsState = this.stateProvider.getGlobal(SHOW_FAVICONS);\n this.showFavicons$ = this.showFaviconsState.state$.pipe(map((x) => x ?? true));\n\n this.neverDomainsState = this.stateProvider.getGlobal(NEVER_DOMAINS);\n this.neverDomains$ = this.neverDomainsState.state$.pipe(map((x) => x ?? null));\n\n this.equivalentDomainsState = this.stateProvider.getActive(EQUIVALENT_DOMAINS);\n this.equivalentDomains$ = this.equivalentDomainsState.state$.pipe(map((x) => x ?? null));\n\n this.defaultUriMatchStrategyState = this.stateProvider.getActive(DEFAULT_URI_MATCH_STRATEGY);\n this.defaultUriMatchStrategy$ = this.defaultUriMatchStrategyState.state$.pipe(\n map((x) => x ?? UriMatchStrategy.Domain),\n );\n }\n\n async setShowFavicons(newValue: boolean): Promise {\n await this.showFaviconsState.update(() => newValue);\n }\n\n async setNeverDomains(newValue: NeverDomains): Promise {\n await this.neverDomainsState.update(() => newValue);\n }\n\n async setEquivalentDomains(newValue: EquivalentDomains): Promise {\n await this.equivalentDomainsState.update(() => newValue);\n }\n\n async setDefaultUriMatchStrategy(newValue: UriMatchStrategySetting): Promise {\n await this.defaultUriMatchStrategyState.update(() => newValue);\n }\n\n getUrlEquivalentDomains(url: string): Observable> {\n const domains$ = this.equivalentDomains$.pipe(\n map((equivalentDomains) => {\n const domain = Utils.getDomain(url);\n if (domain == null || equivalentDomains == null) {\n return new Set() as Set;\n }\n\n const equivalents = equivalentDomains.filter((ed) => ed.includes(domain)).flat();\n\n return new Set(equivalents);\n }),\n );\n\n return domains$;\n }\n}\n","import { Observable } from \"rxjs\";\n\nexport type BillingAccountProfile = {\n hasPremiumPersonally: boolean;\n hasPremiumFromAnyOrganization: boolean;\n};\n\nexport abstract class BillingAccountProfileStateService {\n /**\n * Emits `true` when the active user's account has been granted premium from any of the\n * organizations it is a member of. Otherwise, emits `false`\n */\n hasPremiumFromAnyOrganization$: Observable;\n\n /**\n * Emits `true` when the active user's account has an active premium subscription at the\n * individual user level\n */\n hasPremiumPersonally$: Observable;\n\n /**\n * Emits `true` when either `hasPremiumPersonally` or `hasPremiumFromAnyOrganization` is `true`\n */\n hasPremiumFromAnySource$: Observable;\n\n /**\n * Sets the active user's premium status fields upon every full sync, either from their personal\n * subscription to premium, or an organization they're a part of that grants them premium.\n * @param hasPremiumPersonally\n * @param hasPremiumFromAnyOrganization\n */\n abstract setHasPremium(\n hasPremiumPersonally: boolean,\n hasPremiumFromAnyOrganization: boolean,\n ): Promise;\n}\n","import { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { TokenizedPaymentMethodRequest } from \"@bitwarden/common/billing/models/request/tokenized-payment-method.request\";\nimport { VerifyBankAccountRequest } from \"@bitwarden/common/billing/models/request/verify-bank-account.request\";\nimport { InvoicesResponse } from \"@bitwarden/common/billing/models/response/invoices.response\";\nimport { PaymentInformationResponse } from \"@bitwarden/common/billing/models/response/payment-information.response\";\n\nimport { SubscriptionCancellationRequest } from \"../../billing/models/request/subscription-cancellation.request\";\nimport { OrganizationBillingMetadataResponse } from \"../../billing/models/response/organization-billing-metadata.response\";\nimport { OrganizationBillingStatusResponse } from \"../../billing/models/response/organization-billing-status.response\";\nimport { OrganizationSubscriptionResponse } from \"../../billing/models/response/organization-subscription.response\";\nimport { PlanResponse } from \"../../billing/models/response/plan.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { CreateClientOrganizationRequest } from \"../models/request/create-client-organization.request\";\nimport { UpdateClientOrganizationRequest } from \"../models/request/update-client-organization.request\";\nimport { ProviderSubscriptionResponse } from \"../models/response/provider-subscription-response\";\n\nexport abstract class BillingApiServiceAbstraction {\n cancelOrganizationSubscription: (\n organizationId: string,\n request: SubscriptionCancellationRequest,\n ) => Promise;\n\n cancelPremiumUserSubscription: (request: SubscriptionCancellationRequest) => Promise;\n\n createClientOrganization: (\n providerId: string,\n request: CreateClientOrganizationRequest,\n ) => Promise;\n\n createSetupIntent: (paymentMethodType: PaymentMethodType) => Promise;\n\n getBillingStatus: (id: string) => Promise;\n\n getOrganizationBillingMetadata: (\n organizationId: string,\n ) => Promise;\n\n getOrganizationSubscription: (\n organizationId: string,\n ) => Promise;\n\n getPlans: () => Promise>;\n\n getProviderClientInvoiceReport: (providerId: string, invoiceId: string) => Promise;\n\n getProviderInvoices: (providerId: string) => Promise;\n\n getProviderPaymentInformation: (providerId: string) => Promise;\n\n getProviderSubscription: (providerId: string) => Promise;\n\n updateClientOrganization: (\n providerId: string,\n organizationId: string,\n request: UpdateClientOrganizationRequest,\n ) => Promise;\n\n updateProviderPaymentMethod: (\n providerId: string,\n request: TokenizedPaymentMethodRequest,\n ) => Promise;\n\n updateProviderTaxInformation: (\n providerId: string,\n request: ExpandedTaxInfoUpdateRequest,\n ) => Promise;\n\n verifyProviderBankAccount: (\n providerId: string,\n request: VerifyBankAccountRequest,\n ) => Promise;\n}\n","export abstract class BraintreeServiceAbstraction {\n /**\n * Utilizes the Braintree SDK to create a [Braintree drop-in]{@link https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html} instance attached to the container ID specified as part of the {@link loadBraintree} method.\n */\n createDropin: () => void;\n\n /**\n * Loads the Bitwarden dropin.js script in the element of the current page.\n * This script attaches the Braintree SDK to the window.\n * @param containerId - The ID of the HTML element where the Braintree drop-in will be loaded at.\n * @param autoCreateDropin - Specifies whether the Braintree drop-in should be created when dropin.js loads.\n */\n loadBraintree: (containerId: string, autoCreateDropin: boolean) => void;\n\n /**\n * Invokes the Braintree [requestPaymentMethod]{@link https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#requestPaymentMethod} method\n * in order to generate a payment method token using the active Braintree drop-in.\n */\n requestPaymentMethod: () => Promise;\n\n /**\n * Removes the following elements from the of the current page:\n * - The Bitwarden dropin.js script\n * - Any