module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=48)}({0:function(t,e){t.exports=flarum.core.compat.extend},11:function(t,e){},12:function(t,e){t.exports=flarum.core.compat["components/Badge"]},20:function(t,e){t.exports=flarum.core.compat["components/PermissionGrid"]},24:function(t,e){t.exports=flarum.extensions["fof-components"]},26:function(t,e,n){"use strict";var i=n(46),a=n.n(i),s=n(0),r=n(20),o=n.n(r),u=function(){Object(s.extend)(o.a.prototype,"startItems",(function(t){t.add("startPrivateUsers",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.create_private_discussions_with_users"),permission:"discussion.startPrivateDiscussionWithUsers"},95),t.add("startPrivateGroups",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.create_private_discussions_with_groups"),permission:"discussion.startPrivateDiscussionWithGroups"},95),t.add("startPrivateBlockers",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.create_private_discussions_with_blocking_users"),permission:"startPrivateDiscussionWithBlockers"},95)})),Object(s.extend)(o.a.prototype,"replyItems",(function(t){t.add("makePrivatePublic",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.make_private_into_public"),permission:"discussion.makePublic"},95)})),Object(s.extend)(o.a.prototype,"moderateItems",(function(t){t.add("editUserRecipients",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.edit_user_recipients"),permission:"discussion.editUserRecipients"},95),t.add("editGroupRecipients",{icon:"far fa-map",label:app.translator.trans("fof-byobu.admin.permission.edit_group_recipients"),permission:"discussion.editGroupRecipients"},95),t.add("actor-can-view-private-discussions-when-flagged",{icon:"fas fa-flag",label:app.translator.trans("fof-byobu.admin.permission.view_private_discussions-when-flagged"),permission:"user.viewPrivateDiscussionsWhenFlagged"},95)}))},p=n(24),d=(n(12),p.settings.SettingsModal),f=p.settings.items,c=f.BooleanItem,l=(f.StringItem,f.SelectItem);function b(){var t={},e=app.store.all("tags").sort((function(t,e){return t.data.attributes.position-e.data.attributes.position})).reduce((function(e,n){return null===n.position()||(n.isChild()?void 0===t[n.data.relationships.parent.data.id]?t[n.data.relationships.parent.data.id]=[n.data.id]:t[n.data.relationships.parent.data.id].push(n.data.id):e[n.slug()]=n.name()),e}),{}),n={"":app.translator.trans("fof-byobu.admin.settings.use_tag_slug_no_restriction")};for(var i in e){n[i]=e[i];var a=app.store.getBy("tags","slug",i);a.isPrimary()&&void 0!==t[a.data.id]&&t[a.data.id].forEach((function(t){var e=app.store.getBy("tags","id",t);n[e.slug()]=" └─ "+e.name()}))}return n}var _=function(){app.extensionSettings["fof-byobu"]=function(){return app.modal.show(new d({title:"FoF Byōbu",size:"medium",items:[m(c,{key:"fof-byobu.index_link"},app.translator.trans("fof-byobu.admin.settings.byobu_index")),m("p",null,app.translator.trans("fof-byobu.admin.settings.byobu_index_help")),m("div",{className:"Form-group"},m("label",null,app.translator.trans("fof-byobu.admin.settings.use_tag_slug")),l.component({options:b(),key:"fof-byobu.use_tag_slug",required:!1})),m("p",null,app.translator.trans("fof-byobu.admin.settings.use_tag_slug_help",{no_restriction:app.translator.trans("fof-byobu.admin.settings.use_tag_slug_no_restriction")}))]}))}};app.initializers.add("fof-byobu",(function(t){t.store.models.recipients=a.a,u(),_()}))},46:function(t,e){t.exports=flarum.core.compat["core/models/User"]},48:function(t,e,n){"use strict";n.r(e);var i=n(11);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n(26)}});
//# sourceMappingURL=admin.js.map