{"version":3,"file":"swapd-mlm.js","names":["define","_exports","_component","_component2","_templateFactory","Object","defineProperty","value","default","EarningDate","formattedDate","moment","this","args","date","format","static","setComponentTemplate","createTemplateFactory","id","block","moduleName","isStrictMode","_decorators","_ajax","_string","_utils","_object","__COLOCATED_TEMPLATE__","EarningsEditTransaction","init","super","arguments","set","w","forEach","k","get","editTransaction","type","dt7948","n","prototype","isEdit","isBlank","placeholderValue2","key","I18n","t","modalTitle","action","suffix","saveDisabled","loading","formatedPrice","value1","value2","isNaN","parseInt","save","_update","_save","_delete","ajax","data","_serializeData","then","result","appEvents","trigger","finally","closeModal","user_id","replace","extend","p","classNames","valueCopy","didInsertElement","disabled","formatedValue","parseFloat","toFixed","actions","doSave","doCancel","_tracking","_service","_ajaxError","_url","_application","_helper","_truthHelpers","_modifier","_didInsert","_willDestroy","_loadMore2","_conditionalLoadingSpinner","_dButton","_dIcon","_boundAvatarTemplate","_earningDate","_userEarningsEditForm","_earningsEditTransaction","_i18n","UserEarnings","g","inject","i","currentUser","siteSettings","modal","tracked","currentEarnings","lifetimeEarnings","editingCE","editingLE","loadingMore","canLoadMore","earnings","updatingEarnings","requestingPayout","user","constructor","formattedCEarnings","formattedLTEarnings","filteredEarnings","uniqBy","payoutDisabled","referral_payout_minimum","referral_payout_user","setupComponent","_loadMore","updateEarnings","current","lifetime","has","addEarningsHandler","addObject","on","updateEarningsHandler","earning","findBy","removeObject","deleteEarningsHandler","teardownComponent","off","addTransaction","_showModal","addComment","edit","editCE","editLE","saveCE","val","_updateEarnings","saveLE","loadMore","requestPayout","routeTo","url","error","popupAjaxError","_handleEarningsData","addObjects","can_load_more","offset","length","additional","assign","model","show","scope","eq","fn","_routing","_discourseI18n","c","canSeeEarnings","admin","LinkTo","i18n","tagName","_controller","UserEarningsController","username","pushObjects","window","location","href","_helpers","registerHelper","params","_pluginApi","_userInvitedShow","_userInvited","_iconLibrary","_copyText","initPlugin","api","reopen","showRefCopied","viewingSelf","staff","pluginEnabled","userId","currentUserId","refUrl","origin","copyRefUrl","text","copyRange","$","html","trim","document","body","append","remove","setTimeout","parent","userChanged","showEarnings","filter","includes","observes","name","initialize","container","lookup","referral_enabled","withPluginApi","replaceIcon","route","path","_discourse","modelFor","setupController","controller","_super","setProperties","_routesBuilder"],"sources":["discourse/plugins/swapd-mlm/discourse/components/earning-date.js","discourse/plugins/swapd-mlm/discourse/components/modal/earnings-edit-transaction.js","discourse/plugins/swapd-mlm/discourse/components/user-earnings-edit-form.js","discourse/plugins/swapd-mlm/discourse/components/user-earnings.js","discourse/plugins/swapd-mlm/discourse/connectors/user-main-nav/user-earnings.js","discourse/plugins/swapd-mlm/discourse/controllers/user-earnings.js","discourse/plugins/swapd-mlm/discourse/helpers/referral.js","discourse/plugins/swapd-mlm/discourse/initializers/referral.js","discourse/plugins/swapd-mlm/discourse/routes/earnings-route-map.js","discourse/plugins/swapd-mlm/discourse/routes/user-earnings.js","discourse/plugins/swapd-mlm/discourse/routes/user.js","discourse/plugins/swapd-mlm/discourse/templates/connectors/user-card-post-names/invited-by.js","discourse/plugins/swapd-mlm/discourse/templates/user-earnings.js"],"sourcesContent":["define(\"discourse/plugins/swapd-mlm/discourse/components/earning-date\", [\"exports\", \"@glimmer/component\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class EarningDate extends _component.default {\n    get formattedDate() {\n      return moment(this.args.date).format(\"DD/MM/YYYY\");\n    }\n    static #_ = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      <div>{{this.formattedDate}}</div>\n    */\n    {\n      \"id\": \"RDsMLNn5\",\n      \"block\": \"[[[10,0],[12],[1,[30,0,[\\\"formattedDate\\\"]]],[13]],[],false,[]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/swapd-mlm/discourse/components/earning-date.js\",\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = EarningDate;\n});","define(\"discourse/plugins/swapd-mlm/discourse/components/modal/earnings-edit-transaction\", [\"exports\", \"@ember/component\", \"discourse-common/utils/decorators\", \"discourse/lib/ajax\", \"@ember/string\", \"@ember/utils\", \"@ember/object\", \"@ember/template-factory\"], function (_exports, _component, _decorators, _ajax, _string, _utils, _object, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <DModal @closeModal={{@closeModal}} id=\"earnings-modal\" @title={{this.modalTitle}} class=\"close-topic-modal\">\n    <:body>\n      {{#if this.editTransaction}}\n        <section>\n          <Input\n            placeholder={{(i18n \"referral.price\")}}\n            @value={{this.value1}}\n            />\n        </section>\n      {{/if}}\n  \n      <section>\n        <Textarea\n          @value={{this.value2}}\n          placeholder={{this.placeholderValue2}}\n          rows=\"5\"/>\n      </section>\n    </:body>\n  \n    <:footer>\n      <DButton\n        @action={{action \"save\"}}\n        @disabled={{this.saveDisabled}}\n        class=\"btn-large btn-primary\"\n        @label=\"referral.save\"\n      />\n  \n      {{#if this.isEdit}}\n        <DButton\n          class=\"btn-large btn-danger\"\n          @disabled={{this.loading}}\n          @action={{action \"delete\"}}\n          @label=\"referral.delete\"\n        />\n      {{/if}}\n    </:footer>\n  </DModal>\n  \n  */\n  {\n    \"id\": \"9D/5kG04\",\n    \"block\": \"[[[8,[39,0],[[24,1,\\\"earnings-modal\\\"],[24,0,\\\"close-topic-modal\\\"]],[[\\\"@closeModal\\\",\\\"@title\\\"],[[30,1],[30,0,[\\\"modalTitle\\\"]]]],[[\\\"body\\\",\\\"footer\\\"],[[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"editTransaction\\\"]],[[[1,\\\"      \\\"],[10,\\\"section\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[39,4],[[16,\\\"placeholder\\\",[28,[37,5],[\\\"referral.price\\\"],null]]],[[\\\"@value\\\"],[[30,0,[\\\"value1\\\"]]]],null],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n    \\\"],[10,\\\"section\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[39,6],[[16,\\\"placeholder\\\",[30,0,[\\\"placeholderValue2\\\"]]],[24,\\\"rows\\\",\\\"5\\\"]],[[\\\"@value\\\"],[[30,0,[\\\"value2\\\"]]]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[]],[[[1,\\\"\\\\n    \\\"],[8,[39,8],[[24,0,\\\"btn-large btn-primary\\\"]],[[\\\"@action\\\",\\\"@disabled\\\",\\\"@label\\\"],[[28,[37,9],[[30,0],\\\"save\\\"],null],[30,0,[\\\"saveDisabled\\\"]],\\\"referral.save\\\"]],null],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"isEdit\\\"]],[[[1,\\\"      \\\"],[8,[39,8],[[24,0,\\\"btn-large btn-danger\\\"]],[[\\\"@disabled\\\",\\\"@action\\\",\\\"@label\\\"],[[30,0,[\\\"loading\\\"]],[28,[37,9],[[30,0],\\\"delete\\\"],null],\\\"referral.delete\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"]],[]]]]],[1,\\\"\\\\n\\\"]],[\\\"@closeModal\\\"],false,[\\\"d-modal\\\",\\\":body\\\",\\\"if\\\",\\\"section\\\",\\\"input\\\",\\\"i18n\\\",\\\"textarea\\\",\\\":footer\\\",\\\"d-button\\\",\\\"action\\\"]]\",\n    \"moduleName\": \"discourse/plugins/swapd-mlm/discourse/components/modal/earnings-edit-transaction.hbs\",\n    \"isStrictMode\": false\n  });\n  class EarningsEditTransaction extends _component.default {\n    init() {\n      super.init(...arguments);\n      this.set(\"loading\", false);\n      (0, _string.w)(\"type value1 value2 user_id\").forEach(k => {\n        this.set(k, this.get(`model.${k}`));\n      });\n    }\n    editTransaction(type) {\n      return type === 1;\n    }\n    static #_ = (() => dt7948.n(this.prototype, \"editTransaction\", [(0, _decorators.default)(\"type\")]))();\n    isEdit(id) {\n      return !(0, _utils.isBlank)(id);\n    }\n    static #_2 = (() => dt7948.n(this.prototype, \"isEdit\", [(0, _decorators.default)(\"model.id\")]))();\n    placeholderValue2(editTransaction) {\n      const key = editTransaction ? \"title\" : \"comment\";\n      return I18n.t(`referral.${key}`);\n    }\n    static #_3 = (() => dt7948.n(this.prototype, \"placeholderValue2\", [(0, _decorators.default)(\"editTransaction\")]))();\n    modalTitle(editTransaction, isEdit) {\n      const action = isEdit ? \"edit\" : \"add\";\n      const suffix = editTransaction ? \"transaction\" : \"comment\";\n      return I18n.t(`referral.${action}_${suffix}`);\n    }\n    static #_4 = (() => dt7948.n(this.prototype, \"modalTitle\", [(0, _decorators.default)(\"editTransaction\", \"isEdit\")]))();\n    saveDisabled(loading, editTransaction, formatedPrice, value1, value2) {\n      if (loading) return true;\n      if (editTransaction) return isNaN(formatedPrice) || (0, _utils.isBlank)(value2);\n      return (0, _utils.isBlank)(value1) || (0, _utils.isBlank)(value2);\n    }\n    static #_5 = (() => dt7948.n(this.prototype, \"saveDisabled\", [(0, _decorators.default)(\"loading\", \"editTransaction\", \"formatedPrice\", \"value1\", \"value2\")]))();\n    formatedPrice(value1) {\n      return parseInt(value1 || \"\");\n    }\n    static #_6 = (() => dt7948.n(this.prototype, \"formatedPrice\", [(0, _decorators.default)(\"value1\")]))();\n    save() {\n      if (this.get(\"saveDisabled\")) return;\n      this.set(\"loading\", true);\n      this.get(\"isEdit\") ? this._update() : this._save();\n    }\n    static #_7 = (() => dt7948.n(this.prototype, \"save\", [_object.action]))();\n    delete() {\n      if (this.get(\"loading\")) return;\n      this.set(\"loading\", true);\n      this._delete();\n    }\n    static #_8 = (() => dt7948.n(this.prototype, \"delete\", [_object.action]))();\n    _save() {\n      (0, _ajax.ajax)(\"/earnings\", {\n        type: \"POST\",\n        data: this._serializeData()\n      }).then(result => this.appEvents.trigger(\"earnings:add\", result)).finally(() => {\n        this.set(\"loading\", false);\n        this.closeModal();\n      });\n    }\n    _update() {\n      const id = this.get(\"model.id\");\n      (0, _ajax.ajax)(`/earnings/${id}`, {\n        type: \"PUT\",\n        data: this._serializeData()\n      }).then(result => this.appEvents.trigger(\"earnings:update\", result)).finally(() => {\n        this.set(\"loading\", false);\n        this.closeModal();\n      });\n    }\n    _delete() {\n      const id = this.get(\"model.id\");\n      (0, _ajax.ajax)(`/earnings/${id}`, {\n        type: \"DELETE\",\n        data: this._serializeData()\n      }).then(result => this.appEvents.trigger(\"earnings:delete\", result)).finally(() => {\n        this.set(\"loading\", false);\n        this.closeModal();\n      });\n    }\n    _serializeData() {\n      return {\n        user_id: this.get(\"user_id\"),\n        data: {\n          type: this.get(\"type\"),\n          value1: typeof this.get(\"value1\") === 'string' ? this.get(\"value1\").replace(',', '.') : this.get(\"value1\"),\n          value2: this.get(\"value2\")\n        }\n      };\n    }\n  }\n  _exports.default = EarningsEditTransaction;\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, EarningsEditTransaction);\n});","define(\"discourse/plugins/swapd-mlm/discourse/components/user-earnings-edit-form\", [\"exports\", \"@ember/component\", \"discourse-common/utils/decorators\", \"@ember/template-factory\"], function (_exports, _component, _decorators, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{input\n    value=this.valueCopy}}\n  \n  {{d-button\n    icon=\"far-save\"\n    disabled=this.saveDisabled\n    action=(action \"doSave\")\n    class=\"btn-primary\"}}\n  \n  {{d-button\n    icon=\"times\"\n    disabled=this.disabled\n    action=(action \"doCancel\")\n    class=\"btn-danger\"}}\n  \n  */\n  {\n    \"id\": \"nuCM/j5B\",\n    \"block\": \"[[[1,[28,[35,0],null,[[\\\"value\\\"],[[30,0,[\\\"valueCopy\\\"]]]]]],[1,\\\"\\\\n\\\\n\\\"],[1,[28,[35,1],null,[[\\\"icon\\\",\\\"disabled\\\",\\\"action\\\",\\\"class\\\"],[\\\"far-save\\\",[30,0,[\\\"saveDisabled\\\"]],[28,[37,2],[[30,0],\\\"doSave\\\"],null],\\\"btn-primary\\\"]]]],[1,\\\"\\\\n\\\\n\\\"],[1,[28,[35,1],null,[[\\\"icon\\\",\\\"disabled\\\",\\\"action\\\",\\\"class\\\"],[\\\"times\\\",[30,0,[\\\"disabled\\\"]],[28,[37,2],[[30,0],\\\"doCancel\\\"],null],\\\"btn-danger\\\"]]]],[1,\\\"\\\\n\\\"]],[],false,[\\\"input\\\",\\\"d-button\\\",\\\"action\\\"]]\",\n    \"moduleName\": \"discourse/plugins/swapd-mlm/discourse/components/user-earnings-edit-form.hbs\",\n    \"isStrictMode\": false\n  });\n  var _default = _exports.default = (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, _component.default.extend(dt7948.p({\n    classNames: [\"earnings-edit-form\"],\n    valueCopy: null,\n    didInsertElement() {\n      this.set(\"valueCopy\", this.value);\n    },\n    saveDisabled(disabled, formatedValue) {\n      return disabled || isNaN(formatedValue);\n    },\n    formatedValue(value) {\n      const floatValue = parseFloat(value || 0);\n      return floatValue.toFixed(2);\n    },\n    actions: {\n      doSave() {\n        if (this.get(\"saveDisabled\")) return;\n        this.save(this.get(\"formatedValue\"));\n      },\n      doCancel() {\n        if (this.get(\"disabled\")) return;\n        this.set(\"marker\", false);\n      }\n    }\n  }, [[\"method\", \"saveDisabled\", [(0, _decorators.default)(\"disabled\", \"formatedValue\")]], [\"method\", \"formatedValue\", [(0, _decorators.default)(\"valueCopy\")]]])));\n});","define(\"discourse/plugins/swapd-mlm/discourse/components/user-earnings\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/lib/url\", \"@ember/utils\", \"@ember/application\", \"@ember/helper\", \"truth-helpers\", \"@ember/modifier\", \"@ember/render-modifiers/modifiers/did-insert\", \"@ember/render-modifiers/modifiers/will-destroy\", \"discourse/components/load-more\", \"discourse/components/conditional-loading-spinner\", \"discourse/components/d-button\", \"discourse/helpers/d-icon\", \"discourse/helpers/bound-avatar-template\", \"discourse/plugins/swapd-mlm/discourse/components/earning-date\", \"discourse/plugins/swapd-mlm/discourse/components/user-earnings-edit-form\", \"discourse/plugins/swapd-mlm/discourse/components/modal/earnings-edit-transaction\", \"discourse-common/helpers/i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _service, _ajax, _ajaxError, _url, _utils, _application, _helper, _truthHelpers, _modifier, _didInsert, _willDestroy, _loadMore2, _conditionalLoadingSpinner, _dButton, _dIcon, _boundAvatarTemplate, _earningDate, _userEarningsEditForm, _earningsEditTransaction, _i18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class UserEarnings extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"appEvents\", [_service.inject]))();\n    #appEvents = (() => (dt7948.i(this, \"appEvents\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"currentUser\", [_service.inject]))();\n    #currentUser = (() => (dt7948.i(this, \"currentUser\"), void 0))();\n    static #_3 = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.inject]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_4 = (() => dt7948.g(this.prototype, \"modal\", [_service.inject]))();\n    #modal = (() => (dt7948.i(this, \"modal\"), void 0))();\n    static #_5 = (() => dt7948.g(this.prototype, \"currentEarnings\", [_tracking.tracked], function () {\n      return 0;\n    }))();\n    #currentEarnings = (() => (dt7948.i(this, \"currentEarnings\"), void 0))();\n    static #_6 = (() => dt7948.g(this.prototype, \"lifetimeEarnings\", [_tracking.tracked], function () {\n      return 0;\n    }))();\n    #lifetimeEarnings = (() => (dt7948.i(this, \"lifetimeEarnings\"), void 0))();\n    static #_7 = (() => dt7948.g(this.prototype, \"editingCE\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #editingCE = (() => (dt7948.i(this, \"editingCE\"), void 0))();\n    static #_8 = (() => dt7948.g(this.prototype, \"editingLE\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #editingLE = (() => (dt7948.i(this, \"editingLE\"), void 0))();\n    static #_9 = (() => dt7948.g(this.prototype, \"loadingMore\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #loadingMore = (() => (dt7948.i(this, \"loadingMore\"), void 0))();\n    static #_10 = (() => dt7948.g(this.prototype, \"canLoadMore\", [_tracking.tracked], function () {\n      return true;\n    }))();\n    #canLoadMore = (() => (dt7948.i(this, \"canLoadMore\"), void 0))();\n    static #_11 = (() => dt7948.g(this.prototype, \"earnings\", [_tracking.tracked], function () {\n      return [];\n    }))();\n    #earnings = (() => (dt7948.i(this, \"earnings\"), void 0))();\n    static #_12 = (() => dt7948.g(this.prototype, \"updatingEarnings\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #updatingEarnings = (() => (dt7948.i(this, \"updatingEarnings\"), void 0))();\n    static #_13 = (() => dt7948.g(this.prototype, \"requestingPayout\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #requestingPayout = (() => (dt7948.i(this, \"requestingPayout\"), void 0))();\n    static #_14 = (() => dt7948.g(this.prototype, \"user\", [_tracking.tracked], function () {\n      return null;\n    }))();\n    #user = (() => (dt7948.i(this, \"user\"), void 0))();\n    constructor() {\n      super(...arguments);\n      this.earnings = [];\n      this.user = this.args.user;\n    }\n    get formattedCEarnings() {\n      const floatValue = parseFloat(this.currentEarnings || 0);\n      return floatValue.toFixed(2);\n    }\n    get formattedLTEarnings() {\n      const floatValue = parseFloat(this.lifetimeEarnings || 0);\n      return floatValue.toFixed(2);\n    }\n    get filteredEarnings() {\n      return this.earnings.uniqBy(\"id\");\n    }\n    get payoutDisabled() {\n      return this.currentEarnings < this.siteSettings.referral_payout_minimum || (0, _utils.isBlank)(this.siteSettings.referral_payout_user) || this.requestingPayout;\n    }\n    setupComponent() {\n      this._loadMore();\n      const updateEarnings = data => {\n        this.currentEarnings = data.current;\n        this.lifetimeEarnings = data.lifetime;\n      };\n      if (!this.appEvents.has(\"earnings:add\")) {\n        this.addEarningsHandler = data => {\n          this.earnings.addObject(data.data);\n          updateEarnings(data);\n        };\n        this.appEvents.on(\"earnings:add\", this, this.addEarningsHandler);\n      }\n      if (!this.appEvents.has(\"earnings:update\")) {\n        this.updateEarningsHandler = data => {\n          const earning = this.earnings.findBy(\"id\", data.data.id);\n          this.earnings.removeObject(earning);\n          this.earnings.addObject(data.data);\n          updateEarnings(data);\n        };\n        this.appEvents.on(\"earnings:update\", this, this.updateEarningsHandler);\n      }\n      if (!this.appEvents.has(\"earnings:delete\")) {\n        this.deleteEarningsHandler = data => {\n          const earning = this.earnings.findBy(\"id\", data.data.id);\n          this.earnings.removeObject(earning);\n          updateEarnings(data);\n        };\n        this.appEvents.on(\"earnings:delete\", this, this.deleteEarningsHandler);\n      }\n    }\n    static #_15 = (() => dt7948.n(this.prototype, \"setupComponent\", [_object.action]))();\n    teardownComponent() {\n      if (this.addEarningsHandler) {\n        this.appEvents.off(\"earnings:add\", this, this.addEarningsHandler);\n      }\n      if (this.updateEarningsHandler) {\n        this.appEvents.off(\"earnings:update\", this, this.updateEarningsHandler);\n      }\n      if (this.deleteEarningsHandler) {\n        this.appEvents.off(\"earnings:delete\", this, this.deleteEarningsHandler);\n      }\n    }\n    static #_16 = (() => dt7948.n(this.prototype, \"teardownComponent\", [_object.action]))();\n    addTransaction() {\n      this._showModal({\n        type: 1\n      });\n    }\n    static #_17 = (() => dt7948.n(this.prototype, \"addTransaction\", [_object.action]))();\n    addComment() {\n      this._showModal({\n        type: 2,\n        value1: this.currentUser.id\n      });\n    }\n    static #_18 = (() => dt7948.n(this.prototype, \"addComment\", [_object.action]))();\n    edit(earning) {\n      this._showModal(earning);\n    }\n    static #_19 = (() => dt7948.n(this.prototype, \"edit\", [_object.action]))();\n    editCE() {\n      this.editingLE = false;\n      this.editingCE = true;\n    }\n    static #_20 = (() => dt7948.n(this.prototype, \"editCE\", [_object.action]))();\n    editLE() {\n      this.editingLE = true;\n      this.editingCE = false;\n    }\n    static #_21 = (() => dt7948.n(this.prototype, \"editLE\", [_object.action]))();\n    saveCE(val) {\n      this._updateEarnings({\n        current: val\n      });\n    }\n    static #_22 = (() => dt7948.n(this.prototype, \"saveCE\", [_object.action]))();\n    saveLE(val) {\n      this._updateEarnings({\n        lifetime: val\n      });\n    }\n    static #_23 = (() => dt7948.n(this.prototype, \"saveLE\", [_object.action]))();\n    loadMore() {\n      this._loadMore();\n    }\n    static #_24 = (() => dt7948.n(this.prototype, \"loadMore\", [_object.action]))();\n    async requestPayout() {\n      if (this.requestingPayout) return;\n      this.requestingPayout = true;\n      try {\n        const result = await (0, _ajax.ajax)(\"/earnings/payout\", {\n          type: \"POST\",\n          data: {\n            user_id: this.user.id\n          }\n        });\n        _url.default.routeTo(result.url);\n      } catch (error) {\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.requestingPayout = false;\n      }\n    }\n    static #_25 = (() => dt7948.n(this.prototype, \"requestPayout\", [_object.action]))();\n    _handleEarningsData(result) {\n      this.earnings.addObjects(result.data);\n      this.canLoadMore = result.can_load_more;\n      this.currentEarnings = result.current;\n      this.lifetimeEarnings = result.lifetime;\n    }\n    async _loadMore() {\n      if (!this.canLoadMore || this.loadingMore) return;\n      this.loadingMore = true;\n      try {\n        const result = await (0, _ajax.ajax)(\"/earnings\", {\n          data: {\n            offset: this.filteredEarnings.length,\n            user_id: this.user.id\n          }\n        });\n        this._handleEarningsData(result);\n      } catch (error) {\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.loadingMore = false;\n      }\n    }\n    async _updateEarnings(additional) {\n      if (this.updatingEarnings) return;\n      this.updatingEarnings = true;\n      const data = Object.assign({\n        user_id: this.user.id,\n        current: this.currentEarnings,\n        lifetime: this.lifetimeEarnings\n      }, additional);\n      try {\n        const result = await (0, _ajax.ajax)(\"/earnings/update_earnings\", {\n          type: \"POST\",\n          data\n        });\n        this.lifetimeEarnings = result.lifetime;\n        this.currentEarnings = result.current;\n        this.editingLE = false;\n        this.editingCE = false;\n      } catch (error) {\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.updatingEarnings = false;\n      }\n    }\n    _showModal(model) {\n      model[\"user_id\"] = this.user.id;\n      this.modal.show(_earningsEditTransaction.default, {\n        model: model\n      });\n    }\n    static #_26 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div\n          class=\"earnings\"\n          {{didInsert this.setupComponent}}\n          {{willDestroy this.teardownComponent}}\n        >\n          <div class=\"earnings-list\">\n            <h2>{{i18n \"referral.activity_feed\"}}</h2>\n    \n            <p class=\"earnings-explanation\">{{i18n \"referral.explanation\"}}</p>\n    \n            <LoadMore @class=\"earnings-list-content\" @selector=\".earnings-item\" @action={{this.loadMore}}>\n              {{#if this.filteredEarnings}}\n                {{#each this.filteredEarnings as |earning|}}\n                  <div class=\"earnings-item\">\n                    {{#if (eq earning.type 1)}}\n                      <div class=\"earnings-item-date\">\n                        <EarningDate @date={{earning.date}} />\n                      </div>\n    \n                      <div class=\"earnings-item-value\">\n                        {{earning.value1}}\n                      </div>\n                      <div class=\"earnings-item-title\">\n                        {{earning.value2}}\n                      </div>\n                    {{else}}\n                      <div class=\"earnings-item-avatar\">\n                        {{boundAvatarTemplate earning.avatar_template \"small\"}}\n                      </div>\n    \n                      <div class=\"earnings-item-comment\">\n                        {{earning.value2}}\n                      </div>\n                    {{/if}}\n    \n                    {{#if this.currentUser.admin}}\n                      <div class=\"earnings-edit\" style=\"margin-left:5px\" {{on \"click\" (fn this.edit earning)}}>\n                        {{icon \"pencil\"}}\n                      </div>\n                    {{/if}}\n                  </div>\n                {{/each}}\n              {{else}}\n                {{#unless this.loadingMore}}\n                  <div class=\"alert alert-notice\">\n                    {{i18n \"referral.no_activity\"}}\n                  </div>\n                {{/unless}}\n              {{/if}}\n    \n              <ConditionalLoadingSpinner @condition={{this.loadingMore}} />\n            </LoadMore>\n          </div>\n    \n          <div class=\"earnings-info\">\n            <div class=\"earnings-info-container\">\n              {{#if this.editingCE}}\n                <UserEarningsEditForm\n                  @value={{this.formattedCEarnings}}\n                  @marker={{this.editingCE}}\n                  @disabled={{this.updatingEarnings}}\n                  @save={{this.saveCE}}\n                />\n              {{else}}\n                <div class=\"earnings-current\">\n                  ${{this.formattedCEarnings}}\n    \n                  {{#if this.currentUser.admin}}\n                    <span class=\"earnings-edit\" {{on \"click\" this.editCE}}>\n                      {{icon \"pencil\"}}\n                    </span>\n                  {{/if}}\n                </div>\n    \n                <div class=\"earnings-current-info\">\n                  {{i18n \"referral.current_earnings\"}}\n                </div>\n              {{/if}}\n    \n              <DButton\n                @class=\"btn-danger btn-large\"\n                @label=\"referral.request_payout\"\n                @disabled={{this.payoutDisabled}}\n                @action={{this.requestPayout}}\n              />\n    \n              {{#if this.editingLE}}\n                <UserEarningsEditForm\n                  @value={{this.formattedLTEarnings}}\n                  @marker={{this.editingLE}}\n                  @disabled={{this.updatingEarnings}}\n                  @save={{this.saveLE}}\n                />\n              {{else}}\n                <div class=\"earnings-lifetime\">\n                  {{i18n \"referral.lifetime_earnings\"}}: {{this.formattedLTEarnings}} USD\n    \n                  {{#if this.currentUser.admin}}\n                    <span class=\"earnings-edit\" {{on \"click\" this.editLE}}>\n                      {{icon \"pencil\"}}\n                    </span>\n                  {{/if}}\n                </div>\n              {{/if}}\n    \n              <div class=\"earnings-info-links\">\n                {{{i18n \"referral.links\"}}}\n              </div>\n    \n              {{#if this.currentUser.admin}}\n                <DButton\n                  @class=\"btn-primary btn-large\"\n                  @label=\"referral.add_transaction\"\n                  @action={{this.addTransaction}}\n                />\n    \n                <DButton\n                  @class=\"btn-primary btn-large\"\n                  @label=\"referral.add_comment\"\n                  @action={{this.addComment}}\n                />\n              {{/if}}\n            </div>\n          </div>\n        </div>\n      \n    */\n    {\n      \"id\": \"i/IekTKL\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[11,0],[24,0,\\\"earnings\\\"],[4,[32,0],[[30,0,[\\\"setupComponent\\\"]]],null],[4,[32,1],[[30,0,[\\\"teardownComponent\\\"]]],null],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"earnings-list\\\"],[12],[1,\\\"\\\\n        \\\"],[10,\\\"h2\\\"],[12],[1,[28,[32,2],[\\\"referral.activity_feed\\\"],null]],[13],[1,\\\"\\\\n\\\\n        \\\"],[10,2],[14,0,\\\"earnings-explanation\\\"],[12],[1,[28,[32,2],[\\\"referral.explanation\\\"],null]],[13],[1,\\\"\\\\n\\\\n        \\\"],[8,[32,3],null,[[\\\"@class\\\",\\\"@selector\\\",\\\"@action\\\"],[\\\"earnings-list-content\\\",\\\".earnings-item\\\",[30,0,[\\\"loadMore\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"filteredEarnings\\\"]],[[[42,[28,[31,2],[[28,[31,2],[[30,0,[\\\"filteredEarnings\\\"]]],null]],null],null,[[[1,\\\"              \\\"],[10,0],[14,0,\\\"earnings-item\\\"],[12],[1,\\\"\\\\n\\\"],[41,[28,[32,4],[[30,1,[\\\"type\\\"]],1],null],[[[1,\\\"                  \\\"],[10,0],[14,0,\\\"earnings-item-date\\\"],[12],[1,\\\"\\\\n                    \\\"],[8,[32,5],null,[[\\\"@date\\\"],[[30,1,[\\\"date\\\"]]]],null],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n\\\\n                  \\\"],[10,0],[14,0,\\\"earnings-item-value\\\"],[12],[1,\\\"\\\\n                    \\\"],[1,[30,1,[\\\"value1\\\"]]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n                  \\\"],[10,0],[14,0,\\\"earnings-item-title\\\"],[12],[1,\\\"\\\\n                    \\\"],[1,[30,1,[\\\"value2\\\"]]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"                  \\\"],[10,0],[14,0,\\\"earnings-item-avatar\\\"],[12],[1,\\\"\\\\n                    \\\"],[1,[28,[32,6],[[30,1,[\\\"avatar_template\\\"]],\\\"small\\\"],null]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n\\\\n                  \\\"],[10,0],[14,0,\\\"earnings-item-comment\\\"],[12],[1,\\\"\\\\n                    \\\"],[1,[30,1,[\\\"value2\\\"]]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"currentUser\\\",\\\"admin\\\"]],[[[1,\\\"                  \\\"],[11,0],[24,0,\\\"earnings-edit\\\"],[24,5,\\\"margin-left:5px\\\"],[4,[32,7],[\\\"click\\\",[28,[32,8],[[30,0,[\\\"edit\\\"]],[30,1]],null]],null],[12],[1,\\\"\\\\n                    \\\"],[1,[28,[32,9],[\\\"pencil\\\"],null]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"              \\\"],[13],[1,\\\"\\\\n\\\"]],[1]],null]],[]],[[[41,[51,[30,0,[\\\"loadingMore\\\"]]],[[[1,\\\"              \\\"],[10,0],[14,0,\\\"alert alert-notice\\\"],[12],[1,\\\"\\\\n                \\\"],[1,[28,[32,2],[\\\"referral.no_activity\\\"],null]],[1,\\\"\\\\n              \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[]]],[1,\\\"\\\\n          \\\"],[8,[32,10],null,[[\\\"@condition\\\"],[[30,0,[\\\"loadingMore\\\"]]]],null],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\\n      \\\"],[10,0],[14,0,\\\"earnings-info\\\"],[12],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"earnings-info-container\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"editingCE\\\"]],[[[1,\\\"            \\\"],[8,[32,11],null,[[\\\"@value\\\",\\\"@marker\\\",\\\"@disabled\\\",\\\"@save\\\"],[[30,0,[\\\"formattedCEarnings\\\"]],[30,0,[\\\"editingCE\\\"]],[30,0,[\\\"updatingEarnings\\\"]],[30,0,[\\\"saveCE\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"            \\\"],[10,0],[14,0,\\\"earnings-current\\\"],[12],[1,\\\"\\\\n              $\\\"],[1,[30,0,[\\\"formattedCEarnings\\\"]]],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"currentUser\\\",\\\"admin\\\"]],[[[1,\\\"                \\\"],[11,1],[24,0,\\\"earnings-edit\\\"],[4,[32,7],[\\\"click\\\",[30,0,[\\\"editCE\\\"]]],null],[12],[1,\\\"\\\\n                  \\\"],[1,[28,[32,9],[\\\"pencil\\\"],null]],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\\n            \\\"],[10,0],[14,0,\\\"earnings-current-info\\\"],[12],[1,\\\"\\\\n              \\\"],[1,[28,[32,2],[\\\"referral.current_earnings\\\"],null]],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n          \\\"],[8,[32,12],null,[[\\\"@class\\\",\\\"@label\\\",\\\"@disabled\\\",\\\"@action\\\"],[\\\"btn-danger btn-large\\\",\\\"referral.request_payout\\\",[30,0,[\\\"payoutDisabled\\\"]],[30,0,[\\\"requestPayout\\\"]]]],null],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"editingLE\\\"]],[[[1,\\\"            \\\"],[8,[32,11],null,[[\\\"@value\\\",\\\"@marker\\\",\\\"@disabled\\\",\\\"@save\\\"],[[30,0,[\\\"formattedLTEarnings\\\"]],[30,0,[\\\"editingLE\\\"]],[30,0,[\\\"updatingEarnings\\\"]],[30,0,[\\\"saveLE\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"            \\\"],[10,0],[14,0,\\\"earnings-lifetime\\\"],[12],[1,\\\"\\\\n              \\\"],[1,[28,[32,2],[\\\"referral.lifetime_earnings\\\"],null]],[1,\\\": \\\"],[1,[30,0,[\\\"formattedLTEarnings\\\"]]],[1,\\\" USD\\\\n\\\\n\\\"],[41,[30,0,[\\\"currentUser\\\",\\\"admin\\\"]],[[[1,\\\"                \\\"],[11,1],[24,0,\\\"earnings-edit\\\"],[4,[32,7],[\\\"click\\\",[30,0,[\\\"editLE\\\"]]],null],[12],[1,\\\"\\\\n                  \\\"],[1,[28,[32,9],[\\\"pencil\\\"],null]],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"earnings-info-links\\\"],[12],[1,\\\"\\\\n            \\\"],[2,[28,[32,2],[\\\"referral.links\\\"],null]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"currentUser\\\",\\\"admin\\\"]],[[[1,\\\"            \\\"],[8,[32,12],null,[[\\\"@class\\\",\\\"@label\\\",\\\"@action\\\"],[\\\"btn-primary btn-large\\\",\\\"referral.add_transaction\\\",[30,0,[\\\"addTransaction\\\"]]]],null],[1,\\\"\\\\n\\\\n            \\\"],[8,[32,12],null,[[\\\"@class\\\",\\\"@label\\\",\\\"@action\\\"],[\\\"btn-primary btn-large\\\",\\\"referral.add_comment\\\",[30,0,[\\\"addComment\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"earning\\\"],false,[\\\"if\\\",\\\"each\\\",\\\"-track-array\\\",\\\"unless\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/swapd-mlm/discourse/components/user-earnings.js\",\n      \"scope\": () => [_didInsert.default, _willDestroy.default, _i18n.default, _loadMore2.default, _truthHelpers.eq, _earningDate.default, _boundAvatarTemplate.default, _modifier.on, _helper.fn, _dIcon.default, _conditionalLoadingSpinner.default, _userEarningsEditForm.default, _dButton.default],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = UserEarnings;\n});","define(\"discourse/plugins/swapd-mlm/discourse/connectors/user-main-nav/user-earnings\", [\"exports\", \"@ember/component\", \"@ember/routing\", \"@ember/helper\", \"@ember-decorators/component\", \"discourse/helpers/d-icon\", \"discourse-i18n\", \"@ember/template-factory\"], function (_exports, _component, _routing, _helper, _component2, _dIcon, _discourseI18n, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const UserEarnings = dt7948.c(class UserEarnings extends _component.default {\n    get canSeeEarnings() {\n      return this.currentUser && (this.currentUser.id === this.model.id || this.currentUser.admin);\n    }\n    static #_ = (() => (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        {{#if this.canSeeEarnings}}\n            <LinkTo @route=\"user.earnings\">\n              {{icon \"coins\"}}\n              <span>{{i18n \"user.invited.earnings_tab\"}}</span>\n            </LinkTo>\n        {{/if}}\n      \n    */\n    {\n      \"id\": \"oS+bT3pU\",\n      \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"canSeeEarnings\\\"]],[[[1,\\\"        \\\"],[8,[32,0],null,[[\\\"@route\\\"],[\\\"user.earnings\\\"]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[28,[32,1],[\\\"coins\\\"],null]],[1,\\\"\\\\n          \\\"],[10,1],[12],[1,[28,[32,2],[\\\"user.invited.earnings_tab\\\"],null]],[13],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"]],[],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/swapd-mlm/discourse/connectors/user-main-nav/user-earnings.js\",\n      \"scope\": () => [_routing.LinkTo, _dIcon.default, _discourseI18n.i18n],\n      \"isStrictMode\": true\n    }), this))();\n  }, [(0, _component2.classNames)(\"user-nav__earnings\"), (0, _component2.tagName)(\"li\")]);\n  var _default = _exports.default = UserEarnings;\n});","define(\"discourse/plugins/swapd-mlm/discourse/controllers/user-earnings\", [\"exports\", \"@ember/controller\", \"@glimmer/tracking\", \"@ember/object\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\"], function (_exports, _controller, _tracking, _object, _ajax, _ajaxError) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class UserEarningsController extends _controller.default {\n    static #_ = (() => dt7948.g(this.prototype, \"loading\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #loading = (() => (dt7948.i(this, \"loading\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"earnings\", [_tracking.tracked], function () {\n      return null;\n    }))();\n    #earnings = (() => (dt7948.i(this, \"earnings\"), void 0))();\n    async loadMore() {\n      if (this.loading) return;\n      this.loading = true;\n      try {\n        const offset = this.earnings?.data?.length || 0;\n        const result = await (0, _ajax.ajax)(`/u/${this.username}/earnings.json?offset=${offset}`);\n        if (this.earnings) {\n          this.earnings.data.pushObjects(result.data);\n          this.earnings.can_load_more = result.can_load_more;\n        } else {\n          this.earnings = result;\n        }\n      } catch (error) {\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.loading = false;\n      }\n    }\n    static #_3 = (() => dt7948.n(this.prototype, \"loadMore\", [_object.action]))();\n    async requestPayout() {\n      try {\n        const result = await (0, _ajax.ajax)(`/u/${this.username}/earnings/payout`, {\n          type: \"POST\"\n        });\n        if (result.url) {\n          window.location.href = result.url;\n        }\n      } catch (error) {\n        (0, _ajaxError.popupAjaxError)(error);\n      }\n    }\n    static #_4 = (() => dt7948.n(this.prototype, \"requestPayout\", [_object.action]))();\n  }\n  _exports.default = UserEarningsController;\n});","define(\"discourse/plugins/swapd-mlm/discourse/helpers/referral\", [\"exports\", \"discourse-common/lib/helpers\"], function (_exports, _helpers) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = (0, _helpers.registerHelper)(\"eq\", params => {\n    return params[0] == params[1];\n  });\n});","define(\"discourse/plugins/swapd-mlm/discourse/initializers/referral\", [\"exports\", \"discourse/lib/plugin-api\", \"discourse/controllers/user-invited-show\", \"discourse/controllers/user-invited\", \"discourse-common/utils/decorators\", \"discourse-common/lib/icon-library\", \"discourse/lib/copy-text\", \"@ember/controller\"], function (_exports, _pluginApi, _userInvitedShow, _userInvited, _decorators, _iconLibrary, _copyText, _controller) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  function initPlugin(api) {\n    // api.modifyClass(\"route:user-invited-show\", {\n    //   afterModel(model) {\n    //     if (this.inviteFilter == \"earnings\") {\n    //       return this.replaceWith(\"userInvited.show\", \"redeemed\");\n    //     }\n\n    //     return this._super(...arguments);\n    //   },\n    // });\n\n    _userInvited.default.reopen(dt7948.p({\n      user: null,\n      showRefCopied: false,\n      canSeeEarnings(viewingSelf, staff, pluginEnabled) {\n        return (viewingSelf || staff) && pluginEnabled;\n      },\n      viewingSelf(userId, currentUserId) {\n        return userId == currentUserId;\n      },\n      refUrl(userId) {\n        return `${window.location.origin}/ref/${userId}`;\n      },\n      actions: {\n        copyRefUrl() {\n          const text = this.get(\"refUrl\");\n          const copyRange = $('<p id=\"copy-range\"></p>');\n          copyRange.html(text.trim().replace(\"\\n\", \"<br>\"));\n          $(document.body).append(copyRange);\n          (0, _copyText.default)(text, copyRange[0]);\n          copyRange.remove();\n          this.set(\"showRefCopied\", true);\n          setTimeout(() => {\n            this.set(\"showRefCopied\", false);\n          }, 1500);\n        }\n      }\n    }, [[\"method\", \"canSeeEarnings\", [(0, _decorators.default)(\"viewingSelf\", \"currentUser.staff\", \"siteSettings.referral_enabled\")]], [\"method\", \"viewingSelf\", [(0, _decorators.default)(\"user.id\", \"currentUser.id\")]], [\"method\", \"refUrl\", [(0, _decorators.default)(\"user.id\")]]]));\n    _userInvitedShow.default.reopen(dt7948.p({\n      parent: (0, _controller.inject)('user.invited'),\n      userChanged() {\n        this.get('parent').set('user', this.user);\n      },\n      showEarnings(filter, canSeeEarnings) {\n        return [\"earnings\"].includes(filter) && canSeeEarnings;\n      },\n      viewingSelf(userId, currentUserId) {\n        return userId == currentUserId;\n      },\n      canSeeEarnings(viewingSelf, staff, pluginEnabled) {\n        return (viewingSelf || staff) && pluginEnabled;\n      }\n    }, [[\"method\", \"userChanged\", [(0, _decorators.observes)(\"user.id\")]], [\"method\", \"showEarnings\", [(0, _decorators.default)(\"filter\", \"canSeeEarnings\")]], [\"method\", \"viewingSelf\", [(0, _decorators.default)(\"user.id\", \"currentUser.id\")]], [\"method\", \"canSeeEarnings\", [(0, _decorators.default)(\"viewingSelf\", \"currentUser.staff\", \"siteSettings.referral_enabled\")]]]));\n  }\n  var _default = _exports.default = {\n    name: \"referral\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"site-settings:main\");\n      if (siteSettings.referral_enabled) {\n        (0, _pluginApi.withPluginApi)(\"0.8\", initPlugin);\n      }\n      (0, _iconLibrary.replaceIcon)(\"notification.referral.notification\", \"dollar-sign\");\n      (0, _iconLibrary.replaceIcon)(\"notification.referral.new_referent\", \"user-plus\");\n    }\n  };\n});","define(\"discourse/plugins/swapd-mlm/discourse/routes/earnings-route-map\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = _default;\n  function _default() {\n    this.route(\"user\", {\n      path: \"/u/:username\"\n    }, function () {\n      this.route(\"earnings\");\n    });\n  }\n});","define(\"discourse/plugins/swapd-mlm/discourse/routes/user-earnings\", [\"exports\", \"discourse/routes/discourse\", \"discourse/lib/ajax\"], function (_exports, _discourse, _ajax) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _discourse.default.extend({\n    model(params) {\n      return this.modelFor(\"user\");\n    },\n    setupController(controller, model) {\n      this._super(controller, model);\n      controller.setProperties({\n        model: model\n      });\n    }\n  });\n});","define(\"discourse/plugins/swapd-mlm/discourse/routes/user\", [\"exports\", \"discourse-common/addons/routes-builder\"], function (_exports, _routesBuilder) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  // If you need to create the file:\n  var _default = _exports.default = (0, _routesBuilder.default)(() => {\n    (void 0).route(\"earnings\");\n  });\n});","define(\"discourse/plugins/swapd-mlm/discourse/templates/connectors/user-card-post-names/invited-by\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{#if this.currentUser.admin}}\n    {{#if this.siteSettings.referral_enabled}}\n      {{#if this.user.invited_by}}\n        <div class=\"earnings-invited-by\">\n          {{i18n \"referral.invited_by\"}}\n  \n          <strong>{{this.user.invited_by.username}}</strong>\n          <LinkTo @route=\"userInvited.show\" @models={{array this.user.invited_by.username \"earnings\"}}>\n            {{d-icon \"plus\"}}\n          </LinkTo>\n        </div>\n      {{/if}}\n    {{/if}}\n  {{/if}}\n  \n  */\n  {\n    \"id\": \"sewbaIRt\",\n    \"block\": \"[[[41,[30,0,[\\\"currentUser\\\",\\\"admin\\\"]],[[[41,[30,0,[\\\"siteSettings\\\",\\\"referral_enabled\\\"]],[[[41,[30,0,[\\\"user\\\",\\\"invited_by\\\"]],[[[1,\\\"      \\\"],[10,0],[14,0,\\\"earnings-invited-by\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,2],[\\\"referral.invited_by\\\"],null]],[1,\\\"\\\\n\\\\n        \\\"],[10,\\\"strong\\\"],[12],[1,[30,0,[\\\"user\\\",\\\"invited_by\\\",\\\"username\\\"]]],[13],[1,\\\"\\\\n        \\\"],[8,[39,4],null,[[\\\"@route\\\",\\\"@models\\\"],[\\\"userInvited.show\\\",[28,[37,5],[[30,0,[\\\"user\\\",\\\"invited_by\\\",\\\"username\\\"]],\\\"earnings\\\"],null]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[28,[35,6],[\\\"plus\\\"],null]],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[]],null]],[]],null]],[],false,[\\\"if\\\",\\\"div\\\",\\\"i18n\\\",\\\"strong\\\",\\\"link-to\\\",\\\"array\\\",\\\"d-icon\\\"]]\",\n    \"moduleName\": \"discourse/plugins/swapd-mlm/discourse/templates/connectors/user-card-post-names/invited-by.hbs\",\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/swapd-mlm/discourse/templates/user-earnings\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{user-earnings user=this.model closeModal=(route-action \"closeModal\")}}\n  */\n  {\n    \"id\": \"HexH8q/o\",\n    \"block\": \"[[[1,[28,[35,0],null,[[\\\"user\\\",\\\"closeModal\\\"],[[30,0,[\\\"model\\\"]],[28,[37,1],[\\\"closeModal\\\"],null]]]]]],[],false,[\\\"user-earnings\\\",\\\"route-action\\\"]]\",\n    \"moduleName\": \"discourse/plugins/swapd-mlm/discourse/templates/user-earnings.hbs\",\n    \"isStrictMode\": false\n  });\n});"],"mappings":"AAAAA,OAAA,uJAAAC,EAAAC,EAAAC,EAAAC,GACA;AAEAC,OAAAC,eAAAL,EAAA,cACAM,OAAA,IAEAN,EAAAO,aAAA;AACA,MAAAC,UAAAP,EAAAM,QACA,iBAAAE,GACA,OAAAC,OAAAC,KAAAC,KAAAC,MAAAC,OAAA,aACA,CACAC,SAAA,QAAAb,EAAAc,uBAAA,EAAAb,EAAAc,uBAIA,CACAC,GAAA,WACAC,MAAA,gEACAC,WAAA,uHACAC,cAAA,IACAV,MATA,GAWAX,EAAAO,QAAAC,C,GCtBAT,OAAA,6PAAAC,EAAAC,EAAAqB,EAAAC,EAAAC,EAAAC,EAAAC,EAAAvB,GACA;AAEAC,OAAAC,eAAAL,EAAA,cACAM,OAAA,IAEAN,EAAAO,aAAA;AACA,MAAAoB,GAAA,EAAAxB,EAAAc,uBAyCA,CACAC,GAAA,WACAC,MAAA,4mCACAC,WAAA,uFACAC,cAAA;AAEA,MAAAO,UAAA3B,EAAAM,QACA,IAAAsB,GACAC,MAAAD,QAAAE,WACApB,KAAAqB,IAAA,eACA,EAAAR,EAAAS,GAAA,8BAAAC,QAAAC,IACAxB,KAAAqB,IAAAG,EAAAxB,KAAAyB,IAAA,SAAAD,OAEA,CACA,eAAAE,CAAAC,GACA,WAAAA,CACA,CACAvB,SAAA,KAAAwB,OAAAC,EAAA7B,KAAA8B,UAAA,sBAAAnB,EAAAf,SAAA;AACA,MAAAmC,CAAAxB,GACA,UAAAO,EAAAkB,SAAAzB,EACA,CACAH,SAAA,KAAAwB,OAAAC,EAAA7B,KAAA8B,UAAA,aAAAnB,EAAAf,SAAA;AACA,iBAAAqC,CAAAP,GACA,MAAAQ,EAAAR,EAAA;AACA,OAAAS,KAAAC,EAAA,YAAAF,IACA,CACA9B,SAAA,KAAAwB,OAAAC,EAAA7B,KAA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