(()=>{vart={n:o=>{vare=o&&o.__esModule?()=>o.default:()=>o;returnt.d(e,{a:e}),e},d:(o,e)=>{for(varrine)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);conste=flarum.core.compat["common/app"];t.n(e)().initializers.add("foskym/flarum-oauth-center",(function(){console.log("[foskym/flarum-oauth-center] Hello, forum and admin!")}));constr=flarum.core.compat["forum/app"];varn=t.n(r);consta=flarum.core.compat["common/extend"],u=flarum.core.compat["forum/components/UserPage"];vars=t.n(u);constc=flarum.core.compat["common/components/LinkButton"];vari=t.n(c);functionp(t,o){returnp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){returnt.__proto__=o,t},p(t,o)}functionf(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}flarum.core.compat["common/components/Page"];constl=flarum.core.compat["forum/components/IndexPage"];vard=t.n(l);consth=flarum.core.compat["forum/components/LogInModal"];vary=t.n(h);constv=flarum.core.compat["common/utils/extractText"];varg=t.n(v),b=function(t){functiono(){returnt.apply(this,arguments)||this}f(o,t);vare=o.prototype;returne.oninit=function(o){t.prototype.oninit.call(this,o),n().session.user||setTimeout((function(){returnn().modal.show(y())}),500),m.route.param()},e.setTitle=function(){n().setTitle(g()(n().translator.trans("foskym-oauth-center.forum.page.title.authorize"))),n().setTitleCount(0)},e.view=function(){returnm("div",{className:"AuthorizePage"},m("div",{className:"container"}))},o}(d()),z=function(t){functiono(){returnt.apply(this,arguments)||this}f(o,t);vare=o.prototype;returne.oninit=function(o){t.prototype.oninit.call(this,o),this.loadUser(m.route.param("username"))},e.content=function(){returnm("div",{className:"AuthorizedPage"})},o}(s());n().initializers.add("foskym/flarum-oauth-center",(function(){n().routes["oauth.authorize"]={path:"/oauth/authorize",component:b},n().routes["user.authorized"]={path:"/u/:username/authorized",component:z},(0,a.extend)(s().prototype,"navItems",(function(t){n().session.user&&n().session.user.id()===this.user.id()&&t.add("authorized",i().component({href:n().route("user.authorized",{username:this.user.username()}),icon:"fas fa-user-friends"},[n().translator.trans("foskym-oauth-center.forum.page.label.authorized")]),-110)}))}))})(),module.exports=o})();