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pack://rivendell/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://rivendell/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://rivendell/webpack/bootstrap","webpack://rivendell/webpack/runtime/compat get default export","webpack://rivendell/webpack/runtime/define property getters","webpack://rivendell/webpack/runtime/hasOwnProperty shorthand","webpack://rivendell/webpack/runtime/nonce","webpack://rivendell/./src/scripts/utils/object.js","webpack://rivendell/./src/scripts/singleton/state.js","webpack://rivendell/./src/scripts/constants/widget.js","webpack://rivendell/./src/scripts/singleton/middlewareState.js","webpack://rivendell/./src/scripts/constants/event.js","webpack://rivendell/./src/scripts/helpers/api.js","webpack://rivendell/./src/scripts/constants/analytics.js","webpack://rivendell/./node_modules/@helpshiftdev/gunpowder/resources/static/scripts/utils/browser.js","webpack://rivendell/./node_modules/@helpshiftdev/gunpowder/resources/static/scripts/utils/object.js","webpack://rivendell/./node_modules/@helpshiftdev/gunpowder/resources/static/scripts/utils/xhr.js","webpack://rivendell/./src/scripts/constants/routes.js","webpack://rivendell/./src/scripts/helpers/analytics.js","webpack://rivendell/./src/scripts/helpers/xhr.js","webpack://rivendell/./src/scripts/helpers/iframe.js","webpack://rivendell/./src/scripts/constants/build.js","webpack://rivendell/./src/scripts/constants/widgetCss.js","webpack://rivendell/./src/scripts/helpers/widgetCss.js","webpack://rivendell/./src/scripts/helpers/postMessage.js","webpack://rivendell/./src/scripts/api.js","webpack://rivendell/./src/scripts/constants/icon.js","webpack://rivendell/./src/scripts/constants/api.js","webpack://rivendell/./src/styles/main.css?5f65","webpack://rivendell/./src/middleware.js","webpack://rivendell/./src/scripts/constants/error.js"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".hs-widget-iframe {\\n position: fixed;\\n inset: var(--hs-widget-iframe-pos, auto 20px 24px auto);\\n z-index: var(--hs-widget-z-index, 9999999);\\n width: 100%;\\n /* Final computed height = 100% (max 780px)\\n - 48px (2 * bottom value of the widget) */\\n height: calc(100% - 48px);\\n max-width: 380px;\\n max-height: 780px;\\n min-width: 360px;\\n min-height: 380px;\\n overflow: hidden;\\n border: none;\\n border-radius: 12px;\\n -webkit-transform: translate3d(0, 0, 0);\\n transform: translate3d(0, 0, 0);\\n box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);\\n}\\n\\n.hide {\\n display: none;\\n}\\n\\n.hs-widget-laucher-button {\\n position: fixed;\\n z-index: var(--hs-widget-z-index, 9999999);\\n display: var(--hs-widget-btn-display, none);\\n width: 48px;\\n height: 48px;\\n padding: 0;\\n margin: 4px;\\n overflow: hidden;\\n cursor: pointer;\\n background: linear-gradient(\\n 131deg,\\n var(--hs-widget-launcher-btn-primary-color-light-75, #453fb9bf),\\n var(--hs-widget-launcher-btn-primary-color, rgb(69, 63, 185)) 123%\\n );\\n border: none;\\n border-radius: 50%;\\n outline: rgba(0, 103, 244, 0.4) solid 0;\\n box-shadow: rgba(0, 0, 0, 0.4) 0 2px 24px 0;\\n box-sizing: content-box;\\n inset: var(--hs-widget-btn-pos, auto 20px 16px auto);\\n}\\n\\n.hs-widget-iframe--fullscreen {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n z-index: var(--hs-widget-z-index, 9999999);\\n width: 100%;\\n height: 100%;\\n max-width: none;\\n max-height: none;\\n min-width: 0;\\n min-height: 0;\\n padding: 0;\\n margin: 0;\\n overflow: hidden;\\n border: none;\\n border-radius: 0;\\n}\\n\\n.hs-widget-launcher-button-unread-count {\\n position: absolute;\\n right: 22px;\\n bottom: 50px;\\n z-index: 9999999;\\n width: 22px;\\n height: 22px;\\n font-family: sans-serif;\\n font-size: 13px;\\n line-height: 21px;\\n /* stylelint-disable-next-line sh-waqar/declaration-use-variable */\\n color: white;\\n text-align: center;\\n /* stylelint-disable-next-line sh-waqar/declaration-use-variable */\\n background-color: #fa3e3e;\\n border: 1px solid white;\\n border-radius: 50%;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/styles/main.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,uDAAuD;EACvD,0CAA0C;EAC1C,WAAW;EACX;uEACqE;EACrE,yBAAyB;EACzB,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,YAAY;EACZ,mBAAmB;EACnB,uCAA+B;UAA/B,+BAA+B;EAC/B,yCAAyC;AAC3C;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,eAAe;EACf,0CAA0C;EAC1C,2CAA2C;EAC3C,WAAW;EACX,YAAY;EACZ,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,eAAe;EACf;;;;GAIC;EACD,YAAY;EACZ,kBAAkB;EAClB,uCAAuC;EACvC,2CAA2C;EAC3C,uBAAuB;EACvB,oDAAoD;AACtD;;AAEA;EACE,eAAe;EACf,MAAM;EACN,QAAQ;EACR,SAAS;EACT,OAAO;EACP,0CAA0C;EAC1C,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,uBAAuB;EACvB,eAAe;EACf,iBAAiB;EACjB,kEAAkE;EAClE,YAAY;EACZ,kBAAkB;EAClB,kEAAkE;EAClE,yBAAyB;EACzB,uBAAuB;EACvB,kBAAkB;AACpB\",\"sourcesContent\":[\".hs-widget-iframe {\\n position: fixed;\\n inset: var(--hs-widget-iframe-pos, auto 20px 24px auto);\\n z-index: var(--hs-widget-z-index, 9999999);\\n width: 100%;\\n /* Final computed height = 100% (max 780px)\\n - 48px (2 * bottom value of the widget) */\\n height: calc(100% - 48px);\\n max-width: 380px;\\n max-height: 780px;\\n min-width: 360px;\\n min-height: 380px;\\n overflow: hidden;\\n border: none;\\n border-radius: 12px;\\n transform: translate3d(0, 0, 0);\\n box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);\\n}\\n\\n.hide {\\n display: none;\\n}\\n\\n.hs-widget-laucher-button {\\n position: fixed;\\n z-index: var(--hs-widget-z-index, 9999999);\\n display: var(--hs-widget-btn-display, none);\\n width: 48px;\\n height: 48px;\\n padding: 0;\\n margin: 4px;\\n overflow: hidden;\\n cursor: pointer;\\n background: linear-gradient(\\n 131deg,\\n var(--hs-widget-launcher-btn-primary-color-light-75, #453fb9bf),\\n var(--hs-widget-launcher-btn-primary-color, rgb(69, 63, 185)) 123%\\n );\\n border: none;\\n border-radius: 50%;\\n outline: rgba(0, 103, 244, 0.4) solid 0;\\n box-shadow: rgba(0, 0, 0, 0.4) 0 2px 24px 0;\\n box-sizing: content-box;\\n inset: var(--hs-widget-btn-pos, auto 20px 16px auto);\\n}\\n\\n.hs-widget-iframe--fullscreen {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n z-index: var(--hs-widget-z-index, 9999999);\\n width: 100%;\\n height: 100%;\\n max-width: none;\\n max-height: none;\\n min-width: 0;\\n min-height: 0;\\n padding: 0;\\n margin: 0;\\n overflow: hidden;\\n border: none;\\n border-radius: 0;\\n}\\n\\n.hs-widget-launcher-button-unread-count {\\n position: absolute;\\n right: 22px;\\n bottom: 50px;\\n z-index: 9999999;\\n width: 22px;\\n height: 22px;\\n font-family: sans-serif;\\n font-size: 13px;\\n line-height: 21px;\\n /* stylelint-disable-next-line sh-waqar/declaration-use-variable */\\n color: white;\\n text-align: center;\\n /* stylelint-disable-next-line sh-waqar/declaration-use-variable */\\n background-color: #fa3e3e;\\n border: 1px solid white;\\n border-radius: 50%;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","__webpack_require__.nc = undefined;","/**\n * Object utils\n *\n * @author Umang Govil \n * @created Feb 27, 2024\n * @module utils/object\n */\n\n/**\n * Deep clones an object\n * Ref: https://stackoverflow.com/a/34624648\n *\n * @param {Object} obj - Object to be deep cloned\n * @returns {Object} - cloned object\n */\nexport const cloneDeep = (obj) => {\n if (obj === null || typeof obj !== \"object\") {\n return obj;\n }\n\n const copy = Array.isArray(obj) ? [] : {};\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n copy[key] = cloneDeep(obj[key]);\n }\n }\n\n return copy;\n};\n\n/**\n * A method to verify if a given value is an object.\n * Returns false if it's primitive, array or function.\n */\nexport const isObject = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n};\n","/**\n * This file exports the State class\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module singleton/state.js\n */\n\nimport {cloneDeep} from \"utils/object\";\nexport class State {\n constructor(initialState) {\n this.state = initialState;\n }\n\n /**\n * Returns the cloned copy of state\n * @returns {Object} - state of the middleware\n */\n getState() {\n return cloneDeep(this.state);\n }\n\n /**\n * Partially updates the state object\n * @param {Object} - partial state object\n */\n updateState(newState) {\n this.state = {...this.state, ...newState};\n }\n\n /**\n * Sets the middleware state\n * @param {Object} newState\n */\n setState(newState) {\n this.state = newState;\n }\n}\n","export const WIDGET_POSITIONS = {\n TOP_LEFT: \"top-left\",\n TOP_RIGHT: \"top-right\",\n BOTTOM_LEFT: \"bottom-left\",\n BOTTOM_RIGHT: \"bottom-right\"\n};\n\nexport const WIDGET_TYPE = {\n HELPCENTER_AND_WEBCHAT: \"helpcenter_and_webchat\",\n HELPCENTER: \"helpcenter\",\n WEBCHAT: \"webchat\"\n};\n\nexport const LAUNCHER_DEFAULT_Z_INDEX = 9999991;\n","/**\n * This file exports the singleton for the middleware state, this is the state of the parent page.\n *\n * @author Rehan \n * @created Jan 30, 2023\n * @module singleton/middlewareState.js\n */\n\nimport {State} from \"singleton/state\";\nimport {WIDGET_POSITIONS, LAUNCHER_DEFAULT_Z_INDEX} from \"constants/widget\";\n\nexport const middlewareState = new State({\n domain: \"\",\n platformId: \"\",\n language: \"\",\n appId: \"\",\n userId: \"\",\n userName: \"\",\n userEmail: \"\",\n userAuthToken: \"\",\n widgetOptions: {\n showLauncher: true,\n fullScreen: false,\n position: WIDGET_POSITIONS.BOTTOM_RIGHT,\n zIndex: LAUNCHER_DEFAULT_Z_INDEX\n },\n fullPrivacy: false,\n initiateChatOnLoad: false,\n // This contains the event's details like its data & whether that event has occured or not\n eventRegister: {},\n // This contains all APIs that the developer/customer calls using the HelpshiftWidget object\n apiEvents: [],\n initialUserMessage: \"\",\n cifs: {},\n tags: [],\n conversationPrefillText: \"\",\n clearAnonymousUserOnLogin: false,\n apiQueue: [],\n sdkHasLoaded: false,\n deviceId: \"\",\n anonUserId: \"\",\n hsWidgetIframeIsVisible: false,\n hsWidgetLauncherButtonIsVisible: false,\n hsWidgetIframeWasHidden: false,\n hsWidgetLauncherButtonWasHidden: false,\n unreadMsgCount: 0,\n pcWidgetConfig: {}\n});\n","/**\n * This file exports event names of postMessage\n * 1. communication between parent i.e index.html and hswidget i.e main.html\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module constants/build\n */\n\nexport const API_EVENTS = {\n JS_LOADED: \"js-loaded\",\n SET_CONFIG: \"set-config\",\n CALL_WEBCHAT_JS_API: \"call-webchat-js-api\",\n STORE_LS_DATA: \"store-ls-data\",\n UPDATE_HELPSHIFT_WIDGET_CONFIG: \"update-helpshift-widget-config\",\n // This event is used to reset widgetType in helpshiftWidgetConfig in case\n // customer try to update it along with updateHelpshiftWidgetConfig JS API\n HS_WIDGET_TYPE_RESET: \"hs-widget-type-reset\"\n};\n\nexport const CUSTOMER_EXPOSED_EVENTS = {\n CONVERSATION_RESOLVED: \"conversationResolved\",\n CONVERSATION_START: \"conversationStart\",\n CONVERSATION_REJECTED: \"conversationRejected\",\n CONVERSATION_REOPENED: \"conversationReopened\",\n CSAT_SUBMIT: \"csatSubmit\",\n USER_CHANGED: \"userChanged\",\n MESSAGE_ADD: \"messageAdd\",\n CONVERSATION_END: \"conversationEnd\",\n NEW_UNREAD_MESSAGES: \"newUnreadMessages\",\n WIDGET_TOGGLE: \"widgetToggle\",\n GENERIC_SDK_DATA: \"genericSdkData\"\n};\n\nexport const WEBCHAT_EVENTS = {\n SDK_EVENT_CONVERSATION_RESOLVED: \"sdk-event-conversation-resolved\",\n SDK_EVENT_CONVERSATION_START: \"sdk-event-conversation-start\",\n SDK_EVENT_CONVERSATION_REJECTED: \"sdk-event-conversation-rejected\",\n SDK_EVENT_CONVERSATION_REOPENED: \"sdk-event-conversation-reopened\",\n SDK_EVENT_CSAT_SUBMIT: \"sdk-event-csat-submit\",\n SDK_USER_CHANGED_VIA_RE_ENGAGEMENT: \"sdk-user-changed-via-re-engagement\",\n SDK_EVENT_MESSAGE_ADD: \"sdk-event-message-add\",\n SDK_EVENT_CONVERSATION_END: \"sdk-event-conversation-end\",\n SDK_UPDATE_UNREAD_COUNT: \"sdk-update-unread-count\",\n SDK_CONFIG_LOADED: \"sdk-config-loaded\",\n CMD_MESSENGER_TOGGLED: \"cmd-messenger-toggled\",\n SDK_EVENT_UI_CONFIG_CHANGE: \"sdk-event-ui-config-change\",\n SDK_EVENT_CLOSE_HELPSHIFT_WIDGET: \"sdk-event-close-helpshift-widget\",\n SDK_EVENT_SEND_GENERIC_SDK_DATA: \"sdk-event-send-generic-sdk-data\"\n};\n\nexport const HELPCENTER_EVENTS = {\n CLOSE: \"closeHelpcenter\",\n HELPCENTER_LOADED: \"helpcenterLoaded\"\n};\n","/**\n * This file contains all the customer exposed JS APIs handling along\n * with helper functions like queuing mechanism for the APIs etc.\n *\n * @author Umang Govil \n * @created Jan 31, 2023\n * @module helpers/api\n */\n\nimport {HELPSHIFT_WIDGET_APIS} from \"api\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport {CUSTOMER_EXPOSED_EVENTS} from \"constants/event\";\n\n/**\n * Check if the given API is supported\n * @param {string} api - the API name string\n * @returns {boolean}\n */\nexport const isApiValid = (api) => {\n return typeof HELPSHIFT_WIDGET_APIS[api] === \"function\";\n};\n\n/**\n * Get APIs queued with the global Helpshift function defined in the embed\n * script along with their names\n * @returns {Array} - List of functions for APIs bound with the arguments.\n */\nexport const getQueuedApisWithNames = () => {\n // The window.HelpshiftWidget function defined in the embed script contains a\n // static queue used to store the API calls made by client side JavaScript.\n // For each item of the queue, add an item (a function bound with the API's\n // arguments) to the list to return.\n const HS = window.HelpshiftWidget;\n const validApiQueue = [];\n\n if (HS && Array.isArray(HS.q) && HS.q.length) {\n HS.q.forEach((queuedArgs) => {\n // Convert arguments to an array.\n // For V8 optimization reasons, using a for loop here, instead of slicing\n // the arguments to make a new array.\n // For details, check the following -\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n const queuedArgsLen = queuedArgs.length;\n const args = [];\n for (let i = 0; i < queuedArgsLen; i++) {\n args.push(queuedArgs[i]);\n }\n\n // The array args contains the API name (\"open\", \"addEventListener\", etc)\n // as the first item. Rest of the items of the args array are the arguments\n // that the API should execute with.\n const api = args[0];\n const apiArgs = args.slice(1);\n\n if (isApiValid(api)) {\n const apiFn = HELPSHIFT_WIDGET_APIS[api];\n // Concatenating apiArgs with null in order to specify the context of\n // the bound function (null).\n validApiQueue.push({fn: apiFn.bind(...[null].concat(apiArgs)), name: api});\n }\n });\n }\n\n return validApiQueue;\n};\n\n/**\n * Execute every queued api and clear the api queue\n * @param {Array} apiQueue - API queue\n *\n * @returns {Array} - Empty queue.\n */\nexport const clearApiQueue = (apiQueue) => {\n apiQueue.forEach((fn) => {\n if (typeof fn === \"function\") {\n fn();\n }\n });\n\n middlewareState.updateState({\n apiQueue: []\n });\n\n return [];\n};\n\n/**\n * Function to find the event name in the event list and call its handler.\n * If eventName is not found within event list then add it in eventRegister.\n * @param {string} eventName - Name of the event\n * @param {*} eventData - Data for the event\n */\nexport const callApiEventHandler = (eventName, eventData) => {\n const {apiEvents, eventRegister} = middlewareState.getState();\n\n const eventToBeCalled = apiEvents.find((apiEvent) => apiEvent.eventName === eventName);\n if (eventToBeCalled) {\n eventToBeCalled.eventHandler(eventData);\n\n return;\n }\n\n // Add event to the eventRegister if the handler is not found.\n // The event handler will be called when developer calls the\n // addEventListener Helpshift API for this event.\n const currentEventRegister = {...eventRegister};\n let cumulativeEventData;\n\n // If the event is already registered, then enqueue the data to\n // already registered event's data\n if (currentEventRegister[eventName] && currentEventRegister[eventName].data) {\n cumulativeEventData = {...currentEventRegister[eventName].data, ...eventData};\n } else {\n cumulativeEventData = eventData;\n }\n\n currentEventRegister[eventName] = {\n eventHasOccured: true,\n data: cumulativeEventData\n };\n\n middlewareState.updateState({eventRegister: currentEventRegister});\n};\n\n/**\n * Returns boolean if event name is supported\n * @param {string} eventName - name of event\n * @returns {boolean} - whether event name is supported\n */\nexport const isEventSupported = (eventName) => {\n return Object.values(CUSTOMER_EXPOSED_EVENTS).some(\n (currentEventName) => currentEventName === eventName\n );\n};\n\n/**\n * Function to get the default value for registered event\n * @returns {Object}\n */\nconst _getDefaultRegisteredEventValue = () => {\n return {\n eventHasOccured: false,\n data: null\n };\n};\n\n/**\n * Reset registered events value to default value.\n * @param {string} eventName\n */\nexport const resetRegisteredEvent = (eventName) => {\n const {eventRegister: currentEventRegister} = middlewareState.getState();\n\n currentEventRegister[eventName] = _getDefaultRegisteredEventValue();\n middlewareState.updateState({eventRegister: currentEventRegister});\n};\n\n/**\n * Returns helpshiftConfig config for Helpcenter & Web Chat JS context\n *\n * @param {Object} data - Data out of which helpshift config is being created\n * for Helpcenter & Web Chat\n * @returns {Object} - helpshiftConfig object\n */\nexport const getHelpshiftConfig = (data) => {\n const helpshiftConfig = {\n ...data,\n widgetSdkConfig: {\n widgetType: data.widgetType,\n version: \"1.7.0\",\n widgetPlatform: \"web\"\n },\n helpcenterConfig: {\n faqId: data.faqId,\n sectionId: data.sectionId\n }\n };\n\n if (typeof data?.widgetOptions?.fullScreen === \"boolean\") {\n helpshiftConfig.widgetSdkConfig.fullScreen = data.widgetOptions.fullScreen;\n }\n\n // For PC widget set the pluginVersion, widgetPlatform, pluginType\n if (data.pcWidgetConfig) {\n helpshiftConfig.widgetSdkConfig.pluginType = data.pcWidgetConfig?.pluginType;\n helpshiftConfig.widgetSdkConfig.pluginVersion = data.pcWidgetConfig?.pluginVersion;\n helpshiftConfig.widgetSdkConfig.widgetPlatform = data.pcWidgetConfig?.widgetPlatform;\n }\n\n // We need to delete these keys as the parent data object (data argument of this method)\n // comes from the developer config which has a different structure than that of\n // helpshiftConfig which is consumed by HC and WC\n const keysToBeDeletedFromHelpshiftConfig = [\"widgetType\", \"faqId\", \"sectionId\", \"widgetOptions\"];\n keysToBeDeletedFromHelpshiftConfig.forEach((keyToBeDeleted) => {\n delete helpshiftConfig[keyToBeDeleted];\n });\n\n return helpshiftConfig;\n};\n","/**\n * Analytics related constants\n *\n * @author Umang Govil \n * @created March 28, 2024\n * @module constants/analytics\n */\n\nexport const PAYLOAD_EVENT = {\n MAXIMIZE: \"max\",\n MINIMIZE: \"min\"\n};\n\nexport const PAYLOAD_DATA = {\n ID: \"id\",\n TIMESTAMP: \"timestamp\",\n LANGUAGE: \"ln\",\n DEV_SET_LANGUAGE: \"dln\",\n HS_WIDGET_VERSION: \"hwv\",\n PLUGIN_TYPE: \"s\", // type of pc widget wrapper plugin (e.g. \"unity\", \"unreal\")\n PLUGIN_VERSION: \"pv\", // version of pc widget wrapper plugin\n WIDGET_PLATFORM: \"wplat\" // platform of widget (e.g. \"web\", \"windows\", \"mac\")\n};\n","/**\n * Browser related utils.\n * @author Manish Garg \n * @created Aug 16, 2017\n * @module gunpowder/utils/browser\n */\n\n/**\n * Detects if the current environment is mobile or not.\n * @returns {Boolean}\n */\nconst isMobile = () => {\n // eslint-disable-next-line max-len\n const isMobileRegEx = /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop|XBLWP7/i;\n return isMobileRegEx.test(navigator.userAgent);\n};\n\n/**\n * Extracts browser language.\n * Checks & fallbacks are for browser compatibility,\n * For more info: https://zzz.buzz/2016/01/13/detect-browser-language-in-javascript/\n * @returns {String} - Language code\n */\nconst getLanguage = () => {\n const nav = window.navigator;\n return (nav.languages && nav.languages[0]) || nav.language || nav.userLanguage;\n};\n\n/**\n * Determine if the current environment is search engine bots, crawlers, etc by\n * reading the user agent string and looking for the UA strings used by the most\n * common search engine bots and crawler programs.\n * For more discussion on the solution, please see\n * https://stackoverflow.com/a/20084661/1093247\n * https://webmasters.stackexchange.com/a/64805\n * @returns {boolean}\n */\nconst isBot = () => {\n return navigator && /bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent);\n};\n\n/**\n * Returns true if touch events like touchstart etc are supported. We assume\n * here that if ontouchstart is not undefined, then other events like touchmove,\n * and touchend will also be not undefined and infer that touch events are\n * supported.\n * @returns {Boolean}\n */\nconst areTouchEventsSupported = () => {\n return typeof window.ontouchstart !== \"undefined\";\n};\n\n/**\n * Check whether the display is a retina display (i.e. it has high pixel density)\n */\nconst isDisplayRetina = () => window.devicePixelRatio > 1;\n\nexport default {\n isMobile,\n getLanguage,\n isBot,\n areTouchEventsSupported,\n isDisplayRetina\n};\n","/**\n * Object Utils\n * @author Nayan Suthar \n * @created 8 Jan, 2016\n * @module utils/object\n */\n\n/**\n * Is Object.\n * A method to check if given value is an object.\n * Returns false if it's premitive, array or function.\n */\nvar isObject = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n};\n\n/**\n * Function to shallow merge one object into another.\n * @param destObj {Object} Destination object to copy other objects property into.\n * @param srcObj {Object} Source obj to copy props from.\n * @param options {Object} Optional object you can pass to handle some special cases.\n * - only {Array} If you pass only, it'll just copy keys in this array from obj2 to obj1.\n * - skip {Array} If you pass skip, it'll not copy these keys from obj2 to obj1 while merging.\n */\nvar shallowMerge = function(destObj, srcObj, options) {\n var keys;\n\n options = options || {};\n\n if (options.only) {\n keys = options.only;\n } else {\n keys = Object.keys(srcObj);\n }\n\n keys.forEach(function(k) {\n if (options.skip && options.skip.indexOf(k) !== -1) {\n return null;\n }\n if (srcObj.hasOwnProperty(k)) {\n destObj[k] = srcObj[k];\n }\n });\n return destObj;\n};\n\n/**\n * Set In.\n * Used to set new key or update existing key in a nested object.\n * Takes an object, a value and an array of keys that indicates\n * where the value needs to be set.\n */\nvar setIn = function(obj, value, keys) {\n var i,\n currentTarget = obj;\n for (i = 0; i < keys.length; i++) {\n // If last key simply set the value for key and exit.\n if (i === keys.length - 1) {\n currentTarget[keys[i]] = value;\n break;\n\n // Else set the key if not present or\n // if the value of that key is of primitive type\n } else if (\n !(currentTarget.hasOwnProperty(keys[i]) && currentTarget[keys[i]] instanceof Object)\n ) {\n currentTarget[keys[i]] = {};\n }\n // Update target to point at current key\n currentTarget = currentTarget[keys[i]];\n }\n currentTarget = value;\n // Returns the object it self as it's mutated.\n return obj;\n};\n\n/**\n * Get In.\n * Get value of a key/index in a nested structure of arrays and objects.\n * Starting from the first item (key/index) in the given array if the\n * key/index is present in the object/array, look inside inside the\n * value of that key/index for next key/index and so on until the value\n * of the last key/index is found.\n * If any of the keys/indices do not exist it will return null. If all\n * keys/indices are present it returns the values of last key/index.\n */\nvar getIn = function(obj, keys) {\n var currentObject = obj,\n index;\n for (index = 0; index < keys.length; index++) {\n // Look for key if complex datatype\n if (currentObject instanceof Object && currentObject.hasOwnProperty(keys[index])) {\n currentObject = currentObject[keys[index]];\n } else {\n return null;\n }\n }\n return currentObject;\n};\n\n/**\n * forEachKey.\n * Loop through all keys of an object and call the given function\n * for each key.\n */\nvar forEachKey = function(obj, fn) {\n var key;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n fn(key, obj[key]);\n }\n }\n};\n\n/**\n * Similar to forEach key with order of iteration\n * being determined by sortKey\n */\nconst sortedForEachKey = function(object, sortKey, func) {\n // if sortKey isn't present treat skip the ordering logic\n if (!sortKey) {\n forEachKey(object, func);\n return;\n }\n\n const sortedKeys = Object.keys(object).sort(function(obj1, obj2) {\n return obj1[sortKey] - obj2[sortKey];\n });\n\n for (let i = 0; i < sortedKeys.length; i++) {\n func(sortedKeys[i], object[sortedKeys[i]]);\n }\n};\n\n/**\n * Walk.\n * This function looks for the given key in the given object and in all it's\n * nested objects/arrays. When encountered an object that contains the key,\n * it calls the given function with that object and replace the object with\n * the output of that function.\n * This function can be used to evaluate nested objects. For example:\n *\n * walk ({\n * foo: [{double: 1}, {double: {double: 2}}, 3, 4, 5],\n * bar: {double: {double: {double: {double: 6}}}}\n * }, \"double\", function (obj) {\n * return obj.double * 2;\n * });\n *\n * Will return\n * {foo: [2, 8, 3, 4, 5], bar: 96}\n */\nvar walk = function(obj, key, operation) {\n var newObj = {};\n if (Array.isArray(obj)) {\n // If obj is array, walk through every item in the array.\n newObj = obj.map(function(item) {\n return walk(item, key, operation);\n });\n } else if (isObject(obj)) {\n /**\n * Else if obj is Object, walk through every key in object.\n * NOTE: An object containing the key is processed after all\n * the nested items are processed.\n */\n forEachKey(obj, function(item, value) {\n newObj[item] = walk(value, key, operation);\n });\n /**\n *\n * If object contains the key, call the given function with the\n * object and replace the object with the output of that function.\n * NOTE: This also mutates the original object that was passed.\n */\n if (obj.hasOwnProperty(key)) {\n newObj = operation(newObj);\n }\n } else {\n // Not a walkable structure so just return the variable obj as it is.\n newObj = obj;\n }\n return newObj;\n};\n\nconst HYPHEN_UNDERSCORE_REGEX = /\\-|\\_/g;\n\n/**\n * Given an object, this function will return a new object with all keys\n * converted to camel case. Recursively converts inner objects to camel case.\n */\nconst toCamelCaseKeys = function(obj) {\n const newObj = {};\n forEachKey(obj, function(key, value) {\n let words,\n newKey = key;\n if (key.indexOf(\"_\") !== -1 || key.indexOf(\"-\") !== -1) {\n words = key.split(HYPHEN_UNDERSCORE_REGEX);\n newKey = words.slice(1).reduce(function(str1, str2) {\n return str1 + str2.charAt(0).toUpperCase() + str2.slice(1);\n }, words[0]);\n }\n\n newObj[newKey] = isObject(value) ? toCamelCaseKeys(value) : value;\n });\n\n return newObj;\n};\n\n/**\n * Returns a new object with same props as the given object. If the values are\n * objects themselves then those objects will not be cloned.\n * @param {Object} obj - The object to be cloned.\n * @return {Object} - The cloned object.\n */\nconst shallowClone = (obj) => shallowMerge({}, obj);\n\n/**\n * Returns an array of values of a given object.\n * E.g. For the object\n * {\n * a: {\n * b: 1\n * },\n * c: 2\n * }\n * the array returned would look like\n * [{b: 1}, 2]\n * @param {Object} obj - The object for which values are needed\n * @returns {Array} - Array of object's property values\n */\nconst getAllValues = (obj) => {\n if (typeof Object.values === \"function\") {\n return Object.values(obj);\n }\n\n return Object.keys(obj).map((key) => obj[key]);\n};\n\nexport default {\n isObject: isObject,\n shallowMerge: shallowMerge,\n setIn: setIn,\n getIn: getIn,\n forEachKey: forEachKey,\n sortedForEachKey: sortedForEachKey,\n walk: walk,\n toCamelCaseKeys: toCamelCaseKeys,\n shallowClone,\n getAllValues\n};\n","/**\n * Utility for xhrs\n * @author Prajwalit Bhopale \n * @created Feb 11, 2015\n * @module utils/xhr\n */\n\n/* eslint-disable max-len */\n// From http://yuilibrary.com/yui/docs/api/files/querystring_js_querystring-stringify-simple.js.html\n/* eslint-enable max-len */\n\n/**\n * Converts object into query string\n * @param {Object} obj - Key value pair\n * @returns {string} - Query string for GET request\n */\nvar _queryStringify = function(obj) {\n var qs = [],\n key;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n qs.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(obj[key]));\n }\n }\n return qs.join(\"&\");\n};\n\n/**\n * Check if given status indicates success or not.\n * @param {number} statusCode - Status code of HTTP response\n * @returns {boolean} - Whether the status code indicates success\n */\nvar _isSuccess = function(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n};\n\n/**\n * Check whether the xhr should be retried or not based on following\n * 1) Whether the xhr should be retried based on the current status code\n * 2) Whether the xhr has exceeded the maximum retries\n *\n * @param {Object} retryConfig - Retry config for when the XHR is auto retriable\n * @param {number} statusCode - Status code of the xhr response\n * @returns\n */\nconst _shouldXhrAutoRetry = (retryConfig, statusCode) => {\n return (\n retryConfig.shouldRetryHappen(statusCode) &&\n retryConfig.autoRetryCounter < retryConfig.maxRetryCount\n );\n};\n\n/**\n * This method retries the XHR after a particular timeout\n *\n * @param {Object} params - Object containing the parameters for firing an XHR\n * @param {Object} retryConfig - Retry config for when the XHR is auto retriable\n */\nconst _autoRetryXhr = (params, retryConfig) => {\n setTimeout(\n recurXhr.bind(\n this,\n Object.assign({}, params),\n Object.assign({}, retryConfig, {\n autoRetryCounter: retryConfig.autoRetryCounter + 1,\n autoRetryXhrTimeout: retryConfig.autoRetryXhrTimeout * retryConfig.timeoutMultiplier\n })\n ),\n retryConfig.autoRetryXhrTimeout\n );\n};\n\n/**\n * Makes recurring network calls in case of auto retries, otherwise run only once\n *\n * @param {Object} params - Object containing the parameters for firing an XHR\n * @param {Object} retryConfig - Retry config for when the XHR is auto retriable\n * @param {Object} retryConfig.autoRetryCounter - Current counter for the auto retry\n * @param {Object} retryConfig.autoRetryXhrTimeout - Time after which the XHR\n * has to be fired\n * @param {Object} retryConfig.shouldRetryHappen - This method takes in the status\n * code as input and decides whether the XHR should be retried or not based on the status code\n * @param {Object} retryConfig.maxRetryCount - This tells how many times should the\n * XHR be retried\n * @param {Object} retryConfig.timeoutMultiplier - Amount by which the XHR time out\n * should increase\n */\nconst recurXhr = (params, retryConfig) => {\n var x = new XMLHttpRequest();\n var url = params.route;\n var formParams;\n params.method = params.method || \"GET\";\n params.parse = typeof params.parse === \"boolean\" ? params.parse : true;\n\n if (params.method === \"GET\" && params.data) {\n url += \"?\" + _queryStringify(params.data);\n }\n\n x.open(params.method, url, true);\n // x.setRequestHeader (\"authorization\", \"Basic \" + btoa (API_KEY + \":\"));\n\n if (params.method === \"POST\" || params.method === \"PUT\") {\n params.data = params.data || {};\n formParams = _queryStringify(params.data);\n x.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n }\n\n const headers = params.headers;\n if (headers) {\n for (const key in headers) {\n if (headers.hasOwnProperty(key)) {\n x.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n x.onreadystatechange = function() {\n var response;\n\n if (x.readyState === 4) {\n if (_isSuccess(x.status) && params.onSuccess) {\n response = params.parse && x.responseText ? JSON.parse(x.responseText) : x.responseText;\n params.onSuccess.call(params.context || null, response, x, x.status);\n } else if (!_isSuccess(x.status)) {\n if (x.status === 0) {\n if (params.onAbort) {\n params.onAbort.call(params.context || null, x, x.status);\n }\n } else if (params.onFailure) {\n if (params.autoRetry) {\n if (_shouldXhrAutoRetry(retryConfig, x.status)) {\n _autoRetryXhr(params, retryConfig);\n } else {\n params.onFailure.call(params.context || null, x, x.status);\n }\n } else {\n params.onFailure.call(params.context || null, x, x.status);\n }\n } else if (params.autoRetry) {\n if (_shouldXhrAutoRetry(retryConfig, x.status)) {\n _autoRetryXhr(params, retryConfig);\n }\n }\n }\n\n if (params.onEnd) {\n params.onEnd.call(params.context, x.responseText);\n }\n }\n };\n\n x.send(formParams);\n\n return x;\n};\n\n/**\n * Callback that gets called when XHR request is successful\n * @callback successCallback\n * @param {object} [response] - XHR response\n * @param {object} [xhrObj] - XHR object\n * @param {number} [status] - Response status\n */\n\n/**\n * Callback that gets called when XHR request fails\n * @callback failureCallback\n * @param {object} [xhrObj] - XHR object\n * @param {number} [status] - Response status\n */\n\n/**\n * Callback that gets called when XHR request fails\n * @callback endCallback\n * @param {string} [responseText] - Raw XHR Response body\n * @param {number} [status] - Response status\n */\n\n/**\n * Makes a network request\n *\n * @param {Object} params - Object containing the parameters for firing an XHR\n * @param {string} params.route - Route at which xhr is to be made\n * @param {string} params.method - Method for the XHR\n * @param {boolean} params.parse - If true, then parse the response on success\n * @param {Object} params.data - XHR data\n * @param {Object} params.headers - XHR headers\n * @param {successCallback} [params.onSuccess] - Callback that gets called when XHR request is\n * successful.\n * @param {failureCallback} [params.onFailure] - Callback that gets called when XHR request fails\n * @param {function} [params.onAbort] - onAbort handler\n * @param {endCallback} [params.onEnd] - Callback that gets called upon completion of XHR request,\n * regardless of whether the call succeeds or fails.\n * @param {object|null} [params.context] - Context with which onSuccess & onFailure callbacks are\n * called. Defaults to null.\n * @param {boolean} [params.autoRetry] - If true, then the XHR should be auto retriable\n * @param {Object} [params.retryConfig] - Retry config for when the XHR is auto retriable\n * @param {Object} [params.retryConfig.autoRetryXhrTimeout = 3000] - Time after which the XHR\n * has to be fired\n * @param {Object} [params.retryConfig.shouldRetryHappen] - This method takes in the status\n * code as input and decides whether the XHR should be retried or not based on the status code\n * @param {Object} [params.retryConfig.maxRetryCount = 5] - This tells how many times should the\n * XHR be retried\n * @param {Object} [params.retryConfig.timeoutMultiplier = 2] - Amount by which the XHR time out\n * should increase\n */\nconst xhr = (params) => {\n const retryConfig = {};\n\n if (params.autoRetry) {\n retryConfig.autoRetryCounter = 0;\n // eslint-disable-next-line max-len\n retryConfig.autoRetryXhrTimeout = params?.retryConfig?.autoRetryXhrTimeout ?? 3000; // in milliseconds\n retryConfig.shouldRetryHappen =\n params?.retryConfig?.shouldRetryHappen ?? ((statusCode) => statusCode / 100 === 5);\n retryConfig.maxRetryCount = params?.retryConfig?.maxRetryCount ?? 5;\n retryConfig.timeoutMultiplier = params?.retryConfig?.timeoutMultiplier ?? 2;\n }\n\n return recurXhr(params, retryConfig);\n};\n\nexport default xhr;\n","/**\n * Routes constants.\n * @author Umang Govil \n * @created April 30, 2024\n * @module constants/route\n */\n\n/**\n * Returns tracking xhr route for analytics events\n *\n * @param {string} domain - Domain name\n * @returns {string} - Tracking xhr route for analytics events\n */\nexport const postAnalyticsXhrRoute = (domain) => {\n return `https://api.helpshift.com/events/v1/${domain}/websdk/`;\n};\n","/**\n * Analytics related helpers\n *\n * @author Umang Govil \n * @created March 28, 2024\n * @module helpers/analytics\n */\n\nimport {PAYLOAD_EVENT, PAYLOAD_DATA} from \"constants/analytics\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport browserUtils from \"gunpowder/utils/browser\";\nimport {getCommonHeaders, getPreparedXhrData} from \"helpers/xhr\";\nimport objectUtils from \"gunpowder/utils/object\";\nimport xhr from \"gunpowder/utils/xhr\";\nimport {postAnalyticsXhrRoute} from \"constants/routes\";\n\nconst _getDefaultPayload = () => {\n const {deviceId, language: developerSetLanguage} = middlewareState.getState();\n const language = browserUtils.getLanguage();\n\n const payload = {\n [PAYLOAD_DATA.ID]: deviceId,\n [PAYLOAD_DATA.TIMESTAMP]: Date.now(), // Timestamp of when the event is tracked\n [PAYLOAD_DATA.LANGUAGE]: language,\n [PAYLOAD_DATA.HS_WIDGET_VERSION]: \"1.7.0\",\n [PAYLOAD_DATA.WIDGET_PLATFORM]: \"web\" // default platform for widget is web\n };\n\n if (developerSetLanguage) {\n payload[PAYLOAD_DATA.DEV_SET_LANGUAGE] = developerSetLanguage;\n }\n\n return getPreparedXhrData(payload);\n};\n\n/**\n * Fire the XHR to track the given events payload.\n * @param {Object[]} eventsPayload - Array of events payload with name, event timestamp etc.\n */\nconst _fireTrackingXhr = (eventPayload) => {\n const {domain, pcWidgetConfig} = middlewareState.getState();\n const defaultPayload = _getDefaultPayload();\n const eventData = {\n e: JSON.stringify(eventPayload)\n };\n\n if (pcWidgetConfig && Object.keys(pcWidgetConfig).length) {\n eventData[PAYLOAD_DATA.PLUGIN_TYPE] = pcWidgetConfig.pluginType;\n eventData[PAYLOAD_DATA.PLUGIN_VERSION] = pcWidgetConfig.pluginVersion;\n eventData[PAYLOAD_DATA.WIDGET_PLATFORM] = pcWidgetConfig.widgetPlatform;\n }\n\n const data = objectUtils.shallowMerge(defaultPayload, eventData);\n\n xhr({\n route: postAnalyticsXhrRoute(domain),\n method: \"POST\",\n headers: getCommonHeaders(),\n data\n });\n};\n\n/**\n * Track the hs widget maximize event. This event is tracked when widget is maximized\n * @param {Object} data - Event data\n */\nconst _trackWidgetMaximizeEvent = (data) => {\n _fireTrackingXhr([\n {\n t: PAYLOAD_EVENT.MAXIMIZE,\n ts: Date.now(),\n d: data\n }\n ]);\n};\n\n/**\n * Track the hs widget minimize event. This event is tracked when widget is minimized\n * @param {Object} data - Event data\n */\nconst _trackWidgetMinimizeEvent = (data) => {\n _fireTrackingXhr([\n {\n t: PAYLOAD_EVENT.MINIMIZE,\n ts: Date.now(),\n d: data\n }\n ]);\n};\nexport const trackEvent = {\n widgetMaximize: _trackWidgetMaximizeEvent,\n widgetMinimize: _trackWidgetMinimizeEvent\n};\n","/**\n * XHR helpers\n *\n * @author Umang Govil \n * @created March 28, 2024\n * @module helpers/xhr\n */\n\nimport {middlewareState} from \"singleton/middlewareState\";\nimport browserUtils from \"gunpowder/utils/browser\";\nimport objectUtils from \"gunpowder/utils/object\";\n\nconst API_VERSION_HEADER = \"application/vnd+hsapi-v2+json\";\n\n/**\n * Return common headers which are to be passed to each xhr request.\n * @returns {Object} - Headers for the network request\n */\nexport const getCommonHeaders = () => {\n const {platformId, language: developerSetLanguage} = middlewareState.getState();\n const language = browserUtils.getLanguage();\n\n const headers = {\n Accept: API_VERSION_HEADER\n };\n\n headers.authorization = \"Basic \" + btoa(platformId + \":\");\n\n if (developerSetLanguage) {\n headers[\"Accept-Language\"] = `${developerSetLanguage};q=1,${language};q=0.9`;\n }\n\n return headers;\n};\n\n/**\n * Get the data object to be passed with the `data` field of an XHR call. It\n * merges the custom data (specific to an XHR) with the common XHR data. The\n * common XHR data contains the following.\n * 1. Device ID (did)\n * 2. User identifier (uid)\n * 3. Email (email)\n * 4. User hash (user_auth_token)\n * 5. Platform ID (platform_id)\n *\n * @param {Object} [customXhrData]\n * @returns {String} - JSON stringified prepared data for the network call\n */\nexport const getPreparedXhrData = (customXhrData) => {\n const {\n deviceId,\n userId,\n anonUserId,\n userEmail,\n userAuthToken,\n platformId,\n fullPrivacy: fullPrivacyIsEnabled\n } = middlewareState.getState();\n let xhrData;\n\n const commonXhrData = {\n did: deviceId\n };\n\n // Set `uid` to the xhr data according to the following rules.\n // If none of userId, email and phoneNumber is passed, set `uid` to `anonUserIdentifier`.\n // If userId is passed (irrespective of if email is passed), set `uid` to `userId`.\n // If userId is not passed and email is passed, don't send `uid`.\n // If email is the only identifier in fullPrivacy mode, set `uid` to `anonUserIdentifier`.\n if ((!userId && !userEmail) || (!userId && userEmail && fullPrivacyIsEnabled)) {\n commonXhrData.uid = anonUserId;\n } else if (userId) {\n commonXhrData.uid = userId;\n }\n\n commonXhrData[\"platform-id\"] = platformId;\n\n // Handle fullPrivacy mode and HMAC\n // If fullPrivacy is not enabled, send all (userId, userEmail, userAuthToken) the values.\n // If fullPrivacy is enabled then\n // If email is not set and userId and userAuthToken are set, send userId and\n // userAuthToken.\n // If email is set, do not send userAuthToken\n if (!fullPrivacyIsEnabled) {\n if (userEmail) {\n commonXhrData.email = userEmail;\n }\n\n if (userAuthToken) {\n commonXhrData.user_auth_token = userAuthToken;\n }\n } else if (!userEmail && userId && userAuthToken) {\n commonXhrData.user_auth_token = userAuthToken;\n }\n\n // Merge custom and common XHR data objects if the passed custom data is\n // an object.\n if (objectUtils.isObject(customXhrData)) {\n xhrData = objectUtils.shallowMerge(commonXhrData, customXhrData);\n } else {\n xhrData = commonXhrData;\n }\n\n return xhrData;\n};\n","/**\n * This file contains the helpers to create the iframe for hswidget\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module helpers/iframe.js\n */\n\nimport {LAUNCHER_HS_ICON_SVG} from \"constants/icon\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport {callApiEventHandler} from \"helpers/api\";\nimport {CUSTOMER_EXPOSED_EVENTS} from \"constants/event\";\nimport {trackEvent} from \"helpers/analytics\";\n\nexport const renderUnreadCount = () => {\n const {\n widgetOptions: {showLauncher}\n } = middlewareState.getState();\n\n if (!showLauncher) {\n return;\n }\n\n const launcherButtonUnreadCountEl = document.querySelector(\n \".hs-widget-launcher-button-unread-count\"\n );\n\n if (!launcherButtonUnreadCountEl) {\n return;\n }\n\n const {unreadMsgCount, hsWidgetIframeIsVisible} = middlewareState.getState();\n\n if (unreadMsgCount && !hsWidgetIframeIsVisible) {\n launcherButtonUnreadCountEl.innerHTML = unreadMsgCount;\n launcherButtonUnreadCountEl.classList.remove(\"hide\");\n } else {\n launcherButtonUnreadCountEl.innerHTML = \"\";\n launcherButtonUnreadCountEl.classList.add(\"hide\");\n }\n};\n\n/**\n * This function creates and returns hs widget iframe\n * @param {string} hsWidgetUrl\n * @returns {HTMLElement} iframe\n */\nexport const createHsWidgetIframe = (hsWidgetUrl) => {\n const iframe = document.createElement(\"iframe\");\n iframe.setAttribute(\"role\", \"none\");\n iframe.id = \"hs-widget-iframe\";\n iframe.classList.add(\"hs-widget-iframe\", \"hide\");\n iframe.src = hsWidgetUrl;\n\n return iframe;\n};\n\n/**\n * Creates and returns launcher button for hs widget\n * @returns {HTMLElement}\n */\nexport const createHsWidgetLauncherButton = () => {\n const launcherButton = document.createElement(\"button\");\n launcherButton.id = \"hs-widget-laucher-button\";\n launcherButton.classList.add(\"hs-widget-laucher-button\");\n\n const launcherIconEl = document.createElement(\"span\");\n launcherIconEl.innerHTML = LAUNCHER_HS_ICON_SVG;\n launcherButton.appendChild(launcherIconEl);\n\n return launcherButton;\n};\n\n/**\n * Creates and returns launcher button for hs widget\n * @returns {HTMLElement}\n */\nexport const createHsWidgetWrapper = () => {\n const widgetWrapper = document.createElement(\"div\");\n widgetWrapper.id = \"hs-widget-wrapper\";\n\n return widgetWrapper;\n};\n\n/**\n * Returns hs widget iframe element\n *\n * @returns {Element} - hs widget iframe element\n */\nexport const getHsWidgetIframeEl = () => {\n return document.getElementById(\"hs-widget-iframe\");\n};\n\nexport const toggleWidgetIframe = () => {\n const {hsWidgetIframeIsVisible, widgetType} = middlewareState.getState();\n\n if (hsWidgetIframeIsVisible) {\n trackEvent.widgetMaximize({wt: widgetType});\n } else {\n trackEvent.widgetMinimize({wt: widgetType});\n }\n\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.WIDGET_TOGGLE, {\n visible: hsWidgetIframeIsVisible\n });\n};\n","/**\n * This file exports constants that are derived from the variables\n * replaced during the build.\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module constants/build\n */\n\nexport const HS_WIDGET_ROOT = \"https://hs-widget.helpshift.com\";\nexport const VERSION = \"1.7.0\";\n// the URL object\nconst url = new URL(HS_WIDGET_ROOT);\nconst {host, pathname, protocol} = url;\nconst INDEX_HTML_PATH = `${VERSION}/html/main.html`;\n// A query string with parent page's origin, which is later used with the\n// postMessage call by hs widget to the parent page.\nconst PARENT_ORIGIN_QUERY_STRING = `parent=${encodeURIComponent(window.location.origin)}`;\n\nexport const HS_WIDGET_DOMAIN = `${protocol}//${host}`;\nexport const HS_WIDGET_URL =\n `${protocol}//${host}${pathname}${INDEX_HTML_PATH}` + `?${PARENT_ORIGIN_QUERY_STRING}`;\n","/**\n * This file contains css variable constants\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module constants/widgetCss.js\n */\n\nimport {WIDGET_POSITIONS} from \"constants/widget\";\n\nexport const IFRAME_POSITION_CONFIG = {\n cssVarName: \"--hs-widget-iframe-pos\",\n [WIDGET_POSITIONS.TOP_LEFT]: \"24px auto auto 20px\",\n [WIDGET_POSITIONS.TOP_RIGHT]: \"24px 20px auto auto\",\n [WIDGET_POSITIONS.BOTTOM_LEFT]: \"auto auto 24px 20px\",\n [WIDGET_POSITIONS.BOTTOM_RIGHT]: \"auto 20px 24px auto\"\n};\n\nexport const LAUNCHER_BTN_POSITION_CONFIG = {\n cssVarName: \"--hs-widget-btn-pos\",\n [WIDGET_POSITIONS.TOP_LEFT]: \"16px auto auto 20px\",\n [WIDGET_POSITIONS.TOP_RIGHT]: \"16px 20px auto auto\",\n [WIDGET_POSITIONS.BOTTOM_LEFT]: \"auto auto 16px 20px\",\n [WIDGET_POSITIONS.BOTTOM_RIGHT]: \"auto 20px 16px auto\"\n};\n\nexport const Z_INDEX_CONFIG = {\n cssVarName: \"--hs-widget-z-index\"\n};\n\nexport const SHOW_LAUNCHER_CONFIG = {\n cssVarName: \"--hs-widget-btn-display\",\n true: \"block\",\n false: \"none\"\n};\n\nexport const LAUNCHER_BTN_PRIMARY_COLOR_LIGHT_75 = {\n cssVarName: \"--hs-widget-launcher-btn-primary-color-light-75\"\n};\n\nexport const LAUNCHER_BTN_PRIMARY_COLOR = {\n cssVarName: \"--hs-widget-launcher-btn-primary-color\"\n};\n","/**\n * This file contains the helpers for performing operations on css variables used on\n * parent page.\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module helpers/widgetCss.js\n */\n\nimport {\n IFRAME_POSITION_CONFIG,\n LAUNCHER_BTN_POSITION_CONFIG,\n Z_INDEX_CONFIG,\n SHOW_LAUNCHER_CONFIG\n} from \"constants/widgetCss\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport {getHsWidgetIframeEl, renderUnreadCount} from \"helpers/iframe\";\n\n/**\n * Checks whether the hs widget launcher button should be visible or not\n *\n * @param {Object} config - config options\n * @param {boolean} config.launcherBtnShouldBeShown - true if launcher button should be displayed\n * @param {boolean} config.showLauncher - true if showLauncher is passed as true in the\n * @returns {boolean} - whether the hs widget launcher button should be visible or not\n */\nconst _shouldHsWidgetLauncherButtonBeVisible = ({launcherBtnShouldBeShown, showLauncher}) => {\n if (launcherBtnShouldBeShown) {\n return typeof showLauncher === \"boolean\" ? showLauncher : launcherBtnShouldBeShown;\n }\n\n return launcherBtnShouldBeShown;\n};\n\n/**\n * Sets a css variable on helpshift widget wrapper\n * @param {string} cssVarName - name of variable\n * @param {string} value - value to be set\n */\nexport const updateWidgetCssVar = (cssVarName, value) => {\n document.getElementById(\"hs-widget-wrapper\").style.setProperty(cssVarName, value);\n};\n\n/**\n * Updates the position of the hs widget as a whole, including button, iframe.\n * @param {string} position - position of widget\n */\nconst _updateWidgetPosition = (position) => {\n updateWidgetCssVar(IFRAME_POSITION_CONFIG.cssVarName, IFRAME_POSITION_CONFIG[position]);\n updateWidgetCssVar(\n LAUNCHER_BTN_POSITION_CONFIG.cssVarName,\n LAUNCHER_BTN_POSITION_CONFIG[position]\n );\n};\n\n/**\n * Updates the css vars for making the hs widget dynamic\n * @param {object} widgetOptions - contains widget config options passed by developer\n */\nexport const updateWidgetOptionsRelatedCssVars = (widgetOptions) => {\n // @TODO: feature/hs-widget-demo: Add validation for the all the config passed by the customer.\n if (widgetOptions?.position) {\n _updateWidgetPosition(widgetOptions.position);\n }\n if (widgetOptions?.zIndex) {\n updateWidgetCssVar(Z_INDEX_CONFIG.cssVarName, widgetOptions.zIndex);\n }\n};\n\n/**\n * This function controls the display of the launcher button\n * @param {Object} config - config options\n * @param {boolean} config.hsWidgetLauncherButtonShouldBeVisible - true if launcher button\n * should be displayed\n * @param {boolean} config.showLauncher - true if showLauncher is passed as true in the\n * developer config\n */\nexport const showLauncherButton = ({launcherBtnShouldBeShown, showLauncher}) => {\n const {hsWidgetIframeIsVisible} = middlewareState.getState();\n const hsWidgetLauncherButtonShouldBeVisible = _shouldHsWidgetLauncherButtonBeVisible({\n launcherBtnShouldBeShown,\n showLauncher\n });\n\n if (hsWidgetLauncherButtonShouldBeVisible && hsWidgetIframeIsVisible) {\n return;\n }\n\n middlewareState.updateState({\n hsWidgetLauncherButtonIsVisible: hsWidgetLauncherButtonShouldBeVisible\n });\n\n updateWidgetCssVar(\n SHOW_LAUNCHER_CONFIG.cssVarName,\n SHOW_LAUNCHER_CONFIG[String(hsWidgetLauncherButtonShouldBeVisible)]\n );\n renderUnreadCount();\n};\n\n/**\n * This function controls the display of the widget iframe\n * @param {boolean} widgetIframeShouldBeShown - true if widget iframe should be displayed\n */\nexport const showWidgetIframe = (widgetIframeShouldBeShown) => {\n const hsWidgetIframe = getHsWidgetIframeEl();\n\n if (!widgetIframeShouldBeShown) {\n hsWidgetIframe.classList.add(\"hide\");\n middlewareState.updateState({\n hsWidgetIframeIsVisible: false\n });\n\n return;\n }\n\n hsWidgetIframe.classList.remove(\"hide\");\n middlewareState.updateState({\n hsWidgetIframeIsVisible: true,\n hsWidgetWasOpened: widgetIframeShouldBeShown\n });\n};\n\n/**\n * This function controls the display of unread count element in hs widget\n * @param {boolean} show - true if unread count element should be displayed\n */\nexport const showUnreadCountEl = (show) => {\n const unreadCountEl = document.querySelector(\".hs-widget-launcher-button-unread-count\");\n\n if (show) {\n unreadCountEl.classList.remove(\"hide\");\n } else {\n unreadCountEl.classList.add(\"hide\");\n }\n};\n","/**\n * This file contains the logic for handling postMessage events from the\n * child main.html of hs widget which is parent of webchat\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module helpers/postMessage.js\n */\n\nimport {\n API_EVENTS,\n WEBCHAT_EVENTS,\n CUSTOMER_EXPOSED_EVENTS,\n HELPCENTER_EVENTS\n} from \"constants/event\";\nimport {HS_WIDGET_DOMAIN} from \"constants/build\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport {callApiEventHandler, clearApiQueue, getHelpshiftConfig} from \"helpers/api\";\nimport {\n showLauncherButton,\n showWidgetIframe,\n updateWidgetCssVar,\n updateWidgetOptionsRelatedCssVars\n} from \"helpers/widgetCss\";\nimport {renderUnreadCount, toggleWidgetIframe} from \"helpers/iframe\";\nimport {WIDGET_TYPE} from \"constants/widget\";\nimport {LAUNCHER_BTN_PRIMARY_COLOR_LIGHT_75, LAUNCHER_BTN_PRIMARY_COLOR} from \"constants/widgetCss\";\nimport browserUtils from \"gunpowder/utils/browser\";\n\nconst IS_MOBILE = browserUtils.isMobile();\n\n/**\n * Handles whether HS widget should be opened in fullscreen mode or not\n *\n * @param {boolean} widgetIsFullscreen - If true, fullscreen config is passed by the customer\n * @param {boolean} hsWidgetIsOpenedInMobile - If true, HS widget is opened in mobile\n */\nexport const handleFullScreenConfig = (widgetIsFullscreen, hsWidgetIsOpenedInMobile) => {\n const hsWidgetIframe = document.querySelector(\"#hs-widget-iframe\");\n\n if (!widgetIsFullscreen && !hsWidgetIsOpenedInMobile) {\n hsWidgetIframe.classList.add(\"hs-widget-iframe\");\n hsWidgetIframe.classList.remove(\"hs-widget-iframe--fullscreen\");\n return;\n }\n\n hsWidgetIframe.classList.remove(\"hs-widget-iframe\");\n hsWidgetIframe.classList.add(\"hs-widget-iframe--fullscreen\");\n};\n\n/**\n * Updates primary color related css vars\n *\n * @param {Object} data - Event data\n * @param {string} data.primaryColor - Primary color set on B&C page on agent dashboard\n */\nconst _updatePrimaryColorRelatedCssVars = (data) => {\n updateWidgetCssVar(LAUNCHER_BTN_PRIMARY_COLOR_LIGHT_75.cssVarName, `${data.primaryColor}bf`);\n updateWidgetCssVar(LAUNCHER_BTN_PRIMARY_COLOR.cssVarName, data.primaryColor);\n};\n\n/**\n * Returns postmessage event data for HC and WC events\n * @param {Object} eventData - Post message event data\n */\nconst _getEventInfo = (eventData) => {\n // For WC events\n if (eventData.type) {\n return {\n type: eventData.type,\n data: eventData.data\n };\n }\n\n // For HC events\n if (eventData.eventType) {\n return {\n type: eventData.eventType,\n data: eventData.config\n };\n }\n};\n\nexport const onMessage = (event) => {\n if (event.origin !== HS_WIDGET_DOMAIN) {\n return;\n }\n\n let type, data;\n try {\n const eventData = JSON.parse(event.data);\n const eventInfo = _getEventInfo(eventData);\n\n type = eventInfo.type;\n data = eventInfo.data;\n } catch (exception) {\n // We are not handling any kind of exception if data parsing fails\n }\n\n switch (type) {\n case API_EVENTS.JS_LOADED:\n const {widgetOptions} = window.helpshiftWidgetConfig;\n\n middlewareState.updateState(window.helpshiftWidgetConfig);\n updateWidgetOptionsRelatedCssVars(widgetOptions);\n\n handleFullScreenConfig(widgetOptions?.fullScreen, IS_MOBILE);\n\n // send processed data to set in webchat config\n event.source.postMessage(\n JSON.stringify({\n type: API_EVENTS.SET_CONFIG,\n data: getHelpshiftConfig(window.helpshiftWidgetConfig)\n }),\n event.origin\n );\n break;\n\n case API_EVENTS.STORE_LS_DATA:\n {\n const {anonUserId, deviceId} = data;\n\n if (anonUserId) {\n middlewareState.updateState({\n anonUserId\n });\n }\n\n if (deviceId) {\n middlewareState.updateState({\n deviceId\n });\n }\n }\n break;\n\n case API_EVENTS.HS_WIDGET_TYPE_RESET:\n window.helpshiftWidgetConfig.widgetType = data.widgetType;\n break;\n\n case HELPCENTER_EVENTS.CLOSE:\n case WEBCHAT_EVENTS.SDK_EVENT_CLOSE_HELPSHIFT_WIDGET:\n {\n const {showLauncher} = middlewareState.getState().widgetOptions;\n showWidgetIframe(false);\n toggleWidgetIframe();\n showLauncherButton({launcherBtnShouldBeShown: true, showLauncher});\n renderUnreadCount();\n }\n break;\n\n case HELPCENTER_EVENTS.HELPCENTER_LOADED:\n {\n const {\n widgetOptions: {showLauncher},\n widgetType,\n apiQueue,\n sdkHasLoaded\n } = middlewareState.getState();\n\n if (!sdkHasLoaded) {\n if (widgetType === WIDGET_TYPE.HELPCENTER) {\n showLauncherButton({launcherBtnShouldBeShown: true, showLauncher});\n\n middlewareState.updateState({\n sdkHasLoaded: true\n });\n clearApiQueue(apiQueue);\n }\n\n _updatePrimaryColorRelatedCssVars({primaryColor: data.primaryColor});\n }\n }\n break;\n\n // SDK_CONFIG_LOADED corresponds to the event which gets triggered when Web Chat's\n // config has loaded. This is the internal event exposed from Web Chat\n case WEBCHAT_EVENTS.SDK_CONFIG_LOADED:\n {\n const {showLauncher, sdkHasLoaded} = middlewareState.getState().widgetOptions;\n\n if (!sdkHasLoaded) {\n showLauncherButton({launcherBtnShouldBeShown: true, showLauncher});\n\n const {apiQueue} = middlewareState.getState();\n middlewareState.updateState({\n sdkHasLoaded: true\n });\n clearApiQueue(apiQueue);\n }\n }\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CONVERSATION_RESOLVED:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CONVERSATION_RESOLVED);\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CONVERSATION_START:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CONVERSATION_START, {\n message: data.message\n });\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CONVERSATION_REJECTED:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CONVERSATION_REJECTED);\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CONVERSATION_REOPENED:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CONVERSATION_REOPENED);\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CSAT_SUBMIT:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CSAT_SUBMIT, {\n rating: data.rating,\n additionalFeedback: data.review\n });\n break;\n\n case WEBCHAT_EVENTS.SDK_USER_CHANGED_VIA_RE_ENGAGEMENT:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.USER_CHANGED, data.userInfo);\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_MESSAGE_ADD:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.MESSAGE_ADD, {\n type: data.type,\n body: data.body\n });\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_CONVERSATION_END:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.CONVERSATION_END);\n break;\n\n case WEBCHAT_EVENTS.SDK_UPDATE_UNREAD_COUNT:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.NEW_UNREAD_MESSAGES, {\n unreadCount: data.count\n });\n\n middlewareState.updateState({\n unreadMsgCount: data.count\n });\n renderUnreadCount();\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_UI_CONFIG_CHANGE:\n _updatePrimaryColorRelatedCssVars(data);\n\n break;\n\n case WEBCHAT_EVENTS.SDK_EVENT_SEND_GENERIC_SDK_DATA:\n callApiEventHandler(CUSTOMER_EXPOSED_EVENTS.GENERIC_SDK_DATA, data);\n break;\n }\n};\n","/**\n * This file contains all the customer exposed JS APIs handling\n *\n * @author Umang Govil \n * @created Jan 31, 2023\n * @module api\n */\n\nimport {\n createHsWidgetIframe,\n createHsWidgetLauncherButton,\n createHsWidgetWrapper,\n getHsWidgetIframeEl,\n renderUnreadCount,\n toggleWidgetIframe\n} from \"helpers/iframe\";\nimport {handleFullScreenConfig, onMessage} from \"helpers/postMessage\";\nimport {HS_WIDGET_URL} from \"constants/build\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport {callApiEventHandler, isEventSupported, resetRegisteredEvent} from \"helpers/api\";\nimport {\n showLauncherButton,\n showWidgetIframe,\n showUnreadCountEl,\n updateWidgetOptionsRelatedCssVars\n} from \"helpers/widgetCss\";\nimport {API_EVENTS} from \"constants/event\";\nimport {API_NAMES} from \"constants/api\";\nimport browserUtils from \"gunpowder/utils/browser\";\n\nconst IS_MOBILE = browserUtils.isMobile();\n\nconst init = () => {\n const hsWidgetIframeExists = getHsWidgetIframeEl();\n\n if (hsWidgetIframeExists) {\n return;\n }\n\n const hsWidgetWrapper = createHsWidgetWrapper();\n\n const hsWidgetIframe = createHsWidgetIframe(HS_WIDGET_URL);\n hsWidgetWrapper.appendChild(hsWidgetIframe);\n\n const hsWidgetLauncherButton = createHsWidgetLauncherButton();\n hsWidgetWrapper.appendChild(hsWidgetLauncherButton);\n\n const launcherButtonUnreadCountEl = document.createElement(\"span\");\n launcherButtonUnreadCountEl.classList.add(\"hs-widget-launcher-button-unread-count\", \"hide\");\n hsWidgetWrapper.appendChild(launcherButtonUnreadCountEl);\n\n document.body.appendChild(hsWidgetWrapper);\n\n // @TODO: feature/hs-widget-demo: Add relevant remove event listener\n hsWidgetLauncherButton.addEventListener(\"click\", () => {\n showWidgetIframe(true);\n toggleWidgetIframe();\n showLauncherButton({launcherBtnShouldBeShown: false});\n renderUnreadCount();\n });\n\n window.addEventListener(\"message\", onMessage);\n};\n\n/**\n * JS API to add supported events\n * @param {string} eventName - name of event\n * @param {Function} eventHandler - event handler\n */\nconst addEventListener = (eventName, eventHandler) => {\n const {apiEvents, eventRegister} = middlewareState.getState();\n\n if (isEventSupported(eventName) && eventHandler) {\n middlewareState.updateState({\n apiEvents: [...apiEvents, {eventName, eventHandler}]\n });\n }\n\n // If event has already occured for the current event\n // then call the handler with the registered data.\n // Reset the event in register once the handler is called.\n const registeredEvent = eventRegister[eventName];\n if (registeredEvent && registeredEvent.eventHasOccured) {\n callApiEventHandler(eventName, registeredEvent.data);\n resetRegisteredEvent(eventName);\n }\n};\n\n/**\n * JS API to remove supported events\n * @param {String} eventName - name of event\n * @param {Function} eventHandler - event handler\n */\nconst removeEventListener = (eventName, eventHandler) => {\n // If event name is supported, remove that event\n if (isEventSupported(eventName) && eventHandler) {\n const {apiEvents} = middlewareState.getState();\n middlewareState.updateState({\n apiEvents: apiEvents.filter((apiEvent) => {\n return !(apiEvent.eventName === eventName && apiEvent.eventHandler === eventHandler);\n })\n });\n }\n};\n\n/**\n * JS API to set greeting message\n * @param {String} message - greeting message\n */\nconst setGreetingMessage = (message) => {\n const hsWidgetIframe = getHsWidgetIframeEl();\n\n hsWidgetIframe.contentWindow.postMessage(\n JSON.stringify({\n type: API_EVENTS.CALL_WEBCHAT_JS_API,\n data: {\n apiName: API_NAMES.SET_GREETING_MSG,\n apiArgs: message\n }\n }),\n HS_WIDGET_URL\n );\n};\n\n/**\n * JS API to update helpshift widget config\n */\nconst updateHelpshiftWidgetConfig = () => {\n const hsWidgetIframe = getHsWidgetIframeEl();\n const {widgetOptions} = window.helpshiftWidgetConfig;\n\n // Earlier we were not handling some widget config options api in our code\n // like (fullscreen, zIndex, position) whenever we call it\n // using \"updateHelpshiftWidgetConfig\" api.\n // So, now we have handled it here just after we call \"updateHelpshiftWidgetConfig\" api.\n updateWidgetOptionsRelatedCssVars(widgetOptions);\n handleFullScreenConfig(widgetOptions?.fullScreen, IS_MOBILE);\n\n hsWidgetIframe.contentWindow.postMessage(\n JSON.stringify({\n type: API_EVENTS.UPDATE_HELPSHIFT_WIDGET_CONFIG,\n data: window.helpshiftWidgetConfig\n }),\n HS_WIDGET_URL\n );\n};\n\n/**\n * JS API to open the HS widget\n */\nconst open = () => {\n const {hsWidgetIframeWasHidden, hsWidgetLauncherButtonWasHidden} = middlewareState.getState();\n\n if (hsWidgetIframeWasHidden || hsWidgetLauncherButtonWasHidden) {\n return;\n }\n\n // We are using the value from showLauncher from window.helpshiftWidgetConfig\n // and not from middlewareState because `HelpshiftWidget(\"open\")` can be called\n // before the middlewareState is updated\n const {showLauncher} = window.helpshiftWidgetConfig?.widgetOptions || {};\n showWidgetIframe(true);\n toggleWidgetIframe();\n showLauncherButton({launcherBtnShouldBeShown: false, showLauncher});\n\n renderUnreadCount();\n};\n\n/**\n * JS API to close the HS widget\n */\nconst close = () => {\n const {hsWidgetIframeWasHidden, hsWidgetLauncherButtonWasHidden} = middlewareState.getState();\n if (hsWidgetIframeWasHidden || hsWidgetLauncherButtonWasHidden) {\n return;\n }\n\n // We are using the value from showLauncher from window.helpshiftWidgetConfig\n // and not from middlewareState because `HelpshiftWidget(\"close\")` can be called\n // before the middlewareState is updated\n const {showLauncher} = window.helpshiftWidgetConfig?.widgetOptions || {};\n showWidgetIframe(false);\n toggleWidgetIframe();\n showLauncherButton({launcherBtnShouldBeShown: true, showLauncher});\n\n renderUnreadCount();\n};\n\n/**\n * JS API to show the HS widget\n */\nconst show = () => {\n const hsWidgetIframe = getHsWidgetIframeEl();\n\n if (!hsWidgetIframe) {\n return;\n }\n\n const {hsWidgetIframeWasHidden, hsWidgetLauncherButtonWasHidden} = middlewareState.getState();\n\n // Here `hsWidgetIframeWasHidden` & `hsWidgetLauncherButtonWasHidden` are used to know out of\n // iframe and launcher button, which was hidden earlier so that based on that iframe or\n // launcher button can be made visible\n if (hsWidgetIframeWasHidden) {\n showWidgetIframe(true);\n } else if (hsWidgetLauncherButtonWasHidden) {\n const {showLauncher} = window.helpshiftWidgetConfig?.widgetOptions || {};\n showLauncherButton({launcherBtnShouldBeShown: true, showLauncher});\n }\n\n renderUnreadCount();\n\n middlewareState.updateState({\n hsWidgetIframeWasHidden: false,\n hsWidgetLauncherButtonWasHidden: false\n });\n};\n\n/**\n * JS API to hide the HS widget\n */\nconst hide = () => {\n const hsWidgetIframe = getHsWidgetIframeEl();\n const {hsWidgetIframeIsVisible, hsWidgetLauncherButtonIsVisible} = middlewareState.getState();\n\n if (!hsWidgetIframe) {\n return;\n }\n\n if (hsWidgetLauncherButtonIsVisible) {\n showLauncherButton({launcherBtnShouldBeShown: false});\n middlewareState.updateState({\n hsWidgetLauncherButtonWasHidden: true\n });\n } else if (hsWidgetIframeIsVisible) {\n showWidgetIframe(false);\n middlewareState.updateState({\n hsWidgetIframeWasHidden: true\n });\n }\n\n showUnreadCountEl(false);\n};\n\n/**\n * JS API mentioned in embed code of HS widget to indicate if\n * window.HelpshiftWidget function is already defined in the global scope or not\n */\nconst update = () => {\n // TODO: feature/hsbug-2639 - Add the relevant log or error after confirming with Product\n return;\n};\n\nexport const HELPSHIFT_WIDGET_APIS = {\n init,\n addEventListener,\n removeEventListener,\n setGreetingMessage,\n open,\n close,\n show,\n hide,\n updateHelpshiftWidgetConfig,\n update\n};\n","/**\n * This file exports svg icons\n *\n * @author Rehan \n * @created Jan 22, 2023\n * @module constants/build\n */\n\nexport const LAUNCHER_HS_ICON_SVG = `\n\n\n\n\n`;\n","/**\n * Api related constants\n *\n * @author Umang Govil \n * @created March 4, 2024\n * @module constants/api\n */\n\nexport const API_NAMES = {\n SET_GREETING_MSG: \"setGreetingMessage\"\n};\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js!./main.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js!./main.css\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * This file will load on the host page. It creates and appends the iframe\n * to the host page's document. It is responsible for communication between\n * the host and iframe. It also creates the Helpshift global object.\n *\n * @author Umang Govil \n * @created Dec 1, 2023\n * @module src/middleware.js\n */\n\nimport {JS_API_ERROR_MSG} from \"constants/error\";\nimport {HELPSHIFT_WIDGET_APIS} from \"api\";\nimport {isApiValid, getQueuedApisWithNames} from \"helpers/api\";\nimport {middlewareState} from \"singleton/middlewareState\";\nimport \"./styles/main.css\";\n\nconst INIT = \"init\";\n\n// Get APIs that were queued in the embed script\nconst apiQueueWithNames = getQueuedApisWithNames();\n\nconst initFromQueue = apiQueueWithNames.find((api) => api.name === INIT);\n\n// Strip \"init\" from the queue since it is a special API call, intended\n// to load the HC and WC\nmiddlewareState.updateState({\n apiQueue: apiQueueWithNames.filter((api) => api.name !== INIT).map((api) => api.fn)\n});\n\n/**\n * The global HelpshiftWidget function to handle the APIs. It relies on the\n * following invocation pattern.\n *\n * // Call the addMessage api\n * HelpshiftWidget (\"addMessage\", apiArguments)\n * where addMessage is the name of the API and apiArguments is the argument\n * that is further passed to the api call.\n *\n * The number of arguments passed to this function may vary depending on which\n * API is called. The API should throw exception(s) based on its requirements.\n * @returns - Value returned in Helpshift API.\n */\nwindow.HelpshiftWidget = function(api, ...apiArguments) {\n if (typeof api !== \"string\") {\n // Throw an error back to the client if an API is not called\n throw new Error(JS_API_ERROR_MSG.NO_API_NAME);\n } else if (typeof HELPSHIFT_WIDGET_APIS[api] !== \"function\") {\n // Throw an error if the API is not supported\n throw new Error(JS_API_ERROR_MSG.API_NOT_SUPPORTED + \" - \" + api);\n }\n\n // the API is init, then directly call the API\n // Else queue the API in sequence and call them after SDK config is loaded\n // Note :- Allowing init API because it's the first API that will be called\n const {sdkHasLoaded} = middlewareState.getState();\n if (sdkHasLoaded || api === INIT) {\n // Call the Helpshift widget api with the arguments\n return HELPSHIFT_WIDGET_APIS[api].apply(null, apiArguments);\n } else if (isApiValid(api)) {\n // Queue the API, if it's valid\n const {apiQueue} = middlewareState.getState();\n const apiToQueue = HELPSHIFT_WIDGET_APIS[api].bind(null, ...apiArguments);\n\n middlewareState.updateState({\n apiQueue: apiQueue.concat(apiToQueue)\n });\n }\n};\n\nif (initFromQueue) {\n initFromQueue.fn();\n}\n","/**\n * Error constants\n *\n * @author Umang Govil \n * @created Jan 31, 2023\n * @module constants/error\n */\n\nexport const JS_API_ERROR_MSG = {\n NO_API_NAME: \"API name is not passed with the Helpshift Widget call\",\n API_NOT_SUPPORTED: \"The API name passed with the Helpshift Widget call is not supported\"\n};\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","options","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","domAPI","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","insert","style","target","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","e","getTarget","Error","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","prop","prototype","hasOwnProperty","call","nc","cloneDeep","_typeof","copy","Array","isArray","WIDGET_POSITIONS","middlewareState","State","initialState","_classCallCheck","state","value","newState","_objectSpread","domain","platformId","language","appId","userId","userName","userEmail","userAuthToken","widgetOptions","showLauncher","fullScreen","position","zIndex","fullPrivacy","initiateChatOnLoad","eventRegister","apiEvents","initialUserMessage","cifs","tags","conversationPrefillText","clearAnonymousUserOnLogin","apiQueue","sdkHasLoaded","deviceId","anonUserId","hsWidgetIframeIsVisible","hsWidgetLauncherButtonIsVisible","hsWidgetIframeWasHidden","hsWidgetLauncherButtonWasHidden","unreadMsgCount","pcWidgetConfig","CUSTOMER_EXPOSED_EVENTS","CONVERSATION_RESOLVED","CONVERSATION_START","CONVERSATION_REJECTED","CONVERSATION_REOPENED","CSAT_SUBMIT","USER_CHANGED","MESSAGE_ADD","CONVERSATION_END","NEW_UNREAD_MESSAGES","WIDGET_TOGGLE","GENERIC_SDK_DATA","isApiValid","HELPSHIFT_WIDGET_APIS","clearApiQueue","forEach","fn","updateState","callApiEventHandler","eventName","eventData","_middlewareState$getS","getState","eventToBeCalled","find","apiEvent","eventHandler","cumulativeEventData","currentEventRegister","eventHasOccured","isEventSupported","values","some","currentEventName","getHelpshiftConfig","_data$widgetOptions","_data$pcWidgetConfig","_data$pcWidgetConfig2","_data$pcWidgetConfig3","helpshiftConfig","widgetSdkConfig","widgetType","version","widgetPlatform","helpcenterConfig","faqId","sectionId","pluginType","pluginVersion","keyToBeDeleted","PAYLOAD_DATA","test","navigator","userAgent","nav","languages","userLanguage","destObj","srcObj","only","keys","skip","indexOf","_queryStringify","qs","_isSuccess","statusCode","_shouldXhrAutoRetry","retryConfig","shouldRetryHappen","autoRetryCounter","maxRetryCount","_autoRetryXhr","params","setTimeout","recurXhr","bind","assign","autoRetryXhrTimeout","timeoutMultiplier","formParams","x","XMLHttpRequest","url","route","method","parse","open","setRequestHeader","headers","onreadystatechange","response","readyState","status","onSuccess","responseText","context","onAbort","onFailure","autoRetry","onEnd","send","postAnalyticsXhrRoute","_fireTrackingXhr","eventPayload","_middlewareState$getS2","defaultPayload","developerSetLanguage","browserUtils","payload","_defineProperty","Date","now","customXhrData","fullPrivacyIsEnabled","commonXhrData","did","uid","user_auth_token","email","objectUtils","getPreparedXhrData","_getDefaultPayload","xhr","Accept","authorization","renderUnreadCount","launcherButtonUnreadCountEl","innerHTML","classList","add","getHsWidgetIframeEl","getElementById","toggleWidgetIframe","_middlewareState$getS3","wt","t","ts","trackEvent","visible","URL","host","pathname","protocol","INDEX_HTML_PATH","PARENT_ORIGIN_QUERY_STRING","location","origin","HS_WIDGET_DOMAIN","HS_WIDGET_URL","IFRAME_POSITION_CONFIG","cssVarName","LAUNCHER_BTN_POSITION_CONFIG","SHOW_LAUNCHER_CONFIG","true","false","updateWidgetCssVar","setProperty","updateWidgetOptionsRelatedCssVars","showLauncherButton","_ref2","launcherBtnShouldBeShown","hsWidgetLauncherButtonShouldBeVisible","_ref","_shouldHsWidgetLauncherButtonBeVisible","String","showWidgetIframe","widgetIframeShouldBeShown","hsWidgetIframe","hsWidgetWasOpened","IS_MOBILE","handleFullScreenConfig","widgetIsFullscreen","hsWidgetIsOpenedInMobile","_updatePrimaryColorRelatedCssVars","primaryColor","onMessage","event","type","eventInfo","eventType","config","exception","helpshiftWidgetConfig","source","postMessage","_data","message","rating","additionalFeedback","review","userInfo","body","unreadCount","init","widgetWrapper","hsWidgetUrl","iframe","hsWidgetWrapper","src","hsWidgetLauncherButton","launcherButton","launcherIconEl","createHsWidgetLauncherButton","addEventListener","registeredEvent","resetRegisteredEvent","removeEventListener","filter","setGreetingMessage","contentWindow","apiName","apiArgs","_window$helpshiftWidg","close","_window$helpshiftWidg2","_middlewareState$getS4","show","_middlewareState$getS5","_window$helpshiftWidg3","hide","_middlewareState$getS6","updateHelpshiftWidgetConfig","locals","HS","validApiQueue","INIT","apiQueueWithNames","HelpshiftWidget","q","queuedArgs","queuedArgsLen","args","slice","apiFn","name","initFromQueue","JS_API_ERROR_MSG","_len","arguments","apiArguments","_key","_HELPSHIFT_WIDGET_API","apiToQueue"],"sourceRoot":""}