From ed59241ecf367b5db7573fac3e3cea36325c7e18 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Fri, 20 Sep 2019 06:22:45 +0000 Subject: [PATCH] Bundled output for commit 0fdb32d2a7c530d4b6b74bb9d5190d3021deb8cc [skip ci] --- extensions/suspend/js/dist/admin.js | 2 +- extensions/suspend/js/dist/admin.js.map | 2 +- extensions/suspend/js/dist/forum.js | 2 +- extensions/suspend/js/dist/forum.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/suspend/js/dist/admin.js b/extensions/suspend/js/dist/admin.js index 0b426c097..c59b2549d 100644 --- a/extensions/suspend/js/dist/admin.js +++ b/extensions/suspend/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=13)}({0:function(e,n){e.exports=flarum.core.compat.app},1:function(e,n){e.exports=flarum.core.compat.extend},11:function(e,n){e.exports=flarum.core.compat["components/PermissionGrid"]},13:function(e,n,t){"use strict";t.r(n);var r=t(1),o=t(0),u=t.n(o),i=t(11),s=t.n(i);u.a.initializers.add("suspend",function(){Object(r.extend)(s.a.prototype,"moderateItems",function(e){e.add("suspendUsers",{icon:"fas fa-ban",label:u.a.translator.trans("flarum-suspend.admin.permissions.suspend_users_label"),permission:"user.suspend"})})})}}); +module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=11)}([function(e,n){e.exports=flarum.core.compat.app},function(e,n){e.exports=flarum.core.compat.extend},,,,,,,,function(e,n){e.exports=flarum.core.compat["components/PermissionGrid"]},,function(e,n,t){"use strict";t.r(n);var r=t(1),o=t(0),u=t.n(o),i=t(9),s=t.n(i);u.a.initializers.add("suspend",function(){Object(r.extend)(s.a.prototype,"moderateItems",function(e){e.add("suspendUsers",{icon:"fas fa-ban",label:u.a.translator.trans("flarum-suspend.admin.permissions.suspend_users_label"),permission:"user.suspend"})})})}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/suspend/js/dist/admin.js.map b/extensions/suspend/js/dist/admin.js.map index 14449f5e2..6a15c4939 100644 --- a/extensions/suspend/js/dist/admin.js.map +++ b/extensions/suspend/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/external \"flarum.core.compat['app']\"","webpack://@flarum/suspend/external \"flarum.core.compat['extend']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/suspend/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extend","PermissionGrid","items","icon","label","translator","trans","permission"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,WAA2B,OAAArB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD/B,EAAAkC,EAAA,GAIAlC,IAAAmC,EAAA,sBClFAhC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,qBCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,yBCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,iHCIAC,IAAIC,aAAaC,IAAI,UAAW,WAC9BC,iBAAOC,IAAeX,UAAW,gBAAiB,SAAAY,GAChDA,EAAMH,IAAI,eAAgB,CACxBI,KAAM,aACNC,MAAOP,IAAIQ,WAAWC,MAAM,wDAC5BC,WAAY","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/PermissionGrid'];","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\n\napp.initializers.add('suspend', () => {\n extend(PermissionGrid.prototype, 'moderateItems', items => {\n items.add('suspendUsers', {\n icon: 'fas fa-ban',\n label: app.translator.trans('flarum-suspend.admin.permissions.suspend_users_label'),\n permission: 'user.suspend'\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/external \"flarum.core.compat['app']\"","webpack://@flarum/suspend/external \"flarum.core.compat['extend']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/suspend/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extend","PermissionGrid","items","icon","label","translator","trans","permission"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,WAA2B,OAAArB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD/B,EAAAkC,EAAA,GAIAlC,IAAAmC,EAAA,oBClFAhC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,mBCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,6BCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,8GCIAC,IAAIC,aAAaC,IAAI,UAAW,WAC9BC,iBAAOC,IAAeX,UAAW,gBAAiB,SAAAY,GAChDA,EAAMH,IAAI,eAAgB,CACxBI,KAAM,aACNC,MAAOP,IAAIQ,WAAWC,MAAM,wDAC5BC,WAAY","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/PermissionGrid'];","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\n\napp.initializers.add('suspend', () => {\n extend(PermissionGrid.prototype, 'moderateItems', items => {\n items.add('suspendUsers', {\n icon: 'fas fa-ban',\n label: app.translator.trans('flarum-suspend.admin.permissions.suspend_users_label'),\n permission: 'user.suspend'\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/suspend/js/dist/forum.js b/extensions/suspend/js/dist/forum.js index 746d7b4e5..60e6ef175 100644 --- a/extensions/suspend/js/dist/forum.js +++ b/extensions/suspend/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.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 s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));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=12)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Notification"]},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat["models/User"]},function(t,e){t.exports=flarum.core.compat["helpers/username"]},function(t,e){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,e){t.exports=flarum.core.compat["utils/UserControls"]},function(t,e){t.exports=flarum.core.compat["components/Badge"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},,function(t,e,n){"use strict";n.r(e);var r=n(1),s=n(0),a=n.n(s),o=n(8),u=n.n(o),i=n(2),p=n.n(i),l=n(9),c=n.n(l),d=n(4),f=n.n(d),h=n(5),y=n.n(h);function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var v=n(10),_=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this);var e=this.props.user.suspendedUntil(),n=null;new Date>e&&(e=null),e&&(n=9999===e.getFullYear()?"indefinitely":"limited"),this.status=m.prop(n),this.daysRemaining=m.prop("limited"===n&&1-moment().diff(e,"days"))},n.className=function(){return"SuspendUserModal Modal--small"},n.title=function(){return app.translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.props.user})},n.content=function(){var t=this;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:m.withAttr("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:m.withAttr("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw(!0),t.$(".SuspendUserModal-days-input input").select(),m.redraw.strategy("none")}}),app.translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()?m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:m.withAttr("value",this.daysRemaining),className:"FormControl"}),app.translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text")):""))),m("div",{className:"Form-group"},m(p.a,{className:"Button Button--primary",loading:this.loading,type:"submit"},app.translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=new Date("2038-01-01");break;case"limited":n=moment().add(this.daysRemaining(),"days").toDate()}this.props.user.save({suspendedUntil:n}).then(function(){return e.hide()},this.loaded.bind(this))},e}(n.n(v).a),x=n(3),g=n.n(x),U=(n(6),n(7),function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"ban"},n.href=function(){return app.route.user(this.props.notification.subject())},n.content=function(){var t=this.props.notification,e=t.content(),n=moment(e.date).from(t.createdAt(),!0);return app.translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{user:t.fromUser(),timeReadable:n})},e}(g.a)),S=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"ban"},n.href=function(){return app.route.user(this.props.notification.subject())},n.content=function(){var t=this.props.notification;return app.translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text",{user:t.fromUser()})},e}(g.a);a.a.initializers.add("flarum-suspend",function(){a.a.notificationComponents.userSuspended=U,a.a.notificationComponents.userUnsuspended=S,y.a.prototype.canSuspend=f.a.attribute("canSuspend"),y.a.prototype.suspendedUntil=f.a.attribute("suspendedUntil",f.a.transformDate),Object(r.extend)(u.a,"moderationControls",function(t,e){e.canSuspend()&&t.add("suspend",p.a.component({children:a.a.translator.trans("flarum-suspend.forum.user_controls.suspend_button"),icon:"fas fa-ban",onclick:function(){return a.a.modal.show(new _({user:e}))}}))}),Object(r.extend)(y.a.prototype,"badges",function(t){var e=this.suspendedUntil();new Datee&&(e=null),e&&(n=9999===e.getFullYear()?"indefinitely":"limited"),this.status=m.prop(n),this.daysRemaining=m.prop("limited"===n&&1-moment().diff(e,"days"))},n.className=function(){return"SuspendUserModal Modal--small"},n.title=function(){return app.translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.props.user})},n.content=function(){var t=this;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:m.withAttr("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:m.withAttr("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw(!0),t.$(".SuspendUserModal-days-input input").select(),m.redraw.strategy("none")}}),app.translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()?m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:m.withAttr("value",this.daysRemaining),className:"FormControl"}),app.translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text")):""))),m("div",{className:"Form-group"},m(p.a,{className:"Button Button--primary",loading:this.loading,type:"submit"},app.translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=new Date("2038-01-01");break;case"limited":n=moment().add(this.daysRemaining(),"days").toDate()}this.props.user.save({suspendedUntil:n}).then(function(){return e.hide()},this.loaded.bind(this))},e}(n.n(v).a),x=n(3),g=n.n(x),U=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return app.route.user(this.props.notification.subject())},n.content=function(){var t=this.props.notification,e=t.content(),n=moment(e.date).from(t.createdAt(),!0);return app.translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{user:t.fromUser(),timeReadable:n})},e}(g.a),S=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return app.route.user(this.props.notification.subject())},n.content=function(){var t=this.props.notification;return app.translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text",{user:t.fromUser()})},e}(g.a);a.a.initializers.add("flarum-suspend",function(){a.a.notificationComponents.userSuspended=U,a.a.notificationComponents.userUnsuspended=S,y.a.prototype.canSuspend=f.a.attribute("canSuspend"),y.a.prototype.suspendedUntil=f.a.attribute("suspendedUntil",f.a.transformDate),Object(s.extend)(u.a,"moderationControls",function(t,e){e.canSuspend()&&t.add("suspend",p.a.component({children:a.a.translator.trans("flarum-suspend.forum.user_controls.suspend_button"),icon:"fas fa-ban",onclick:function(){return a.a.modal.show(new _({user:e}))}}))}),Object(s.extend)(y.a.prototype,"badges",function(t){var e=this.suspendedUntil();new Date until) until = null;\n\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';\n else status = 'limited';\n }\n\n this.status = m.prop(status);\n this.daysRemaining = m.prop(status === 'limited' && -moment().diff(until, 'days') + 1);\n }\n\n className() {\n return 'SuspendUserModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', {user: this.props.user});\n }\n\n content() {\n return (\n
\n
\n
\n \n
\n \n\n \n\n \n
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = new Date('2038-01-01');\n break;\n\n case 'limited':\n suspendedUntil = moment().add(this.daysRemaining(), 'days').toDate();\n break;\n\n default:\n // no default\n }\n\n this.props.user.save({suspendedUntil}).then(\n () => this.hide(),\n this.loaded.bind(this)\n );\n }\n}\n","import Notification from 'flarum/components/Notification';\nimport username from 'flarum/helpers/username';\nimport humanTime from 'flarum/helpers/humanTime';\n\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'ban';\n }\n\n href() {\n return app.route.user(this.props.notification.subject());\n }\n\n content() {\n const notification = this.props.notification;\n const suspendedUntil = notification.content();\n const timeReadable = moment(suspendedUntil.date).from(notification.createdAt(), true);\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n user: notification.fromUser(),\n timeReadable,\n });\n }\n}\n","import Notification from 'flarum/components/Notification';\nimport username from 'flarum/helpers/username';\nimport humanTime from 'flarum/helpers/humanTime';\n\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'ban';\n }\n\n href() {\n return app.route.user(this.props.notification.subject());\n }\n\n content() {\n const notification = this.props.notification;\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text', {\n user: notification.fromUser(),\n });\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport UserControls from 'flarum/utils/UserControls';\nimport Button from 'flarum/components/Button';\nimport Badge from 'flarum/components/Badge';\nimport Model from 'flarum/Model';\nimport User from 'flarum/models/User';\n\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\n\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n\n User.prototype.canSuspend = Model.attribute('canSuspend');\n User.prototype.suspendedUntil = Model.attribute('suspendedUntil', Model.transformDate);\n\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add('suspend', Button.component({\n children: app.translator.trans('flarum-suspend.forum.user_controls.suspend_button'),\n icon: 'fas fa-ban',\n onclick: () => app.modal.show(new SuspendUserModal({user}))\n }));\n }\n });\n\n extend(User.prototype, 'badges', function(items) {\n const until = this.suspendedUntil();\n\n if (new Date() < until) {\n items.add('suspended', Badge.component({\n icon: 'fas fa-ban',\n type: 'suspended',\n label: app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip')\n }));\n }\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/external \"flarum.core.compat['app']\"","webpack://@flarum/suspend/external \"flarum.core.compat['extend']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/Notification']\"","webpack://@flarum/suspend/external \"flarum.core.compat['Model']\"","webpack://@flarum/suspend/external \"flarum.core.compat['models/User']\"","webpack://@flarum/suspend/external \"flarum.core.compat['utils/UserControls']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/Badge']\"","webpack://@flarum/suspend/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/suspend/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/suspend/./src/forum/components/SuspendUserModal.js","webpack://@flarum/suspend/./src/forum/components/UserSuspendedNotification.js","webpack://@flarum/suspend/./src/forum/components/UserUnsuspendedNotification.js","webpack://@flarum/suspend/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_inheritsLoose","subClass","superClass","constructor","__proto__","SuspendUserModal","init","_Modal","this","until","props","user","suspendedUntil","status","Date","getFullYear","prop","daysRemaining","moment","diff","className","title","app","translator","trans","content","_this","type","checked","onclick","withAttr","e","target","redraw","$","select","strategy","min","oninput","Button_default","a","loading","onsubmit","_this2","preventDefault","add","toDate","save","then","hide","loaded","Modal","UserSuspendedNotification","icon","href","route","notification","subject","timeReadable","date","from","createdAt","fromUser","Notification","UserUnsuspendedNotification","initializers","notificationComponents","userSuspended","userUnsuspended","User","canSuspend","Model","attribute","transformDate","extend","UserControls","items","Button","component","children","modal","show","Badge","label"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAA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E,GAC7CA,EAAK2D,cACPM,EAAM/B,IAAI,UAAWgC,IAAOC,UAAU,CACpCC,SAAUzD,IAAIC,WAAWC,MAAM,qDAC/B6B,KAAM,aACNxB,QAAS,kBAAMP,IAAI0D,MAAMC,KAAK,IAAI5E,EAAiB,CAACM,gBAK1D+D,iBAAOL,IAAK5E,UAAW,SAAU,SAASmF,GACxC,IAAMnE,EAAQD,KAAKI,iBAEf,IAAIE,KAASL,GACfmE,EAAM/B,IAAI,YAAaqC,IAAMJ,UAAU,CACrCzB,KAAM,aACN1B,KAAM,YACNwD,MAAO7D,IAAIC,WAAWC,MAAM","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Notification'];","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['models/User'];","module.exports = flarum.core.compat['utils/UserControls'];","module.exports = flarum.core.compat['components/Badge'];","module.exports = flarum.core.compat['components/Modal'];","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nexport default class SuspendUserModal extends Modal {\n init() {\n super.init();\n\n let until = this.props.user.suspendedUntil();\n let status = null;\n\n if (new Date() > until) until = null;\n\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';\n else status = 'limited';\n }\n\n this.status = m.prop(status);\n this.daysRemaining = m.prop(status === 'limited' && -moment().diff(until, 'days') + 1);\n }\n\n className() {\n return 'SuspendUserModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', {user: this.props.user});\n }\n\n content() {\n return (\n
\n
\n
\n \n
\n \n\n \n\n \n
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = new Date('2038-01-01');\n break;\n\n case 'limited':\n suspendedUntil = moment().add(this.daysRemaining(), 'days').toDate();\n break;\n\n default:\n // no default\n }\n\n this.props.user.save({suspendedUntil}).then(\n () => this.hide(),\n this.loaded.bind(this)\n );\n }\n}\n","import Notification from 'flarum/components/Notification';\n\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.props.notification.subject());\n }\n\n content() {\n const notification = this.props.notification;\n const suspendedUntil = notification.content();\n const timeReadable = moment(suspendedUntil.date).from(notification.createdAt(), true);\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n user: notification.fromUser(),\n timeReadable,\n });\n }\n}\n","import Notification from 'flarum/components/Notification';\n\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.props.notification.subject());\n }\n\n content() {\n const notification = this.props.notification;\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text', {\n user: notification.fromUser(),\n });\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport UserControls from 'flarum/utils/UserControls';\nimport Button from 'flarum/components/Button';\nimport Badge from 'flarum/components/Badge';\nimport Model from 'flarum/Model';\nimport User from 'flarum/models/User';\n\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\n\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n\n User.prototype.canSuspend = Model.attribute('canSuspend');\n User.prototype.suspendedUntil = Model.attribute('suspendedUntil', Model.transformDate);\n\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add('suspend', Button.component({\n children: app.translator.trans('flarum-suspend.forum.user_controls.suspend_button'),\n icon: 'fas fa-ban',\n onclick: () => app.modal.show(new SuspendUserModal({user}))\n }));\n }\n });\n\n extend(User.prototype, 'badges', function(items) {\n const until = this.suspendedUntil();\n\n if (new Date() < until) {\n items.add('suspended', Badge.component({\n icon: 'fas fa-ban',\n type: 'suspended',\n label: app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip')\n }));\n }\n });\n});\n"],"sourceRoot":""} \ No newline at end of file