{"version":3,"file":"discourse-files-section.js","names":["define","_exports","_component","_component2","_object","_templateFactory","Object","defineProperty","value","default","__COLOCATED_TEMPLATE__","createTemplateFactory","id","block","moduleName","isStrictMode","FilePost","click","e","target","static","dt7948","n","this","prototype","action","setComponentTemplate","_uppyUpload","_tracking","FileUploader","extend","g","tracked","I18n","t","fileName","i","didReceiveAttrs","super","arguments","set","get","validateUploadedFilesOptions","uploadDone","upload","original_filename","url","_scrolling","_runloop","FilesFeed","didInsertElement","_readjustScrollPosition","bindScrolling","willDestroyElement","$","window","scrollTop","unbindScrolling","saveScrollPosition","session","scrolled","isScrolledToBottom","getMore","height","document","scrollTo","schedule","_dButton","FilesSectionDownloadButton","shouldRender","args","post","upload_url","scope","_decorators","_controller","p","saved","saveButtonText","isSaving","titleValidation","title","lastValidatedAt","model","create","failed","reason","lastShownAt","uploadValidation","descriptionValidation","description","categoryValidation","file_subcategories","length","actions","validateAndSave","save","notifyPropertyChange","send","chooseCategory","chosen","file_category","forEach","subcategory","available_file_categories","category","chooseSubcategory","filter","file_subcategory","removeObject","addObject","_owner","_shareTopic","loadingMore","gotMore","filterCategory","filterSubcategory","filtered","editPost","deletePost","sharePost","getOwner","lookup","show","topic","route","path","array","params","object","content","_pluginApi","_virtualDom","_filesSectionDownloadButton","_deprecated","name","initialize","container","application","withPluginApi","api","silencedKey","registerValueTransformer","_ref","dag","context","firstButtonKey","secondLastHiddenButtonKey","lastHiddenButtonKey","add","before","withSilencedDeprecations","addPostMenuButton","icon","className","position","contents","h","href","download","upload_file_name","_subcategory","init","self","_preloadStore","deleted","files","offset","limit","sort_order","_user","_route","_getOwner","setupController","controller","_super","beforeModel","transition","current","getOwnerWithFallback","transitionTo","file_subcategory_ids","ajax","type","data","user_id","upload_id","then","result","_files","_file","_category","_discourse","getCategories","fetchData","file_categories","store","file_category_id","undefined","file","postModel","admin","available_file_category","available_file_subcategory","success","setTimeout"],"sources":["discourse/plugins/discourse-files-section/discourse/components/file-post.js","discourse/plugins/discourse-files-section/discourse/components/file-uploader.js","discourse/plugins/discourse-files-section/discourse/components/files-feed.js","discourse/plugins/discourse-files-section/discourse/components/files-section-download-button.js","discourse/plugins/discourse-files-section/discourse/controllers/files-edit.js","discourse/plugins/discourse-files-section/discourse/controllers/files-index.js","discourse/plugins/discourse-files-section/discourse/controllers/files-new.js","discourse/plugins/discourse-files-section/discourse/controllers/files-show.js","discourse/plugins/discourse-files-section/discourse/files-section-route-map.js","discourse/plugins/discourse-files-section/discourse/helpers/unless-last.js","discourse/plugins/discourse-files-section/discourse/initializers/file-post-menu.js","discourse/plugins/discourse-files-section/discourse/models/category.js","discourse/plugins/discourse-files-section/discourse/models/file.js","discourse/plugins/discourse-files-section/discourse/models/files.js","discourse/plugins/discourse-files-section/discourse/models/subcategory.js","discourse/plugins/discourse-files-section/discourse/routes/files-edit.js","discourse/plugins/discourse-files-section/discourse/routes/files-index.js","discourse/plugins/discourse-files-section/discourse/routes/files-new.js","discourse/plugins/discourse-files-section/discourse/routes/files-show.js","discourse/plugins/discourse-files-section/discourse/templates/files/edit.js","discourse/plugins/discourse-files-section/discourse/templates/files/index.js","discourse/plugins/discourse-files-section/discourse/templates/files/new.js","discourse/plugins/discourse-files-section/discourse/templates/files/show.js"],"sourcesContent":["define(\"discourse/plugins/discourse-files-section/discourse/components/file-post\", [\"exports\", \"@ember/component\", \"@glimmer/component\", \"@ember/object\", \"@ember/template-factory\"], function (_exports, _component, _component2, _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    <article class=\"post row {{if this.post.deleted 'deleted'}}\">\n    <div class=\"article-header\">\n      {{format-age @post.created_at}}&nbsp;-&nbsp;{{i18n 'files.by'}}&nbsp;\n      <a href=\"{{@post.user.path}}\" data-user-card=\"{{@post.user.username}}\"><strong>{{@post.user.username}}</strong></a>\n      <span class=\"article-categories\">\n        {{@post.file_category.category}} /\n        {{#each @post.file_subcategories as |subcategory|}}\n          <strong>{{subcategory.subcategory}}{{unless-last @post.file_subcategories object=subcategory content=\",\"}}</strong>\n        {{/each}}\n      </span>\n    </div>\n    <div class=\"file\">\n      <a download=\"{{@post.upload_file_name}}\" href=\"{{@post.upload_url}}\" id=\"file_{{@post.id}}\" class=\"hidden_link\" style=\"display: none;\"></a>​​​​​​​​​​​​​​​​​​​​​​​​​​​\n      <div class=\"file-article\">\n        <LinkTo @route=\"files.show\" @model={{@post.id}}>\n          <h1>\n            {{@post.title}}\n          </h1>\n        </LinkTo>\n        <div class=\"description\">\n          {{{@post.description_cooked}}}\n        </div>\n      </div>\n    </div>\n    {{mount-widget widget=\"post-menu\"\n                   args=@post\n                   editPost=@edit\n                   deletePost=@delete\n                   share=@share\n                   model=@post}}\n  </article>\n  \n  */\n  {\n    \"id\": \"lZK61c3/\",\n    \"block\": \"[[[10,\\\"article\\\"],[15,0,[29,[\\\"post row \\\",[52,[30,0,[\\\"post\\\",\\\"deleted\\\"]],\\\"deleted\\\"]]]],[12],[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"article-header\\\"],[12],[1,\\\"\\\\n    \\\"],[1,[28,[35,3],[[30,1,[\\\"created_at\\\"]]],null]],[1,\\\" - \\\"],[1,[28,[35,4],[\\\"files.by\\\"],null]],[1,\\\" \\\\n    \\\"],[10,3],[15,6,[29,[[30,1,[\\\"user\\\",\\\"path\\\"]]]]],[15,\\\"data-user-card\\\",[29,[[30,1,[\\\"user\\\",\\\"username\\\"]]]]],[12],[10,\\\"strong\\\"],[12],[1,[30,1,[\\\"user\\\",\\\"username\\\"]]],[13],[13],[1,\\\"\\\\n    \\\"],[10,1],[14,0,\\\"article-categories\\\"],[12],[1,\\\"\\\\n      \\\"],[1,[30,1,[\\\"file_category\\\",\\\"category\\\"]]],[1,\\\" /\\\\n\\\"],[42,[28,[37,9],[[28,[37,9],[[30,1,[\\\"file_subcategories\\\"]]],null]],null],null,[[[1,\\\"        \\\"],[10,\\\"strong\\\"],[12],[1,[30,2,[\\\"subcategory\\\"]]],[1,[28,[35,10],[[30,1,[\\\"file_subcategories\\\"]]],[[\\\"object\\\",\\\"content\\\"],[[30,2],\\\",\\\"]]]],[13],[1,\\\"\\\\n\\\"]],[2]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"file\\\"],[12],[1,\\\"\\\\n    \\\"],[10,3],[15,\\\"download\\\",[29,[[30,1,[\\\"upload_file_name\\\"]]]]],[15,6,[29,[[30,1,[\\\"upload_url\\\"]]]]],[15,1,[29,[\\\"file_\\\",[30,1,[\\\"id\\\"]]]]],[14,0,\\\"hidden_link\\\"],[14,5,\\\"display: none;\\\"],[12],[13],[1,\\\"​​​​​​​​​​​​​​​​​​​​​​​​​​​\\\\n    \\\"],[10,0],[14,0,\\\"file-article\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[39,11],null,[[\\\"@route\\\",\\\"@model\\\"],[\\\"files.show\\\",[30,1,[\\\"id\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n        \\\"],[10,\\\"h1\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[30,1,[\\\"title\\\"]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"description\\\"],[12],[1,\\\"\\\\n        \\\"],[2,[30,1,[\\\"description_cooked\\\"]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n  \\\"],[1,[28,[35,13],null,[[\\\"widget\\\",\\\"args\\\",\\\"editPost\\\",\\\"deletePost\\\",\\\"share\\\",\\\"model\\\"],[\\\"post-menu\\\",[30,1],[30,3],[30,4],[30,5],[30,1]]]]],[1,\\\"\\\\n\\\"],[13],[1,\\\"\\\\n\\\"]],[\\\"@post\\\",\\\"subcategory\\\",\\\"@edit\\\",\\\"@delete\\\",\\\"@share\\\"],false,[\\\"article\\\",\\\"if\\\",\\\"div\\\",\\\"format-age\\\",\\\"i18n\\\",\\\"a\\\",\\\"strong\\\",\\\"span\\\",\\\"each\\\",\\\"-track-array\\\",\\\"unless-last\\\",\\\"link-to\\\",\\\"h1\\\",\\\"mount-widget\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/components/file-post.hbs\",\n    \"isStrictMode\": false\n  });\n  class FilePost extends _component2.default {\n    click(e) {\n      var target = e.target;\n    }\n    static #_ = (() => dt7948.n(this.prototype, \"click\", [_object.action]))();\n  }\n  _exports.default = FilePost;\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, FilePost);\n});","define(\"discourse/plugins/discourse-files-section/discourse/components/file-uploader\", [\"exports\", \"@ember/component\", \"discourse/lib/uppy/uppy-upload\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/template-factory\"], function (_exports, _component, _uppyUpload, _tracking, _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    <label class=\"btn pad-left no-text {{if this.uploading 'disabled'}}\">\n    {{d-icon \"upload\"}}\n    <input disabled={{this.uploading}} type=\"file\" class=\"hidden-upload-field\" />\n  </label>\n  {{#if this.uploading}}\n    <span>{{i18n 'upload_selector.uploading'}} {{this.uploadProgress}}%</span>\n  {{/if}}\n  {{this.fileName}}\n  {{input-tip validation=this.validation id=\"upload-validation\"}}\n  \n  */\n  {\n    \"id\": \"1KqM63a7\",\n    \"block\": \"[[[10,\\\"label\\\"],[15,0,[29,[\\\"btn pad-left no-text \\\",[52,[30,0,[\\\"uploading\\\"]],\\\"disabled\\\"]]]],[12],[1,\\\"\\\\n  \\\"],[1,[28,[35,2],[\\\"upload\\\"],null]],[1,\\\"\\\\n  \\\"],[10,\\\"input\\\"],[15,\\\"disabled\\\",[30,0,[\\\"uploading\\\"]]],[14,0,\\\"hidden-upload-field\\\"],[14,4,\\\"file\\\"],[12],[13],[1,\\\"\\\\n\\\"],[13],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"uploading\\\"]],[[[1,\\\"  \\\"],[10,1],[12],[1,[28,[35,5],[\\\"upload_selector.uploading\\\"],null]],[1,\\\" \\\"],[1,[30,0,[\\\"uploadProgress\\\"]]],[1,\\\"%\\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,[30,0,[\\\"fileName\\\"]]],[1,\\\"\\\\n\\\"],[1,[28,[35,6],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"validation\\\"]],\\\"upload-validation\\\"]]]],[1,\\\"\\\\n\\\"]],[],false,[\\\"label\\\",\\\"if\\\",\\\"d-icon\\\",\\\"input\\\",\\\"span\\\",\\\"i18n\\\",\\\"input-tip\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/components/file-uploader.hbs\",\n    \"isStrictMode\": false\n  });\n  class FileUploader extends _component.default.extend(_uppyUpload.default) {\n    static #_ = (() => dt7948.g(this.prototype, \"fileName\", [_tracking.tracked], function () {\n      return I18n.t('files.post.file.placeholder');\n    }))();\n    #fileName = (() => (dt7948.i(this, \"fileName\"), void 0))();\n    id = \"elektron-file-upload\";\n    didReceiveAttrs() {\n      super.didReceiveAttrs(...arguments);\n      this.set(\"fileName\", this.get('model').get('upload_file_name'));\n    }\n    validateUploadedFilesOptions() {\n      this.fileName = '';\n    }\n    static #_2 = (() => dt7948.n(this.prototype, \"validateUploadedFilesOptions\", [_object.action]))();\n    uploadDone(upload) {\n      this.set(\"fileName\", upload.original_filename);\n      this.get('model').set('upload_id', upload.id);\n      this.get('model').set('upload_url', upload.url);\n      this.get('model').set('upload_file_name', upload.original_filename);\n      this.get('model').set('upload', upload);\n    }\n    static #_3 = (() => dt7948.n(this.prototype, \"uploadDone\", [_object.action]))();\n  }\n  _exports.default = FileUploader;\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, FileUploader);\n});","define(\"discourse/plugins/discourse-files-section/discourse/components/files-feed\", [\"exports\", \"discourse/mixins/scrolling\", \"@ember/component\", \"@ember/runloop\"], function (_exports, _scrolling, _component, _runloop) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class FilesFeed extends _component.default.extend(_scrolling.default) {\n    didInsertElement() {\n      this._readjustScrollPosition();\n      this.bindScrolling();\n    }\n    willDestroyElement() {\n      $(window).scrollTop(0);\n      this.unbindScrolling();\n    }\n    saveScrollPosition() {\n      this.session.set('filesListScrollPosition', $(window).scrollTop());\n    }\n    scrolled() {\n      this.saveScrollPosition();\n      if (this.isScrolledToBottom()) {\n        this.getMore();\n      }\n    }\n    isScrolledToBottom() {\n      if ($(window).scrollTop() + $(window).height() > $(document).height() - 50 && $(document).height() > $(window).height()) {\n        return true;\n      }\n      return false;\n    }\n    _readjustScrollPosition() {\n      const scrollTo = this.session.get('filesListScrollPosition');\n      if (scrollTo && scrollTo >= 0) {\n        (0, _runloop.schedule)('afterRender', () => $(window).scrollTop(scrollTo + 1));\n      } else {\n        // scheduleOnce('afterRender', this, this.loadMoreUnlessFull);\n      }\n    }\n  }\n  _exports.default = FilesFeed;\n});","define(\"discourse/plugins/discourse-files-section/discourse/components/files-section-download-button\", [\"exports\", \"@glimmer/component\", \"@ember/object\", \"discourse/components/d-button\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _object, _dButton, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class FilesSectionDownloadButton extends _component.default {\n    static shouldRender(args) {\n      return args.post?.upload_url;\n    }\n    static #_ = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div>\n          <DButton\n            class=\"post-action-menu__files_download\"\n            ...attributes\n            href={{this.args.post.upload_url}}\n            @icon=\"download\"\n          />\n        </div>\n      \n    */\n    {\n      \"id\": \"lD1Pf+Eq\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[12],[1,\\\"\\\\n      \\\"],[8,[32,0],[[24,0,\\\"post-action-menu__files_download\\\"],[17,1],[16,6,[30,0,[\\\"args\\\",\\\"post\\\",\\\"upload_url\\\"]]]],[[\\\"@icon\\\"],[\\\"download\\\"]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"&attrs\\\"],false,[]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-files-section/discourse/components/files-section-download-button.js\",\n      \"scope\": () => [_dButton.default],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = FilesSectionDownloadButton;\n});","define(\"discourse/plugins/discourse-files-section/discourse/controllers/files-edit\", [\"exports\", \"discourse-common/utils/decorators\", \"@ember/controller\", \"@ember/object\"], function (_exports, _decorators, _controller, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _controller.default.extend(dt7948.p({\n    // By default we haven't saved anything\n    saved: false,\n    saveButtonText(isSaving) {\n      return isSaving ? I18n.t('saving') : I18n.t('save');\n    },\n    titleValidation(title, lastValidatedAt) {\n      if (this.model.get('titleMissing') && !title) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.title_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    uploadValidation(upload, lastValidatedAt) {\n      if (this.model.get('noUpload') && !upload) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.no_upload'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    descriptionValidation(description, lastValidatedAt) {\n      if (this.model.get('descriptionMissing') && !description) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.description_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    categoryValidation(file_subcategories, lastValidatedAt) {\n      if (this.model.get('categoryMissing') && file_subcategories.length == 0) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.category_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    actions: {\n      validateAndSave() {\n        var save = true;\n        if (!this.model.get('title')) {\n          this.model.set('titleMissing', true);\n          this.notifyPropertyChange('model.title');\n          save = false;\n        }\n        if (!this.model.get('upload_url')) {\n          this.model.set('noUpload', true);\n          this.notifyPropertyChange('model.upload_url');\n          save = false;\n        }\n        if (!this.model.get('description')) {\n          this.model.set('descriptionMissing', true);\n          this.notifyPropertyChange('model.description');\n          save = false;\n        }\n        if (this.model.get('file_subcategories').length == 0) {\n          this.model.set('categoryMissing', true);\n          this.notifyPropertyChange('model.file_subcategories');\n          save = false;\n        }\n        if (save) {\n          // Trigger the route's save action\n          this.send('save');\n        }\n        return save;\n      },\n      chooseCategory(chosen) {\n        this.model.set(\"file_subcategories\", []);\n        this.model.file_category.file_subcategories.forEach(function (subcategory) {\n          subcategory.set(\"filter\", false);\n        });\n        this.model.available_file_categories.forEach(function (category) {\n          if (chosen.id != category.id) {\n            category.set(\"filter\", false);\n          }\n        });\n        if (chosen.get(\"filter\")) {\n          chosen.set(\"filter\", false);\n          this.model.set(\"file_category\", {\n            file_subcategories: []\n          });\n        } else {\n          chosen.set(\"filter\", true);\n          this.model.set(\"file_category\", chosen);\n        }\n      },\n      chooseSubcategory(chosen) {\n        var model = this.model;\n        this.model.file_category.file_subcategories.forEach(function (subcategory) {\n          if (subcategory.id == chosen.id && !chosen.filter) {\n            chosen.set(\"filter\", true);\n            model.file_subcategories.addObject(chosen);\n          } else if (subcategory.id == chosen.id && chosen.filter) {\n            chosen.set(\"filter\", false);\n            model.file_subcategories.forEach(function (file_subcategory) {\n              if (file_subcategory.id == chosen.id) {\n                model.file_subcategories.removeObject(file_subcategory);\n              }\n            });\n          }\n        });\n        this.notifyPropertyChange('model.file_subcategories');\n      }\n    }\n  }, [[\"method\", \"saveButtonText\", [(0, _decorators.default)(\"model.isSaving\")]], [\"method\", \"titleValidation\", [(0, _decorators.default)('model.title', 'lastValidatedAt', 'model.titleMissing')]], [\"method\", \"uploadValidation\", [(0, _decorators.default)('model.upload_url', 'lastValidatedAt', 'model.noUpload')]], [\"method\", \"descriptionValidation\", [(0, _decorators.default)('model.description', 'lastValidatedAt', 'model.descriptionMissing')]], [\"method\", \"categoryValidation\", [(0, _decorators.default)('model.file_subcategories.[]', 'lastValidatedAt', 'model.categoryMissing')]]]));\n});","define(\"discourse/plugins/discourse-files-section/discourse/controllers/files-index\", [\"exports\", \"@ember/controller\", \"@ember/owner\", \"discourse/components/modal/share-topic\"], function (_exports, _controller, _owner, _shareTopic) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _controller.default.extend({\n    loadingMore: true,\n    actions: {\n      getMore: function () {\n        if (this.get('loadingMore')) {\n          return;\n        }\n        this.set('loadingMore', true);\n        this.get('target').send('getMore');\n      },\n      gotMore: function () {\n        this.set('loadingMore', false);\n      },\n      filterCategory(category) {\n        if (this.get('loadingMore')) {\n          return;\n        }\n        this.set('loadingMore', true);\n        this.get('target').send('filterCategory', category);\n      },\n      filterSubcategory(subcategory) {\n        if (this.get('loadingMore')) {\n          return;\n        }\n        this.set('loadingMore', true);\n        this.get('target').send('filterSubcategory', subcategory);\n      },\n      filtered: function () {\n        this.set('loadingMore', false);\n      },\n      editPost(post) {\n        this.get('target').send('editPost', post);\n      },\n      deletePost(post) {\n        this.get('target').send('deletePost', post);\n      },\n      sharePost(post) {\n        (0, _owner.getOwner)(this).lookup(\"service:modal\").show(_shareTopic.default, {\n          model: {\n            topic: post\n          }\n        });\n      }\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/controllers/files-new\", [\"exports\", \"discourse-common/utils/decorators\", \"@ember/controller\", \"@ember/object\"], function (_exports, _decorators, _controller, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _controller.default.extend(dt7948.p({\n    // By default we haven't saved anything\n    saved: false,\n    saveButtonText(isSaving) {\n      return isSaving ? I18n.t('saving') : I18n.t('files.post.submit_file_upload');\n    },\n    titleValidation(title, lastValidatedAt) {\n      if (this.model.get('titleMissing') && !title) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.title_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    uploadValidation(upload, lastValidatedAt) {\n      if (this.model.get('noUpload') && !upload) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.no_upload'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    descriptionValidation(description, lastValidatedAt) {\n      if (this.model.get('descriptionMissing') && !description) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.description_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    categoryValidation(file_subcategories, lastValidatedAt) {\n      if (this.model.get('categoryMissing') && file_subcategories.length == 0) {\n        return _object.default.create({\n          failed: true,\n          reason: I18n.t('files.error.category_missing'),\n          lastShownAt: lastValidatedAt\n        });\n      }\n    },\n    actions: {\n      validateAndSave() {\n        var save = true;\n        if (!this.model.get('title')) {\n          this.model.set('titleMissing', true);\n          this.notifyPropertyChange('model.title');\n          save = false;\n        }\n        if (!this.model.get('upload_url')) {\n          this.model.set('noUpload', true);\n          this.notifyPropertyChange('model.upload_url');\n          save = false;\n        }\n        if (!this.model.get('description')) {\n          this.model.set('descriptionMissing', true);\n          this.notifyPropertyChange('model.description');\n          save = false;\n        }\n        if (this.model.get('file_subcategories').length == 0) {\n          this.model.set('categoryMissing', true);\n          this.notifyPropertyChange('model.file_subcategories');\n          save = false;\n        }\n        if (save) {\n          // Trigger the route's save action\n          this.send('save');\n        }\n        return save;\n      },\n      chooseCategory(chosen) {\n        this.model.set(\"file_subcategories\", []);\n        if (this.model.file_category.file_subcategories) {\n          this.model.file_category.file_subcategories.forEach(function (subcategory) {\n            subcategory.set(\"filter\", false);\n          });\n        }\n        this.model.available_file_categories.forEach(function (category) {\n          if (chosen.id != category.id) {\n            category.set(\"filter\", false);\n          }\n        });\n        if (chosen.get(\"filter\")) {\n          chosen.set(\"filter\", false);\n          this.model.set(\"file_category\", {});\n        } else {\n          chosen.set(\"filter\", true);\n          this.model.set(\"file_category\", chosen);\n        }\n      },\n      chooseSubcategory(chosen) {\n        var model = this.model;\n        this.model.file_category.file_subcategories.forEach(function (subcategory) {\n          if (subcategory.id == chosen.id && !chosen.filter) {\n            chosen.set(\"filter\", true);\n            model.file_subcategories.addObject(chosen);\n          } else if (subcategory.id == chosen.id && chosen.filter) {\n            chosen.set(\"filter\", false);\n            model.file_subcategories.removeObject(chosen);\n          }\n        });\n        this.notifyPropertyChange('model.file_subcategories');\n      }\n    }\n  }, [[\"method\", \"saveButtonText\", [(0, _decorators.default)(\"model.isSaving\")]], [\"method\", \"titleValidation\", [(0, _decorators.default)('model.title', 'lastValidatedAt', 'model.titleMissing')]], [\"method\", \"uploadValidation\", [(0, _decorators.default)('model.upload_url', 'lastValidatedAt', 'model.noUpload')]], [\"method\", \"descriptionValidation\", [(0, _decorators.default)('model.description', 'lastValidatedAt', 'model.descriptionMissing')]], [\"method\", \"categoryValidation\", [(0, _decorators.default)('model.file_subcategories.[]', 'lastValidatedAt', 'model.categoryMissing')]]]));\n});","define(\"discourse/plugins/discourse-files-section/discourse/controllers/files-show\", [\"exports\", \"@ember/controller\", \"@ember/owner\", \"discourse/components/modal/share-topic\"], function (_exports, _controller, _owner, _shareTopic) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _controller.default.extend({\n    actions: {\n      sharePost(post) {\n        (0, _owner.getOwner)(this).lookup(\"service:modal\").show(_shareTopic.default, {\n          model: {\n            topic: post\n          }\n        });\n      }\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/files-section-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('files', {\n      path: '/files'\n    }, function () {\n      this.route('new', {\n        path: '/new'\n      });\n      this.route('show', {\n        path: '/:id'\n      });\n      this.route('edit', {\n        path: '/edit/:id'\n      });\n    });\n  }\n});","define(\"discourse/plugins/discourse-files-section/discourse/helpers/unless-last\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = unlessLast;\n  function unlessLast(array, params) {\n    if (array[array.length - 1] == params.object) {\n      return \"\";\n    } else {\n      return params.content;\n    }\n  }\n});","define(\"discourse/plugins/discourse-files-section/discourse/initializers/file-post-menu\", [\"exports\", \"discourse/lib/plugin-api\", \"virtual-dom\", \"discourse/plugins/discourse-files-section/discourse/components/files-section-download-button\", \"discourse/lib/deprecated\"], function (_exports, _pluginApi, _virtualDom, _filesSectionDownloadButton, _deprecated) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = {\n    name: \"file-post-menu\",\n    initialize: function (container, application) {\n      (0, _pluginApi.withPluginApi)('1.34.0', api => {\n        const transformerRegistered = api.registerValueTransformer(\"post-menu-buttons\", _ref => {\n          let {\n            value: dag,\n            context: {\n              post,\n              firstButtonKey,\n              // key of the first button\n              secondLastHiddenButtonKey,\n              // key of the second last hidden button\n              lastHiddenButtonKey // key of the last hidden button\n            }\n          } = _ref;\n          dag.add(\"download\", _filesSectionDownloadButton.default, {\n            before: firstButtonKey\n          });\n        });\n        const silencedKey = transformerRegistered && \"discourse.post-menu-widget-overrides\";\n        (0, _deprecated.withSilencedDeprecations)(silencedKey, () => {\n          api.addPostMenuButton('download', post => {\n            if (post.upload_url) {\n              return {\n                icon: 'download',\n                className: 'download-file',\n                title: 'files.download',\n                position: 'first',\n                contents: (0, _virtualDom.h)('a', {\n                  href: post.upload_url,\n                  download: post.upload_file_name,\n                  target: '_blank'\n                })\n              };\n            }\n          });\n        });\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-files-section/discourse/models/category\", [\"exports\", \"discourse/plugins/discourse-files-section/discourse/models/subcategory\", \"@ember/object\"], function (_exports, _subcategory, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _object.default.extend({\n    init() {\n      var self = this;\n      this.set('subcategories', function () {\n        for (var i = 0; i < self.file_subcategories.length; i++) {\n          self.file_subcategories[i] = _subcategory.default.create(self.file_subcategories[i]);\n        }\n        ;\n      }());\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/models/file\", [\"exports\", \"discourse/lib/preload-store\", \"@ember/object\"], function (_exports, _preloadStore, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _object.default.extend({\n    available_file_categories: [],\n    file_subcategories: [],\n    file_category: {},\n    isSaving: false,\n    deleted: false,\n    init: function () {\n      this.set('available_file_categories', _preloadStore.default.get('file_categories'));\n      this.set('isSaving', false);\n      this.set('deleted', false);\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/models/files\", [\"exports\", \"@ember/object\"], function (_exports, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _object.default.extend({\n    files: [],\n    available_file_categories: [],\n    file_category: {},\n    file_subcategories: [],\n    offset: 0,\n    limit: 10,\n    sort_order: 'desc',\n    init: function () {\n      this.set('files', []);\n      this.set('available_file_categories', []);\n      this.set('offset', 0);\n      this.set('limit', 10);\n      this.set('sort_order', 'desc');\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/models/subcategory\", [\"exports\", \"@ember/object\"], function (_exports, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _object.default.extend({});\n});","define(\"discourse/plugins/discourse-files-section/discourse/routes/files-edit\", [\"exports\", \"discourse/models/user\", \"@ember/routing/route\", \"discourse-common/lib/get-owner\"], function (_exports, _user, _route, _getOwner) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _route.default.extend({\n    path: \"files\",\n    setupController: function (controller, model) {\n      // model.reply = model.content;\n      controller.set('saved', false);\n      this._super(controller, model);\n    },\n    beforeModel(transition) {\n      if (!_user.default.current()) {\n        const router = (0, _getOwner.getOwnerWithFallback)(this).lookup(\"service:router\");\n        router.transitionTo('files.index');\n      }\n    },\n    actions: {\n      save: function () {\n        var self = this;\n        var model = this.controller.model;\n        model.set('isSaving', true);\n        var file_subcategory_ids = [];\n        model.get('file_subcategories').forEach(function (file_subcategory) {\n          file_subcategory_ids.addObject(file_subcategory.id);\n        });\n        $.ajax({\n          url: \"/\" + self.path + \"/\" + model.get('id'),\n          type: \"PUT\",\n          data: {\n            user_id: _user.default.current().id,\n            description: model.get('description'),\n            title: model.get('title'),\n            upload_id: model.get('upload_id'),\n            upload_url: model.get('upload_url'),\n            upload_file_name: model.get('upload_file_name'),\n            file_subcategory_ids: file_subcategory_ids\n          }\n        }).then(function (result) {\n          model.set('isSaving', false);\n          const router = (0, _getOwner.getOwnerWithFallback)(this).lookup(\"service:router\");\n          router.transitionTo(self.path + '.index');\n        });\n      }\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/routes/files-index\", [\"exports\", \"discourse/plugins/discourse-files-section/discourse/models/files\", \"discourse/plugins/discourse-files-section/discourse/models/file\", \"discourse/plugins/discourse-files-section/discourse/models/category\", \"discourse/models/user\", \"discourse/lib/preload-store\", \"discourse/routes/discourse\", \"discourse-common/lib/get-owner\"], function (_exports, _files, _file, _category, _user, _preloadStore, _discourse, _getOwner) {\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    path: \"files\",\n    setupController: function (controller, model) {\n      controller.set('model', model);\n      controller.send('gotMore');\n      this._super(controller, model);\n    },\n    model() {\n      var self = this;\n      var model = _files.default.create();\n      return this.getCategories(model).then(function () {\n        return self.fetchData(model);\n      });\n    },\n    getCategories(model) {\n      return $.ajax({\n        url: \"/files/categories\",\n        type: \"GET\"\n      }).then(function (result) {\n        var file_categories = [];\n        result.file_categories.forEach(function (category) {\n          file_categories.addObject(_category.default.create(category));\n        });\n        _preloadStore.default.store(\"file_categories\", file_categories);\n        model.set(\"available_file_categories\", _preloadStore.default.get('file_categories'));\n      });\n    },\n    fetchData(model) {\n      var self = this;\n      var file_subcategory_ids = [];\n      model.get(\"file_subcategories\").forEach(function (file_subcategory) {\n        file_subcategory_ids.addObject(file_subcategory.id);\n      });\n      return $.ajax({\n        url: \"/files\",\n        type: \"GET\",\n        data: {\n          file_category_id: model.get(\"file_category\") ? model.get(\"file_category\").id : undefined,\n          file_subcategory_ids: file_subcategory_ids,\n          offset: model.get('offset'),\n          limit: model.get('limit'),\n          sort_order: model.get('sort_order')\n        }\n      }).then(function (result) {\n        result.files.forEach(function (file) {\n          var postModel = _file.default.create(file);\n          if (_user.default.current()) {\n            postModel.set('canEdit', postModel.user_id == _user.default.current().id || _user.default.current().admin);\n            postModel.set('canDelete', postModel.user_id == _user.default.current().id || _user.default.current().admin);\n          }\n          postModel.set('shareUrl', '/files/' + postModel.id);\n          model.files.addObject(postModel);\n        });\n        model.set('offset', result.offset);\n        model.set('limit', result.limit);\n        model.set('sort_order', result.sort_order);\n        return model;\n      });\n    },\n    actions: {\n      editPost(post) {\n        post.available_file_categories.forEach(function (available_file_category) {\n          if (post.file_category.id == available_file_category.id) {\n            available_file_category.set(\"filter\", true);\n            post.set(\"file_category\", _category.default.create(available_file_category));\n            post.file_category.set(\"filter\", true);\n            post.file_category.file_subcategories.forEach(function (available_file_subcategory) {\n              post.file_subcategories.forEach(function (file_subcategory) {\n                if (file_subcategory.id == available_file_subcategory.id) {\n                  available_file_subcategory.filter = true;\n                }\n              });\n            });\n          }\n        });\n        const router = (0, _getOwner.getOwnerWithFallback)(this).lookup(\"service:router\");\n        router.transitionTo(this.path + \".edit\", post);\n      },\n      deletePost(post) {\n        var model = this.controller.model;\n        $.ajax({\n          url: \"/files/\" + post.id,\n          type: \"DELETE\"\n        }).then(function (result) {\n          if (result.success) {\n            for (var i = 0; i < model.files.length; i++) {\n              if (post.id == model.files[i].id) {\n                model.files[i].set('deleted', true);\n                setTimeout(function () {\n                  $(\".files .posts .row.deleted\").height('0');\n                }, 100);\n                setTimeout(function () {\n                  model.files.removeObject(model.files[i]);\n                }, 500);\n                break;\n              }\n            }\n          }\n        });\n      },\n      getMore() {\n        var self = this;\n        var limit = this.controller.model.get('limit'),\n          offset = this.controller.model.get('offset');\n        this.controller.model.set('offset', offset + limit);\n        this.fetchData(this.controller.model).then(function () {\n          self.controller.send('gotMore');\n        });\n      },\n      filterCategory(category) {\n        var self = this;\n        var model = this.controller.model;\n        model.set(\"file_subcategories\", []);\n        if (model.file_category.file_subcategories) {\n          model.file_category.file_subcategories.forEach(function (subcategory) {\n            subcategory.set(\"filter\", false);\n          });\n        }\n        model.available_file_categories.forEach(function (available_file_category) {\n          if (category.id != available_file_category.id) {\n            available_file_category.set(\"filter\", false);\n          }\n        });\n        if (category.get(\"filter\")) {\n          category.set(\"filter\", false);\n          model.set(\"file_category\", {});\n        } else {\n          category.set(\"filter\", true);\n          model.set(\"file_category\", category);\n        }\n        model.set(\"files\", []);\n        model.set(\"offset\", 0);\n        model.set(\"limit\", 20);\n        this.fetchData(model).then(function () {\n          self.controller.send(\"gotMore\");\n        });\n      },\n      filterSubcategory(subcategory) {\n        var self = this;\n        var model = this.controller.model;\n        for (var i = 0; i < model.file_category.file_subcategories.length; i++) {\n          if (model.file_category.file_subcategories[i].subcategory == subcategory.subcategory) {\n            if (!model.file_category.file_subcategories[i].filter) {\n              model.file_category.file_subcategories[i].set(\"filter\", true);\n              model.file_subcategories.addObject(model.file_category.file_subcategories[i]);\n            } else {\n              model.file_category.file_subcategories[i].set(\"filter\", false);\n              model.file_subcategories.removeObject(model.file_category.file_subcategories[i]);\n            }\n          }\n        }\n        model.set(\"files\", []);\n        model.set(\"offset\", 0);\n        model.set(\"limit\", 20);\n        this.fetchData(model).then(function () {\n          self.controller.send(\"gotMore\");\n        });\n      }\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/routes/files-new\", [\"exports\", \"discourse/plugins/discourse-files-section/discourse/models/file\", \"discourse/models/user\", \"@ember/routing/route\", \"discourse-common/lib/get-owner\"], function (_exports, _file, _user, _route, _getOwner) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _route.default.extend({\n    path: \"files\",\n    setupController: function (controller, model) {\n      controller.set('model', model);\n      this._super(controller, model);\n    },\n    beforeModel(transition) {\n      if (!_user.default.current()) {\n        const router = (0, _getOwner.getOwnerWithFallback)(this).lookup(\"service:router\");\n        router.transitionTo('files.index');\n      }\n    },\n    model(params, transition) {\n      var file = _file.default.create();\n      return file;\n    },\n    actions: {\n      save: function () {\n        var self = this;\n        var model = this.controller.model;\n        model.set('isSaving', true);\n        var file_subcategory_ids = [];\n        model.get('file_subcategories').forEach(function (file_subcategory) {\n          file_subcategory_ids.addObject(file_subcategory.id);\n        });\n        $.ajax({\n          url: \"/\" + self.path + \"/new\",\n          type: \"POST\",\n          data: {\n            user_id: _user.default.current().id,\n            description: model.get('description'),\n            title: model.get('title'),\n            upload_id: model.get('upload_id'),\n            upload_url: model.get('upload_url'),\n            upload_file_name: model.get('upload_file_name'),\n            file_subcategory_ids: file_subcategory_ids\n          }\n        }).then(function (result) {\n          model.set('isSaving', false);\n          const router = (0, _getOwner.getOwnerWithFallback)(this).lookup(\"service:router\");\n          router.transitionTo(self.path + '.index');\n        });\n      }\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/routes/files-show\", [\"exports\", \"discourse/plugins/discourse-files-section/discourse/models/file\", \"@ember/routing/route\"], function (_exports, _file, _route) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = _route.default.extend({\n    path: \"files\",\n    setupController: function (controller, model) {\n      this._super(controller, model);\n    },\n    model(params, transition) {\n      var self = this;\n      return $.ajax({\n        url: \"/\" + self.path + \"/\" + params.id,\n        type: \"GET\"\n      }).then(function (result) {\n        var postModel = _file.default.create(result.post);\n        postModel.set('shareUrl', '/files/' + postModel.id);\n        return postModel;\n      });\n    }\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/templates/files/edit\", [\"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    \n  <article class='edit-file'>\n  \n    <form class=\"form-horizontal\" method=\"post\">\n  \n      <div class=\"control-group files-post-heading\">\n        <div class=\"controls\">\n            <h1>{{i18n 'files.edit_uploaded_file'}}</h1>\n        </div>\n      </div>\n  \n      <div class=\"control-group file-title\">\n        <label class=\"control-label\">{{i18n 'files.post.title'}}</label>\n        <div class=\"controls\">\n          {{input type=\"text\" value=this.model.title class=\"input-xxlarge\" id='edit-title'}}\n          {{input-tip validation=this.titleValidation id=\"title-validation\"}}\n        </div>\n      </div>\n  \n      <div class=\"control-group file-upload\">\n        <label class=\"control-label\">{{i18n 'files.post.file.label'}}</label>\n        <div class=\"controls\">\n          {{file-uploader model=this.model validation=this.uploadValidation type='files_section_file'}}\n        </div>\n      </div>\n  \n      <div class=\"control-group files-post-description\">\n        <label class=\"control-label\">{{i18n 'files.post.description'}}</label>\n        <div class=\"controls\">\n          {{d-editor value=this.model.description id='edit-description'}}\n          {{input-tip validation=this.descriptionValidation id=\"description-validation\"}}\n        </div>\n      </div>\n  \n      <div class=\"control-group file-post-categories\">\n        <label class=\"control-label\">{{i18n 'files.categories'}}</label>\n        <div class=\"controls\">\n          <div class=\"categories\">\n            {{#each this.model.available_file_categories as |category|}}\n              <a {{action 'chooseCategory' category}}>\n                {{#if category.filter}}\n                  <span class=\"chosen\">{{category.category}}</span>\n                {{/if}}\n                {{#unless category.filter}}\n                  <span>{{category.category}}</span>\n                {{/unless}}\n              </a>\n            {{/each}}\n          </div>\n          <div class=\"subcategories\">\n            {{#each this.model.file_category.file_subcategories as |subcategory|}}\n              <a {{action 'chooseSubcategory' subcategory}}>\n                {{#if subcategory.filter}}\n                  <span class=\"chosen\">{{subcategory.subcategory}}</span>\n                {{/if}}\n                {{#unless subcategory.filter}}\n                  <span>{{subcategory.subcategory}}</span>\n                {{/unless}}\n              </a>\n            {{/each}}\n            {{input-tip validation=this.categoryValidation id=\"category-validation\"}}\n          </div>\n        </div>\n      </div>\n  \n      <div class=\"control-group\">\n        <div class=\"controls\">\n          <DButton @action={{action \"validateAndSave\"}} @disabled={{this.model.isSaving}} class=\"btn btn-primary upload-file\">\n            {{this.saveButtonText}}\n          </DButton>\n  \n          {{#if this.saved}}\n            <span class='saved-user'>{{i18n 'saved'}}</span>\n          {{/if}}\n        </div>\n      </div>\n  \n    </form>\n  \n  </article>\n  \n  */\n  {\n    \"id\": \"8olCf/5h\",\n    \"block\": \"[[[1,\\\"\\\\n\\\"],[10,\\\"article\\\"],[14,0,\\\"edit-file\\\"],[12],[1,\\\"\\\\n\\\\n  \\\"],[10,\\\"form\\\"],[14,0,\\\"form-horizontal\\\"],[14,\\\"method\\\",\\\"post\\\"],[12],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group files-post-heading\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n          \\\"],[10,\\\"h1\\\"],[12],[1,[28,[35,4],[\\\"files.edit_uploaded_file\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-title\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.title\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,6],null,[[\\\"type\\\",\\\"value\\\",\\\"class\\\",\\\"id\\\"],[\\\"text\\\",[30,0,[\\\"model\\\",\\\"title\\\"]],\\\"input-xxlarge\\\",\\\"edit-title\\\"]]]],[1,\\\"\\\\n        \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"titleValidation\\\"]],\\\"title-validation\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-upload\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.file.label\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,8],null,[[\\\"model\\\",\\\"validation\\\",\\\"type\\\"],[[30,0,[\\\"model\\\"]],[30,0,[\\\"uploadValidation\\\"]],\\\"files_section_file\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group files-post-description\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.description\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,9],null,[[\\\"value\\\",\\\"id\\\"],[[30,0,[\\\"model\\\",\\\"description\\\"]],\\\"edit-description\\\"]]]],[1,\\\"\\\\n        \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"descriptionValidation\\\"]],\\\"description-validation\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-post-categories\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.categories\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"categories\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,11],[[28,[37,11],[[30,0,[\\\"model\\\",\\\"available_file_categories\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[11,3],[4,[38,13],[[30,0],\\\"chooseCategory\\\",[30,1]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,1,[\\\"filter\\\"]],[[[1,\\\"                \\\"],[10,1],[14,0,\\\"chosen\\\"],[12],[1,[30,1,[\\\"category\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,1,[\\\"filter\\\"]]],[[[1,\\\"                \\\"],[10,1],[12],[1,[30,1,[\\\"category\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"subcategories\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,11],[[28,[37,11],[[30,0,[\\\"model\\\",\\\"file_category\\\",\\\"file_subcategories\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[11,3],[4,[38,13],[[30,0],\\\"chooseSubcategory\\\",[30,2]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,2,[\\\"filter\\\"]],[[[1,\\\"                \\\"],[10,1],[14,0,\\\"chosen\\\"],[12],[1,[30,2,[\\\"subcategory\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,2,[\\\"filter\\\"]]],[[[1,\\\"                \\\"],[10,1],[12],[1,[30,2,[\\\"subcategory\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\"]],[2]],null],[1,\\\"          \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"categoryValidation\\\"]],\\\"category-validation\\\"]]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[39,17],[[24,0,\\\"btn btn-primary upload-file\\\"]],[[\\\"@action\\\",\\\"@disabled\\\"],[[28,[37,13],[[30,0],\\\"validateAndSave\\\"],null],[30,0,[\\\"model\\\",\\\"isSaving\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[30,0,[\\\"saveButtonText\\\"]]],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"saved\\\"]],[[[1,\\\"          \\\"],[10,1],[14,0,\\\"saved-user\\\"],[12],[1,[28,[35,4],[\\\"saved\\\"],null]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n  \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[13],[1,\\\"\\\\n\\\"]],[\\\"category\\\",\\\"subcategory\\\"],false,[\\\"article\\\",\\\"form\\\",\\\"div\\\",\\\"h1\\\",\\\"i18n\\\",\\\"label\\\",\\\"input\\\",\\\"input-tip\\\",\\\"file-uploader\\\",\\\"d-editor\\\",\\\"each\\\",\\\"-track-array\\\",\\\"a\\\",\\\"action\\\",\\\"if\\\",\\\"span\\\",\\\"unless\\\",\\\"d-button\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/templates/files/edit.hbs\",\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/templates/files/index\", [\"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    {{#files-feed model=this.model getMore=(action 'getMore')}}\n    <div class='files'>\n  \n      <!-- {{share-popup topic=model}} -->\n  \n      <div class=\"files-container\">\n        <div class=\"mobile-new-button\">\n          <LinkTo @route='files.new' class=\"btn btn-primary upload-file\">\n            {{i18n 'files.upload_file'}}\n          </LinkTo>\n        </div>\n  \n        <div class=\"files-feed\">\n  \n          <div class=\"posts\">\n            {{#each this.model.files as |post index|}}\n              {{file-post post=post edit=(action 'editPost') delete=(action 'deletePost') share=(action 'sharePost')}}\n            {{/each}}\n          </div>\n  \n          <div class=\"spinner-container\">\n            {{conditional-loading-spinner condition=this.loadingMore}}\n          </div>\n  \n        </div>\n  \n        <div class=\"files-sidebar\">\n          <div class=\"sidebar-content\">\n  \n            <div class=\"upload-button-container\">\n              {{#if this.currentUser}}\n                <LinkTo @route='files.new' class=\"btn btn-primary upload-file\">\n                  {{i18n 'files.upload_file'}}\n                </LinkTo>\n              {{/if}}\n            </div>\n  \n            <div class=\"filter-control\">\n              <span><b>{{i18n 'files.filter'}}</b></span>\n              <hr>\n  \n              <div class=\"file-categories-container\">\n                <div class=\"file-categories inline-list\">\n                  {{#each this.model.available_file_categories as |category|}}\n                    <a {{action 'filterCategory' category}}>\n                      {{#if category.filter}}\n                        <span><strong>{{category.category}}</strong></span>\n                      {{/if}}\n                      {{#unless category.filter}}\n                        <span>{{category.category}}</span>\n                      {{/unless}}\n                    </a>\n                  {{/each}}\n                </div>\n                <br />\n                <div class=\"file-subcategories inline-list\">\n                  {{#each this.model.file_category.file_subcategories as |subcategory|}}\n                    <a {{action 'filterSubcategory' subcategory}}>\n                      {{#if subcategory.filter}}\n                        <span><strong>{{subcategory.subcategory}}</strong></span>\n                      {{/if}}\n                      {{#unless subcategory.filter}}\n                        <span>{{subcategory.subcategory}}</span>\n                      {{/unless}}\n                    </a>\n                  {{/each}}\n                </div>\n              </div>\n  \n            </div>\n  \n          </div>\n        </div>\n  \n      </div>\n  \n    </div>\n  {{/files-feed}}\n  \n  */\n  {\n    \"id\": \"56ed5A6h\",\n    \"block\": \"[[[6,[39,0],null,[[\\\"model\\\",\\\"getMore\\\"],[[30,0,[\\\"model\\\"]],[28,[37,1],[[30,0],\\\"getMore\\\"],null]]],[[\\\"default\\\"],[[[[1,\\\"  \\\"],[10,0],[14,0,\\\"files\\\"],[12],[1,\\\"\\\\n\\\\n    \\\"],[3,\\\" {{share-popup topic=model}} \\\"],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"files-container\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"mobile-new-button\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[39,3],[[24,0,\\\"btn btn-primary upload-file\\\"]],[[\\\"@route\\\"],[\\\"files.new\\\"]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[28,[35,4],[\\\"files.upload_file\\\"],null]],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\\n      \\\"],[10,0],[14,0,\\\"files-feed\\\"],[12],[1,\\\"\\\\n\\\\n        \\\"],[10,0],[14,0,\\\"posts\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,6],[[28,[37,6],[[30,0,[\\\"model\\\",\\\"files\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[1,[28,[35,7],null,[[\\\"post\\\",\\\"edit\\\",\\\"delete\\\",\\\"share\\\"],[[30,1],[28,[37,1],[[30,0],\\\"editPost\\\"],null],[28,[37,1],[[30,0],\\\"deletePost\\\"],null],[28,[37,1],[[30,0],\\\"sharePost\\\"],null]]]]],[1,\\\"\\\\n\\\"]],[1,2]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n\\\\n        \\\"],[10,0],[14,0,\\\"spinner-container\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[28,[35,8],null,[[\\\"condition\\\"],[[30,0,[\\\"loadingMore\\\"]]]]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\\n      \\\"],[13],[1,\\\"\\\\n\\\\n      \\\"],[10,0],[14,0,\\\"files-sidebar\\\"],[12],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"sidebar-content\\\"],[12],[1,\\\"\\\\n\\\\n          \\\"],[10,0],[14,0,\\\"upload-button-container\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"currentUser\\\"]],[[[1,\\\"              \\\"],[8,[39,3],[[24,0,\\\"btn btn-primary upload-file\\\"]],[[\\\"@route\\\"],[\\\"files.new\\\"]],[[\\\"default\\\"],[[[[1,\\\"\\\\n                \\\"],[1,[28,[35,4],[\\\"files.upload_file\\\"],null]],[1,\\\"\\\\n              \\\"]],[]]]]],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"          \\\"],[13],[1,\\\"\\\\n\\\\n          \\\"],[10,0],[14,0,\\\"filter-control\\\"],[12],[1,\\\"\\\\n            \\\"],[10,1],[12],[10,\\\"b\\\"],[12],[1,[28,[35,4],[\\\"files.filter\\\"],null]],[13],[13],[1,\\\"\\\\n            \\\"],[10,\\\"hr\\\"],[12],[13],[1,\\\"\\\\n\\\\n            \\\"],[10,0],[14,0,\\\"file-categories-container\\\"],[12],[1,\\\"\\\\n              \\\"],[10,0],[14,0,\\\"file-categories inline-list\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,6],[[28,[37,6],[[30,0,[\\\"model\\\",\\\"available_file_categories\\\"]]],null]],null],null,[[[1,\\\"                  \\\"],[11,3],[4,[38,1],[[30,0],\\\"filterCategory\\\",[30,3]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,3,[\\\"filter\\\"]],[[[1,\\\"                      \\\"],[10,1],[12],[10,\\\"strong\\\"],[12],[1,[30,3,[\\\"category\\\"]]],[13],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,3,[\\\"filter\\\"]]],[[[1,\\\"                      \\\"],[10,1],[12],[1,[30,3,[\\\"category\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"                  \\\"],[13],[1,\\\"\\\\n\\\"]],[3]],null],[1,\\\"              \\\"],[13],[1,\\\"\\\\n              \\\"],[10,\\\"br\\\"],[12],[13],[1,\\\"\\\\n              \\\"],[10,0],[14,0,\\\"file-subcategories inline-list\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,6],[[28,[37,6],[[30,0,[\\\"model\\\",\\\"file_category\\\",\\\"file_subcategories\\\"]]],null]],null],null,[[[1,\\\"                  \\\"],[11,3],[4,[38,1],[[30,0],\\\"filterSubcategory\\\",[30,4]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,4,[\\\"filter\\\"]],[[[1,\\\"                      \\\"],[10,1],[12],[10,\\\"strong\\\"],[12],[1,[30,4,[\\\"subcategory\\\"]]],[13],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,4,[\\\"filter\\\"]]],[[[1,\\\"                      \\\"],[10,1],[12],[1,[30,4,[\\\"subcategory\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"                  \\\"],[13],[1,\\\"\\\\n\\\"]],[4]],null],[1,\\\"              \\\"],[13],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\\n          \\\"],[13],[1,\\\"\\\\n\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"]],[]]]]]],[\\\"post\\\",\\\"index\\\",\\\"category\\\",\\\"subcategory\\\"],false,[\\\"files-feed\\\",\\\"action\\\",\\\"div\\\",\\\"link-to\\\",\\\"i18n\\\",\\\"each\\\",\\\"-track-array\\\",\\\"file-post\\\",\\\"conditional-loading-spinner\\\",\\\"if\\\",\\\"span\\\",\\\"b\\\",\\\"hr\\\",\\\"a\\\",\\\"strong\\\",\\\"unless\\\",\\\"br\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/templates/files/index.hbs\",\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/templates/files/new\", [\"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    \n  <article class='create-file'>\n  \n    <form class=\"form-horizontal\" method=\"post\">\n  \n      <div class=\"control-group files-post-heading\">\n        <div class=\"controls\">\n            <h1>{{i18n 'files.upload_file'}}</h1>\n        </div>\n      </div>\n  \n      <div class=\"control-group file-title\">\n        <label class=\"control-label\">{{i18n 'files.post.title'}}</label>\n        <div class=\"controls\">\n          {{input type=\"text\" value=this.model.title class=\"input-xxlarge\" id='edit-title'}}\n          {{input-tip validation=this.titleValidation id=\"title-validation\"}}\n        </div>\n      </div>\n  \n      <div class=\"control-group file-upload\">\n        <label class=\"control-label\">{{i18n 'files.post.file.label'}}</label>\n        <div class=\"controls\">\n          {{file-uploader model=this.model validation=this.uploadValidation type='files_section_file'}}\n        </div>\n      </div>\n  \n      <div class=\"control-group files-post-description\">\n        <label class=\"control-label\">{{i18n 'files.post.description'}}</label>\n        <div class=\"controls\">\n          {{d-editor value=this.model.description id='edit-description'}}\n          {{input-tip validation=this.descriptionValidation id=\"description-validation\"}}\n        </div>\n      </div>\n  \n      <div class=\"control-group file-post-categories\">\n        <label class=\"control-label\">{{i18n 'files.categories'}}</label>\n        <div class=\"controls\">\n          <div class=\"categories\">\n            {{#each this.model.available_file_categories as |category|}}\n              <a {{action 'chooseCategory' category}}>\n                {{#if category.filter}}\n                  <span class=\"chosen\">{{category.category}}</span>\n                {{/if}}\n                {{#unless category.filter}}\n                  <span>{{category.category}}</span>\n                {{/unless}}\n              </a>\n            {{/each}}\n          </div>\n          <div class=\"subcategories\">\n            {{#each this.model.file_category.file_subcategories as |subcategory|}}\n              <a {{action 'chooseSubcategory' subcategory}}>\n                {{#if subcategory.filter}}\n                  <span class=\"chosen\">{{subcategory.subcategory}}</span>\n                {{/if}}\n                {{#unless subcategory.filter}}\n                  <span>{{subcategory.subcategory}}</span>\n                {{/unless}}\n              </a>\n            {{/each}}\n            {{input-tip validation=this.categoryValidation id=\"category-validation\"}}\n          </div>\n        </div>\n      </div>\n  \n      <div class=\"control-group\">\n        <div class=\"controls\">\n          <DButton @action={{action \"validateAndSave\"}} @disabled={{this.model.isSaving}} class=\"btn btn-primary upload-file\">\n            {{this.saveButtonText}}\n          </DButton>\n          {{#if this.saved}}\n            <span class='saved-user'>{{i18n 'saved'}}</span>\n          {{/if}}\n        </div>\n      </div>\n  \n    </form>\n  \n  </article>\n  \n  */\n  {\n    \"id\": \"I5O0aPwz\",\n    \"block\": \"[[[1,\\\"\\\\n\\\"],[10,\\\"article\\\"],[14,0,\\\"create-file\\\"],[12],[1,\\\"\\\\n\\\\n  \\\"],[10,\\\"form\\\"],[14,0,\\\"form-horizontal\\\"],[14,\\\"method\\\",\\\"post\\\"],[12],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group files-post-heading\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n          \\\"],[10,\\\"h1\\\"],[12],[1,[28,[35,4],[\\\"files.upload_file\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-title\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.title\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,6],null,[[\\\"type\\\",\\\"value\\\",\\\"class\\\",\\\"id\\\"],[\\\"text\\\",[30,0,[\\\"model\\\",\\\"title\\\"]],\\\"input-xxlarge\\\",\\\"edit-title\\\"]]]],[1,\\\"\\\\n        \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"titleValidation\\\"]],\\\"title-validation\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-upload\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.file.label\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,8],null,[[\\\"model\\\",\\\"validation\\\",\\\"type\\\"],[[30,0,[\\\"model\\\"]],[30,0,[\\\"uploadValidation\\\"]],\\\"files_section_file\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group files-post-description\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.post.description\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[35,9],null,[[\\\"value\\\",\\\"id\\\"],[[30,0,[\\\"model\\\",\\\"description\\\"]],\\\"edit-description\\\"]]]],[1,\\\"\\\\n        \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"descriptionValidation\\\"]],\\\"description-validation\\\"]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group file-post-categories\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,[28,[35,4],[\\\"files.categories\\\"],null]],[13],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"categories\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,11],[[28,[37,11],[[30,0,[\\\"model\\\",\\\"available_file_categories\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[11,3],[4,[38,13],[[30,0],\\\"chooseCategory\\\",[30,1]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,1,[\\\"filter\\\"]],[[[1,\\\"                \\\"],[10,1],[14,0,\\\"chosen\\\"],[12],[1,[30,1,[\\\"category\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,1,[\\\"filter\\\"]]],[[[1,\\\"                \\\"],[10,1],[12],[1,[30,1,[\\\"category\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"subcategories\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,11],[[28,[37,11],[[30,0,[\\\"model\\\",\\\"file_category\\\",\\\"file_subcategories\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[11,3],[4,[38,13],[[30,0],\\\"chooseSubcategory\\\",[30,2]],null],[12],[1,\\\"\\\\n\\\"],[41,[30,2,[\\\"filter\\\"]],[[[1,\\\"                \\\"],[10,1],[14,0,\\\"chosen\\\"],[12],[1,[30,2,[\\\"subcategory\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[41,[51,[30,2,[\\\"filter\\\"]]],[[[1,\\\"                \\\"],[10,1],[12],[1,[30,2,[\\\"subcategory\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n\\\"]],[2]],null],[1,\\\"          \\\"],[1,[28,[35,7],null,[[\\\"validation\\\",\\\"id\\\"],[[30,0,[\\\"categoryValidation\\\"]],\\\"category-validation\\\"]]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"control-group\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[39,17],[[24,0,\\\"btn btn-primary upload-file\\\"]],[[\\\"@action\\\",\\\"@disabled\\\"],[[28,[37,13],[[30,0],\\\"validateAndSave\\\"],null],[30,0,[\\\"model\\\",\\\"isSaving\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[30,0,[\\\"saveButtonText\\\"]]],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"saved\\\"]],[[[1,\\\"          \\\"],[10,1],[14,0,\\\"saved-user\\\"],[12],[1,[28,[35,4],[\\\"saved\\\"],null]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n  \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[13],[1,\\\"\\\\n\\\"]],[\\\"category\\\",\\\"subcategory\\\"],false,[\\\"article\\\",\\\"form\\\",\\\"div\\\",\\\"h1\\\",\\\"i18n\\\",\\\"label\\\",\\\"input\\\",\\\"input-tip\\\",\\\"file-uploader\\\",\\\"d-editor\\\",\\\"each\\\",\\\"-track-array\\\",\\\"a\\\",\\\"action\\\",\\\"if\\\",\\\"span\\\",\\\"unless\\\",\\\"d-button\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/templates/files/new.hbs\",\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/discourse-files-section/discourse/templates/files/show\", [\"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    <article class=\"post show-files\">\n    <div class=\"article-header\">\n      {{format-age this.model.created_at}}&nbsp;-&nbsp;{{i18n 'files.by'}}&nbsp;\n      <a href=\"{{this.model.user.path}}\" data-user-card=\"{{this.model.user.username}}\"><strong>{{this.model.user.username}}</strong></a>\n      <span class=\"article-categories\">\n        {{this.model.file_category.category}} /\n        {{#each this.model.file_subcategories as |subcategory|}}\n          <strong>{{subcategory.subcategory}}{{unless-last this.model.file_subcategories object=subcategory content=\",\"}}</strong>\n        {{/each}}\n      </span>\n    </div>\n    <div class=\"file\">\n      <a download=\"{{this.model.upload_file_name}}\" href=\"{{this.model.upload_url}}\" id=\"file_{{this.model.id}}\" class=\"hidden_link\" style=\"display: none;\"></a>​​​​​​​​​​​​​​​​​​​​​​​​​​​\n      <div class=\"file-article\">\n        <LinkTo @route=\"files.show\" @model={{this.model.id}}>\n          <h1>\n            {{this.model.title}}\n          </h1>\n        </LinkTo>\n        <div class=\"description\">\n          {{{this.model.description_cooked}}}\n        </div>\n      </div>\n    </div>\n  \n     <MountWidget @widget=\"post-menu\" @args={{this.model}} @model={{@model}} @share={{action 'sharePost'}}/>\n  \n  </article>\n  \n  */\n  {\n    \"id\": \"VPIa/BZt\",\n    \"block\": \"[[[10,\\\"article\\\"],[14,0,\\\"post show-files\\\"],[12],[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"article-header\\\"],[12],[1,\\\"\\\\n    \\\"],[1,[28,[35,2],[[30,0,[\\\"model\\\",\\\"created_at\\\"]]],null]],[1,\\\" - \\\"],[1,[28,[35,3],[\\\"files.by\\\"],null]],[1,\\\" \\\\n    \\\"],[10,3],[15,6,[29,[[30,0,[\\\"model\\\",\\\"user\\\",\\\"path\\\"]]]]],[15,\\\"data-user-card\\\",[29,[[30,0,[\\\"model\\\",\\\"user\\\",\\\"username\\\"]]]]],[12],[10,\\\"strong\\\"],[12],[1,[30,0,[\\\"model\\\",\\\"user\\\",\\\"username\\\"]]],[13],[13],[1,\\\"\\\\n    \\\"],[10,1],[14,0,\\\"article-categories\\\"],[12],[1,\\\"\\\\n      \\\"],[1,[30,0,[\\\"model\\\",\\\"file_category\\\",\\\"category\\\"]]],[1,\\\" /\\\\n\\\"],[42,[28,[37,8],[[28,[37,8],[[30,0,[\\\"model\\\",\\\"file_subcategories\\\"]]],null]],null],null,[[[1,\\\"        \\\"],[10,\\\"strong\\\"],[12],[1,[30,1,[\\\"subcategory\\\"]]],[1,[28,[35,9],[[30,0,[\\\"model\\\",\\\"file_subcategories\\\"]]],[[\\\"object\\\",\\\"content\\\"],[[30,1],\\\",\\\"]]]],[13],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"file\\\"],[12],[1,\\\"\\\\n    \\\"],[10,3],[15,\\\"download\\\",[29,[[30,0,[\\\"model\\\",\\\"upload_file_name\\\"]]]]],[15,6,[29,[[30,0,[\\\"model\\\",\\\"upload_url\\\"]]]]],[15,1,[29,[\\\"file_\\\",[30,0,[\\\"model\\\",\\\"id\\\"]]]]],[14,0,\\\"hidden_link\\\"],[14,5,\\\"display: none;\\\"],[12],[13],[1,\\\"​​​​​​​​​​​​​​​​​​​​​​​​​​​\\\\n    \\\"],[10,0],[14,0,\\\"file-article\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[39,10],null,[[\\\"@route\\\",\\\"@model\\\"],[\\\"files.show\\\",[30,0,[\\\"model\\\",\\\"id\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n        \\\"],[10,\\\"h1\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[30,0,[\\\"model\\\",\\\"title\\\"]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"description\\\"],[12],[1,\\\"\\\\n        \\\"],[2,[30,0,[\\\"model\\\",\\\"description_cooked\\\"]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\\n   \\\"],[8,[39,12],null,[[\\\"@widget\\\",\\\"@args\\\",\\\"@model\\\",\\\"@share\\\"],[\\\"post-menu\\\",[30,0,[\\\"model\\\"]],[30,2],[28,[37,13],[[30,0],\\\"sharePost\\\"],null]]],null],[1,\\\"\\\\n\\\\n\\\"],[13],[1,\\\"\\\\n\\\"]],[\\\"subcategory\\\",\\\"@model\\\"],false,[\\\"article\\\",\\\"div\\\",\\\"format-age\\\",\\\"i18n\\\",\\\"a\\\",\\\"strong\\\",\\\"span\\\",\\\"each\\\",\\\"-track-array\\\",\\\"unless-last\\\",\\\"link-to\\\",\\\"h1\\\",\\\"mount-widget\\\",\\\"action\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-files-section/discourse/templates/files/show.hbs\",\n    \"isStrictMode\": false\n  });\n});"],"mappings":"AAAAA,OAAA,mLAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAEAC,OAAAC,eAAAN,EAAA,cACAO,OAAA,IAEAP,EAAAQ,aAAA;AACA,MAAAC,GAAA,EAAAL,EAAAM,uBAmCA,CACAC,GAAA,WACAC,MAAA,m1DACAC,WAAA,+EACAC,cAAA;AAEA,MAAAC,UAAAb,EAAAM,QACA,KAAAQ,CAAAC,GACAA,EAAAC,MACA,CACAC,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,SAAApB,EAAAqB,SAAA,GAEAxB,EAAAQ,QAAAO,GACA,EAAAd,EAAAwB,sBAAAhB,EAAAM,E,ICvDAhB,OAAA,uNAAAC,EAAAC,EAAAyB,EAAAC,EAAAxB,EAAAC,GACA;AAEAC,OAAAC,eAAAN,EAAA,cACAO,OAAA,IAEAP,EAAAQ,aAAA;AACA,MAAAC,GAAA,EAAAL,EAAAM,uBAaA,CACAC,GAAA,WACAC,MAAA,4oBACAC,WAAA,mFACAC,cAAA;AAEA,MAAAc,UAAA3B,EAAAO,QAAAqB,OAAAH,EAAAlB,UACAW,SAAA,KAAAC,OAAAU,EAAAR,KAAAC,UAAA,YAAAI,EAAAI,UAAA,WACA,OAAAC,KAAAC,EAAA,8BACA,IAFA;AAGAC,GAAA,MAAAd,OAAAe,EAAAb,KAAA;AACAX,GAAA;AACA,eAAAyB,GACAC,MAAAD,mBAAAE,WACAhB,KAAAiB,IAAA,WAAAjB,KAAAkB,IAAA,SAAAA,IAAA,oBACA,CACA,4BAAAC,GACAnB,KAAAY,SAAA,EACA,CACAf,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,gCAAApB,EAAAqB,SAAA;AACA,UAAAkB,CAAAC,GACArB,KAAAiB,IAAA,WAAAI,E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