{"version":3,"sources":["webpack:///./app/javascript/widget/components/ArticleCategoryCard.vue?f940","webpack:///./app/javascript/widget/views/Home.vue?83c2","webpack:///./app/javascript/widget/components/GroupedAvatars.vue?4d56","webpack:///app/javascript/widget/components/GroupedAvatars.vue","webpack:///./app/javascript/widget/components/AvailableAgents.vue?df8c","webpack:///app/javascript/widget/components/AvailableAgents.vue","webpack:///./app/javascript/widget/components/GroupedAvatars.vue","webpack:///./app/javascript/widget/components/GroupedAvatars.vue?2c43","webpack:///./app/javascript/widget/components/AvailableAgents.vue","webpack:///./app/javascript/widget/components/AvailableAgents.vue?5ff4","webpack:///app/javascript/widget/components/TeamAvailability.vue","webpack:///./app/javascript/widget/components/TeamAvailability.vue?b386","webpack:///./app/javascript/widget/components/TeamAvailability.vue","webpack:///./app/javascript/widget/components/TeamAvailability.vue?d3f1","webpack:///./app/javascript/widget/components/ArticleListItem.vue?f2ac","webpack:///app/javascript/widget/components/ArticleListItem.vue","webpack:///./app/javascript/widget/components/ArticleList.vue?0d08","webpack:///app/javascript/widget/components/ArticleList.vue","webpack:///./app/javascript/widget/components/ArticleListItem.vue","webpack:///./app/javascript/widget/components/ArticleListItem.vue?5bd9","webpack:///./app/javascript/widget/components/ArticleList.vue","webpack:///./app/javascript/widget/components/ArticleList.vue?8d4b","webpack:///app/javascript/widget/components/ArticleCategoryCard.vue","webpack:///./app/javascript/widget/components/ArticleCategoryCard.vue?e9ab","webpack:///./app/javascript/widget/components/ArticleHero.vue?6b77","webpack:///app/javascript/widget/components/ArticleHero.vue","webpack:///./app/javascript/widget/components/ArticleCategoryCard.vue","webpack:///./app/javascript/widget/components/ArticleCategoryCard.vue?6949","webpack:///./app/javascript/widget/components/ArticleHero.vue","webpack:///./app/javascript/widget/components/ArticleHero.vue?3107","webpack:///./app/javascript/widget/components/ArticleCardSkeletonLoader.vue","webpack:///./app/javascript/widget/components/ArticleCardSkeletonLoader.vue?e2d1","webpack:///app/javascript/widget/views/Home.vue","webpack:///./app/javascript/widget/views/Home.vue?129f","webpack:///./app/javascript/widget/views/Home.vue"],"names":["_vm","this","_c","_self","staticClass","_l","user","index","key","id","class","attrs","name","avatar","users","_v","_s","isOnline","$t","replyWaitMessage","availableAgents","_e","style","color","widgetColor","on","startConversation","hasConversation","onClick","title","article","slug","link","articles","onArticleClick","$event","$emit","slice","_m","showArticles","conversationSize","unreadMessageCount","articleUiFlags","isFetching","isError","popularArticles","length","openArticleInArticleViewer","viewAllArticles"],"mappings":"mHAAA,S,oGCAA,I,2BCAoN,G,kBCGpN,CACA,sBACA,sB,OAAA,GACA,OACA,OACA,WACA,iC,OCTqN,ECGrN,CACA,uBACA,2BCEgB,YACd,GCRW,WAAkB,IAAIA,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQJ,EAAIK,GAAIL,EAAS,OAAE,SAASM,EAAKC,GAAO,OAAOL,EAAG,OAAO,CAACM,IAAIF,EAAKG,GAAGC,OACjKH,EAAQ,QAAU,IADqJ,sDAEnH,CAACL,EAAG,YAAY,CAACS,MAAM,CAAC,KAAO,OAAO,SAAWL,EAAKM,KAAK,IAAMN,EAAKO,OAAO,aAAa,OAAO,MAAK,KAE1I,IDOpB,EACA,KACA,KACA,M,SDRF,OACA,QACA,WACA,+BAGA,UACA,MADA,WAEA,sDACA,QACA,oBACA,mBGCe,EAXC,YACd,GCRW,WAA+C,OAAOX,EAA5BD,KAAYE,MAAMD,IAAa,iBAAiB,CAACS,MAAM,CAAC,MAAxDV,KAAoEa,WAErF,IDSpB,EACA,KACA,KACA,M,4uBEHF,ICXsN,EDWtN,CACA,wBACA,YACA,kBACA,gBAEA,qBACA,OACA,iBACA,WACA,sBAEA,iBACA,aACA,YAEA,aACA,YACA,YAIA,gBACA,sBACA,0CAFA,IAIA,UAJA,WAKA,sCAEA,SAPA,WAQA,6CACA,gCAEA,SACA,gCAEA,KAGA,SACA,kBADA,WAEA,gCACA,sBACA,iBACA,gBACA,oBACA,+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oB,CAACF,EAAG,MAAM,CAACE,YAAY,8DAA8D,CAACF,EAAG,8BAA8B,KAAKF,EAAIqB,SAEtW,IiCKpB,EACA,KACA,KACA,MAIa,Y","file":"js/87-d03bd860584fd0e571c0.chunk.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??ref--3-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleCategoryCard.vue?vue&type=style&index=0&id=73e13d22&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"z-50 flex flex-col flex-1 w-full rounded-md\",class:{ 'pb-2': _vm.showArticles, 'justify-end': !_vm.showArticles }},[_c('div',{staticClass:\"w-full px-4 pt-4\"},[_c('TeamAvailability',{attrs:{\"available-agents\":_vm.availableAgents,\"has-conversation\":!!_vm.conversationSize,\"unread-count\":_vm.unreadMessageCount},on:{\"startConversation\":_vm.startConversation}})],1),_vm._v(\" \"),(_vm.showArticles)?_c('div',{staticClass:\"w-full px-4 py-2\"},[_c('div',{staticClass:\"w-full p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\"},[(\n          !_vm.articleUiFlags.isFetching &&\n          !_vm.articleUiFlags.isError &&\n          _vm.popularArticles.length\n        )?_c('ArticleHero',{attrs:{\"articles\":_vm.popularArticles},on:{\"view\":_vm.openArticleInArticleViewer,\"viewAll\":_vm.viewAllArticles}}):_vm._e()],1)]):_vm._e(),_vm._v(\" \"),(_vm.articleUiFlags.isFetching)?_c('div',{staticClass:\"w-full px-4 py-2\"},[_c('div',{staticClass:\"w-full p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\"},[_c('ArticleCardSkeletonLoader')],1)]):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupedAvatars.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupedAvatars.vue?vue&type=script&lang=js&\"","<script>\nimport Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';\n\nexport default {\n  name: 'GroupedAvatars',\n  components: { Thumbnail },\n  props: {\n    users: {\n      type: Array,\n      default: () => [],\n    },\n  },\n};\n</script>\n\n<template>\n  <div class=\"flex\">\n    <span\n      v-for=\"(user, index) in users\"\n      :key=\"user.id\"\n      :class=\"`${\n        index ? '-ml-4' : ''\n      } inline-block rounded-full text-white shadow-solid`\"\n    >\n      <Thumbnail\n        size=\"36px\"\n        :username=\"user.name\"\n        :src=\"user.avatar\"\n        has-border\n      />\n    </span>\n  </div>\n</template>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AvailableAgents.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AvailableAgents.vue?vue&type=script&lang=js&\"","<script>\nimport GroupedAvatars from 'widget/components/GroupedAvatars.vue';\n\nexport default {\n  name: 'AvailableAgents',\n  components: { GroupedAvatars },\n  props: {\n    agents: {\n      type: Array,\n      default: () => [],\n    },\n  },\n  computed: {\n    users() {\n      return this.agents.slice(0, 4).map(agent => ({\n        id: agent.id,\n        avatar: agent.avatar_url,\n        name: agent.name,\n      }));\n    },\n  },\n};\n</script>\n\n<template>\n  <GroupedAvatars :users=\"users\" />\n</template>\n","import { render, staticRenderFns } from \"./GroupedAvatars.vue?vue&type=template&id=5f0a4588&\"\nimport script from \"./GroupedAvatars.vue?vue&type=script&lang=js&\"\nexport * from \"./GroupedAvatars.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"flex\"},_vm._l((_vm.users),function(user,index){return _c('span',{key:user.id,class:`${\n      index ? '-ml-4' : ''\n    } inline-block rounded-full text-white shadow-solid`},[_c('Thumbnail',{attrs:{\"size\":\"36px\",\"username\":user.name,\"src\":user.avatar,\"has-border\":\"\"}})],1)}),0)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./AvailableAgents.vue?vue&type=template&id=762d9a28&\"\nimport script from \"./AvailableAgents.vue?vue&type=script&lang=js&\"\nexport * from \"./AvailableAgents.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('GroupedAvatars',{attrs:{\"users\":_vm.users}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\nimport { mapGetters } from 'vuex';\nimport { getContrastingTextColor } from '@chatwoot/utils';\nimport nextAvailabilityTime from 'widget/mixins/nextAvailabilityTime';\nimport AvailableAgents from 'widget/components/AvailableAgents.vue';\nimport configMixin from 'widget/mixins/configMixin';\nimport availabilityMixin from 'widget/mixins/availability';\nimport FluentIcon from 'shared/components/FluentIcon/Index.vue';\nimport { IFrameHelper } from 'widget/helpers/utils';\nimport { CHATWOOT_ON_START_CONVERSATION } from '../constants/sdkEvents';\n\nexport default {\n  name: 'TeamAvailability',\n  components: {\n    AvailableAgents,\n    FluentIcon,\n  },\n  mixins: [configMixin, nextAvailabilityTime, availabilityMixin],\n  props: {\n    availableAgents: {\n      type: Array,\n      default: () => {},\n    },\n    hasConversation: {\n      type: Boolean,\n      default: false,\n    },\n    unreadCount: {\n      type: Number,\n      default: 0,\n    },\n  },\n\n  computed: {\n    ...mapGetters({\n      widgetColor: 'appConfig/getWidgetColor',\n    }),\n    textColor() {\n      return getContrastingTextColor(this.widgetColor);\n    },\n    isOnline() {\n      const { workingHoursEnabled } = this.channelConfig;\n      const anyAgentOnline = this.availableAgents.length > 0;\n\n      if (workingHoursEnabled) {\n        return this.isInBetweenTheWorkingHours;\n      }\n      return anyAgentOnline;\n    },\n  },\n  methods: {\n    startConversation() {\n      this.$emit('startConversation');\n      if (!this.hasConversation) {\n        IFrameHelper.sendMessage({\n          event: 'onEvent',\n          eventIdentifier: CHATWOOT_ON_START_CONVERSATION,\n          data: { hasConversation: false },\n        });\n      }\n    },\n  },\n};\n</script>\n\n<template>\n  <div class=\"p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\">\n    <div class=\"flex items-center justify-between\">\n      <div class=\"\">\n        <div class=\"text-sm font-medium text-slate-700 dark:text-slate-50\">\n          {{\n            isOnline\n              ? $t('TEAM_AVAILABILITY.ONLINE')\n              : $t('TEAM_AVAILABILITY.OFFLINE')\n          }}\n        </div>\n        <div class=\"mt-1 text-sm text-slate-500 dark:text-slate-100\">\n          {{ replyWaitMessage }}\n        </div>\n      </div>\n      <AvailableAgents v-if=\"isOnline\" :agents=\"availableAgents\" />\n    </div>\n    <button\n      class=\"inline-flex items-center justify-between px-2 py-1 mt-2 -ml-2 text-sm font-medium leading-6 rounded-md text-slate-800 dark:text-slate-50 hover:bg-slate-25 dark:hover:bg-slate-800\"\n      :style=\"{ color: widgetColor }\"\n      @click=\"startConversation\"\n    >\n      <span class=\"pr-2 text-sm\">\n        {{\n          hasConversation\n            ? $t('CONTINUE_CONVERSATION')\n            : $t('START_CONVERSATION')\n        }}\n      </span>\n      <FluentIcon icon=\"arrow-right\" size=\"14\" />\n    </button>\n  </div>\n</template>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TeamAvailability.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TeamAvailability.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TeamAvailability.vue?vue&type=template&id=5c8cc7a4&\"\nimport script from \"./TeamAvailability.vue?vue&type=script&lang=js&\"\nexport * from \"./TeamAvailability.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\"},[_c('div',{staticClass:\"flex items-center justify-between\"},[_c('div',{},[_c('div',{staticClass:\"text-sm font-medium text-slate-700 dark:text-slate-50\"},[_vm._v(\"\\n        \"+_vm._s(_vm.isOnline\n            ? _vm.$t('TEAM_AVAILABILITY.ONLINE')\n            : _vm.$t('TEAM_AVAILABILITY.OFFLINE'))+\"\\n      \")]),_vm._v(\" \"),_c('div',{staticClass:\"mt-1 text-sm text-slate-500 dark:text-slate-100\"},[_vm._v(\"\\n        \"+_vm._s(_vm.replyWaitMessage)+\"\\n      \")])]),_vm._v(\" \"),(_vm.isOnline)?_c('AvailableAgents',{attrs:{\"agents\":_vm.availableAgents}}):_vm._e()],1),_vm._v(\" \"),_c('button',{staticClass:\"inline-flex items-center justify-between px-2 py-1 mt-2 -ml-2 text-sm font-medium leading-6 rounded-md text-slate-800 dark:text-slate-50 hover:bg-slate-25 dark:hover:bg-slate-800\",style:({ color: _vm.widgetColor }),on:{\"click\":_vm.startConversation}},[_c('span',{staticClass:\"pr-2 text-sm\"},[_vm._v(\"\\n      \"+_vm._s(_vm.hasConversation\n          ? _vm.$t('CONTINUE_CONVERSATION')\n          : _vm.$t('START_CONVERSATION'))+\"\\n    \")]),_vm._v(\" \"),_c('FluentIcon',{attrs:{\"icon\":\"arrow-right\",\"size\":\"14\"}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleListItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleListItem.vue?vue&type=script&lang=js&\"","<script>\nimport FluentIcon from 'shared/components/FluentIcon/Index.vue';\n\nexport default {\n  components: { FluentIcon },\n  props: {\n    link: {\n      type: String,\n      default: '',\n    },\n    title: {\n      type: String,\n      default: '',\n    },\n  },\n  data() {\n    return {};\n  },\n  methods: {\n    onClick() {\n      this.$emit('click', this.link);\n    },\n  },\n};\n</script>\n\n<template>\n  <li\n    class=\"py-1 flex items-center justify-between -mx-1 px-1 hover:bg-slate-25 dark:hover:bg-slate-600 rounded cursor-pointer text-slate-700 dark:text-slate-50 dark:hover:text-slate-25 hover:text-slate-900\"\n    role=\"button\"\n    @click=\"onClick\"\n  >\n    <button class=\"underline-offset-2 text-sm leading-6 text-left\">\n      {{ title }}\n    </button>\n    <span class=\"pl-1 arrow\">\n      <FluentIcon icon=\"arrow-right\" size=\"14\" />\n    </span>\n  </li>\n</template>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleList.vue?vue&type=script&lang=js&\"","<script>\nimport ArticleListItem from './ArticleListItem.vue';\n\nexport default {\n  components: {\n    ArticleListItem,\n  },\n  props: {\n    articles: {\n      type: Array,\n      default: () => [],\n    },\n  },\n  data() {\n    return {};\n  },\n  methods: {\n    onClick(link) {\n      this.$emit('click', link);\n    },\n  },\n};\n</script>\n\n<template>\n  <ul role=\"list\" class=\"py-2\">\n    <ArticleListItem\n      v-for=\"article in articles\"\n      :key=\"article.slug\"\n      :link=\"article.link\"\n      :title=\"article.title\"\n      @click=\"onClick\"\n    />\n  </ul>\n</template>\n","import { render, staticRenderFns } from \"./ArticleListItem.vue?vue&type=template&id=0c18072e&\"\nimport script from \"./ArticleListItem.vue?vue&type=script&lang=js&\"\nexport * from \"./ArticleListItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"py-1 flex items-center justify-between -mx-1 px-1 hover:bg-slate-25 dark:hover:bg-slate-600 rounded cursor-pointer text-slate-700 dark:text-slate-50 dark:hover:text-slate-25 hover:text-slate-900\",attrs:{\"role\":\"button\"},on:{\"click\":_vm.onClick}},[_c('button',{staticClass:\"underline-offset-2 text-sm leading-6 text-left\"},[_vm._v(\"\\n    \"+_vm._s(_vm.title)+\"\\n  \")]),_vm._v(\" \"),_c('span',{staticClass:\"pl-1 arrow\"},[_c('FluentIcon',{attrs:{\"icon\":\"arrow-right\",\"size\":\"14\"}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ArticleList.vue?vue&type=template&id=fb558e5e&\"\nimport script from \"./ArticleList.vue?vue&type=script&lang=js&\"\nexport * from \"./ArticleList.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ul',{staticClass:\"py-2\",attrs:{\"role\":\"list\"}},_vm._l((_vm.articles),function(article){return _c('ArticleListItem',{key:article.slug,attrs:{\"link\":article.link,\"title\":article.title},on:{\"click\":_vm.onClick}})}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\nimport { mapGetters } from 'vuex';\nimport ArticleList from './ArticleList.vue';\nimport FluentIcon from 'shared/components/FluentIcon/Index.vue';\n\nexport default {\n  components: { FluentIcon, ArticleList },\n  props: {\n    title: {\n      type: String,\n      default: '',\n    },\n    articles: {\n      type: Array,\n      default: () => [],\n    },\n  },\n  computed: {\n    ...mapGetters({ widgetColor: 'appConfig/getWidgetColor' }),\n  },\n  methods: {\n    onArticleClick(link) {\n      this.$emit('view', link);\n    },\n  },\n};\n</script>\n\n<template>\n  <div>\n    <h3 class=\"mb-0 text-sm font-medium text-slate-800 dark:text-slate-50\">\n      {{ title }}\n    </h3>\n    <ArticleList :articles=\"articles\" @click=\"onArticleClick\" />\n    <button\n      class=\"inline-flex items-center justify-between px-2 py-1 -ml-2 text-sm font-medium leading-6 rounded-md text-slate-800 dark:text-slate-50 hover:bg-slate-25 dark:hover:bg-slate-800 see-articles\"\n      :style=\"{ color: widgetColor }\"\n      @click=\"$emit('viewAll')\"\n    >\n      <span class=\"pr-2 text-sm\">{{ $t('PORTAL.VIEW_ALL_ARTICLES') }}</span>\n      <FluentIcon icon=\"arrow-right\" size=\"14\" />\n    </button>\n  </div>\n</template>\n\n<style lang=\"scss\" scoped>\n.see-articles {\n  color: var(--brand-textButtonClear);\n  svg {\n    color: var(--brand-textButtonClear);\n  }\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleCategoryCard.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleCategoryCard.vue?vue&type=script&lang=js&\"","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleHero.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleHero.vue?vue&type=script&lang=js&\"","<script>\nimport CategoryCard from './ArticleCategoryCard.vue';\nexport default {\n  components: { CategoryCard },\n  props: {\n    articles: {\n      type: Array,\n      default: () => [],\n    },\n  },\n  methods: {\n    onArticleClick(link) {\n      this.$emit('view', link);\n    },\n  },\n};\n</script>\n\n<template>\n  <CategoryCard\n    :title=\"$t('PORTAL.POPULAR_ARTICLES')\"\n    :articles=\"articles.slice(0, 6)\"\n    @viewAll=\"$emit('viewAll')\"\n    @view=\"onArticleClick\"\n  />\n</template>\n","import { render, staticRenderFns } from \"./ArticleCategoryCard.vue?vue&type=template&id=73e13d22&scoped=true&\"\nimport script from \"./ArticleCategoryCard.vue?vue&type=script&lang=js&\"\nexport * from \"./ArticleCategoryCard.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ArticleCategoryCard.vue?vue&type=style&index=0&id=73e13d22&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"73e13d22\",\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('h3',{staticClass:\"mb-0 text-sm font-medium text-slate-800 dark:text-slate-50\"},[_vm._v(\"\\n    \"+_vm._s(_vm.title)+\"\\n  \")]),_vm._v(\" \"),_c('ArticleList',{attrs:{\"articles\":_vm.articles},on:{\"click\":_vm.onArticleClick}}),_vm._v(\" \"),_c('button',{staticClass:\"inline-flex items-center justify-between px-2 py-1 -ml-2 text-sm font-medium leading-6 rounded-md text-slate-800 dark:text-slate-50 hover:bg-slate-25 dark:hover:bg-slate-800 see-articles\",style:({ color: _vm.widgetColor }),on:{\"click\":function($event){return _vm.$emit('viewAll')}}},[_c('span',{staticClass:\"pr-2 text-sm\"},[_vm._v(_vm._s(_vm.$t('PORTAL.VIEW_ALL_ARTICLES')))]),_vm._v(\" \"),_c('FluentIcon',{attrs:{\"icon\":\"arrow-right\",\"size\":\"14\"}})],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ArticleHero.vue?vue&type=template&id=4a03811e&\"\nimport script from \"./ArticleHero.vue?vue&type=script&lang=js&\"\nexport * from \"./ArticleHero.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('CategoryCard',{attrs:{\"title\":_vm.$t('PORTAL.POPULAR_ARTICLES'),\"articles\":_vm.articles.slice(0, 6)},on:{\"viewAll\":function($event){return _vm.$emit('viewAll')},\"view\":_vm.onArticleClick}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ArticleCardSkeletonLoader.vue?vue&type=template&id=ba622d24&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _vm._m(0)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"py-4 space-y-4 bg-white dark:bg-slate-700\"},[_c('div',{staticClass:\"space-y-2 animate-pulse\"},[_c('div',{staticClass:\"h-6 bg-slate-100 dark:bg-slate-500 rounded w-2/5\"})]),_vm._v(\" \"),_c('div',{staticClass:\"space-y-2 animate-pulse\"},[_c('div',{staticClass:\"h-4 bg-slate-100 dark:bg-slate-500 rounded\"}),_vm._v(\" \"),_c('div',{staticClass:\"h-4 bg-slate-100 dark:bg-slate-500 rounded\"}),_vm._v(\" \"),_c('div',{staticClass:\"h-4 bg-slate-100 dark:bg-slate-500 rounded\"})]),_vm._v(\" \"),_c('div',{staticClass:\"space-y-2 animate-pulse\"},[_c('div',{staticClass:\"h-4 bg-slate-100 dark:bg-slate-500 rounded w-1/5\"})])])\n}]\n\nexport { render, staticRenderFns }","<script>\nimport TeamAvailability from 'widget/components/TeamAvailability.vue';\nimport ArticleHero from 'widget/components/ArticleHero.vue';\nimport ArticleCardSkeletonLoader from 'widget/components/ArticleCardSkeletonLoader.vue';\n\nimport { mapGetters } from 'vuex';\nimport { useDarkMode } from 'widget/composables/useDarkMode';\nimport routerMixin from 'widget/mixins/routerMixin';\nimport configMixin from 'widget/mixins/configMixin';\n\nexport default {\n  name: 'Home',\n  components: {\n    ArticleHero,\n    TeamAvailability,\n    ArticleCardSkeletonLoader,\n  },\n  mixins: [configMixin, routerMixin],\n  setup() {\n    const { prefersDarkMode } = useDarkMode();\n    return { prefersDarkMode };\n  },\n  computed: {\n    ...mapGetters({\n      availableAgents: 'agent/availableAgents',\n      conversationSize: 'conversation/getConversationSize',\n      unreadMessageCount: 'conversation/getUnreadMessageCount',\n      popularArticles: 'article/popularArticles',\n      articleUiFlags: 'article/uiFlags',\n    }),\n    widgetLocale() {\n      return this.$i18n.locale || 'en';\n    },\n    portal() {\n      return window.chatwootWebChannel.portal;\n    },\n    showArticles() {\n      return (\n        this.portal &&\n        !this.articleUiFlags.isFetching &&\n        this.popularArticles.length\n      );\n    },\n    defaultLocale() {\n      const widgetLocale = this.widgetLocale;\n      const { allowed_locales: allowedLocales, default_locale: defaultLocale } =\n        this.portal.config;\n\n      // IMPORTANT: Variation strict locale matching, Follow iso_639_1_code\n      // If the exact match of a locale is available in the list of portal locales, return it\n      // Else return the default locale. Eg: `es` will not work if `es_ES` is available in the list\n      if (allowedLocales.includes(widgetLocale)) {\n        return widgetLocale;\n      }\n      return defaultLocale;\n    },\n  },\n  mounted() {\n    if (this.portal && this.popularArticles.length === 0) {\n      const locale = this.defaultLocale;\n      this.$store.dispatch('article/fetch', {\n        slug: this.portal.slug,\n        locale,\n      });\n    }\n  },\n  methods: {\n    startConversation() {\n      if (this.preChatFormEnabled && !this.conversationSize) {\n        return this.replaceRoute('prechat-form');\n      }\n      return this.replaceRoute('messages');\n    },\n    openArticleInArticleViewer(link) {\n      let linkToOpen = `${link}?show_plain_layout=true`;\n      const isDark = this.prefersDarkMode;\n      if (isDark) {\n        linkToOpen = `${linkToOpen}&theme=dark`;\n      }\n      this.$router.push({\n        name: 'article-viewer',\n        params: { link: linkToOpen },\n      });\n    },\n    viewAllArticles() {\n      const locale = this.defaultLocale;\n      const {\n        portal: { slug },\n      } = window.chatwootWebChannel;\n      this.openArticleInArticleViewer(`/hc/${slug}/${locale}`);\n    },\n  },\n};\n</script>\n\n<template>\n  <div\n    class=\"z-50 flex flex-col flex-1 w-full rounded-md\"\n    :class=\"{ 'pb-2': showArticles, 'justify-end': !showArticles }\"\n  >\n    <div class=\"w-full px-4 pt-4\">\n      <TeamAvailability\n        :available-agents=\"availableAgents\"\n        :has-conversation=\"!!conversationSize\"\n        :unread-count=\"unreadMessageCount\"\n        @startConversation=\"startConversation\"\n      />\n    </div>\n    <div v-if=\"showArticles\" class=\"w-full px-4 py-2\">\n      <div class=\"w-full p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\">\n        <ArticleHero\n          v-if=\"\n            !articleUiFlags.isFetching &&\n            !articleUiFlags.isError &&\n            popularArticles.length\n          \"\n          :articles=\"popularArticles\"\n          @view=\"openArticleInArticleViewer\"\n          @viewAll=\"viewAllArticles\"\n        />\n      </div>\n    </div>\n    <div v-if=\"articleUiFlags.isFetching\" class=\"w-full px-4 py-2\">\n      <div class=\"w-full p-4 bg-white rounded-md shadow-sm dark:bg-slate-700\">\n        <ArticleCardSkeletonLoader />\n      </div>\n    </div>\n  </div>\n</template>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=156a0333&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}