{"version":3,"file":"discourse-templates.js","names":["define","_exports","_component","_object","_service","_runloop","_component2","_tracking","_decorators","_ajax","_ajaxError","_tagDrop","_templateFactory","_dec","_class","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_applyDecoratedDescriptor","decorators","desc","keys","forEach","key","slice","reverse","reduce","decorator","undefined","default","__COLOCATED_TEMPLATE__","createTemplateFactory","id","block","moduleName","isStrictMode","DTemplatesFilterableList","computed","constructor","super","arguments","this","filteredReplies","filterTitle","listFilter","toLowerCase","replies","map","template","score","title","includes","content","filter","selectedTag","ALL_TAGS_ID","NO_TAG_ID","tags","length","sort","a","b","load","loading","results","ajax","templates","siteSettings","tagging_enabled","availableTags","values","tag","count","name","e","popupAjaxError","schedule","document","querySelector","focus","changeSelectedTag","tagId","insertTemplate","args","onBeforeInsertTemplate","onInsertTemplate","onAfterInsertTemplate","prototype","inject","tracked","getOwnPropertyDescriptor","bind","action","setComponentTemplate","DTemplatesItem","apply","type","catch","_templateOnly","topTags","search","defaultItem","tagFilter","onChange","onChangeSelectedTag","_getOwner","_obj","setupComponent","component","setProperties","active","model","getOwner","lookup","displayMap","WeakMap","appEvents","on","teardownComponent","off","show","_ref","textarea","container","set","Array","from","children","element","style","display","hide","oldDisplay","get","delete","SELECTOR_EDITOR_PREVIEW","templatesVisible","shouldRender","site","mobileView","elemEditorPreview","_keyboardShortcuts","_pluginApi","_variablesChatChannel","_variablesChatThread","initialize","currentUser","discourse_templates_enabled","can_use_templates","withPluginApi","api","modifyClass","pluginId","actions","showComposerUI","patchComposer","addToolbarPopupMenuOptionsCallback","icon","label","addOptionsMenuItem","addKeyboardShortcut","PLATFORM_KEY_MODIFIER","event","preventDefault","dTemplates","isComposerFocused","_templateShortcutTargets","isTextAreaFocused","isFocused","activeElement","showTextAreaUI","variables","global","help","category","definition","keys1","keysDelimiter","userCanChat","channelVariablesExtractor","chat","channelComposer","activeChannel","currentMessage","message","router","threadVariablesExtractor","threadComposer","activeThread","registerChatComposerButton","position","contextVariablesExtractor","composer","displayed","push","addChatIntegration","_form","_replaceVariables","_textareaManipulator","_variablesComposer","_isTextArea","_highjackModal","_showModal","_showComposerPreviewUI","_insertTemplateIntoTextArea","_insertTemplateIntoComposer","_replaceTemplateVariables","_classPrivateMethodInitSpec","obj","privateSet","privateCollection","has","TypeError","_checkPrivateRedeclaration","add","_classPrivateMethodGet","receiver","fn","WeakSet","_insertTemplateIntoComposer2","_showModal2","_showComposerPreviewUI2","variablesExtractor","_isTextArea2","modal","_insertTemplateIntoTextArea2","extractVariables","contains","_highjackModal2","modalModel","activeModal","opts","composerModel","composerElement","nodeName","trigger","_replaceTemplateVariables2","addBlock","templateVariables","replaceVariables","my_username","username","my_name","displayName","_deprecationsHelper","scope","_user","TEMPLATES_ALLOWED_VARIABLES","modelVariables","current","replace","RegExp","freeze","_application","_textareaTextManipulation","TextareaManipulator","extend","owner","setOwner","_textarea","ready","init","text","_addBlock","getSelected","channel","inReplyTo","channelVariables","chat_channel_name","chat_channel_url","routeModels","urlFor","reply_to_username","user","reply_to_name","context_title","context_url","thread","originalMessage","threadVariables","chat_thread_name","chat_thread_url","composerVariables","topic_title","topic","topic_url","url","original_poster_username","details","created_by","original_poster_name","post","last_poster_username","reply_to_or_last_poster_username"],"sources":["discourse/plugins/discourse-templates/discourse/components/d-templates/filterable-list.js","discourse/plugins/discourse-templates/discourse/components/d-templates/item.js","discourse/plugins/discourse-templates/discourse/components/d-templates/modal/form.js","discourse/plugins/discourse-templates/discourse/components/d-templates/tag-drop.js","discourse/plugins/discourse-templates/discourse/connectors/above-modal-header/d-templates-modal-hijacker.js","discourse/plugins/discourse-templates/discourse/connectors/editor-preview/d-templates.js","discourse/plugins/discourse-templates/discourse/initializers/d-templates.js","discourse/plugins/discourse-templates/discourse/services/d-templates.js","discourse/plugins/discourse-templates/discourse/templates/connectors/above-modal-header/d-templates-modal-hijacker.js","discourse/plugins/discourse-templates/discourse/templates/connectors/editor-preview/d-templates.js","discourse/plugins/discourse-templates/lib/replace-variables.js","discourse/plugins/discourse-templates/lib/textarea-manipulator.js","discourse/plugins/discourse-templates/lib/variables-chat-channel.js","discourse/plugins/discourse-templates/lib/variables-chat-thread.js","discourse/plugins/discourse-templates/lib/variables-composer.js"],"sourcesContent":["define(\"discourse/plugins/discourse-templates/discourse/components/d-templates/filterable-list\", [\"exports\", \"@ember/component\", \"@ember/object\", \"@ember/service\", \"@ember/runloop\", \"@glimmer/component\", \"@glimmer/tracking\", \"discourse-common/utils/decorators\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"select-kit/components/tag-drop\", \"@ember/template-factory\"], function (_exports, _component, _object, _service, _runloop, _component2, _tracking, _decorators, _ajax, _ajaxError, _tagDrop, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _dec, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;\n  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n  function _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : String(i); }\n  function _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <div class=\"templates-filterable-list\" {{did-insert this.load}}>\n  \n    <ConditionalLoadingSpinner @condition={{this.loading}}>\n      <div class=\"templates-filter-bar\">\n        {{#if this.siteSettings.tagging_enabled}}\n          <DTemplates::TagDrop\n            @availableTags={{this.availableTags}}\n            @tagId={{this.selectedTag}}\n            @onChangeSelectedTag={{this.changeSelectedTag}}\n          />\n        {{/if}}\n        <TextField\n          class=\"templates-filter\"\n          @value={{this.listFilter}}\n          placeholder={{i18n \"templates.filter_hint\"}}\n        />\n      </div>\n      <div class=\"templates-list\">\n        {{#each this.filteredReplies as |r|}}\n          <DTemplates::Item\n            @template={{r}}\n            @model={{@model}}\n            @onInsertTemplate={{this.insertTemplate}}\n          />\n        {{/each}}\n      </div>\n    </ConditionalLoadingSpinner>\n  </div>\n  */\n  {\n    \"id\": \"MxdRx2Ru\",\n    \"block\": \"[[[11,0],[24,0,\\\"templates-filterable-list\\\"],[4,[38,0],[[30,0,[\\\"load\\\"]]],null],[12],[1,\\\"\\\\n\\\\n  \\\"],[8,[39,1],null,[[\\\"@condition\\\"],[[30,0,[\\\"loading\\\"]]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"templates-filter-bar\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"siteSettings\\\",\\\"tagging_enabled\\\"]],[[[1,\\\"        \\\"],[8,[39,3],null,[[\\\"@availableTags\\\",\\\"@tagId\\\",\\\"@onChangeSelectedTag\\\"],[[30,0,[\\\"availableTags\\\"]],[30,0,[\\\"selectedTag\\\"]],[30,0,[\\\"changeSelectedTag\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"      \\\"],[8,[39,4],[[24,0,\\\"templates-filter\\\"],[16,\\\"placeholder\\\",[28,[37,5],[\\\"templates.filter_hint\\\"],null]]],[[\\\"@value\\\"],[[30,0,[\\\"listFilter\\\"]]]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"templates-list\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,7],[[28,[37,7],[[30,0,[\\\"filteredReplies\\\"]]],null]],null],null,[[[1,\\\"        \\\"],[8,[39,8],null,[[\\\"@template\\\",\\\"@model\\\",\\\"@onInsertTemplate\\\"],[[30,1],[30,2],[30,0,[\\\"insertTemplate\\\"]]]],null],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[]]]]],[1,\\\"\\\\n\\\"],[13]],[\\\"r\\\",\\\"@model\\\"],false,[\\\"did-insert\\\",\\\"conditional-loading-spinner\\\",\\\"if\\\",\\\"d-templates/tag-drop\\\",\\\"text-field\\\",\\\"i18n\\\",\\\"each\\\",\\\"-track-array\\\",\\\"d-templates/item\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-templates/discourse/components/d-templates/filterable-list.hbs\",\n    \"isStrictMode\": false\n  });\n  let DTemplatesFilterableList = _exports.default = (_dec = (0, _object.computed)(\"replies\", \"selectedTag\", \"listFilter\"), (_class = class DTemplatesFilterableList extends _component2.default {\n    constructor() {\n      super(...arguments);\n      _initializerDefineProperty(this, \"siteSettings\", _descriptor, this);\n      _initializerDefineProperty(this, \"loading\", _descriptor2, this);\n      _initializerDefineProperty(this, \"listFilter\", _descriptor3, this);\n      _initializerDefineProperty(this, \"replies\", _descriptor4, this);\n      _initializerDefineProperty(this, \"selectedTag\", _descriptor5, this);\n      _initializerDefineProperty(this, \"availableTags\", _descriptor6, this);\n    }\n    get filteredReplies() {\n      const filterTitle = this.listFilter.toLowerCase();\n      return this.replies.map(template => {\n        /* Give a relevant score to each template. */\n        template.score = 0;\n        if (template.title.toLowerCase().includes(filterTitle)) {\n          template.score += 2;\n        } else if (template.content.toLowerCase().includes(filterTitle)) {\n          template.score += 1;\n        }\n        return template;\n      })\n      // Filter irrelevant replies.\n      .filter(template => template.score !== 0)\n      // Filter only replies tagged with the selected tag.\n      .filter(template => {\n        if (this.selectedTag === _tagDrop.ALL_TAGS_ID) {\n          return true;\n        }\n        if (this.selectedTag === _tagDrop.NO_TAG_ID && template.tags.length === 0) {\n          return true;\n        }\n        return template.tags.includes(this.selectedTag);\n      }).sort((a, b) => {\n        /* Sort replies by relevance and title. */\n        if (a.score !== b.score) {\n          return a.score > b.score ? -1 : 1; /* descending */\n        } else if (a.title !== b.title) {\n          return a.title < b.title ? -1 : 1; /* ascending */\n        }\n        return 0;\n      });\n    }\n    async load() {\n      try {\n        this.loading = true;\n        const results = await (0, _ajax.ajax)(\"/discourse_templates\");\n        this.replies = results.templates;\n        if (this.siteSettings.tagging_enabled) {\n          this.availableTags = Object.values(this.replies.reduce((availableTags, template) => {\n            template.tags.forEach(tag => {\n              if (availableTags[tag]) {\n                availableTags[tag].count += 1;\n              } else {\n                availableTags[tag] = {\n                  id: tag,\n                  name: tag,\n                  count: 1\n                };\n              }\n            });\n            return availableTags;\n          }, {}));\n        }\n      } catch (e) {\n        this.loading = false;\n        (0, _ajaxError.popupAjaxError)(e);\n      } finally {\n        this.loading = false;\n        (0, _runloop.schedule)(\"afterRender\", () => document.querySelector(\".templates-filter\")?.focus());\n      }\n    }\n    changeSelectedTag(tagId) {\n      this.selectedTag = tagId;\n    }\n    insertTemplate(template) {\n      this.args.onBeforeInsertTemplate?.();\n      this.args.onInsertTemplate?.(template);\n      this.args.onAfterInsertTemplate?.();\n    }\n  }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"siteSettings\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"loading\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return true;\n    }\n  }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, \"listFilter\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return \"\";\n    }\n  }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, \"replies\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return [];\n    }\n  }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, \"selectedTag\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return _tagDrop.ALL_TAGS_ID;\n    }\n  }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, \"availableTags\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return [];\n    }\n  }), _applyDecoratedDescriptor(_class.prototype, \"filteredReplies\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \"filteredReplies\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"load\", [_decorators.bind], Object.getOwnPropertyDescriptor(_class.prototype, \"load\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"changeSelectedTag\", [_object.action], Object.getOwnPropertyDescriptor(_class.prototype, \"changeSelectedTag\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"insertTemplate\", [_object.action], Object.getOwnPropertyDescriptor(_class.prototype, \"insertTemplate\"), _class.prototype)), _class));\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, DTemplatesFilterableList);\n});","define(\"discourse/plugins/discourse-templates/discourse/components/d-templates/item\", [\"exports\", \"@ember/component\", \"@ember/object\", \"@glimmer/component\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"@ember/template-factory\"], function (_exports, _component, _object, _component2, _ajax, _ajaxError, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _class;\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <details class=\"template-item\" id=\"template-item-{{@template.id}}\">\n    <summary class=\"template-item-title\">\n      <div class=\"template-item-title-text\">{{@template.title}}</div>\n  \n      <div class=\"actions\">\n        <DButton\n          class=\"templates-apply\"\n          @action={{action \"apply\"}}\n          @icon=\"far-clipboard\"\n        />\n      </div>\n    </summary>\n  \n    <div class=\"templates-content\">\n      <CookText @rawText={{@template.content}} />\n    </div>\n  </details>\n  */\n  {\n    \"id\": \"mzCrPOh5\",\n    \"block\": \"[[[10,\\\"details\\\"],[14,0,\\\"template-item\\\"],[15,1,[29,[\\\"template-item-\\\",[30,1,[\\\"id\\\"]]]]],[12],[1,\\\"\\\\n  \\\"],[10,\\\"summary\\\"],[14,0,\\\"template-item-title\\\"],[12],[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"template-item-title-text\\\"],[12],[1,[30,1,[\\\"title\\\"]]],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"actions\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[39,0],[[24,0,\\\"templates-apply\\\"]],[[\\\"@action\\\",\\\"@icon\\\"],[[28,[37,1],[[30,0],\\\"apply\\\"],null],\\\"far-clipboard\\\"]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\\n  \\\"],[10,0],[14,0,\\\"templates-content\\\"],[12],[1,\\\"\\\\n    \\\"],[8,[39,2],null,[[\\\"@rawText\\\"],[[30,1,[\\\"content\\\"]]]],null],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"],[13]],[\\\"@template\\\"],false,[\\\"d-button\\\",\\\"action\\\",\\\"cook-text\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-templates/discourse/components/d-templates/item.hbs\",\n    \"isStrictMode\": false\n  });\n  let DTemplatesItem = _exports.default = (_class = class DTemplatesItem extends _component2.default {\n    apply() {\n      // run parametrized action to insert the template\n      this.args.onInsertTemplate?.(this.args.template);\n      (0, _ajax.ajax)(`/discourse_templates/${this.args.template.id}/use`, {\n        type: \"POST\"\n      }).catch(_ajaxError.popupAjaxError);\n    }\n  }, (_applyDecoratedDescriptor(_class.prototype, \"apply\", [_object.action], Object.getOwnPropertyDescriptor(_class.prototype, \"apply\"), _class.prototype)), _class);\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, DTemplatesItem);\n});","define(\"discourse/plugins/discourse-templates/discourse/components/d-templates/modal/form\", [\"exports\", \"@ember/component\", \"@ember/component/template-only\", \"@ember/template-factory\"], function (_exports, _component, _templateOnly, _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\n    @closeModal={{@closeModal}}\n    @title={{i18n \"templates.insert_template\"}}\n    class=\"d-templates d-templates-modal\"\n  >\n    <:body>\n      <DTemplates::FilterableList\n        @textarea={{@model.textarea}}\n        @onInsertTemplate={{@model.onInsertTemplate}}\n        @onAfterInsertTemplate={{@closeModal}}\n      />\n    </:body>\n  </DModal>\n  */\n  {\n    \"id\": \"StqqkQ0S\",\n    \"block\": \"[[[8,[39,0],[[24,0,\\\"d-templates d-templates-modal\\\"]],[[\\\"@closeModal\\\",\\\"@title\\\"],[[30,1],[28,[37,1],[\\\"templates.insert_template\\\"],null]]],[[\\\"body\\\"],[[[[1,\\\"\\\\n    \\\"],[8,[39,2],null,[[\\\"@textarea\\\",\\\"@onInsertTemplate\\\",\\\"@onAfterInsertTemplate\\\"],[[30,2,[\\\"textarea\\\"]],[30,2,[\\\"onInsertTemplate\\\"]],[30,1]]],null],[1,\\\"\\\\n  \\\"]],[]]]]]],[\\\"@closeModal\\\",\\\"@model\\\"],false,[\\\"d-modal\\\",\\\"i18n\\\",\\\"d-templates/filterable-list\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-templates/discourse/components/d-templates/modal/form.hbs\",\n    \"isStrictMode\": false\n  });\n  var _default = _exports.default = (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, (0, _templateOnly.default)());\n});","define(\"discourse/plugins/discourse-templates/discourse/components/d-templates/tag-drop\", [\"exports\", \"@ember/object\", \"select-kit/components/tag-drop\"], function (_exports, _object, _tagDrop) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _dec, _class;\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  let DTemplatesTagDrop = _exports.default = (_dec = (0, _object.computed)(\"availableTags.[]\"), (_class = class DTemplatesTagDrop extends _tagDrop.default {\n    get topTags() {\n      // sort tags descending by count and ascending by name\n      return (this.availableTags || []).sort((a, b) => {\n        if (a.count !== b.count) {\n          return b.count - a.count;\n        } // descending\n        if (a.name !== b.name) {\n          return a.name < b.name ? -1 : 1;\n        } // ascending\n        return 0;\n      });\n    }\n    search(filter) {\n      return (this.content || []).map(tag => {\n        if (tag.id && tag.name) {\n          return tag;\n        }\n        return this.defaultItem(tag, tag);\n      }).filter(tag => {\n        if (filter == null) {\n          return true;\n        }\n        const tagFilter = filter.toLowerCase();\n        return tag.id.toLowerCase().includes(tagFilter) || tag.name.toLowerCase().includes(tagFilter);\n      });\n    }\n    onChange(tagId, tag) {\n      // overrides the action onChange of the parent with the value received in\n      // the property onChangeSelectedTag in the handlebars template\n      this.onChangeSelectedTag?.(tagId, tag);\n    }\n  }, (_applyDecoratedDescriptor(_class.prototype, \"topTags\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \"topTags\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"onChange\", [_object.action], Object.getOwnPropertyDescriptor(_class.prototype, \"onChange\"), _class.prototype)), _class));\n});","define(\"discourse/plugins/discourse-templates/discourse/connectors/above-modal-header/d-templates-modal-hijacker\", [\"exports\", \"@ember/object\", \"discourse-common/lib/get-owner\"], function (_exports, _object, _getOwner) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _obj;\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  var _default = _exports.default = (_obj = {\n    setupComponent(args, component) {\n      component.setProperties({\n        active: false,\n        model: (0, _getOwner.getOwner)(this).lookup(\"controller:composer\").model,\n        displayMap: new WeakMap()\n      });\n      this.appEvents.on(\"discourse-templates:hijack-modal\", this, \"show\");\n      this.appEvents.on(\"discourse-templates:restore-modal\", this, \"hide\");\n      this.appEvents.on(\"modal:body-dismissed\", this, \"hide\");\n    },\n    teardownComponent() {\n      this.appEvents.off(\"discourse-templates:hijack-modal\", this, \"show\");\n      this.appEvents.off(\"discourse-templates:restore-modal\", this, \"hide\");\n      this.appEvents.off(\"modal:body-dismissed\", this, \"hide\");\n    },\n    show(_ref) {\n      let {\n        textarea,\n        onInsertTemplate\n      } = _ref;\n      const container = document.querySelector(\".modal-inner-container\");\n      if (textarea) {\n        this.set(\"active\", true);\n        this.set(\"textarea\", textarea);\n        this.set(\"onInsertTemplate\", onInsertTemplate);\n        Array.from(container.children).forEach(element => {\n          if (element === this.element) {\n            return;\n          }\n          this.displayMap.set(element, element.style.display);\n          element.style.display = \"none\";\n        });\n      }\n    },\n    hide() {\n      this.set(\"active\", false);\n      const container = document.querySelector(\".modal-inner-container\");\n      Array.from(container.children).forEach(element => {\n        const oldDisplay = this.displayMap.get(element);\n        if (oldDisplay != null) {\n          this.displayMap.delete(element);\n          element.style.display = oldDisplay;\n        }\n      });\n    }\n  }, (_applyDecoratedDescriptor(_obj, \"show\", [_object.action], Object.getOwnPropertyDescriptor(_obj, \"show\"), _obj), _applyDecoratedDescriptor(_obj, \"hide\", [_object.action], Object.getOwnPropertyDescriptor(_obj, \"hide\"), _obj)), _obj);\n});","define(\"discourse/plugins/discourse-templates/discourse/connectors/editor-preview/d-templates\", [\"exports\", \"@ember/object\", \"discourse-common/lib/get-owner\"], function (_exports, _object, _getOwner) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _obj;\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  const SELECTOR_EDITOR_PREVIEW = \"#reply-control .d-editor-preview-wrapper > .d-editor-preview\";\n  var _default = _exports.default = (_obj = {\n    setupComponent(args, component) {\n      component.setProperties({\n        templatesVisible: false,\n        model: (0, _getOwner.getOwner)(this).lookup(\"controller:composer\").model\n      });\n      this.appEvents.on(\"discourse-templates:show\", this, \"show\");\n      this.appEvents.on(\"discourse-templates:hide\", this, \"hide\");\n    },\n    teardownComponent() {\n      this.appEvents.off(\"discourse-templates:show\", this, \"show\");\n      this.appEvents.off(\"discourse-templates:hide\", this, \"hide\");\n    },\n    shouldRender(args, component) {\n      return !component.site.mobileView;\n    },\n    show(_ref) {\n      let {\n        onInsertTemplate\n      } = _ref;\n      const elemEditorPreview = document.querySelector(SELECTOR_EDITOR_PREVIEW);\n      if (elemEditorPreview) {\n        elemEditorPreview.style.display = \"none\";\n      }\n      this.set(\"onInsertTemplate\", onInsertTemplate);\n      this.set(\"templatesVisible\", true);\n    },\n    hide() {\n      const elemEditorPreview = document.querySelector(SELECTOR_EDITOR_PREVIEW);\n      if (elemEditorPreview) {\n        elemEditorPreview.style.display = \"\";\n      }\n      this.set(\"templatesVisible\", false);\n    }\n  }, (_applyDecoratedDescriptor(_obj, \"show\", [_object.action], Object.getOwnPropertyDescriptor(_obj, \"show\"), _obj), _applyDecoratedDescriptor(_obj, \"hide\", [_object.action], Object.getOwnPropertyDescriptor(_obj, \"hide\"), _obj)), _obj);\n});","define(\"discourse/plugins/discourse-templates/discourse/initializers/d-templates\", [\"exports\", \"discourse-common/lib/get-owner\", \"discourse/lib/keyboard-shortcuts\", \"discourse/lib/plugin-api\", \"discourse/plugins/discourse-templates/lib/variables-chat-channel\", \"discourse/plugins/discourse-templates/lib/variables-chat-thread\"], function (_exports, _getOwner, _keyboardShortcuts, _pluginApi, _variablesChatChannel, _variablesChatThread) {\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: \"discourse-templates-add-ui-builder\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"service:site-settings\");\n      const currentUser = container.lookup(\"service:current-user\");\n      if (siteSettings.discourse_templates_enabled && currentUser?.can_use_templates) {\n        (0, _pluginApi.withPluginApi)(\"0.5\", api => {\n          patchComposer(api);\n          addOptionsMenuItem(api);\n          addKeyboardShortcut(api, container);\n          addChatIntegration(api, container);\n        });\n      }\n    }\n  };\n  function patchComposer(api) {\n    api.modifyClass(\"controller:composer\", {\n      pluginId: \"discourse-templates\",\n      actions: {\n        insertTemplate() {\n          (0, _getOwner.getOwner)(this).lookup(\"service:d-templates\").showComposerUI();\n        }\n      }\n    });\n  }\n  function addOptionsMenuItem(api) {\n    api.addToolbarPopupMenuOptionsCallback(() => {\n      return {\n        id: \"discourse_templates_button\",\n        icon: \"far-clipboard\",\n        action: \"insertTemplate\",\n        label: \"templates.insert_template\"\n      };\n    });\n  }\n  const _templateShortcutTargets = [];\n  function addKeyboardShortcut(api, container) {\n    api.addKeyboardShortcut(`${_keyboardShortcuts.PLATFORM_KEY_MODIFIER}+shift+i`, event => {\n      event.preventDefault();\n      const dTemplates = container.lookup(\"service:d-templates\");\n      if (dTemplates.isComposerFocused) {\n        dTemplates.showComposerUI();\n        return;\n      }\n      for (const target of _templateShortcutTargets) {\n        if (dTemplates.isTextAreaFocused && target?.isFocused?.(document.activeElement)) {\n          dTemplates.showTextAreaUI(target?.variables);\n          return;\n        }\n      }\n      if (dTemplates.isTextAreaFocused) {\n        dTemplates.showTextAreaUI();\n      }\n    }, {\n      global: true,\n      help: {\n        category: \"templates\",\n        name: \"templates.insert_template\",\n        definition: {\n          keys1: [_keyboardShortcuts.PLATFORM_KEY_MODIFIER, \"shift\", \"I\"],\n          keysDelimiter: \"plus\"\n        }\n      }\n    });\n  }\n  function addChatIntegration(api, container) {\n    if (!container.lookup(\"service:chat\")?.userCanChat) {\n      return;\n    }\n    const channelVariablesExtractor = function () {\n      const chat = (0, _getOwner.getOwner)(this).lookup(\"service:chat\");\n      const channelComposer = (0, _getOwner.getOwner)(this).lookup(\"service:chat-channel-composer\");\n      const activeChannel = chat?.activeChannel;\n      const currentMessage = channelComposer?.message;\n      const router = (0, _getOwner.getOwner)(this).lookup(\"service:router\");\n      return (0, _variablesChatChannel.default)(activeChannel, currentMessage, router);\n    };\n    const threadVariablesExtractor = function () {\n      const chat = (0, _getOwner.getOwner)(this).lookup(\"service:chat\");\n      const threadComposer = (0, _getOwner.getOwner)(this).lookup(\"service:chat-thread-composer\");\n      const activeThread = chat?.activeChannel?.activeThread;\n      const currentMessage = threadComposer?.message;\n      const router = (0, _getOwner.getOwner)(this).lookup(\"service:router\");\n      return (0, _variablesChatThread.default)(activeThread, currentMessage, router);\n    };\n\n    // add a custom chat composer button\n    api.registerChatComposerButton({\n      id: \"d-templates-chat-insert-template-btn\",\n      icon: \"far-clipboard\",\n      label: \"templates.insert_template\",\n      position: \"dropdown\",\n      action: function () {\n        let contextVariablesExtractor;\n        switch (this.context) {\n          case \"channel\":\n            contextVariablesExtractor = channelVariablesExtractor.bind(this);\n            break;\n          case \"thread\":\n            contextVariablesExtractor = threadVariablesExtractor.bind(this);\n            break;\n          default:\n            contextVariablesExtractor = null;\n        }\n        const textarea = this.composer?.textarea?.textarea; // this.composer.textarea is a TextareaInteractor instance\n\n        (0, _getOwner.getOwner)(this).lookup(\"service:d-templates\").showTextAreaUI(contextVariablesExtractor, textarea);\n      },\n      displayed() {\n        return this.composer?.textarea && (this.context === \"channel\" || this.context === \"thread\");\n      }\n    });\n\n    // add custom keyboard shortcut handlers for the chat channel composer and chat thread composer\n    _templateShortcutTargets.push({\n      isFocused: element => element?.id === \"channel-composer\",\n      variables: channelVariablesExtractor\n    }, {\n      isFocused: element => element?.id === \"thread-composer\",\n      variables: threadVariablesExtractor\n    });\n  }\n});","define(\"discourse/plugins/discourse-templates/discourse/services/d-templates\", [\"exports\", \"@ember/service\", \"discourse-common/lib/get-owner\", \"discourse/plugins/discourse-templates/discourse/components/d-templates/modal/form\", \"discourse/plugins/discourse-templates/lib/replace-variables\", \"discourse/plugins/discourse-templates/lib/textarea-manipulator\", \"discourse/plugins/discourse-templates/lib/variables-composer\"], function (_exports, _service, _getOwner, _form, _replaceVariables, _textareaManipulator, _variablesComposer) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _isTextArea, _highjackModal, _showModal, _showComposerPreviewUI, _insertTemplateIntoTextArea, _insertTemplateIntoComposer, _replaceTemplateVariables;\n  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\n  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n  function _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : String(i); }\n  function _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }\n  let DTemplatesService = _exports.default = (_class = (_isTextArea = /*#__PURE__*/new WeakSet(), _highjackModal = /*#__PURE__*/new WeakSet(), _showModal = /*#__PURE__*/new WeakSet(), _showComposerPreviewUI = /*#__PURE__*/new WeakSet(), _insertTemplateIntoTextArea = /*#__PURE__*/new WeakSet(), _insertTemplateIntoComposer = /*#__PURE__*/new WeakSet(), _replaceTemplateVariables = /*#__PURE__*/new WeakSet(), class DTemplatesService extends _service.default {\n    constructor() {\n      super(...arguments);\n      _classPrivateMethodInitSpec(this, _replaceTemplateVariables);\n      _classPrivateMethodInitSpec(this, _insertTemplateIntoComposer);\n      _classPrivateMethodInitSpec(this, _insertTemplateIntoTextArea);\n      _classPrivateMethodInitSpec(this, _showComposerPreviewUI);\n      _classPrivateMethodInitSpec(this, _showModal);\n      _classPrivateMethodInitSpec(this, _highjackModal);\n      _classPrivateMethodInitSpec(this, _isTextArea);\n      _initializerDefineProperty(this, \"appEvents\", _descriptor, this);\n      _initializerDefineProperty(this, \"modal\", _descriptor2, this);\n      _initializerDefineProperty(this, \"site\", _descriptor3, this);\n      _initializerDefineProperty(this, \"currentUser\", _descriptor4, this);\n    }\n    showComposerUI() {\n      const onInsertTemplate = _classPrivateMethodGet(this, _insertTemplateIntoComposer, _insertTemplateIntoComposer2).bind(this);\n      if (this.site.mobileView) {\n        _classPrivateMethodGet(this, _showModal, _showModal2).call(this, null, onInsertTemplate); // textarea must be empty when targeting the composer\n      } else {\n        _classPrivateMethodGet(this, _showComposerPreviewUI, _showComposerPreviewUI2).call(this, onInsertTemplate);\n      }\n    }\n    showTextAreaUI() {\n      let variablesExtractor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      let textarea = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document.activeElement;\n      if (!_classPrivateMethodGet(this, _isTextArea, _isTextArea2).call(this, textarea)) {\n        return;\n      }\n      const modal = document.querySelector(\".d-modal\");\n      const onInsertTemplate = _classPrivateMethodGet(this, _insertTemplateIntoTextArea, _insertTemplateIntoTextArea2).bind(this);\n      const extractVariables = model => variablesExtractor?.(model);\n      if (modal?.contains(textarea)) {\n        _classPrivateMethodGet(this, _highjackModal, _highjackModal2).call(this, textarea, template => {\n          const modalModel = this.modal.activeModal?.opts?.model;\n          onInsertTemplate(textarea, template, extractVariables(modalModel));\n        });\n      } else {\n        _classPrivateMethodGet(this, _showModal, _showModal2).call(this, textarea, template => onInsertTemplate(textarea, template, extractVariables()));\n      }\n    }\n    get isComposerFocused() {\n      const activeElement = document.activeElement;\n      const composerModel = (0, _getOwner.getOwner)(this).lookup(\"controller:composer\").model;\n      const composerElement = document.querySelector(\".d-editor\");\n      return composerModel && composerElement?.contains(activeElement);\n    }\n    get isTextAreaFocused() {\n      return _classPrivateMethodGet(this, _isTextArea, _isTextArea2).call(this, document.activeElement);\n    }\n  }), (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"appEvents\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"modal\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, \"site\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, \"currentUser\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  })), _class);\n  function _isTextArea2(element) {\n    return element?.nodeName === \"TEXTAREA\";\n  }\n  function _highjackModal2(textarea, onInsertTemplate) {\n    this.appEvents.trigger(\"discourse-templates:hijack-modal\", {\n      textarea,\n      onInsertTemplate\n    });\n  }\n  function _showModal2(textarea, onInsertTemplate) {\n    this.modal.show(_form.default, {\n      model: {\n        textarea,\n        onInsertTemplate\n      }\n    });\n  }\n  function _showComposerPreviewUI2(onInsertTemplate) {\n    this.appEvents.trigger(\"composer-messages:close\");\n    this.appEvents.trigger(\"composer:show-preview\");\n    this.appEvents.trigger(\"discourse-templates:show\", {\n      onInsertTemplate\n    });\n  }\n  function _insertTemplateIntoTextArea2(textarea, template, variables) {\n    template = _classPrivateMethodGet(this, _replaceTemplateVariables, _replaceTemplateVariables2).call(this, template.title, template.content, variables);\n    new _textareaManipulator.default((0, _getOwner.getOwner)(this), textarea).addBlock(template.content);\n  }\n  function _insertTemplateIntoComposer2(template) {\n    const composerModel = (0, _getOwner.getOwner)(this).lookup(\"controller:composer\").model;\n    const templateVariables = (0, _variablesComposer.default)(composerModel);\n    template = _classPrivateMethodGet(this, _replaceTemplateVariables, _replaceTemplateVariables2).call(this, template.title, template.content, templateVariables);\n\n    // insert the title if blank\n    if (composerModel && !composerModel.title) {\n      composerModel.set(\"title\", template.title);\n    }\n\n    // insert the content of the template in the composer\n    this.appEvents.trigger(\"composer:insert-block\", template.content);\n  }\n  function _replaceTemplateVariables2(title, content) {\n    let variables = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    return (0, _replaceVariables.replaceVariables)(title, content, {\n      ...variables,\n      my_username: this.currentUser?.username,\n      my_name: this.currentUser?.displayName\n    });\n  }\n});","define(\"discourse/plugins/discourse-templates/discourse/templates/connectors/above-modal-header/d-templates-modal-hijacker\", [\"exports\", \"ember-this-fallback/deprecations-helper\", \"@ember/template-factory\"], function (_exports, _deprecationsHelper, _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 active}}\n    <div class=\"modal-header hijacked-modal-header\">\n      <DButton\n        @icon=\"angle-double-left\"\n        class=\"btn-flat modal-close close\"\n        @title=\"templates.close_templates\"\n        @action={{action \"hide\"}}\n      />\n      <div class=\"title\">\n        <h3 id=\"discourse-modal-title\">{{i18n \"templates.insert_template\"}}</h3>\n      </div>\n    </div>\n    <div class=\"modal-body hijacked-modal-body d-templates d-templates-modal\">\n      <DTemplates::FilterableList\n        @textarea={{this.textarea}}\n        @onInsertTemplate={{this.onInsertTemplate}}\n        @onBeforeInsertTemplate={{action \"hide\"}}\n      />\n    </div>\n  {{/if}}\n  */\n  {\n    \"id\": \"lsST04g0\",\n    \"block\": \"[[[41,[30,0,[\\\"active\\\"]],[[[1,\\\"  \\\"],[10,0],[14,0,\\\"modal-header hijacked-modal-header\\\"],[12],[1,\\\"\\\\n    \\\"],[8,[39,1],[[24,0,\\\"btn-flat modal-close close\\\"]],[[\\\"@icon\\\",\\\"@title\\\",\\\"@action\\\"],[\\\"angle-double-left\\\",\\\"templates.close_templates\\\",[28,[37,2],[[30,0],\\\"hide\\\"],null]]],null],[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"title\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"h3\\\"],[14,1,\\\"discourse-modal-title\\\"],[12],[1,[28,[35,3],[\\\"templates.insert_template\\\"],null]],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"modal-body hijacked-modal-body d-templates d-templates-modal\\\"],[12],[1,\\\"\\\\n    \\\"],[8,[39,4],null,[[\\\"@textarea\\\",\\\"@onInsertTemplate\\\",\\\"@onBeforeInsertTemplate\\\"],[[30,0,[\\\"textarea\\\"]],[30,0,[\\\"onInsertTemplate\\\"]],[28,[37,2],[[30,0],\\\"hide\\\"],null]]],null],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,[28,[32,0],[\\\"[[\\\\\\\"The `active` property path was used in the `discourse/plugins/discourse-templates/discourse/templates/connectors/above-modal-header/d-templates-modal-hijacker.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.active}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}]]\\\"],null]]],[],false,[\\\"if\\\",\\\"d-button\\\",\\\"action\\\",\\\"i18n\\\",\\\"d-templates/filterable-list\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-templates/discourse/templates/connectors/above-modal-header/d-templates-modal-hijacker.hbs\",\n    \"scope\": () => [_deprecationsHelper.default],\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/discourse-templates/discourse/templates/connectors/editor-preview/d-templates\", [\"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.templatesVisible}}\n    <div class=\"d-editor-preview\">\n      <DButton\n        class=\"modal-close close btn-flat\"\n        @action={{action \"hide\"}}\n        @icon=\"times\"\n      />\n      <DTemplates::FilterableList\n        @onInsertTemplate={{this.onInsertTemplate}}\n        @onAfterInsertTemplate={{action \"hide\"}}\n      />\n    </div>\n  {{/if}}\n  */\n  {\n    \"id\": \"stWsIIYG\",\n    \"block\": \"[[[41,[30,0,[\\\"templatesVisible\\\"]],[[[1,\\\"  \\\"],[10,0],[14,0,\\\"d-editor-preview\\\"],[12],[1,\\\"\\\\n    \\\"],[8,[39,1],[[24,0,\\\"modal-close close btn-flat\\\"]],[[\\\"@action\\\",\\\"@icon\\\"],[[28,[37,2],[[30,0],\\\"hide\\\"],null],\\\"times\\\"]],null],[1,\\\"\\\\n    \\\"],[8,[39,3],null,[[\\\"@onInsertTemplate\\\",\\\"@onAfterInsertTemplate\\\"],[[30,0,[\\\"onInsertTemplate\\\"]],[28,[37,2],[[30,0],\\\"hide\\\"],null]]],null],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[],false,[\\\"if\\\",\\\"d-button\\\",\\\"action\\\",\\\"d-templates/filterable-list\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-templates/discourse/templates/connectors/editor-preview/d-templates.hbs\",\n    \"isStrictMode\": false\n  });\n});","define(\"discourse/plugins/discourse-templates/lib/replace-variables\", [\"exports\", \"discourse/models/user\"], function (_exports, _user) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.TEMPLATES_ALLOWED_VARIABLES = void 0;\n  _exports.replaceVariables = replaceVariables;\n  // keep this list synchronized with the list in spec/plugin_helper.rb\n  const TEMPLATES_ALLOWED_VARIABLES = _exports.TEMPLATES_ALLOWED_VARIABLES = Object.freeze([\"my_username\", \"my_name\", \"chat_channel_name\", \"chat_channel_url\", \"chat_thread_name\", \"chat_thread_url\", \"context_title\", \"context_url\", \"topic_title\", \"topic_url\", \"original_poster_username\", \"original_poster_name\", \"reply_to_username\", \"reply_to_name\", \"last_poster_username\", \"reply_to_or_last_poster_username\"]);\n  function replaceVariables(title, content, modelVariables) {\n    const currentUser = _user.default.current();\n    const variables = {\n      ...(modelVariables || {}),\n      my_username: currentUser?.username,\n      my_name: currentUser?.displayName\n    };\n    if (variables && typeof variables === \"object\") {\n      for (const key of TEMPLATES_ALLOWED_VARIABLES) {\n        if (variables[key]) {\n          title = title.replace(new RegExp(`%{${key}(,fallback:.[^}]*)?}`, \"g\"), variables[key]);\n          content = content.replace(new RegExp(`%{${key}(,fallback:.[^}]*)?}`, \"g\"), variables[key]);\n        } else {\n          title = title.replace(new RegExp(`%{${key},fallback:(.[^}]*)}`, \"g\"), \"$1\");\n          title = title.replace(new RegExp(`%{${key}}`, \"g\"), \"\");\n          content = content.replace(new RegExp(`%{${key},fallback:(.[^}]*)}`, \"g\"), \"$1\");\n          content = content.replace(new RegExp(`%{${key}}`, \"g\"), \"\");\n        }\n      }\n    }\n    return {\n      title,\n      content\n    };\n  }\n});","define(\"discourse/plugins/discourse-templates/lib/textarea-manipulator\", [\"exports\", \"@ember/object\", \"@ember/application\", \"discourse/mixins/textarea-text-manipulation\"], function (_exports, _object, _application, _textareaTextManipulation) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class TextareaManipulator extends _object.default.extend(_textareaTextManipulation.default) {\n    constructor(owner, textarea) {\n      super(...arguments);\n      (0, _application.setOwner)(this, owner);\n      this._textarea = textarea;\n      this.element = this._textarea;\n      this.ready = true;\n      this.init();\n    }\n    addBlock(text) {\n      this._addBlock(this.getSelected(), text);\n    }\n  }\n  _exports.default = TextareaManipulator;\n});","define(\"discourse/plugins/discourse-templates/lib/variables-chat-channel\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = extractVariablesFromChatChannel;\n  function extractVariablesFromChatChannel(channel, message, router) {\n    if (!channel && !message) {\n      return {};\n    }\n    const inReplyTo = message?.inReplyTo;\n    const channelVariables = {\n      chat_channel_name: channel?.title,\n      chat_channel_url: channel?.routeModels ? router?.urlFor(\"chat.channel\", ...channel.routeModels) : null,\n      reply_to_username: inReplyTo?.user?.username,\n      reply_to_name: inReplyTo?.user?.name\n    };\n    return {\n      ...channelVariables,\n      context_title: channelVariables.chat_channel_name,\n      context_url: channelVariables.chat_channel_url\n    };\n  }\n});","define(\"discourse/plugins/discourse-templates/lib/variables-chat-thread\", [\"exports\", \"discourse/plugins/discourse-templates/lib/variables-chat-channel\"], function (_exports, _variablesChatChannel) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = extractVariablesFromChatThread;\n  function extractVariablesFromChatThread(thread, message, router) {\n    if (!thread && !message) {\n      return {};\n    }\n    const channel = thread?.channel;\n    const inReplyTo = thread?.originalMessage;\n    const channelVariables = (0, _variablesChatChannel.default)(channel, message, router);\n    const threadVariables = {\n      chat_thread_name: thread?.title,\n      chat_thread_url: thread?.routeModels ? router?.urlFor(\"chat.channel.thread\", ...thread.routeModels) : null,\n      reply_to_username: inReplyTo?.user?.username,\n      reply_to_name: inReplyTo?.user?.name\n    };\n    return {\n      ...channelVariables,\n      ...threadVariables,\n      context_title: threadVariables.chat_thread_name || channelVariables.chat_channel_name,\n      context_url: threadVariables.chat_thread_url || channelVariables.chat_channel_url\n    };\n  }\n});","define(\"discourse/plugins/discourse-templates/lib/variables-composer\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = extractVariablesFromComposerModel;\n  function extractVariablesFromComposerModel(model) {\n    if (!model) {\n      return {};\n    }\n    const composerVariables = {\n      topic_title: model.topic?.title,\n      topic_url: model.topic?.url,\n      original_poster_username: model.topic?.details.created_by.username,\n      original_poster_name: model.topic?.details.created_by.name,\n      reply_to_username: model.post?.username,\n      reply_to_name: model.post?.name,\n      last_poster_username: model.topic?.last_poster_username,\n      reply_to_or_last_poster_username: model.post?.username || model.topic?.last_poster_username\n    };\n    return {\n      ...composerVariables,\n      context_title: composerVariables.topic_title,\n      context_url: composerVariables.topic_url\n    };\n  }\n});"],"mappings":"AAAAA,OAAA,4WAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAMA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC;AACA,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GAAAD,GAAAE,OAAAC,eAAAL,EAAAC,EAAA,CAAAK,WAAAJ,EAAAI,WAAAC,aAAAL,EAAAK,aAAAC,SAAAN,EAAAM,SAAAC,MAAAP,EAAAQ,YAAAR,EAAAQ,YAAAC,KAAAR,QAAA,IAIA,SAAAS,EAAAZ,EAAAC,EAAAY,EAAAX,EAAAC,GAAA,IAAAW,EAAA;AAAA,OAAAV,OAAAW,KAAAb,GAAAc,SAAA,SAAAC,GAAAH,EAAAG,GAAAf,EAAAe,EAAA,IAAAH,EAAAR,aAAAQ,EAAAR,WAAAQ,EAAAP,eAAAO,EAAAP,cAAA,UAAAO,KAAAJ,eAAAI,EAAAN,UAAA,GAAAM,EAAAD,EAAAK,QAAAC,UAAAC,QAAA,SAAAN,EAAAO,GAAA,OAAAA,EAAArB,EAAAC,EAAAa,KAAA,GAAAA,GAAAX,QAAA,IAAAW,EAAAJ,cAAAI,EAAAL,MAAAK,EAAAJ,YAAAI,EAAAJ,YAAAC,KAAAR,QAAA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