mirror of
https://github.com/flarum/framework.git
synced 2024-12-17 10:16:10 +08:00
737783a8a8
Includes transpiled JS/TS. [skip ci]
1 line
11 KiB
Plaintext
Generated
1 line
11 KiB
Plaintext
Generated
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,qC,aCAzC,SAASC,EAAgBhB,EAAGiB,GAMzC,OALAD,EAAkBf,OAAOiB,gBAAkB,SAAyBlB,EAAGiB,GAErE,OADAjB,EAAEmB,UAAYF,EACPjB,CACR,EAEMgB,EAAgBhB,EAAGiB,EAC3B,CCNc,SAASG,EAAeC,EAAUC,GAC/CD,EAASd,UAAYN,OAAOsB,OAAOD,EAAWf,WAC9Cc,EAASd,UAAUiB,YAAcH,EACjCH,EAA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,GAC5DA,EAAWC,WACbF,EAAML,IACJ,OACAQ,IAAAA,UACE,CACE9B,KAAM,cACN+B,QAAS9B,KAAK+B,WAAWC,KAAKL,IAEhCjB,IAAAA,WAAAA,MACEiB,EAAWP,WAAa,sDAAwD,sDAKzF,IAEDK,IAAAA,WAAgC,WAC9BzB,KAAKiC,KAAK,CAAEb,UAAWpB,KAAKoB,aAAcc,MAAK,WACzCxB,IAAAA,QAAAA,QAAoByB,MACtBzB,IAAAA,QAAAA,IAAgB,UAAU0B,SAG5BC,EAAEC,QACH,GACF,GFXDpB,EAAAA,EAAAA,QAAOqB,IAAAA,UAA4B,qBAAqB,SAAUb,GAChEA,EAAML,IAAI,mBAAoB,CAC5BmB,KAAM,mBACNzC,KAAM,cACNyB,MAAOd,IAAAA,WAAAA,MAAqB,8DAE/B,GACF,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n\n descriptionKey() {\n return this.attrs.post.content().locked\n ? 'flarum-lock.forum.post_stream.discussion_locked_text'\n : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n\n href() {\n const notification = this.attrs.notification;\n\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', { user: this.attrs.notification.fromUser() });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\n\napp.initializers.add('flarum-lock', () => {\n app.postComponents.discussionLocked = DiscussionLockedPost;\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n\n Discussion.prototype.isLocked = Model.attribute('isLocked');\n Discussion.prototype.canLock = Model.attribute('canLock');\n\n addLockBadge();\n addLockControl();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label'),\n });\n });\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add(\n 'locked',\n Badge.component({\n type: 'locked',\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: 'fas fa-lock',\n })\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add(\n 'lock',\n Button.component(\n {\n icon: 'fas fa-lock',\n onclick: this.lockAction.bind(discussion),\n },\n app.translator.trans(\n discussion.isLocked() ? 'flarum-lock.forum.discussion_controls.unlock_button' : 'flarum-lock.forum.discussion_controls.lock_button'\n )\n )\n );\n }\n });\n\n DiscussionControls.lockAction = function () {\n this.save({ isLocked: !this.isLocked() }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n\n m.redraw();\n });\n };\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","DiscussionLockedPost","icon","this","attrs","post","content","locked","descriptionKey","EventPost","DiscussionLockedNotification","href","notification","app","subject","postNumber","user","fromUser","Notification","Discussion","Model","extend","badges","isLocked","add","Badge","type","label","DiscussionControls","items","discussion","canLock","Button","onclick","lockAction","bind","save","then","DiscussionPage","update","m","redraw","NotificationGrid","name"],"sourceRoot":""} |