From b0b09754258a46a14c481b377a9ce3d7a41b10e7 Mon Sep 17 00:00:00 2001 From: Lukas Boehler Date: Fri, 7 Oct 2022 14:21:32 +0200 Subject: [PATCH] v8.0.21 --- build/index.js | 2 +- package.json | 2 +- published/latest/index.js | 2 +- src/GleapNotificationManager.js | 10 ++++++++++ src/UI.js | 33 ++++++++++++++++++++++++++++++--- 5 files changed, 43 insertions(+), 6 deletions(-) diff --git a/build/index.js b/build/index.js index ede17afa..7d6eab10 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gleap=t():e.Gleap=t()}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nvt});var r=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),r=i[0],a=i[1],o=i[2],s=[parseInt(r,16)+t,parseInt(a,16)+t,parseInt(o,16)+t];r=s[0],a=s[1],o=s[2],r=Math.max(Math.min(255,r),0).toString(16),a=Math.max(Math.min(255,a),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(r.length<2?"0":"")+r,l=(a.length<2?"0":"")+a,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},a=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=a(e),u=a(n),d=a(o),p="#ffffff"===d,h=r(o,p?100:-120),f=r(o,p?30:-12),b=r(o,p?80:-30),g=(i=parseInt(i,10),Math.round(1.05*i)),v=Math.round(.4*i),m=Math.round(.25*i),y="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: 375px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 500px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(v,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n line-height: 20px;\n color: ").concat(h,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(m,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(m,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(g,"px;\n background-color: ").concat(f,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(f,";\n }\n .bb-tooltip {\n border-radius: ").concat(v,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(b,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(g,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(h,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(f,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(v,"px;\n border-top-right-radius: ").concat(v,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),w=document.querySelector(".gleap-styles");w&&w.remove();var k=document.createElement("style");k.innerHTML=y,k.className="gleap-styles",document.body.appendChild(k)},s=function(e,t){return"button"===e?'':"dismiss"===e?'\n \n ':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(a){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(a){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,r=i.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:a},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,r){var a=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){r()},o.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>o.width/4&&(r=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>r&&(l*=r/c,c=r):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(i=' id="'.concat(a,'"'));var o=e.getAttribute("class");o&&(r=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(r){}if(t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},Q.getInstance().sendMessage({name:"session-cleared"},!0),at.getInstance().clearAllNotifications(!1),at.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,r=new XMLHttpRequest;r.open("POST",i.apiUrl+"/sessions"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(r.setRequestHeader("Gleap-Id",t.session.gleapId),r.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(a){}r.onreadystatechange=function(t){if(4===r.readyState)if(200===r.status||201===r.status)try{var n=JSON.parse(r.responseText);i.validateSession(n)}catch(a){}else 429!==r.status&&i.clearSession(e,!0)},r.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),r=0;r0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var r=JSON.parse(i.responseText),a=r.a,o=r.u;Q.getInstance().isOpened()||(a&>.getInstance().performActions(a),null!=o&&at.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var r=te.getInstance().getSessionDuration();i.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:Q.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),i=1;i0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}a(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=a.querySelectorAll("link[rel=import]");for(r=0;r0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=a.querySelectorAll("script, noscript");for(r=0;r"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle()})))})),Y(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--survey-full",i="gleap-frame-container--classic",r="gleap-frame-container--classic-left",a="gleap-frame-container--modern-left",o="gleap-frame-container--no-button",s=[i,r,a,o,e,n],c=0;c1&&void 0!==arguments[1]&&arguments[1];this.gleapFrame?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Je.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Xe(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){for(var e=0;e0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Ie.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var r=t.data.formData,a=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(a.feedbackType,"MEDIUM",r,!1,a.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),xe.notifyEvent("feedback-sent",r)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),xe.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Je.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Q.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Q.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&fe(t.prototype,n),i&&fe(t,i),e}();function ve(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=gt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),r=1;r10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var r=n.pop();if("boolean"==typeof r)i+=4;else if("string"==typeof r)i+=2*r.length;else if("number"==typeof r)i+=8;else if("object"===Oe(r)&&-1===t.indexOf(r))for(var a in t.push(r),r)n.push(r[a])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var r,a=Fe(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Fe(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){a.e(E)}finally{a.f()}var p,h=[],f=Fe(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(a=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",a),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,r=0,a=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&je(t.prototype,n),i&&je(t,i),e}();function _e(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Je.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Je.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Je.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Je.translateText("Retry"),'
\n
').concat(Je.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(gt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),We.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new He(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=i[o],s=a.getAttribute("data-color");a.style.backgroundColor=s,a.onclick=function(){a&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=a.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&>.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(o),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(a=r(o[0]))}return a&&a[t]?a[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,Q.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),ge.getInstance().updateFeedbackButtonState(),Q.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Ze(t.prototype,n),i&&Ze(t,i),e}();function Ye(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){Q.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,ge.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);for(var t=function(){var t=e.notifications[n];i=(i=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var r=document.createElement("div");r.onclick=function(){t.data.conversation?gt.openConversation(t.data.conversation.shareToken):t.data.news?gt.openNewsArticle(t.data.news.id):gt.open()},r.className="gleap-notification-item",r.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(i,"
\n
"),e.notificationContainer.appendChild(r)},n=0;n0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===ge.getInstance().buttonHidden?e.feedbackButtonPosition===ge.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):ge.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&it(t.prototype,n),i&&it(t,i),e}();function ot(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";oe.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Be.getInstance().stop(),R.getInstance().stop(),Q.getInstance().destroy(),ge.getInstance().toggleFeedbackButton(!1),at.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"isOpened",value:function(){return Q.getInstance().isOpened()}},{key:"hide",value:function(){Q.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){Q.getInstance().hideWidget()}},{key:"open",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);nt.getInstance().formPreFill=t,Q.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){xe.on(e,t)}},{key:"enableShortcuts",value:function(e){e?$e.getInstance().start():$e.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){ge.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){te.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){te.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){Q.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ye.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ye.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ye.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ye.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Je.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Ie.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Ie.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,0,n,r,i,a,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=i?b(i):{},a=I.getInstance();if(a.ready){var o=e||{};a.session.email&&(o.reportedBy=a.session.email);var s=new V("CRASH",n,o,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.actionOutboundId,a=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),Q.getInstance().setAppMode(i?s:"widget"),Q.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:r,hideBackButton:o,format:s}}),a?Q.getInstance().showDrawingScreen("screenshot"):Q.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}}),Q.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news-article",data:{id:e}}),Q.getInstance().showWidget())}},{key:"openNews",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news"}),Q.getInstance().showWidget()}},{key:"showNotification",value:function(e){at.getInstance().showNotification(e),e&&e.sound&&st.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){ge.getInstance().injectedFeedbackButton=!1,Q.getInstance().injectedFrame=!1,D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var ft=0;ft{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nvt});var r=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),r=i[0],a=i[1],o=i[2],s=[parseInt(r,16)+t,parseInt(a,16)+t,parseInt(o,16)+t];r=s[0],a=s[1],o=s[2],r=Math.max(Math.min(255,r),0).toString(16),a=Math.max(Math.min(255,a),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(r.length<2?"0":"")+r,l=(a.length<2?"0":"")+a,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},a=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=a(e),u=a(n),d=a(o),p="#ffffff"===d,h=r(o,p?100:-120),f=r(o,p?30:-12),b=r(o,p?80:-30),g=(i=parseInt(i,10),Math.round(1.05*i)),v=Math.round(.4*i),m=Math.round(.25*i),y="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: 375px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 500px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 30px;\n height: 30px;\n background-color: ").concat(h,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(v,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n line-height: 20px;\n color: ").concat(h,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(m,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(m,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(g,"px;\n background-color: ").concat(f,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(f,";\n }\n .bb-tooltip {\n border-radius: ").concat(v,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(b,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(g,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(h,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(f,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(v,"px;\n border-top-right-radius: ").concat(v,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),w=document.querySelector(".gleap-styles");w&&w.remove();var k=document.createElement("style");k.innerHTML=y,k.className="gleap-styles",document.body.appendChild(k)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(a){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(a){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,r=i.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:a},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,r){var a=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){r()},o.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>o.width/4&&(r=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>r&&(l*=r/c,c=r):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(i=' id="'.concat(a,'"'));var o=e.getAttribute("class");o&&(r=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(r){}if(t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},Q.getInstance().sendMessage({name:"session-cleared"},!0),at.getInstance().clearAllNotifications(!1),at.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,r=new XMLHttpRequest;r.open("POST",i.apiUrl+"/sessions"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(r.setRequestHeader("Gleap-Id",t.session.gleapId),r.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(a){}r.onreadystatechange=function(t){if(4===r.readyState)if(200===r.status||201===r.status)try{var n=JSON.parse(r.responseText);i.validateSession(n)}catch(a){}else 429!==r.status&&i.clearSession(e,!0)},r.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),r=0;r0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var r=JSON.parse(i.responseText),a=r.a,o=r.u;Q.getInstance().isOpened()||(a&>.getInstance().performActions(a),null!=o&&at.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var r=te.getInstance().getSessionDuration();i.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:Q.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),i=1;i0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}a(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=a.querySelectorAll("link[rel=import]");for(r=0;r0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=a.querySelectorAll("script, noscript");for(r=0;r"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle()})))})),Y(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--survey-full",i="gleap-frame-container--classic",r="gleap-frame-container--classic-left",a="gleap-frame-container--modern-left",o="gleap-frame-container--no-button",s=[i,r,a,o,e,n],c=0;c1&&void 0!==arguments[1]&&arguments[1];this.gleapFrame?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Je.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Xe(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){for(var e=0;e0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Ie.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var r=t.data.formData,a=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(a.feedbackType,"MEDIUM",r,!1,a.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),xe.notifyEvent("feedback-sent",r)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),xe.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Je.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Q.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Q.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&fe(t.prototype,n),i&&fe(t,i),e}();function ve(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=gt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),r=1;r10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var r=n.pop();if("boolean"==typeof r)i+=4;else if("string"==typeof r)i+=2*r.length;else if("number"==typeof r)i+=8;else if("object"===Oe(r)&&-1===t.indexOf(r))for(var a in t.push(r),r)n.push(r[a])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var r,a=Fe(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Fe(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){a.e(E)}finally{a.f()}var p,h=[],f=Fe(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(a=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",a),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,r=0,a=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&je(t.prototype,n),i&&je(t,i),e}();function _e(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Je.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Je.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Je.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Je.translateText("Retry"),'
\n
').concat(Je.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(gt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),We.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new He(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=i[o],s=a.getAttribute("data-color");a.style.backgroundColor=s,a.onclick=function(){a&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=a.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&>.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(o),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(a=r(o[0]))}return a&&a[t]?a[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,Q.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),ge.getInstance().updateFeedbackButtonState(),Q.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Ze(t.prototype,n),i&&Ze(t,i),e}();function Ye(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){Q.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,ge.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];r=(r=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?gt.openConversation(t.data.conversation.shareToken):t.data.news?gt.openNewsArticle(t.data.news.id):gt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(r,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===ge.getInstance().buttonHidden?e.feedbackButtonPosition===ge.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):ge.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&it(t.prototype,n),i&&it(t,i),e}();function ot(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";oe.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Be.getInstance().stop(),R.getInstance().stop(),Q.getInstance().destroy(),ge.getInstance().toggleFeedbackButton(!1),at.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"isOpened",value:function(){return Q.getInstance().isOpened()}},{key:"hide",value:function(){Q.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){Q.getInstance().hideWidget()}},{key:"open",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);nt.getInstance().formPreFill=t,Q.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){xe.on(e,t)}},{key:"enableShortcuts",value:function(e){e?$e.getInstance().start():$e.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){ge.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){te.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){te.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){Q.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ye.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ye.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ye.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ye.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Je.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Ie.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Ie.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,0,n,r,i,a,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=i?b(i):{},a=I.getInstance();if(a.ready){var o=e||{};a.session.email&&(o.reportedBy=a.session.email);var s=new V("CRASH",n,o,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.actionOutboundId,a=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),Q.getInstance().setAppMode(i?s:"widget"),Q.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:r,hideBackButton:o,format:s}}),a?Q.getInstance().showDrawingScreen("screenshot"):Q.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}}),Q.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news-article",data:{id:e}}),Q.getInstance().showWidget())}},{key:"openNews",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news"}),Q.getInstance().showWidget()}},{key:"showNotification",value:function(e){at.getInstance().showNotification(e),e&&e.sound&&st.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){ge.getInstance().injectedFeedbackButton=!1,Q.getInstance().injectedFrame=!1,D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var ft=0;ft{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nvt});var r=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),r=i[0],a=i[1],o=i[2],s=[parseInt(r,16)+t,parseInt(a,16)+t,parseInt(o,16)+t];r=s[0],a=s[1],o=s[2],r=Math.max(Math.min(255,r),0).toString(16),a=Math.max(Math.min(255,a),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(r.length<2?"0":"")+r,l=(a.length<2?"0":"")+a,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},a=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=a(e),u=a(n),d=a(o),p="#ffffff"===d,h=r(o,p?100:-120),f=r(o,p?30:-12),b=r(o,p?80:-30),g=(i=parseInt(i,10),Math.round(1.05*i)),v=Math.round(.4*i),m=Math.round(.25*i),y="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: 375px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 500px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(v,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n line-height: 20px;\n color: ").concat(h,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(m,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(m,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(g,"px;\n background-color: ").concat(f,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(f,";\n }\n .bb-tooltip {\n border-radius: ").concat(v,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(b,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(g,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(h,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(f,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(v,"px;\n border-top-right-radius: ").concat(v,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),w=document.querySelector(".gleap-styles");w&&w.remove();var k=document.createElement("style");k.innerHTML=y,k.className="gleap-styles",document.body.appendChild(k)},s=function(e,t){return"button"===e?'':"dismiss"===e?'\n \n ':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(a){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(a){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,r=i.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:a},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,r){var a=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){r()},o.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>o.width/4&&(r=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>r&&(l*=r/c,c=r):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(i=' id="'.concat(a,'"'));var o=e.getAttribute("class");o&&(r=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(r){}if(t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},Q.getInstance().sendMessage({name:"session-cleared"},!0),at.getInstance().clearAllNotifications(!1),at.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,r=new XMLHttpRequest;r.open("POST",i.apiUrl+"/sessions"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(r.setRequestHeader("Gleap-Id",t.session.gleapId),r.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(a){}r.onreadystatechange=function(t){if(4===r.readyState)if(200===r.status||201===r.status)try{var n=JSON.parse(r.responseText);i.validateSession(n)}catch(a){}else 429!==r.status&&i.clearSession(e,!0)},r.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),r=0;r0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var r=JSON.parse(i.responseText),a=r.a,o=r.u;Q.getInstance().isOpened()||(a&>.getInstance().performActions(a),null!=o&&at.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var r=te.getInstance().getSessionDuration();i.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:Q.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),i=1;i0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}a(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=a.querySelectorAll("link[rel=import]");for(r=0;r0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=a.querySelectorAll("script, noscript");for(r=0;r"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle()})))})),Y(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--survey-full",i="gleap-frame-container--classic",r="gleap-frame-container--classic-left",a="gleap-frame-container--modern-left",o="gleap-frame-container--no-button",s=[i,r,a,o,e,n],c=0;c1&&void 0!==arguments[1]&&arguments[1];this.gleapFrame?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Je.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Xe(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){for(var e=0;e0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Ie.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var r=t.data.formData,a=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(a.feedbackType,"MEDIUM",r,!1,a.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),xe.notifyEvent("feedback-sent",r)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),xe.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Je.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Q.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Q.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&fe(t.prototype,n),i&&fe(t,i),e}();function ve(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=gt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),r=1;r10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var r=n.pop();if("boolean"==typeof r)i+=4;else if("string"==typeof r)i+=2*r.length;else if("number"==typeof r)i+=8;else if("object"===Oe(r)&&-1===t.indexOf(r))for(var a in t.push(r),r)n.push(r[a])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var r,a=Fe(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Fe(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){a.e(E)}finally{a.f()}var p,h=[],f=Fe(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(a=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",a),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,r=0,a=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&je(t.prototype,n),i&&je(t,i),e}();function _e(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Je.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Je.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Je.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Je.translateText("Retry"),'
\n
').concat(Je.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(gt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),We.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new He(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=i[o],s=a.getAttribute("data-color");a.style.backgroundColor=s,a.onclick=function(){a&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=a.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&>.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(o),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(a=r(o[0]))}return a&&a[t]?a[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,Q.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),ge.getInstance().updateFeedbackButtonState(),Q.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Ze(t.prototype,n),i&&Ze(t,i),e}();function Ye(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){Q.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,ge.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);for(var t=function(){var t=e.notifications[n];i=(i=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var r=document.createElement("div");r.onclick=function(){t.data.conversation?gt.openConversation(t.data.conversation.shareToken):t.data.news?gt.openNewsArticle(t.data.news.id):gt.open()},r.className="gleap-notification-item",r.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(i,"
\n
"),e.notificationContainer.appendChild(r)},n=0;n0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===ge.getInstance().buttonHidden?e.feedbackButtonPosition===ge.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):ge.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&it(t.prototype,n),i&&it(t,i),e}();function ot(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";oe.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Be.getInstance().stop(),R.getInstance().stop(),Q.getInstance().destroy(),ge.getInstance().toggleFeedbackButton(!1),at.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"isOpened",value:function(){return Q.getInstance().isOpened()}},{key:"hide",value:function(){Q.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){Q.getInstance().hideWidget()}},{key:"open",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);nt.getInstance().formPreFill=t,Q.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){xe.on(e,t)}},{key:"enableShortcuts",value:function(e){e?$e.getInstance().start():$e.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){ge.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){te.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){te.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){Q.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ye.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ye.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ye.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ye.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Je.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Ie.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Ie.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,0,n,r,i,a,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=i?b(i):{},a=I.getInstance();if(a.ready){var o=e||{};a.session.email&&(o.reportedBy=a.session.email);var s=new V("CRASH",n,o,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.actionOutboundId,a=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),Q.getInstance().setAppMode(i?s:"widget"),Q.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:r,hideBackButton:o,format:s}}),a?Q.getInstance().showDrawingScreen("screenshot"):Q.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}}),Q.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news-article",data:{id:e}}),Q.getInstance().showWidget())}},{key:"openNews",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news"}),Q.getInstance().showWidget()}},{key:"showNotification",value:function(e){at.getInstance().showNotification(e),e&&e.sound&&st.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){ge.getInstance().injectedFeedbackButton=!1,Q.getInstance().injectedFrame=!1,D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var ft=0;ft{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nvt});var r=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),r=i[0],a=i[1],o=i[2],s=[parseInt(r,16)+t,parseInt(a,16)+t,parseInt(o,16)+t];r=s[0],a=s[1],o=s[2],r=Math.max(Math.min(255,r),0).toString(16),a=Math.max(Math.min(255,a),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(r.length<2?"0":"")+r,l=(a.length<2?"0":"")+a,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},a=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=a(e),u=a(n),d=a(o),p="#ffffff"===d,h=r(o,p?100:-120),f=r(o,p?30:-12),b=r(o,p?80:-30),g=(i=parseInt(i,10),Math.round(1.05*i)),v=Math.round(.4*i),m=Math.round(.25*i),y="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: 375px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 500px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 30px;\n height: 30px;\n background-color: ").concat(h,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(v,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n line-height: 20px;\n color: ").concat(h,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(m,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(m,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(g,"px;\n background-color: ").concat(f,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(f,";\n }\n .bb-tooltip {\n border-radius: ").concat(v,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(b,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(g,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(h,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(v,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(f,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(v,"px;\n border-top-right-radius: ").concat(v,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),w=document.querySelector(".gleap-styles");w&&w.remove();var k=document.createElement("style");k.innerHTML=y,k.className="gleap-styles",document.body.appendChild(k)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(a){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(a){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,r=i.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:a},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,r){var a=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){r()},o.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>o.width/4&&(r=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>r&&(l*=r/c,c=r):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(i=' id="'.concat(a,'"'));var o=e.getAttribute("class");o&&(r=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(r){}if(t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},Q.getInstance().sendMessage({name:"session-cleared"},!0),at.getInstance().clearAllNotifications(!1),at.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,r=new XMLHttpRequest;r.open("POST",i.apiUrl+"/sessions"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(r.setRequestHeader("Gleap-Id",t.session.gleapId),r.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(a){}r.onreadystatechange=function(t){if(4===r.readyState)if(200===r.status||201===r.status)try{var n=JSON.parse(r.responseText);i.validateSession(n)}catch(a){}else 429!==r.status&&i.clearSession(e,!0)},r.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),r=0;r0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var r=JSON.parse(i.responseText),a=r.a,o=r.u;Q.getInstance().isOpened()||(a&>.getInstance().performActions(a),null!=o&&at.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var r=te.getInstance().getSessionDuration();i.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:Q.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),i=1;i0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}a(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=a.querySelectorAll("link[rel=import]");for(r=0;r0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=a.querySelectorAll("script, noscript");for(r=0;r"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle()})))})),Y(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--survey-full",i="gleap-frame-container--classic",r="gleap-frame-container--classic-left",a="gleap-frame-container--modern-left",o="gleap-frame-container--no-button",s=[i,r,a,o,e,n],c=0;c1&&void 0!==arguments[1]&&arguments[1];this.gleapFrame?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Je.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Xe(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){for(var e=0;e0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Ie.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var r=t.data.formData,a=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(a.feedbackType,"MEDIUM",r,!1,a.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),xe.notifyEvent("feedback-sent",r)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),xe.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Je.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Q.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Q.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&fe(t.prototype,n),i&&fe(t,i),e}();function ve(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=gt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),r=1;r10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var r=n.pop();if("boolean"==typeof r)i+=4;else if("string"==typeof r)i+=2*r.length;else if("number"==typeof r)i+=8;else if("object"===Oe(r)&&-1===t.indexOf(r))for(var a in t.push(r),r)n.push(r[a])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var r,a=Fe(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Fe(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){a.e(E)}finally{a.f()}var p,h=[],f=Fe(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(a=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",a),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,r=0,a=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&je(t.prototype,n),i&&je(t,i),e}();function _e(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Je.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Je.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Je.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Je.translateText("Retry"),'
\n
').concat(Je.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Je.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(gt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),We.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new He(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=i[o],s=a.getAttribute("data-color");a.style.backgroundColor=s,a.onclick=function(){a&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=a.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&>.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(o),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(a=r(o[0]))}return a&&a[t]?a[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,Q.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),ge.getInstance().updateFeedbackButtonState(),Q.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Ze(t.prototype,n),i&&Ze(t,i),e}();function Ye(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){Q.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,ge.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];r=(r=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?gt.openConversation(t.data.conversation.shareToken):t.data.news?gt.openNewsArticle(t.data.news.id):gt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(r,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==ge.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===ge.getInstance().buttonHidden?e.feedbackButtonPosition===ge.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):ge.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&it(t.prototype,n),i&&it(t,i),e}();function ot(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";oe.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Be.getInstance().stop(),R.getInstance().stop(),Q.getInstance().destroy(),ge.getInstance().toggleFeedbackButton(!1),at.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"isOpened",value:function(){return Q.getInstance().isOpened()}},{key:"hide",value:function(){Q.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){Q.getInstance().hideWidget()}},{key:"open",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);nt.getInstance().formPreFill=t,Q.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){xe.on(e,t)}},{key:"enableShortcuts",value:function(e){e?$e.getInstance().start():$e.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){ge.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){te.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){te.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){Q.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ye.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ye.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ye.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ye.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Je.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Ie.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Ie.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,0,n,r,i,a,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=i?b(i):{},a=I.getInstance();if(a.ready){var o=e||{};a.session.email&&(o.reportedBy=a.session.email);var s=new V("CRASH",n,o,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.actionOutboundId,a=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),Q.getInstance().setAppMode(i?s:"widget"),Q.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:r,hideBackButton:o,format:s}}),a?Q.getInstance().showDrawingScreen("screenshot"):Q.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}}),Q.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news-article",data:{id:e}}),Q.getInstance().showWidget())}},{key:"openNews",value:function(){Q.getInstance().setAppMode("widget"),Q.getInstance().sendMessage({name:"open-news"}),Q.getInstance().showWidget()}},{key:"showNotification",value:function(e){at.getInstance().showNotification(e),e&&e.sound&&st.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){ge.getInstance().injectedFeedbackButton=!1,Q.getInstance().injectedFrame=!1,D.getInstance().start().then((function(){Q.getInstance().injectFrame()})).catch((function(e){}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var ft=0;ft { + this.clearAllNotifications(); + }; + clearElem.className = "gleap-notification-close"; + clearElem.innerHTML = loadIcon("dismiss"); + this.notificationContainer.appendChild(clearElem); + // Render the notifications. for (var i = 0; i < this.notifications.length; i++) { const notification = this.notifications[i]; diff --git a/src/UI.js b/src/UI.js index 7a318665..993285d8 100644 --- a/src/UI.js +++ b/src/UI.js @@ -208,6 +208,35 @@ export const injectStyledCSS = ( animation-name: bbFadeInOpacity; } + .gleap-notification-close { + border-radius: 100%; + width: 30px; + height: 30px; + background-color: ${subTextColor}; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 8px; + cursor: pointer; + visibility: hidden; + pointer-events: none; + } + + .gleap-notification-container:hover .gleap-notification-close { + visibility: visible; + pointer-events: auto; + animation-duration: 0.7s; + animation-fill-mode: both; + animation-name: bbFadeInOpacity; + } + + .gleap-notification-close svg { + width: 45%; + height: 45%; + object-fit: contain; + fill: ${backgroundColor}; + } + .gleap-notification-item { display: flex; align-items: flex-end; @@ -1185,9 +1214,7 @@ export const loadIcon = function (name, color) { } if (name === "dismiss") { - return ` - - `; + return ``; } if (name === "blur") {