{"version":3,"sources":["webpack:///./node_modules/@chatwoot/utils/dist/utils.esm.js","webpack:///./app/javascript/widget/views/Home.vue?40ec","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?0d06","webpack:///app/javascript/widget/views/Home.vue","webpack:///./app/javascript/widget/views/Home.vue?129f","webpack:///./app/javascript/widget/views/Home.vue","webpack:///./app/javascript/shared/components/Button.vue?23f7","webpack:///./app/javascript/shared/components/Button.vue?26c2","webpack:///app/javascript/shared/components/Button.vue","webpack:///./app/javascript/shared/components/Button.vue"],"names":["getContrastingTextColor","bgColor","color","replace","parseInt","slice","formatTime","timeInSeconds","formattedTime","minutes","Math","floor","seconds","hours","_minutes","days","_hours","_vm","this","_h","$createElement","_c","_self","staticClass","class","$dm","_v","_s","isOnline","$t","replyWaitMeessage","attrs","widgetColor","textColor","on","startConversation","hasConversation","availableAgents","conversationSize","component","buttonClassName","style","disabled","onClick","_t"],"mappings":"+JASA,IAAIA,EAA0B,SAAiCC,GAC7D,IAAIC,EAAQD,EAAQE,QAAQ,IAAK,IAKjC,MAAW,KAJHC,SAASF,EAAMG,MAAM,EAAG,GAAI,IAIb,KAHfD,SAASF,EAAMG,MAAM,EAAG,GAAI,IAGD,KAF3BD,SAASF,EAAMG,MAAM,EAAG,GAAI,IAEO,IAAM,UAAY,WA6B3DC,EAAa,SAAoBC,GACnC,IAAIC,EAAgB,GAEpB,GAAID,GAAiB,IAAMA,EAAgB,KAAM,CAC/C,IAAIE,EAAUC,KAAKC,MAAMJ,EAAgB,IACzCC,EAAgBC,EAAU,OAC1B,IAAIG,EAAsB,KAAZH,EAAiB,EAAIC,KAAKC,MAAMJ,EAAgB,IAC9D,OAAOC,GAAuBI,EAAU,EAAI,IAAMA,EAAU,OAAS,IAGvE,GAAIL,GAAiB,MAAQA,EAAgB,MAAO,CAClD,IAAIM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OAAjBH,EAAIK,MAAMD,IAAIF,GAAa,SAAS,CAACK,MAAMP,EAAIuB,gBAAgBC,MAAOxB,EAAgB,aAAEc,MAAM,CAAC,SAAWd,EAAIyB,UAAUR,GAAG,CAAC,MAAQjB,EAAI0B,UAAU,CAAC1B,EAAI2B,GAAG,YAAY,KACxN,IGUpB,EACA,KACA,KACA,MAIa,IAAAL,E","file":"js/16-45b226fc81e61e478860.chunk.js","sourcesContent":["import isToday from 'date-fns/isToday';\nimport isYesterday from 'date-fns/isYesterday';\n/**\r\n * @name Get contrasting text color\r\n * @description Get contrasting text color from a text color\r\n * @param bgColor Background color of text.\r\n * @returns contrasting text color\r\n */\n\nvar getContrastingTextColor = function getContrastingTextColor(bgColor) {\n var color = bgColor.replace('#', '');\n var r = parseInt(color.slice(0, 2), 16);\n var g = parseInt(color.slice(2, 4), 16);\n var b = parseInt(color.slice(4, 6), 16); // http://stackoverflow.com/a/3943023/112731\n\n return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? '#000000' : '#FFFFFF';\n};\n/**\r\n * @name Get formatted date\r\n * @description Get date in today, yesterday or any other date format\r\n * @param date date\r\n * @param todayText Today text\r\n * @param yesterdayText Yesterday text\r\n * @returns formatted date\r\n */\n\n\nvar formatDate = function formatDate(_ref) {\n var date = _ref.date,\n todayText = _ref.todayText,\n yesterdayText = _ref.yesterdayText;\n var dateValue = new Date(date);\n if (isToday(dateValue)) return todayText;\n if (isYesterday(dateValue)) return yesterdayText;\n return date;\n};\n/**\r\n * @name formatTime\r\n * @description Format time to Hour, Minute and Second\r\n * @param timeInSeconds number\r\n * @returns formatted time\r\n */\n\n\nvar formatTime = function formatTime(timeInSeconds) {\n var formattedTime = '';\n\n if (timeInSeconds >= 60 && timeInSeconds < 3600) {\n var minutes = Math.floor(timeInSeconds / 60);\n formattedTime = minutes + \" Min\";\n var seconds = minutes === 60 ? 0 : Math.floor(timeInSeconds % 60);\n return formattedTime + (\"\" + (seconds > 0 ? ' ' + seconds + ' Sec' : ''));\n }\n\n if (timeInSeconds >= 3600 && timeInSeconds < 86400) {\n var hours = Math.floor(timeInSeconds / 3600);\n formattedTime = hours + \" Hr\";\n\n var _minutes = timeInSeconds % 3600 < 60 || hours === 24 ? 0 : Math.floor(timeInSeconds % 3600 / 60);\n\n return formattedTime + (\"\" + (_minutes > 0 ? ' ' + _minutes + ' Min' : ''));\n }\n\n if (timeInSeconds >= 86400) {\n var days = Math.floor(timeInSeconds / 86400);\n formattedTime = days + \" Day\";\n\n var _hours = timeInSeconds % 86400 < 3600 || days >= 364 ? 0 : Math.floor(timeInSeconds % 86400 / 3600);\n\n return formattedTime + (\"\" + (_hours > 0 ? ' ' + _hours + ' Hr' : ''));\n }\n\n return Math.floor(timeInSeconds) + \" Sec\";\n};\n\nexport { formatDate, formatTime, getContrastingTextColor };","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex flex-1 flex-col justify-end\"},[_c('div',{staticClass:\"flex flex-1 overflow-auto\"}),_vm._v(\" \"),_c('team-availability',{attrs:{\"available-agents\":_vm.availableAgents,\"has-conversation\":!!_vm.conversationSize},on:{\"start-conversation\":_vm.startConversation}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n {{\n isOnline\n ? $t('TEAM_AVAILABILITY.ONLINE')\n : $t('TEAM_AVAILABILITY.OFFLINE')\n }}\n \n \n {{ replyWaitMeessage }}\n \n \n \n \n \n {{\n hasConversation ? $t('CONTINUE_CONVERSATION') : $t('START_CONVERSATION')\n }}\n \n \n\n\n\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=6b1946e3&\"\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 () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"px-5\"},[_c('div',{staticClass:\"flex items-center justify-between mb-4\"},[_c('div',{staticClass:\"max-w-xs\",class:_vm.$dm('text-black-700', 'dark:text-slate-50')},[_c('div',{staticClass:\"text-base leading-5 font-medium mb-1\"},[_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:\"text-xs leading-4 mt-1\"},[_vm._v(\"\\n \"+_vm._s(_vm.replyWaitMeessage)+\"\\n \")])])]),_vm._v(\" \"),_c('custom-button',{staticClass:\"font-medium\",attrs:{\"block\":\"\",\"bg-color\":_vm.widgetColor,\"text-color\":_vm.textColor},on:{\"click\":_vm.startConversation}},[_vm._v(\"\\n \"+_vm._s(_vm.hasConversation ? _vm.$t('CONTINUE_CONVERSATION') : _vm.$t('START_CONVERSATION'))+\"\\n \")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n \n \n\n\n\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=f2e40a68&\"\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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{class:_vm.buttonClassName,style:(_vm.buttonStyles),attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.onClick}},[_vm._t(\"default\")],2)}\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!./Button.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!./Button.vue?vue&type=script&lang=js&\"","\n \n \n \n\n\n","import { render, staticRenderFns } from \"./Button.vue?vue&type=template&id=4f2eb420&\"\nimport script from \"./Button.vue?vue&type=script&lang=js&\"\nexport * from \"./Button.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":""}