(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{434:function(t,e,r){var content=r(500);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(39).default)("419b9f89",content,!0,{sourceMap:!1})},499:function(t,e,r){"use strict";r(434)},500:function(t,e,r){var o=r(38)(!1);o.push([t.i,"h4 img{max-height:40px;border-radius:20px;background-color:#333;border:1px solid #333}",""]),t.exports=o},552:function(t,e,r){"use strict";r.r(e);var o=r(11),n=r(3),c=r(13);function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function d(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var _={name:"Authorize",layout:"modal",middleware:["auth"],asyncData:t=>Object(n.a)((function*(){var{$axios:e,query:r,error:o,req:n}=t,{client_id:c,redirect_uri:l,scope:d,response_type:_}=r,h="";c||(h="client_id is missing"),l||(h="redirect_uri is missing"),d&&"event:write"===d||(h="scope is missing or wrong"),_&&"code"===_||(h="response_type is missing or wrong");try{var m=yield e.$get("/client/".concat(c));return m||(h="client not found"),h?o({statusCode:404,message:h}):{client:m,redirect_uri:l,scope:d,response_type:_}}catch(t){o({statusCode:400,message:"Something goes wrong with OAuth authorization"})}}))(),data:()=>({client:{name:"Test"}}),computed:d(d({},Object(c.c)(["settings"])),{},{authorizeURL(){var{scope:t,response_type:e,client_id:r,redirect_uri:o,state:n}=this.$route.query,c="client_id=".concat(r,"&response_type=").concat(e,"&scope=").concat(t,"&redirect_uri=").concat(o,"&state=").concat(n);return"oauth/authorize?".concat(c)}}),head(){return{title:"".concat(this.settings.title," - Authorize")}}},h=(r(499),r(6)),component=Object(h.a)(_,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"d-flex justify-space-around"},[r("v-card",{staticClass:"mt-5",attrs:{"max-width":"600px"}},[r("v-card-title",[t._v(t._s(t.settings.title)+" - "+t._s(t.$t("common.authorize")))]),r("v-card-text",[r("u",[t._v(t._s(t.$auth.user.email))]),r("div",[r("p",{domProps:{innerHTML:t._s(t.$t("oauth.authorization_request",{app:t.client.name,instance_name:t.settings.title}))}}),r("ul",{staticClass:"mb-2"},t._l(t.scope.split(" "),(function(s){return r("li",[t._v(t._s(t.$t("oauth.scopes."+t.scope)))])})),0),r("span",{domProps:{innerHTML:t._s(t.$t("oauth.redirected_to",{url:t.$route.query.redirect_uri}))}})])]),r("v-card-actions",[r("v-spacer"),r("v-btn",{attrs:{color:"error",to:"/"}},[t._v(t._s(t.$t("common.cancel")))]),r("v-btn",{attrs:{href:t.authorizeURL,color:"success"}},[t._v(t._s(t.$t("common.authorize")))])],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);