text: module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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=10)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return r}))},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat["components/SettingsPage"]},function(t,e){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Notification"]},,,function(t,e,n){"use strict";n.r(e),n.d(e,"queryExists",(function(){return x})),n.d(e,"createQuery",(function(){return j})),n.d(e,"deleteQuery",(function(){return _}));var r=n(2),o=n(0),a=n.n(o),c=n(4),i=n.n(c),u=n(5),s=n.n(u),f=n(6),l=n.n(f);function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var d=n(1);function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=n(3),w=n.n(y),b=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return h(p(e=t.call.apply(t,[this].concat(r))||this),"name",w.a.attribute("name")),h(p(e),"query",w.a.attribute("query")),e}return Object(d.a)(e,t),e}(w.a),v=n(7),g=function(t){function e(){return t.apply(this,arguments)||this}Object(d.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-search-plus"},n.href=function(){var t=this.props.notification.subject();return app.route.discussion(t)},n.content=function(){return app.translator.trans("clarkwinkelmann-watch-search.forum.notifications.new_discussion_text",{user:this.props.notification.fromUser(),title:this.props.notification.subject().title()})},e}(n.n(v).a);function x(t){return a.a.store.all("watch-search-queries").some((function(e){return e.query()===t}))}function j(t,e){return void 0===e&&(e=null),e||(e=t),a.a.store.createRecord("watch-search-queries").save({name:e,query:t})}function _(t){var e=a.a.store.all("watch-search-queries").find((function(e){return e.query()===t}));if(e)return e.delete();throw new Error("No record for query "+t)}a.a.initializers.add("clarkwinkelmann-watch-search",(function(){a.a.store.models["watch-search-queries"]=b,a.a.notificationComponents.newDiscussionInSearch=g,Object(r.extend)(s.a.prototype,"notificationTypes",(function(t){t.add("newDiscussionInSearch",{name:"newDiscussionInSearch",icon:"fas fa-search-plus",label:a.a.translator.trans("clarkwinkelmann-watch-search.forum.settings.notify_new_discussion_label")})})),Object(r.extend)(i.a.prototype,"settingsItems",(function(t){var e=a.a.store.all("watch-search-queries");e.length&&t.add("watch-search-queries",m("fieldset",[m("legend",a.a.translator.trans("clarkwinkelmann-watch-search.forum.settings.title")),m("table.WatchSearchQueries",m("tbody",e.map((function(t){return m("tr",[m("td",{onclick:function(){var e=prompt(a.a.translator.trans("clarkwinkelmann-watch-search.forum.settings.new-name"),t.name());e!==t.name()&&e&&t.save({name:e}).then((function(){m.redraw()}))}},t.name()),m("td",m("code",t.query())),m("td",l.a.component({className:"Button Button--danger Button--icon",icon:"fas fa-times",title:a.a.translator.trans("clarkwinkelmann-watch-search.forum.settings.delete"),onclick:function(){t.delete().then((function(){m.redraw()}))}}))])}))))]))}))}))}]);
  //# sourceMappingURL=forum.js.map