(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-263ce514"],{"65c8":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div")},s=[],r=o("2f62"),n=(o("be8c"),o("585f")),i=o("c6d8"),c=o("4a1f"),l=o.n(c);o("9225");l.a.current();var u={components:{},props:{microsoftTeams:Object},data:()=>({}),async mounted(){await this.tryCompleteFlow(),n["a"].$on("login-state-change",async t=>{console.log("teams auth state",this.user),await this.tryCompleteFlow()})},methods:{async tryCompleteFlow(){if(console.log("teams available in auth end",this.microsoftTeams,window.location.hash),console.log("AUTH result",this.user),this.user){var t=await i["a"].createToken();this.microsoftTeams.authentication.notifySuccess(t.data)}},getHashParameters(){let t={};return window.location.hash.substr(1).split("&").forEach((function(e){let o=e.split("="),a=o[0],s=o[1]&&decodeURIComponent(o[1]);t[a]=s})),t}},computed:{...Object(r["b"])({user:"user"})},watch:{microsoftTeams(){this.tryCompleteFlow()}}},h=u,p=o("2877"),d=Object(p["a"])(h,a,s,!1,null,"653dbff0",null);e["default"]=d.exports},c6d8:function(t,e,o){"use strict";var a=o("dde5");o("b383");e["a"]={get(t){return a["a"].http.get("/v1.0/account/"+t)},linkSlack(t,e){return a["a"].http.post(`/v1.0/oauth/link-slack?code=${t}&scope=${e}`,{})},linkTeams(t,e){return a["a"].http.post(`/v1.0/oauth/link-teams?code=${t}&scope=${e}`,{})},createToken(){return a["a"].http.post("/v1.0/oauth/create-token",{})},createCookie(t){return a["a"].http.post("/v1.0/oauth/create-cookie",{id_token:t},this.getConfig(t))},login(t,e){return a["a"].http.post("/v1.0/oauth/login",{email:t,password:e,create_cookie:!1},{withCredentials:!1})},register(t,e,o){return a["a"].http.post("/v1.0/oauth/register",{email:t,password:e,display_name:o,create_cookie:!1},{withCredentials:!1})},getConfig(t){return{headers:{authorization:"Bearer "+t}}}}}}]);
//# sourceMappingURL=chunk-263ce514.d7079393.js.map