{"version":3,"sources":["webpack:///./themeConfig.js","webpack:///./src/store/vertical-menu/index.js","webpack:///./src/views/chat/ChatBulb.vue?c98e","webpack:///./src/views/chat/ChatBulb.vue?ef6c","webpack:///src/views/chat/ChatBulb.vue","webpack:///./src/views/chat/ChatBulb.vue?7e26","webpack:///./src/views/chat/ChatBulb.vue","webpack:///./src/views/chat/ChatBulb.vue?f162"],"names":["$themeColors","$themeBreakpoints","$themeConfig","app","appName","appLogoImage","require","layout","isRTL","skin","routerTransition","type","contentWidth","menu","hidden","isCollapsed","navbar","backgroundColor","footer","customizer","enableScrollToTop","lang","namespaced","state","isVerticalMenuCollapsed","getters","mutations","UPDATE_VERTICAL_MENU_COLLAPSED","val","actions","render","_vm","this","_h","$createElement","_c","_self","ref","attrs","botOptions","messageData","botTyping","inputDisable","lastRoom","old","on","open","destroy","botStart","msgSend","fileSend","chat_started","categ_selected","directives","name","rawName","value","expression","$t","server","model","callback","$$v","dialogRate","staticClass","rate","rateUser","_v","_e","staticRenderFns","FilePondPluginFileValidateType","FilePondPluginFileValidateSize","FilePondPluginImagePreview","components","VueChatBot","computed","mapGetters","user","check_time","data","selectedTag_id","tags","lastMessage","input","boardContentBg","msgBubbleBgBot","inputPlaceholder","inputDisableBg","inputDisablePlaceholder","watch","handler","chat","res","agent","text","disableInput","event","detail","window","item","deep","mounted","options","methods","mapActions","Seen","id","note","setTimeout","description","file","then","msg","chatStart","process","fieldName","metadata","load","error","progress","abort","transfer","reader","axios","method","url","onUploadProgress","self","response","catch","roomcreated","getResponse","search","faq","tag_id","subject","action","message","component"],"mappings":"gHAAA,sGAEO,IAAMA,EAAe,GAIfC,EAAoB,GAGpBC,EAAe,CAC1BC,IAAK,CACHC,QAAS,SAETC,aAAcC,EAAQ,SAExBC,OAAQ,CACNC,OAAO,EACPC,KAAM,QACNC,iBAAkB,YAClBC,KAAM,aACNC,aAAc,OACdC,KAAM,CACJC,QAAQ,EACRC,aAAa,GAEfC,OAAQ,CAENL,KAAM,SACNM,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,WA2NA,qBACA,uBACArC,YACAlF,YACAmF,8DACAC,mBAKAoC,YArOA,WAqOA,uJAEA,eAkBA,4BACA,iBArBA,gCAsBA,YACAC,oBACAC,mBACAC,0BACAvB,MAAA,YACA,SAEA,GADA,kBACA,oBAEA,aACA,cACAhC,gBAEA,yBACA,OACA2B,QACA6B,mBAEA,OACAzC,eACAtC,+BACAgF,aACA3B,kCAIA4B,GACA5C,YACAlF,aACAmF,mCACAQ,gBAGAmC,GACA5C,YACAlF,aACAmF,wBAGA,sBACA,oBACAD,YACAlF,YACAmF,gCACAQ,SACA,CACAR,wBACAtC,aACAgF,kBAMA,kBA5EA,6BA+EA,oBACA3C,YACAlF,YACAmF,gCACAQ,SACA,CACAR,wBACAtC,aACAgF,kBAvFA,kDCngBiW,I,mCCS7VE,EAAY,eACd,EACA5G,EACAuC,GACA,EACA,KACA,KACA,MAIa,OAAAqE,E,2CCpBf,W","file":"app~30ccc425.7ce4135d.js?version=1779449585882","sourcesContent":["// Theme Colors\n// Initially this will be blank. Later on when app is initialized we will assign bootstrap colors to this from CSS variables.\nexport const $themeColors = {}\n\n// App Breakpoints\n// Initially this will be blank. Later on when app is initialized we will assign bootstrap breakpoints to this object from CSS variables.\nexport const $themeBreakpoints = {}\n\n// APP CONFIG\nexport const $themeConfig = {\n  app: {\n    appName: 'U-Sell', // Will update name in navigation menu (Branding)\n    // eslint-disable-next-line global-require\n    appLogoImage: require('@/assets/images/logo/logo.png'), // Will update logo in navigation menu (Branding)\n  },\n  layout: {\n    isRTL: false,\n    skin: 'light', // light, dark, bordered, semi-dark\n    routerTransition: 'zoom-fade', // zoom-fade, slide-fade, fade-bottom, fade, zoom-out, none\n    type: 'horizontal', // vertical, horizontal\n    contentWidth: 'full', // full, boxed\n    menu: {\n      hidden: false,\n      isCollapsed: false,\n    },\n    navbar: {\n      // ? For horizontal menu, navbar type will work for navMenu type\n      type: 'static', // static , sticky , floating, hidden\n      backgroundColor: '', // BS color options [primary, success, etc]\n    },\n    footer: {\n      type: 'hidden', // static, sticky, hidden\n    },\n    customizer: false,\n    enableScrollToTop: false,\n    lang: 'fr',\n  },\n}\n","import { $themeConfig } from '@themeConfig'\n\nexport default {\n  namespaced: true,\n  state: {\n    isVerticalMenuCollapsed: $themeConfig.layout.menu.isCollapsed,\n  },\n  getters: {},\n  mutations: {\n    UPDATE_VERTICAL_MENU_COLLAPSED(state, val) {\n      state.isVerticalMenuCollapsed = val\n    },\n  },\n  actions: {},\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChatBulb.vue?vue&type=style&index=1&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.check_time)?_c('div',{ref:\"chat\"},[_c('vue-chat-bot',{attrs:{\"options\":_vm.botOptions,\"messages\":_vm.messageData,\"bot-typing\":_vm.botTyping,\"input-disable\":_vm.inputDisable,\"is-open\":false,\"state\":_vm.state,\"last-room\":_vm.lastRoom,\"old\":_vm.old},on:{\"open\":_vm.open,\"destroy\":_vm.destroy,\"init\":_vm.botStart,\"msg-send\":_vm.msgSend,\"file-send\":_vm.fileSend,\"chat_started\":_vm.chat_started,\"categ_selected\":_vm.categ_selected}}),_c('file-pond',{directives:[{name:\"show\",rawName:\"v-show\",value:(false),expression:\"false\"}],ref:\"pond\",attrs:{\"name\":\"test\",\"label-idle\":\"<span class='mdi mdi-card-account-details'> </span>\" +\n      _vm.$t(\"Cliquez ici pour ajouter une Pièce d'identité Recto\"),\"allow-multiple\":false,\"allow-image-preview\":false,\"allow-remove\":\"false\",\"accepted-file-types\":['image/*', 'application/pdf'],\"server\":_vm.server,\"max-file-size\":'12MB',\"label-invalid-field\":_vm.$t('labelInvalidField'),\"label-file-waiting-for-size\":_vm.$t('labelFileWaitingForSize'),\"label-file-size-not-available\":_vm.$t('labelFileSizeNotAvailable'),\"label-file-loading\":_vm.$t('labelFileLoading'),\"label-file-load-error\":_vm.$t('labelFileLoadError'),\"label-file-processing\":_vm.$t('labelFileProcessing'),\"label-file-processing-complete\":_vm.$t('labelFileProcessingComplete'),\"label-file-processing-aborted\":_vm.$t('labelFileProcessingAborted'),\"label-file-processing-error\":_vm.$t('labelFileProcessingError'),\"label-file-processing-revert-error\":_vm.$t('labelFileProcessingRevertError'),\"label-file-remove-error\":_vm.$t('labelFileRemoveError'),\"label-tap-to-cancel\":_vm.$t('labelTapToCancel'),\"label-tap-to-retry\":_vm.$t('labelTapToRetry'),\"label-tap-to-undo\":_vm.$t('labelTapToUndo'),\"label-button-remove-item\":_vm.$t('labelButtonRemoveItem'),\"label-button-abort-item-load\":_vm.$t('labelButtonAbortItemLoad'),\"label-button-retry-item-load\":_vm.$t('labelButtonRetryItemLoad'),\"label-button-abort-item-processing\":_vm.$t('labelButtonAbortItemProcessing'),\"label-button-undo-item-processing\":_vm.$t('labelButtonUndoItemProcessing'),\"label-button-retry-item-processing\":_vm.$t('labelButtonRetryItemProcessing'),\"label-button-process-item\":_vm.$t('labelButtonProcessItem'),\"label-max-file-size-exceeded\":_vm.$t('labelMaxFileSizeExceeded'),\"label-max-file-size\":_vm.$t('labelMaxFileSize'),\"label-max-total-file-size-exceeded\":_vm.$t('labelMaxTotalFileSizeExceeded'),\"label-max-total-file-size\":_vm.$t('labelMaxTotalFileSize'),\"label-file-type-not-allowed\":_vm.$t('labelFileTypeNotAllowed'),\"image-validate-size-label-format-error\":_vm.$t('imageValidateSizeLabelFormatError'),\"image-validate-size-label-image-size-too-small\":_vm.$t('imageValidateSizeLabelImageSizeTooSmall'),\"image-validate-size-label-image-size-too-big\":_vm.$t('imageValidateSizeLabelImageSizeTooBig'),\"image-validate-size-label-expected-min-size\":_vm.$t('imageValidateSizeLabelExpectedMinSize'),\"image-validate-size-label-expected-max-size\":_vm.$t('imageValidateSizeLabelExpectedMaxSize'),\"image-validate-size-label-image-resolution-too-low\":_vm.$t('imageValidateSizeLabelImageResolutionTooLow'),\"image-validate-size-label-image-resolution-too-high\":_vm.$t('imageValidateSizeLabelImageResolutionTooHigh'),\"image-validate-size-label-expected-min-resolution\":_vm.$t('imageValidateSizeLabelExpectedMinResolution'),\"image-validate-size-label-expected-max-resolution\":_vm.$t('imageValidateSizeLabelExpectedMaxResolution')}}),_c('b-modal',{ref:\"modal\",attrs:{\"id\":\"modal-prevent-closing\",\"title\":\"Notez la conversation\",\"hide-footer\":\"\",\"size\":\"\"},model:{value:(_vm.dialogRate),callback:function ($$v) {_vm.dialogRate=$$v},expression:\"dialogRate\"}},[_c('b-form-rating',{staticClass:\"mb-2 w-100\",attrs:{\"variant\":\"warning\",\"inline\":\"\",\"value\":\"4\",\"size\":\"lg\",\"no-border\":\"\"},model:{value:(_vm.rate),callback:function ($$v) {_vm.rate=$$v},expression:\"rate\"}}),_c('b-col',{attrs:{\"cols\":\"12\"}},[_c('b-btn',{staticClass:\"m-auto\",on:{\"click\":_vm.rateUser}},[_vm._v(\" Ok \")])],1)],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div v-if=\"check_time\" ref=\"chat\">\n    <vue-chat-bot\n      :options=\"botOptions\"\n      :messages=\"messageData\"\n      :bot-typing=\"botTyping\"\n      :input-disable=\"inputDisable\"\n      :is-open=\"false\"\n      :state=\"state\"\n      :last-room=\"lastRoom\"\n      :old=\"old\"\n      @open=\"open\"\n      @destroy=\"destroy\"\n      @init=\"botStart\"\n      @msg-send=\"msgSend\"\n      @file-send=\"fileSend\"\n      @chat_started=\"chat_started\"\n      @categ_selected=\"categ_selected\"\n    />\n\n    <file-pond\n      v-show=\"false\"\n      ref=\"pond\"\n      name=\"test\"\n      :label-idle=\"\n        `<span class='mdi mdi-card-account-details'> </span>` +\n        $t(`Cliquez ici pour ajouter une Pièce d'identité Recto`)\n      \"\n      :allow-multiple=\"false\"\n      :allow-image-preview=\"false\"\n      allow-remove=\"false\"\n      :accepted-file-types=\"['image/*', 'application/pdf']\"\n      :server=\"server\"\n      :max-file-size=\"'12MB'\"\n      :label-invalid-field=\"$t('labelInvalidField')\"\n      :label-file-waiting-for-size=\"$t('labelFileWaitingForSize')\"\n      :label-file-size-not-available=\"$t('labelFileSizeNotAvailable')\"\n      :label-file-loading=\"$t('labelFileLoading')\"\n      :label-file-load-error=\"$t('labelFileLoadError')\"\n      :label-file-processing=\"$t('labelFileProcessing')\"\n      :label-file-processing-complete=\"$t('labelFileProcessingComplete')\"\n      :label-file-processing-aborted=\"$t('labelFileProcessingAborted')\"\n      :label-file-processing-error=\"$t('labelFileProcessingError')\"\n      :label-file-processing-revert-error=\"$t('labelFileProcessingRevertError')\"\n      :label-file-remove-error=\"$t('labelFileRemoveError')\"\n      :label-tap-to-cancel=\"$t('labelTapToCancel')\"\n      :label-tap-to-retry=\"$t('labelTapToRetry')\"\n      :label-tap-to-undo=\"$t('labelTapToUndo')\"\n      :label-button-remove-item=\"$t('labelButtonRemoveItem')\"\n      :label-button-abort-item-load=\"$t('labelButtonAbortItemLoad')\"\n      :label-button-retry-item-load=\"$t('labelButtonRetryItemLoad')\"\n      :label-button-abort-item-processing=\"$t('labelButtonAbortItemProcessing')\"\n      :label-button-undo-item-processing=\"$t('labelButtonUndoItemProcessing')\"\n      :label-button-retry-item-processing=\"$t('labelButtonRetryItemProcessing')\"\n      :label-button-process-item=\"$t('labelButtonProcessItem')\"\n      :label-max-file-size-exceeded=\"$t('labelMaxFileSizeExceeded')\"\n      :label-max-file-size=\"$t('labelMaxFileSize')\"\n      :label-max-total-file-size-exceeded=\"$t('labelMaxTotalFileSizeExceeded')\"\n      :label-max-total-file-size=\"$t('labelMaxTotalFileSize')\"\n      :label-file-type-not-allowed=\"$t('labelFileTypeNotAllowed')\"\n      :image-validate-size-label-format-error=\"\n        $t('imageValidateSizeLabelFormatError')\n      \"\n      :image-validate-size-label-image-size-too-small=\"\n        $t('imageValidateSizeLabelImageSizeTooSmall')\n      \"\n      :image-validate-size-label-image-size-too-big=\"\n        $t('imageValidateSizeLabelImageSizeTooBig')\n      \"\n      :image-validate-size-label-expected-min-size=\"\n        $t('imageValidateSizeLabelExpectedMinSize')\n      \"\n      :image-validate-size-label-expected-max-size=\"\n        $t('imageValidateSizeLabelExpectedMaxSize')\n      \"\n      :image-validate-size-label-image-resolution-too-low=\"\n        $t('imageValidateSizeLabelImageResolutionTooLow')\n      \"\n      :image-validate-size-label-image-resolution-too-high=\"\n        $t('imageValidateSizeLabelImageResolutionTooHigh')\n      \"\n      :image-validate-size-label-expected-min-resolution=\"\n        $t('imageValidateSizeLabelExpectedMinResolution')\n      \"\n      :image-validate-size-label-expected-max-resolution=\"\n        $t('imageValidateSizeLabelExpectedMaxResolution')\n      \"\n    />\n    <b-modal\n      id=\"modal-prevent-closing\"\n      ref=\"modal\"\n      v-model=\"dialogRate\"\n      title=\"Notez la conversation\"\n      hide-footer\n      size=\"\"\n    >\n      <b-form-rating\n        v-model=\"rate\"\n        variant=\"warning\"\n        inline\n        value=\"4\"\n        class=\"mb-2 w-100\"\n        size=\"lg\"\n        no-border\n      />\n      <b-col cols=\"12\">\n        <b-btn class=\"m-auto\" @click=\"rateUser\"> Ok </b-btn>\n      </b-col>\n    </b-modal>\n  </div>\n</template>\n<script>\nimport { VueChatBot } from \"@/plugins/vue-chat\";\nimport { messageService } from \"@/helpers/message\";\nimport { mapActions, mapGetters } from \"vuex\";\nimport vueFilePond from \"vue-filepond\";\n\n// Import FilePond styles\nimport \"filepond/dist/filepond.min.css\";\n\n// Import FilePond plugins\n// Please note that you need to install these plugins separately\n\n// Import image preview plugin styles\nimport \"filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css\";\n\n// Import image preview and file type validation plugins\nimport FilePondPluginFileValidateType from \"filepond-plugin-file-validate-type\";\nimport FilePondPluginFileValidateSize from \"filepond-plugin-file-validate-size\";\nimport FilePondPluginImagePreview from \"filepond-plugin-image-preview\";\n/// /import // FilePondPluginPdfPreview from \"filepond-plugin-pdf-preview\"\n// Create component\n\nconst FilePond = vueFilePond(\n  FilePondPluginFileValidateType,\n  FilePondPluginFileValidateSize,\n  FilePondPluginImagePreview\n  /// /// FilePondPluginPdfPreview,\n);\nexport default {\n  components: {\n    VueChatBot,\n  },\n  computed: {\n    ...mapGetters(\"auth\", {\n      user: \"GET_UHUB_USER_DATA\",\n    }),\n    check_time() {\n      const start = this.$moment(\"9:00am\", \"h:mma\");\n      const end = this.$moment(\"07:00pm\", \"h:mma\");\n      const now = this.$moment(new Date(), \"h:mma\");\n      const workdays=[1,2,3,4,5]\n      if (workdays.includes(this.$moment().day()),start.isBefore(now) && now.isBefore(end)) {\n        return true;\n      }\n      return false;\n    },\n  },\n  data() {\n    return {\n      selectedTag_id: null,\n      tags: [],\n      lastMessage: null,\n      messageData: [],\n      state: false,\n      server: null,\n      lastRoom: null,\n      old: [],\n      botTyping: false,\n      input: \"\",\n      dialogRate: false,\n      inputDisable: true,\n      rate: 1,\n      botOptions: {\n        boardContentBg: \"#f4f4f4\",\n        msgBubbleBgBot: \"#fff\",\n        inputPlaceholder: `${this.$t(\"Tapez ici votre message\")}...,`,\n        inputDisableBg: \"#fff\",\n        inputDisablePlaceholder: \"Hit the buttons above to respond\",\n      },\n    };\n  },\n  watch: {\n    lastRoom: {\n      handler(val) {\n        if (val) {\n          this.$pusher.unsubscribe(`chat-notifications.${val.id}`);\n          const chat = this.$pusher.subscribe(`chat-notifications.${val.id}`);\n\n          chat.bind(\"new_chat_message_event\", async (res) => {\n            if (res.message.created_by != this.user.id) {\n              // let el=document.getElementsByClassName('qkb-bot-bubble')[0];\n              // el.classList.add('animate__bounce')\n              this.lastRoom.unseen_message_count++;\n              await this.Seen();\n\n              this.messageData.push({\n                agent: res.message.created_by,\n                text: res.message.description,\n                ...res.message,\n                // options: [\n                //   {\n                //     text: \"Search Suport Articles\",\n                //     value: \"search\",\n                //     action: \"postback\",\n                //   },\n                //   {\n                //     text: \"Submit Support Ticket\",\n                //     value: \"submit_ticket\",\n                //     action: \"postback\",\n                //   },\n                // ],\n                disableInput: true,\n              });\n\n              const event = new CustomEvent(\"new_chat_message_event\", {\n                detail: res,\n              });\n              window.dispatchEvent(event);\n            }\n          });\n          window.removeEventListener(\"chat_room_seen_event\", () => {});\n          window.addEventListener(\"chat_room_seen_event\", (e) => {\n            if (this.lastRoom && this.lastRoom.id == e.detail.id) {\n              const index = this.messageData.findLastIndex(\n                (el) => el.created_by == this.user.id\n              );\n              if (index > -1) {\n                const item = Object.assign(this.messageData[index], {});\n                item.seen_by_receiver = true;\n                this.messageData.splice(index, 1, item);\n              }\n            }\n          });\n        } else {\n          this.inputDisable = true;\n        }\n      },\n      deep: true,\n    },\n  },\n  async mounted() {\n    this.tags = await this.GET_FAQS_TAGS({ lang: this.$i18n.locale });\n    //console.log(this.tags)\n    window.addEventListener(\"new_chat_room_event\", (e) => {\n      if (e.detail.room.created_by.id == this.user.id) {\n        this.lastRoom = e.detail.room;\n        this.inputDisable = false;\n      }\n    });\n    window.addEventListener(\"chat_room_pending_event\", (e) => {\n      if (e.detail.room.created_by.id == this.user.id) {\n        this.lastRoom = e.detail.room;\n        this.inputDisable = false;\n      }\n    });\n    window.addEventListener(\"chat_room_closed_event\", (e) => {\n      this.inputDisable = true;\n      if (e.detail.room.created_by == this.user.id) {\n        this.lastRoom = e.detail.room;\n        this.dialogRate = true;\n        this.messageData.push({\n          agent: \"bot\",\n          type: \"text\",\n          text: \"Hello , How can we help you today?\",\n          options: [\n            ...this.tags.map((el) => {\n              return {\n                text: el.name,\n                value: el.id,\n              };\n            }),\n            ...[\n              {\n                text: \"Others\",\n                value: null,\n              },\n            ],\n          ],\n\n          disableInput: true,\n        });\n      }\n    });\n  },\n\n  methods: {\n    ...mapActions(\"faqs\", [\"GET_FAQS_TAGS\"]),\n    async Seen() {\n      if (this.state) {\n        await this.MarkSeen({ id: this.lastRoom.id });\n      }\n    },\n    async open() {\n      this.state = true;\n      if (this.lastRoom && this.lastRoom.id) {\n        await this.MarkSeen({ id: this.lastRoom.id });\n      }\n    },\n    destroy() {\n      this.state = false;\n    },\n    ...mapActions(\"chat\", [\"FetchRoomsConsultant\", \"Rate\"]),\n    rateUser() {\n      this.Rate({ id: this.lastRoom.closed_by, note: this.rate }).then(() => {\n        this.dialogRate = false;\n      });\n    },\n    categ_selected(val) {\n      this.selectedTag_id = val;\n      setTimeout(() => {\n        this.botTyping = false;\n        this.messageData.push({\n          agent: \"bot\",\n          type: \"text\",\n          text: \"Please describe your problem\",\n\n          disableInput: true,\n        });\n        this.inputDisable = false;\n      }, 1000);\n    },\n    chat_started() {\n      this.AddRoom({\n        description:\n          this.lastMessage +\n          \"xxxxmxxxx\" +\n          this.tags.filter((el) => el.id === this.selectedTag_id)[0].name,\n        type: \"start\",\n        file: null,\n      }).then((res) => {\n        if (res) {\n          setTimeout(() => {\n            this.botTyping = false;\n            this.messageData.push({\n              agent: \"bot\",\n              type: \"text\",\n              text: \"A demand has been created, please wait for response :)\",\n\n              disableInput: true,\n            });\n          }, 1000);\n        }\n      });\n    },\n    async botStart() {\n      this.FetchRoomsConsultant().then((res) => {\n        var val = res.data;\n        this.old = val.slice(0, val.length - 1);\n        val = val[val.length - 1];\n        this.lastRoom = val;\n        val.messages.forEach((msg) => {\n          this.messageData.push({\n            agent: msg.created_by,\n            type: msg.type,\n            text: msg.description,\n            ...msg,\n            // options: [\n            //   {\n            //     text: \"Search Suport Articles\",\n            //     value: \"search\",\n            //     action: \"postback\",\n            //   },\n            //   {\n            //     text: \"Submit Support Ticket\",\n            //     value: \"submit_ticket\",\n            //     action: \"postback\",\n            //   },\n            // ],\n            disableInput: true,\n          });\n        });\n        if (res && val && !val.closed_by) {\n          if (!val.pending_by) {\n            this.inputDisable = false;\n            setTimeout(() => {\n              this.botTyping = false;\n              this.messageData.push({\n                agent: \"bot\",\n                type: \"text\",\n                text: \"A demand has been created, please wait for response :)\",\n                // options: [\n                //   {\n                //     text: \"Search Suport Articles\",\n                //     value: \"search\",\n                //     action: \"postback\",\n                //   },\n                //   {\n                //     text: \"Submit Support Ticket\",\n                //     value: \"submit_ticket\",\n                //     action: \"postback\",\n                //   },\n                // ],\n                disableInput: true,\n              });\n            }, 1000);\n          } else {\n            this.inputDisable = false;\n          }\n        } else {\n          this.botTyping = true;\n          setTimeout(() => {\n            this.botTyping = false;\n            this.messageData.push({\n              agent: \"bot\",\n              type: \"text\",\n              text: \"Hello , How can we help you today?\",\n              options: [\n                ...this.tags.map((el) => {\n                  return {\n                    text: el.name,\n                    value: el.id,\n                  };\n                }),\n                ...[\n                  {\n                    text: \"Others\",\n                    value: null,\n                  },\n                ],\n              ],\n\n              disableInput: true,\n            });\n          }, 1000);\n        }\n      });\n    },\n    ...mapActions(\"faqs\", [\"GET_FAQS\"]),\n    ...mapActions(\"chat\", [\"sendMessages\", \"MarkSeen\",\"AddRoom\"]),\n\n\n    chatStart() {},\n    msgSend(value) {\n      // Push the user's message to board\n      this.input = value;\n      if (this.lastRoom && !this.lastRoom.closed_by) {\n        this.sendMessages({\n          id: this.lastRoom.id,\n          description: value.text,\n          type: \"text\",\n          file: null,\n        }).then((res) => {\n          this.messageData.push({\n            agent: this.user.id,\n            type: \"text\",\n            text: value.text,\n            ...res.data,\n          });\n        });\n      } else {\n        this.messageData.push({\n          agent: this.user.id,\n          type: \"text\",\n          text: value.text,\n        });\n        this.getResponse();\n      }\n    },\n\n    fileSend() {\n      this.server = {\n        process: (\n          fieldName,\n          file,\n          metadata,\n          load,\n          error,\n          progress,\n          abort,\n          transfer,\n          options\n        ) => {\n          const reader = new FileReader();\n          reader.readAsDataURL(file);\n\n          const self = this;\n          reader.onload = function () {\n            axios({\n              method: \"post\",\n              url: `https://u_hub_back_2_0-3g1yocsg.on-forge.com/api/chats/rooms/${self.lastRoom.id}/messages`,\n              data: { description: \"file\", type: \"file\", file: reader.result },\n              onUploadProgress: (e) => {\n                // updating progress indicator\n                progress(e.lengthComputable, e.loaded, e.total);\n              },\n            })\n              .then((response) => {\n                // passing the file id to FilePond\n\n                // this.$emit(\"msg-send\", { text: this.messageText, type: \"text\" });\n                self.messageData.push({\n                  agent: self.user.id,\n                  type: \"file\",\n                  text: response.data.data.description,\n                  ...response.data.data,\n                });\n              })\n              .catch((thrown) => {});\n          };\n        },\n      };\n      this.$refs.pond.browse();\n    },\n    roomcreated() {\n      this.inputDisable = false;\n      this.messageData.push({\n        agent: \"bot\",\n        type: \"text\",\n        text: \"A demand has been created, please wait for response :)\",\n        disableInput: true,\n      });\n    },\n\n    // Submit the message from user to bot API, then get the response from Bot\n    async getResponse() {\n      // Loading\n      this.botTyping = true;\n\n      // Post the message from user here\n      // Then get the response as below\n\n      // Create new message from fake data\n      // messageService.createMessage().then((response) => {\n      //   const replyMessage = {\n      //     agent: \"bot\",\n      //     ...response,\n      //   };\n\n      //   this.inputDisable = response.disableInput;\n      //   this.messageData.push(replyMessage);\n\n      //   // finish\n      //   this.botTyping = false;\n      // });\n      this.lastMessage = this.input.text;\n      if (this.selectedTag_id)\n        await this.GET_FAQS({\n          search: this.input.text,\n          faq: this.$i18n.locale,\n          tag_id: this.selectedTag_id,\n        }).then((res) => {\n          let message = {};\n          this.inputDisable = true;\n          if (res && res.data.length > 0) {\n            // let data = Array.prototype.concat.apply([], Object.values(res));\n            var { data } = res;\n            if (data.length >= 3) {\n              data = data.slice(0, 2);\n            }\n            const filtred = data.map((el) => {\n              const obj = {\n                id: el.id,\n                subject: el.subject,\n              };\n              return {\n                text: el.subject,\n                value: `uhub/faq/${el.id}`,\n                action: \"url\",\n                description: JSON.stringify(obj),\n              };\n            });\n\n            message = {\n              agent: \"bot\",\n              type: \"links\",\n              text: \"here is some results in Faq\",\n              options: filtred,\n            };\n          } else {\n            message = {\n              agent: \"bot\",\n              type: \"links\",\n              text: \"No result found\",\n            };\n          }\n          this.messageData.push(message);\n          this.messageData.push({\n            agent: \"bot\",\n            type: \"live\",\n            text: \"you can consult an agent\",\n            options: [\n              {\n                text: \"Demand live chat\",\n                value: \"live\",\n                action: \"live\",\n              },\n            ],\n          });\n\n          // finish\n          this.botTyping = false;\n        });\n      else {\n        this.messageData.push({\n          agent: \"bot\",\n          type: \"live\",\n          text: \"you can consult an agent\",\n          options: [\n            {\n              text: \"Demand live chat\",\n              value: \"live\",\n              action: \"live\",\n            },\n          ],\n        });\n      }\n\n      // this.messageData.push({\n      //   agent: \"bot\",\n      //   type: \"live\",\n      //   text: \"you can consult an agent\",\n      //   options: [\n      //     {\n      //       text: \"Demand live chat\",\n      //       value: \"live\",\n      //       action: \"live\",\n      //     },\n      //   ],\n      // });\n    },\n  },\n};\n</script>\n<style>\n.qkb-bot-ui {\n  position: fixed;\n  right: 1.5rem;\n  bottom: 1.5rem;\n}\n</style>\n<style lang=\"scss\">\n.qkb-bot-ui.active {\n  @media screen and (max-width: 600px) {\n    right: 0;\n    left: 0;\n  }\n}\n.qkb-bot-ui.inactive {\n  @media screen and (max-width: 600px) {\n    right: 0;\n  }\n}\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChatBulb.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChatBulb.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChatBulb.vue?vue&type=template&id=b2bfb7f8&\"\nimport script from \"./ChatBulb.vue?vue&type=script&lang=js&\"\nexport * from \"./ChatBulb.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChatBulb.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./ChatBulb.vue?vue&type=style&index=1&lang=scss&\"\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","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChatBulb.vue?vue&type=style&index=0&lang=css&\""],"sourceRoot":""}