{"version":3,"file":"main.CA1L2k.js","sources":["theme-45/discourse/components/custom-user-menu.gjs","theme-45/virtual:theme","theme-45/discourse/initializers/init-custom-notification-icon.gjs","theme-45/discourse/initializers/init-custom-user-menu.js","theme-45/virtual:entrypoint:main"],"sourcesContent":["import Component from \"@glimmer/component\";\nimport { fn } from \"@ember/helper\";\nimport { on } from \"@ember/modifier\";\nimport { service } from \"@ember/service\";\nimport UserStatusBubble from \"discourse/components/header/user-dropdown/user-status-bubble\";\nimport UserMenuProfileTabContent from \"discourse/components/user-menu/profile-tab-content\";\nimport DMenu from \"discourse/float-kit/components/d-menu\";\nimport dBoundAvatarTemplate from \"discourse/ui-kit/helpers/d-bound-avatar-template\";\n\nfunction closeOnLinkClick(close, event) {\n  if (event.target.closest(\"a[href]\")) {\n    close();\n  }\n}\n\nexport default class CustomUserMenu extends Component {\n  @service currentUser;\n\n  <template>\n    <li class=\"header-dropdown-toggle custom-user-menu\">\n      <DMenu\n        @placement=\"bottom-end\"\n        @offset=\"0\"\n        {{!-- @modalForMobile={{true}} --}}\n        @identifier=\"custom-user-menu\"\n        @triggerClass=\"icon btn-flat\"\n        @groupIdentifier=\"custom-header\"\n      >\n        <:trigger>\n          {{dBoundAvatarTemplate this.currentUser.avatar_template \"medium\"}}\n        </:trigger>\n\n        <:content as |args|>\n\n          <div class=\"fk-d-menu__user-info\">\n            {{dBoundAvatarTemplate this.currentUser.avatar_template \"medium\"}}\n            {{#if this.currentUser.name}}\n              <span class=\"name\">{{this.currentUser.name}}</span>\n            {{/if}}\n            <span class=\"username\">{{this.currentUser.username}}</span>\n          </div>\n\n          {{! Delegate clicks from the nested links, including keyboard activation. }}\n          {{! eslint-disable-next-line ember/template-no-invalid-interactive }}\n          <div\n            {{on \"click\" (fn closeOnLinkClick args.close)}}\n            class=\"fk-d-menu__profile-tab\"\n          >\n            <UserMenuProfileTabContent @closeUserMenu={{args.close}} />\n          </div>\n\n        </:content>\n      </DMenu>\n      {{#if this.currentUser.status}}\n        <UserStatusBubble\n          @timezone={{this.currentUser.user_option.timezone}}\n          @status={{this.currentUser.status}}\n        />\n      {{/if}}\n    </li>\n  </template>\n}\n","import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(45);\n\nexport function themePrefix(key) {\n  return `theme_translations.45.${key}`;\n}\n","import { apiInitializer } from \"discourse/lib/api\";\nimport dIcon from \"discourse/ui-kit/helpers/d-icon\";\n\nexport default apiInitializer((api) => {\n  api.renderInOutlet(\n    \"user-dropdown-notifications__before\",\n    <template>{{dIcon \"bell\"}}</template>\n  );\n});\n","import { apiInitializer } from \"discourse/lib/api\";\nimport CustomUserMenu from \"../components/custom-user-menu\";\n\nexport default apiInitializer((api) => {\n  const currentUser = api.getCurrentUser();\n\n  if (currentUser) {\n    api.headerIcons.add(\"custom-user-menu\", CustomUserMenu, {\n      after: \"hamburger\",\n    });\n  }\n});\n","import * as Mod1 from \"./discourse/components/custom-user-menu\";\nimport * as Mod2 from \"./discourse/initializers/init-custom-notification-icon\";\nimport * as Mod3 from \"./discourse/initializers/init-custom-user-menu\";\nconst compatModules = {\n  \"discourse/components/custom-user-menu\": Mod1,\n  \"discourse/initializers/init-custom-notification-icon\": Mod2,\n  \"discourse/initializers/init-custom-user-menu\": Mod3,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["closeOnLinkClick","close","event","target","closest","getObjectForTheme","CustomUserMenu","Component","dt7948","g","this","prototype","service","currentUser","i","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","DMenu","dBoundAvatarTemplate","on","fn","UserMenuProfileTabContent","UserStatusBubble","isStrictMode","initCustomNotificationIcon","apiInitializer","api","renderInOutlet","dIcon","templateOnly","initCustomUserMenu","getCurrentUser","headerIcons","add","after","compatModules","Mod1","Mod2"],"mappings":";AASA,SAASA,EAAiBC,EAAOC,GAC3BA,EAAMC,OAAOC,QAAQ,YACvBH,GAEJ,CCXwBI,EAAkB;ADa3B,MAAMC,UAAuBC,SAAAC,OAAAC,EAAAC,KAAAC,yBACzCC,GAAA,CAAAC,QAAAL,OAAAM,EAAAJ,KAAA;OAEDK,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,owCAAAC,WAAA,4BAAAC,MAAAA,KAAAA,CAAAC,QAAAC,uBAAAC,KAAAC,KAAAxB,mBAAAyB,4BAAAC,qBAAAC,cAAA,IA0CAjB,KAAU;;;;oCEzDZ,IAAAkB,EAAeC,EAAgBC,IAC7BA,EAAIC,eACF,sCAAAhB,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,0CAAAC,WAAA,4BAAAC,MAAAA,KAAAA,CAAAY,UAAAL,cAAA,IAAAM,oDCFJC,EAAeL,EAAgBC,IACTA,EAAIK,kBAGtBL,EAAIM,YAAYC,IAAI,mBAAoB/B,EAAgB,CACtDgC,MAAO;ACLR,MAACC,EAAgB,CACpB,wCAAyCC,EACzC,uDAAwDC,EACxD;"}