gleap 13.2.0 → 13.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1 +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 o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.d(t,{default:()=>Kt});var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"feedbackButton",null),o(this,"injectedFeedbackButton",!1),o(this,"buttonHidden",null),o(this,"lastButtonIcon",null)}var t,r,a;return t=e,a=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(r=[{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),dt.getInstance().updateContainerStyle()}},{key:"feedbackButtonPressed",value:function(){var e=ae.getInstance();e.isOpened()?e.hideWidget():(e.setAppMode("widget"),e.showWidget())}},{key:"injectFeedbackButton",value:function(){var e=this;if(!this.injectedFeedbackButton){this.injectedFeedbackButton=!0;var t=document.createElement("div");t.onclick=function(){e.feedbackButtonPressed()},document.body.appendChild(t),this.feedbackButton=t,this.updateFeedbackButtonState()}}},{key:"updateNotificationBadge",value:function(e){var t=document.querySelector(".bb-notification-bubble");if(t){var n="bb-notification-bubble--hidden";e>0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"refresh",value:function(){document.querySelector(".bb-feedback-button")?(this.updateFeedbackButtonText(),this.updateFeedbackButtonState()):(this.injectedFeedbackButton=!1,this.injectFeedbackButton())}},{key:"updateFeedbackButtonText",value:function(){var t=B.getInstance().getFlowConfig();if(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT){var n=document.querySelector(".bb-feedback-button-classic");n&&(n.innerText=t.widgetButtonText)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=B.getInstance().getFlowConfig(),n="";n=t.buttonLogo?'<img class="bb-logo-logo" src="'.concat(t.buttonLogo,'" alt="Feedback Button" />'):d("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-font gl-block",this.feedbackButton.setAttribute("dir",nt.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.classList.add("bb-feedback-button--classic-button-style"),this.feedbackButton.innerHTML='<div class="bb-feedback-button-classic '.concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?"bb-feedback-button-classic--left":"").concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM?"bb-feedback-button-classic--bottom":"",'">').concat(t.widgetButtonText,"</div>")):n!==this.lastButtonIcon&&(this.feedbackButton.innerHTML='<div class="bb-feedback-button-icon">'.concat(n).concat(d("arrowdown","#fff"),'</div><div class="bb-notification-bubble bb-notification-bubble--hidden"></div>')),this.lastButtonIcon=n;var o=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(o=!0):e.getInstance().buttonHidden&&(o=!0),o&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ae.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=ae.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||E.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&n(t.prototype,r),a&&n(t,a),e}();function a(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 o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(c){s=!0,r=c}finally{try{i||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,o=new Array(t);n<t;n++)o[n]=e[n];return o}o(r,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),o(r,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),o(r,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),o(r,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),o(r,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),o(r,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),o(r,"instance",void 0);var c=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var n=a(e.match(/.{2}/g),3),o=n[0],r=n[1],i=n[2],s=[parseInt(o,16)+t,parseInt(r,16)+t,parseInt(i,16)+t];o=s[0],r=s[1],i=s[2],o=Math.max(Math.min(255,o),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var c=(o.length<2?"0":"")+o,l=(r.length<2?"0":"")+r,u=(i.length<2?"0":"")+i;return"#".concat(c).concat(l).concat(u)},l=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"},u=function(e,t,n,o,a,i,s,u){var d=l(e),p=l(n),h=l(a),f=l(t),g="#ffffff"===h,v=c(t,"#ffffff"===f?-35:-15),m=c(a,g?100:-120),b=c(a,g?30:-12),y=c(a,g?80:-30),w=(o=parseInt(o,10),Math.round(1.05*o)),k=Math.round(.8*o),x=Math.round(.6*o),C=Math.round(.4*o),S=Math.round(.25*o),I=57+s;u===r.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(u&&u.includes("CLASSIC")||u===r.FEEDBACK_BUTTON_NONE)&&(I=s);var L='\n .gleap-font, .gleap-font * {\n font-style: normal;\n font-variant-caps: normal;\n font-variant-ligatures: normal;\n font-variant-numeric: normal;\n font-variant-east-asian: normal;\n font-weight: normal;\n font-stretch: normal;\n font-size: 100%;\n line-height: 1;\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n }\n .gleap-frame-container {\n right: '.concat(i,"px;\n bottom: ").concat(61+s,"px;\n width: calc(100% - 40px);\n max-width: 400px;\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(k,"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 transition: max-width 0.3s ease-out;\n }\n\n :root {\n --gleap-margin-top: 50px;\n }\n\n .gleap-b-frame {\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: auto;\n padding: 0px;\n margin: 0px;\n }\n\n .gleap-b-shown {\n transition: margin 0.3s ease-out;\n margin-top: var(--gleap-margin-top);\n position: relative;\n z-index: 10000;\n }\n\n .gleap-b-f {\n margin-top: 0px;\n }\n\n .gleap-b {\n display: none;\n position: absolute;\n top: calc(-1 * var(--gleap-margin-top));\n left: 0px;\n width: 100vw;\n height: var(--gleap-margin-top);\n }\n\n @keyframes gleapSlideIn {\n from {\n top: calc(-1 * var(--gleap-margin-top));\n }\n to {\n top: 10px;\n }\n }\n\n .gleap-b-f .gleap-b {\n position: fixed;\n top: 10px;\n animation: gleapSlideIn .25s ease-out forwards;\n max-width: 800px;\n width: calc(100% - 20px);\n left: 50%;\n z-index: ").concat(2147483699,";\n transform: translateX(-50%);\n border-radius: ").concat(C,"px;\n overflow: hidden;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 5px 5px rgba(0, 0, 0, 0.05);\n }\n\n .gleap-b-shown .gleap-b {\n display: block;\n }\n\n .gleap-image-view {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n z-index: ").concat(2147483699,";\n background-color: ").concat(h,"cc;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-image-view-image {\n width: 90%;\n height: auto;\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n }\n\n .gleap-image-view-close {\n position: fixed;\n top: 20px;\n right: 20px;\n width: 32px;\n height: 32px;\n opacity: 0.8;\n z-index: ").concat(2147483740,";\n box-shadow: 0px 5px 18px rgba(0, 0, 0, 0.16);\n cursor: pointer;\n }\n\n .gleap-image-view-close:hover {\n opacity: 1;\n }\n\n .gleap-image-view-close svg path {\n fill: ").concat(a,";\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(v," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(a,"1A 70%,\n ").concat(a," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(s,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !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 max-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: 640px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(k,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(61+s,"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(I,"px;\n right: ").concat(i,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 100%;\n max-width: min(340px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(s,"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: 28px;\n height: 28px;\n background-color: ").concat(m,";\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 @media only screen and (max-width: 450px) {\n .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\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(a,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(a,";\n border-radius: ").concat(m,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-checklist-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n width: 100%;\n width: min(310px, 70vw);\n max-width: min(310px, 70vw);\n }\n\n .gleap-notification-item-checklist-content-title {\n color: ").concat(h,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 10px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-checklist-content-progress {\n width: 100%;\n height: 8px;\n border-radius: 8px;\n background-color: ").concat(b,";\n }\n\n .gleap-notification-item-checklist-content-progress-inner {\n height: 100%;\n border-radius: 8px;\n background-color: ").concat(e,";\n }\n\n .gleap-notification-item-checklist-content-next {\n color: ").concat(m,";\n font-size: 15px;\n font-weight: normal;\n line-height: 21px;\n margin-top: 10px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n }\n\n .gleap-notification-item-checklist-content-next svg {\n height: 18px;\n margin-right: 5px;\n width: auto;\n }\n\n .gleap-notification-item-checklist-content-next b {\n font-size: 15px;\n font-weight: normal;\n color: ").concat(h,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n cursor: pointer;\n }\n\n .gleap-notification-item-news-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n }\n\n .gleap-notification-item-news-preview {\n color: ").concat(m,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n overflow-wrap: break-word;\n word-break: break-word;\n display: block;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender {\n display: flex;\n align-items: center;\n color: ").concat(m,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n }\n\n .gleap-notification-item-news-content-title {\n color: ").concat(h,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 6px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender img {\n border-radius: 100%;\n height: 20px;\n margin-right: 8px;\n object-fit: cover;\n width: 20px;\n }\n\n .gleap-notification-item-news-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(a,";\n border-radius: ").concat(m,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-news-image {\n background-color: ").concat(m,";\n height: 170px;\n object-fit: cover;\n width: 100%;\n }\n\n .gleap-notification-item-news:hover .gleap-notification-item-news-content-title {\n color: ").concat(e,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n cursor: pointer;\n }\n\n .gleap-notification-item img {\n width: 32px;\n height: 32px;\n min-width: 32px;\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(x,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(a,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(h,';\n position: relative;\n }\n\n .gleap-notification-item-container::after {\n content: " ";\n position: absolute;\n bottom: 0px;\n width: 0px;\n height: 0px;\n left: -6px;\n border-style: solid;\n border-width: 0px 0px 10px 6px;\n border-color: transparent transparent ').concat(a,";\n }\n\n .gleap-notification-item-sender {\n color: ").concat(m,";\n line-height: 20px;\n }\n\n .gleap-notification-item-content {\n line-height: 20px;\n color: ").concat(h,";\n margin-top: 4px;\n min-width: min(200px, 50vw);\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+s,"px);\n max-height: ").concat(700,'px;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: calc(100vh - 40px);\n }\n \n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(k,"px);\n top: ").concat(k,"px;\n background-color: ").concat(a,";\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 pointer-events: auto;\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(s,"px;\n right: ").concat(i,"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(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: ").concat(i,'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: -5px;\n right: -5px;\n min-width: 20px;\n padding: 0px 4px;\n height: 20px;\n border-radius: 20px;\n background-color: red;\n color: #fff;\n font-size: 11px;\n font-family: sans-serif;\n text-align: center;\n line-height: 20px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 48px;\n height: 48px;\n border-radius: 48px;\n background-color: #485bff;\n transition: box-shadow, transform 0.2s 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 }\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(i,"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(i,"px;\n right: auto;\n }\n\n .bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n \n .bb-feedback-button--open.bb-feedback-button--classic-button-style {\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: 30px;\n height: 30px;\n top: 9px;\n left: 9px;\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: 14px;\n height: 14px;\n top: 17px;\n left: 17px;\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 transform: scale(1.1);\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: fixed;\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-editor-borderlayer {\n border: 4px solid #eb144c !important;\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(S,"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(S,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(d,';\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 font-family: sans-serif;\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 font-family: sans-serif;\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(h,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(b,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(y,";\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(b,";\n }\n .bb-tooltip {\n border-radius: ").concat(C,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(y,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(d,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-button-next {\n color: ").concat(d,";\n background-color: ").concat(e,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(a,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(m,";\n }\n .bb-svg-path {\n fill: ").concat(h,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(a,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(a,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(b,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(C,"px;\n border-top-right-radius: ").concat(C,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(p,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(p,";\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(p,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-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\n .gleap-tour-sender {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-bottom: 20px;\n }\n\n .gleap-tour-sender-image {\n width: 32px;\n height: 32px;\n border-radius: 32px;\n margin-right: 10px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: 550px;\n max-width: 550px;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: calc(100vw - 40px);\n max-width: calc(100vw - 40px);\n }\n }\n\n .gleap-tour-message,\n .gleap-tour-message p,\n .gleap-tour-message ul {\n color: ").concat(h,";\n }\n\n .gleap-tour-message p {\n line-height: 1.3;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-message {\n max-height: calc(80vh - 100px) !important;\n overflow-y: auto;\n min-width: 270px;\n }\n\n .gleap-tour-message iframe {\n width: 100%;\n height: 300px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-sender-name {\n font-size: 15px;\n }\n\n .gleap-tour-video {\n width: 100%;\n max-width: 100%;\n }\n\n .gleap-tour-video--playing .gleap-tour-video-playpause {\n opacity: 0;\n }\n \n .gleap-tour-video--playing:hover .gleap-tour-video-playpause {\n opacity: 1;\n }\n\n .gleap-tour-popover-video-pointer {\n padding: 0px !important;\n border-radius: 8px;\n position: relative;\n background-color: transparent !important;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer {\n position: absolute;\n top: 0px;\n left: 20px;\n right: 20px;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer button {\n padding: 5px 12px;\n }\n\n .gleap-tour-popover-video-pointer.gleap-tour-popover-can-close .gleap-tour-popover-footer {\n right: 40px !important;\n }\n\n .gleap-tour-popover-video-pointer:hover .gleap-tour-popover-footer {\n opacity: 1;\n }\n\n .gleap-tour-popover-pointer.gleap-tour-popover-no-sender .gleap-tour-message {\n padding-right: 20px;\n }\n\n .gleap-tour-video video {\n width: 100%;\n max-width: 100%;\n height: auto;\n border: none;\n outline: none;\n display: block;\n border-radius: 8px;\n }\n\n .gleap-admin-collapse-ui {\n z-index: ").concat(2147483635,";\n cursor: pointer;\n position: fixed;\n bottom: 75px;\n right: 20px;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;\n }\n\n .gleap-admin-collapse-ui svg {\n width: 20px;\n height: 14px;\n margin-top: 6px;\n fill: #000 !important;\n }\n\n .gleap-admin-collapse-ui-active {\n bottom: 20px !important;\n }\n\n .gleap-admin-collapse-ui-active svg {\n transform: rotate(180deg);\n }\n\n .gleap-admin-frame-container-active {\n display: none !important;\n }\n\n .gleap-admin-frame-container {\n position: fixed;\n bottom: 0px;\n left: 0px;\n right: 0px;\n width: 100vw;\n z-index: ").concat(2147483640,";\n }\n\n .gleap-admin-frame {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n display: block;\n }\n \n .gleap-tour-message .linktype-link {\n display: inline-block !important;\n background-color: transparent !important;\n color: ").concat(n," !important;\n }\n\n .gleap-tour-message .linktype-button {\n display: inline-block !important;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 10px 20px;\n background-color: ").concat(n," !important;\n color: ").concat(p," !important;\n }\n\n .gleap-tour-message img {\n width: 100%;\n max-width: 100%;\n min-height: 260px;\n height: auto;\n margin-top: 10px;\n margin-bottom: 10px;\n object-fit: cover;\n }\n\n .gleap-tour-active .gleap-tour-overlay {\n pointer-events: none;\n }\n \n .gleap-tour-active * {\n pointer-events: none;\n }\n \n .gleap-tour-active .gleap-tour-active-element,\n .gleap-tour-active .gleap-tour-active-element *,\n .gleap-tour-popover,\n .gleap-tour-popover * {\n pointer-events: auto;\n }\n \n @keyframes animate-fade-in {\n 0% {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n .gleap-tour-fade .gleap-tour-overlay {\n animation: animate-fade-in 200ms ease-in-out;\n }\n \n .gleap-tour-fade .gleap-tour-popover {\n animation: animate-fade-in 200ms;\n }\n\n .gleap-tour-video-playpause {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 8px;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-arrow {\n display: none !important;\n }\n\n .gleap-tour-video-playpause svg {\n width: 34px;\n height: auto;\n fill: #fff;\n }\n \n /* Popover styles */\n .gleap-tour-popover {\n all: unset;\n box-sizing: border-box;\n color: #2d2d2d;\n margin: 0;\n padding: 15px;\n border-radius: ").concat(C,'px;\n min-width: 250px;\n max-width: 300px;\n box-shadow: 0 1px 10px #0006;\n z-index: 1000000000;\n position: fixed;\n top: 0;\n right: 0;\n background-color: #fff;\n }\n \n .gleap-tour-popover * {\n font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;\n }\n \n .gleap-tour-popover-title {\n font: 19px / normal sans-serif;\n font-weight: 700;\n display: block;\n position: relative;\n line-height: 1.5;\n zoom: 1;\n margin: 0;\n }\n \n .gleap-tour-popover-close-btn {\n all: unset;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n font-size: 30px;\n font-weight: 500;\n line-height: 32px;\n color: #d2d2d2;\n z-index: 1;\n text-align: center;\n transition: color;\n transition-duration: 200ms;\n }\n \n .gleap-tour-popover-close-btn:hover,\n .gleap-tour-popover-close-btn:focus {\n color: #2d2d2d;\n }\n \n .gleap-tour-popover-title[style*="block"] + .gleap-tour-popover-description {\n margin-top: 5px;\n }\n \n .gleap-tour-popover-description {\n margin-bottom: 0;\n font: 15px / normal sans-serif;\n line-height: 1.5;\n font-weight: 400;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer {\n margin-top: 15px;\n text-align: right;\n zoom: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .gleap-tour-popover-progress-text {\n font-size: 13px;\n font-weight: 400;\n color: #727272;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer button {\n background-color: ').concat(e,";\n color: ").concat(d,";\n border-radius: ").concat(S,"px;\n box-sizing: border-box;\n padding: 10px 20px;\n font-size: 14px;\n font-weight: bold;\n line-height: 21px;\n border: none;\n text-align: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: none !important;\n outline: none !important;\n }\n\n .gleap-tour-popover-prev-btn {\n color: ").concat(h," !important;\n background-color: ").concat(b," !important;\n margin-right: 3px;\n }\n\n .gleap-tour-popover-prev-btn:hover {\n background-color: ").concat(e,"22 !important;\n color: ").concat(e,' !important;\n }\n \n .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n \n /* Disable the scrolling of parent element if it has an active element*/\n :not(body):has(> .gleap-tour-active-element) {\n overflow: hidden !important;\n }\n \n .gleap-tour-no-interaction, .gleap-tour-no-interaction * {\n pointer-events: none !important;\n }\n \n .gleap-tour-popover-navigation-btns {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n \n .gleap-tour-popover-navigation-btns button + button {\n margin-left: 4px;\n }\n \n .gleap-tour-popover-arrow {\n content: "";\n position: absolute;\n border: 5px solid #fff;\n }\n \n .gleap-tour-popover-arrow-side-over {\n display: none;\n }\n \n /** Popover Arrow Sides **/\n .gleap-tour-popover-arrow-side-left {\n left: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-right {\n right: 100%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-top {\n top: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-bottom {\n bottom: 100%;\n border-left-color: transparent;\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-center {\n display: none;\n }\n \n /* Left/Start + Right/Start */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-start {\n top: 15px;\n }\n \n /* Top/Start + Bottom/Start */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-start {\n left: 15px;\n }\n \n /* End/Left + End/Right */\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-left,\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-right {\n bottom: 15px;\n }\n \n /* Top/End + Bottom/End */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-end,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-end {\n right: 15px;\n }\n \n /* Left/Center + Right/Center */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-center {\n top: 50%;\n margin-top: -5px;\n }\n \n /* Top/Center + Bottom/Center */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-center {\n left: 50%;\n margin-left: -5px;\n }\n \n /* No arrow */\n .gleap-tour-popover-arrow-none {\n display: none;\n } \n '),T=document.querySelector(".gleap-styles");T&&T.remove();var O=document.createElement("style");O.innerHTML=L,O.className="gleap-styles",document.body.appendChild(O)},d=function(e,t){return"button"===e?'<svg class="bb-logo-logo bb-logo-logo--default" width="700px" height="700px" viewBox="0 0 700 700" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(77.000000, 119.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M476.856373,0 L68.122339,0 C30.601832,0 0,30.5935323 0,67.1461527 L0,372.655827 C0,410.166158 30.601832,439.80198 68.122339,439.80198 L170.305847,439.80198 L170.305847,528.23059 C170.305847,538.605788 182.280477,544.671288 190.657396,538.552581 L323.602398,438.844269 L476.877661,438.844269 C514.398168,438.844269 545,408.250737 545,371.698116 L545,67.1461527 C544.978712,30.5935323 515.28163,0 476.856373,0 Z"></path>\n </g>\n </g>\n</svg>':"unmute"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.1 386.2C556.7 352 576 306.3 576 256c0-60.1-27.7-113.8-70.9-149c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C507.3 170.7 528 210.9 528 256c0 39.1-15.6 74.5-40.9 100.5L449 326.6c19-17.5 31-42.7 31-70.6c0-30.1-13.9-56.9-35.4-74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C425.1 227.6 432 241 432 256s-6.9 28.4-17.7 37.3c-1.3 1-2.4 2.2-3.4 3.4L352 250.6V64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L197.8 129.8 38.8 5.1zM352 373.3L82.9 161.3C53.8 167.4 32 193.1 32 224v64c0 35.3 28.7 64 64 64h67.8L298.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S352 460.6 352 448V373.3z"/></svg>':"mute"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>':"replay"===e?'<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M48.5 224H40C26.7 224 16 213.3 16 200V72C16 62.3 21.8 53.5 30.8 49.8C39.8 46.1 50.1 48.1 57 55L98.6 96.6C186.2 10.1 327.3 10.4 414.4 97.6C501.9 185.1 501.9 326.9 414.4 414.4C326.9 501.9 185.1 501.9 97.6 414.4C85.1 401.9 85.1 381.6 97.6 369.1C110.1 356.6 130.4 356.6 142.9 369.1C205.4 431.6 306.7 431.6 369.2 369.1C431.7 306.6 431.7 205.3 369.2 142.8C307 80.6 206.5 80.3 143.9 141.8L185 183C191.9 189.9 193.9 200.2 190.2 209.2C186.5 218.2 177.7 224 168 224H48.5Z" />\n </svg>':"dismiss"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M294.6 166.6L317.3 144 272 98.7l-22.6 22.6L160 210.7 70.6 121.4 48 98.7 2.7 144l22.6 22.6L114.7 256 25.4 345.4 2.7 368 48 413.3l22.6-22.6L160 301.3l89.4 89.4L272 413.3 317.3 368l-22.6-22.6L205.3 256l89.4-89.4z"/></svg>':"blur"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>\n</svg>':"pen"===e?'<svg width="1072px" height="1034px" viewBox="0 0 1072 1034" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-907.000000, -217.000000)" fill-rule="nonzero">\n <g transform="translate(907.268457, 217.009827)">\n <g transform="translate(132.335119, 0.000000)" fill="#000" class="bb-svg-path">\n <path d="M20.3764235,730.530173 L10.1884235,720.342173 C-0.791576454,709.362173 -3.16357645,692.432173 4.37592355,678.858173 L83.1809235,537.018173 C71.7589235,502.979173 82.3098335,463.998173 112.254924,440.706173 L655.334924,18.3161733 C689.951924,-8.6058267 739.197924,-5.5388267 770.214924,25.4684733 L913.774924,169.028473 C944.782924,200.040473 947.848924,249.286473 920.927224,283.908473 L498.537224,826.988473 C496.322424,829.836173 493.935624,832.543173 491.384924,835.090073 C467.271924,859.207073 432.513924,866.195073 402.232924,856.063073 L260.382924,934.868073 C246.804924,942.407173 229.874924,940.036073 218.894924,929.055573 L208.706924,918.867573 L20.3764235,730.530173 Z M866.006424,241.190173 C871.393124,234.264373 870.779824,224.417173 864.576724,218.213173 L721.016724,74.6531733 C714.813624,68.4500733 704.965724,67.8367733 698.043724,73.2234733 L154.963724,495.613473 C147.381724,501.507973 146.018424,512.433473 151.912924,520.015473 C152.358234,520.585783 152.834804,521.128773 153.346524,521.636573 L417.586524,785.886573 C424.379524,792.675673 435.391524,792.675673 442.180524,785.886573 C442.692244,785.374853 443.168804,784.831873 443.610224,784.265473 L866.006424,241.190173 Z M342.796424,809.480173 L129.746424,596.430173 L77.9264235,689.707173 L249.516424,861.297173 L342.796424,809.480173 Z"></path>\n </g>\n <g transform="translate(-0.000000, 755.530173)" fill="#EB144C">\n <path d="M124.711543,0 L313.042043,188.3374 L233.288043,268.0914 C222.003043,279.3764 204.483043,281.5324 190.800043,273.3219 L16.8900429,168.9719 C-2.51595711,157.3309 -5.80895711,130.5499 10.1908429,114.5499 L124.711543,0 Z" class="bb-pen-tip"></path>\n </g>\n </g>\n </g>\n </g>\n</svg>':"rect"===e?'<svg width="339px" height="241px" viewBox="0 0 339 241" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.000865, 0.000000)" fill-rule="nonzero">\n <g transform="translate(0.000865, 0.000000)" fill="#000000" class="bb-svg-path">\n <path d="M339,0 L339,241 L0,241 L0,0 L339,0 Z M312.826351,26.168387 L26.1855674,26.168387 L26.1855674,214.41156 L312.826351,214.41156 L312.826351,26.168387 Z"></path>\n </g>\n <g transform="translate(0.000000, 83.206095)" fill="#EB144C" class="bb-pen-tip">\n <path d="M0,0 L26.186,26.186 L26.1864325,131.205465 L131.204,131.205 L157.792,157.793 L0.000865118243,157.793905 L0,0 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"pointer"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path d="m1050.7 508.95-225.94 157.5 160.31 160.31c4.4531 4.4531 6.9141 10.43 6.9141 16.758s-2.4609 12.305-6.9141 16.758l-126.09 126.09c-4.4531 4.4531-10.43 6.9141-16.758 6.9141-6.3281 0-12.188-2.4609-16.758-6.9141l-160.2-160.43-157.62 225.94c-3.3984 4.9219-9.0234 7.8516-14.883 7.8516-0.70313 0-1.5234 0-2.2266-0.11719-6.7969-0.82031-12.422-5.2734-14.766-11.719l-333.16-880.55c-2.5781-6.6797-0.9375-14.297 4.2188-19.336 5.0391-5.0391 12.656-6.6797 19.336-4.2188l880.66 333.05c6.3281 2.3438 10.781 8.0859 11.602 14.766 0.82031 6.7969-2.1094 13.359-7.7344 17.344z" fill="#333"/>\n </svg>':"clip"===e?'<svg width="600px" height="1126px" viewBox="0 0 600 1126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.002000, 0.501000)" fill="#333333" fill-rule="nonzero">\n <path d="M225.002,1124.999 C165.33,1124.999 108.102,1101.292 65.902,1059.097 C23.707,1016.902 5.68434189e-14,959.671 5.68434189e-14,899.997 L5.68434189e-14,299.997 C5.68434189e-14,220.431 31.605,144.127 87.867,87.867 C144.129,31.605 220.437,-4.26325641e-14 299.997,-4.26325641e-14 C379.557,-4.26325641e-14 455.867,31.605 512.127,87.867 C568.389,144.129 599.994,220.437 599.994,299.997 L599.994,1012.497 C599.994,1025.895 592.8456,1038.274 581.244,1044.974 C569.642,1051.6732 555.346,1051.6732 543.744,1044.974 C532.142,1038.2748 524.994,1025.896 524.994,1012.497 L524.994,299.997 C524.994,240.325 501.287,183.097 459.092,140.897 C416.897,98.702 359.666,74.995 299.992,74.995 C240.318,74.995 183.092,98.702 140.892,140.897 C98.697,183.092 74.99,240.323 74.99,299.997 L74.99,899.997 C74.99,953.587 103.58,1003.107 149.99,1029.897 C196.4,1056.694 253.58,1056.694 299.99,1029.897 C346.4,1003.104 374.99,953.585 374.99,899.997 L374.99,337.497 C374.99,310.704 360.697,285.942 337.49,272.544 C314.283,259.149 285.697,259.149 262.49,272.544 C239.283,285.942 224.99,310.704 224.99,337.497 L224.99,824.997 C224.99,838.395 217.8416,850.774 206.24,857.474 C194.638,864.1732 180.342,864.1732 168.74,857.474 C157.138,850.7748 149.99,838.396 149.99,824.997 L149.99,337.497 C149.99,283.907 178.58,234.387 224.99,207.597 C271.4,180.8 328.58,180.8 374.99,207.597 C421.4,234.39 449.99,283.909 449.99,337.497 L449.99,899.997 C449.99,959.669 426.283,1016.897 384.088,1059.097 C341.893,1101.292 284.662,1124.999 224.988,1124.999 L225.002,1124.999 Z" id="Path"></path>\n </g>\n </g>\n</svg>':"mic"===e?'<svg\n width="1200pt"\n height="1200pt"\n version="1.1"\n viewBox="0 0 1200 1200"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g class="bb-svg-path">\n <path\n d="m600 862.5c144.75 0 262.5-117.75 262.5-262.5v-300c0-144.75-117.75-262.5-262.5-262.5s-262.5 117.75-262.5 262.5v300c0 144.75 117.75 262.5 262.5 262.5z"\n />\n <path\n d="m1012.5 600c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 186.11-151.41 337.5-337.5 337.5s-337.5-151.39-337.5-337.5c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 214.8 165.08 391.57 375 410.6v114.4c0 20.727 16.793 37.5 37.5 37.5s37.5-16.773 37.5-37.5v-114.4c209.92-19.031 375-195.8 375-410.6z"\n />\n </g>\n </svg>':"camera"===e?'<svg width="1155px" height="1004px" viewBox="0 0 1155 1004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="#333333" fill-rule="nonzero">\n <g transform="translate(128.324095, 0.000000)">\n <path d="M42.7803063,0.00413459787 C31.4357421,0.00413459787 20.5549853,4.41399115 12.5336107,12.2572687 C4.51223664,20.1005462 0.00420584816,30.741831 0.00420584816,41.8370305 L0.00420584816,251.00151 C-0.156199045,262.200455 4.27736739,272.989996 12.315738,280.963903 C20.3585574,288.938257 31.3288589,293.431222 42.7803063,293.431222 C54.2317532,293.431222 65.2018267,288.938592 73.2448746,280.963903 C81.2832452,272.989549 85.7172445,262.200455 85.5564062,251.00151 L85.5564062,83.6699265 L256.660808,83.6699265 C268.112255,83.8267939 279.145066,79.4909873 287.298762,71.6298611 C295.452913,63.7643845 300.04718,53.0359758 300.04718,41.8370305 C300.04718,30.6380854 295.453255,19.9098998 287.298762,12.0441998 C279.144611,4.18307356 268.112255,-0.153157091 256.660808,0.00413459787 L42.7803063,0.00413459787 Z"></path>\n <path d="M983.227131,710.59444 C971.895913,710.764382 961.099907,715.326799 953.20401,723.279287 C945.312674,731.227538 940.964345,741.91668 941.119476,752.99849 L941.119476,920.330075 L770.015075,920.330075 C758.563631,920.173205 747.530815,924.509015 739.377123,932.370139 C731.222968,940.235615 726.628705,950.964028 726.628705,962.16297 C726.628705,973.361918 731.222627,984.090105 739.377123,991.955802 C747.531272,999.816926 758.563631,1004.15316 770.015075,1003.99587 L983.895579,1003.99587 C995.24014,1003.99587 1006.1209,999.586011 1014.14227,991.742733 C1022.16365,983.899455 1026.67168,973.258169 1026.67168,962.16297 L1026.67168,752.99849 C1026.83208,741.690223 1022.30053,730.801401 1014.11489,722.812989 C1005.93394,714.825472 994.790363,710.415949 983.227131,710.59444 L983.227131,710.59444 Z"></path>\n <path d="M983.227131,375.93127 C971.895913,376.101212 961.099907,380.66363 953.20401,388.61612 C945.312674,396.56437 940.964345,407.253512 941.119476,418.335325 L941.119476,585.66691 C940.959072,596.865853 945.39264,607.655394 953.431008,615.629303 C961.47383,623.603658 972.444131,628.096618 983.895579,628.096618 C995.347023,628.096618 1006.3171,623.603989 1014.36015,615.629303 C1022.39852,607.654947 1026.83251,596.865853 1026.67168,585.66691 L1026.67168,418.335325 C1026.83208,407.027056 1022.30053,396.138232 1014.11489,388.149822 C1005.93394,380.162305 994.790363,375.752783 983.227131,375.93127 L983.227131,375.93127 Z"></path>\n <path d="M769.974012,0.00413459787 C758.522563,-0.152733184 747.489752,4.18307356 739.336055,12.0441998 C731.181906,19.9096767 726.587637,30.6380854 726.587637,41.8370305 C726.587637,53.0359758 731.181564,63.7641611 739.336055,71.6298611 C747.490209,79.4909873 758.522563,83.8272181 769.974012,83.6699265 L941.078414,83.6699265 L941.078414,251.00151 C940.918009,262.200455 945.351572,272.989996 953.389945,280.963903 C961.432763,288.938257 972.403063,293.431222 983.854512,293.431222 C995.30596,293.431222 1006.27603,288.938592 1014.31908,280.963903 C1022.35745,272.989549 1026.79145,262.200455 1026.63061,251.00151 L1026.63061,41.8370305 C1026.63061,30.7426118 1022.12133,20.1017733 1014.10121,12.2572687 C1006.08109,4.41276405 995.199876,0.00413459787 983.854512,0.00413459787 L769.974012,0.00413459787 Z"></path>\n <path d="M427.765208,0.00413459787 C416.31376,-0.152733184 405.280949,4.18307356 397.127256,12.0441998 C388.973102,19.9096767 384.378838,30.6380854 384.378838,41.8370305 C384.378838,53.0359758 388.972761,63.7641611 397.127256,71.6298611 C405.281406,79.4909873 416.31376,83.8272181 427.765208,83.6699265 L598.86961,83.6699265 C610.321058,83.8267939 621.35387,79.4909873 629.507562,71.6298611 C637.661716,63.7643845 642.255985,53.0359758 642.255985,41.8370305 C642.255985,30.6380854 637.662058,19.9098998 629.507562,12.0441998 C621.353413,4.18307356 610.321058,-0.153157091 598.86961,0.00413459787 L427.765208,0.00413459787 Z"></path>\n </g>\n <g transform="translate(0.000000, 427.000000)">\n <path d="M768.516184,22.1826583 C752.659627,13.73125 732.573775,13.73125 717.773442,24.29375 L562.379192,124.6375 L562.379192,31.6875 C562.379192,13.7330104 548.635081,0 530.666079,0 L31.7131123,0 C13.7441105,0 0,13.7330104 0,31.6875 L0,475.3125 C0,493.26699 13.7441105,507 31.7131123,507 L530.666079,507 C548.635081,507 562.379192,493.26699 562.379192,475.3125 L562.379192,382.3625 L717.773442,482.70625 C726.231681,487.9875 735.742444,491.157658 745.257258,491.157658 C753.715498,491.157658 761.113815,489.046567 769.572406,484.820862 C786.485185,475.313732 796,458.414612 796,439.400352 L796,68.6566021 C794.943601,48.5869719 785.428963,31.6878521 768.516184,22.1807219 L768.516184,22.1826583 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderon"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g>\n <circle fill="#E31810" cx="625.5" cy="625.5" r="625.5"></circle>\n <circle fill="#F71008" cx="625" cy="625" r="507"></circle>\n <g transform="translate(175.000000, 449.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M0,347.097493 L0,4.90250696 L135.528311,4.90250696 C161.471024,4.90250696 183.639743,9.49741034 202.034469,18.6872171 C220.429194,27.8770239 234.46286,40.8541449 244.135466,57.6185803 C253.808072,74.3830156 258.644376,94.0714804 258.644376,116.683975 C258.644376,139.40786 253.724206,158.929238 243.883867,175.248107 C234.043527,191.566976 219.814173,204.070682 201.195803,212.759227 C182.577434,221.447772 160.073248,225.792044 133.683247,225.792044 L42.9396629,225.792044 L42.9396629,167.64563 L121.941933,167.64563 C135.807866,167.64563 147.325536,165.751973 156.494943,161.964659 C165.66435,158.177344 172.51345,152.496373 177.042243,144.921744 C181.571035,137.347116 183.835432,127.934526 183.835432,116.683975 C183.835432,105.322032 181.571035,95.7423543 177.042243,87.9449425 C172.51345,80.1475308 165.636395,74.2159282 156.411077,70.1501349 C147.185759,66.0843416 135.584222,64.051445 121.606467,64.051445 L72.6284142,64.051445 L72.6284142,347.097493 L0,347.097493 Z M185.512762,191.37204 L270.888889,347.097493 L190.712487,347.097493 L107.181424,191.37204 L185.512762,191.37204 Z"></path>\n <polygon points="309.166667 347.097493 309.166667 4.90250696 540.126846 4.90250696 540.126846 64.5527072 381.634607 64.5527072 381.634607 146.091356 528.244113 146.091356 528.244113 205.741556 381.634607 205.741556 381.634607 287.447293 540.796296 287.447293 540.796296 347.097493"></polygon>\n <path d="M901,124.638783 L827.757943,124.638783 C826.420189,115.158428 823.68894,106.709759 819.564197,99.2927757 C815.439454,91.8757921 810.144176,85.5462611 803.678363,80.3041825 C797.212549,75.0621039 789.77129,71.0468948 781.354585,68.2585551 C772.93788,65.4702155 763.824427,64.0760456 754.014228,64.0760456 C736.288981,64.0760456 720.849065,68.4537389 707.69448,77.2091255 C694.539894,85.964512 684.339516,98.6793409 677.093346,115.353612 C669.847176,132.027883 666.224091,152.243346 666.224091,176 C666.224091,200.425856 669.875046,220.948035 677.176956,237.56654 C684.478866,254.185044 694.707113,266.732573 707.861699,275.209125 C721.016285,283.685678 736.233242,287.923954 753.51257,287.923954 C763.21129,287.923954 772.213263,286.641318 780.518488,284.076046 C788.823714,281.510773 796.209233,277.746515 802.675047,272.78327 C809.14086,267.820025 814.519748,261.769328 818.81171,254.631179 C823.103672,247.493029 826.08575,239.351077 827.757943,230.205323 L901,230.539924 C899.104848,246.26616 894.394837,261.406844 886.869968,275.961977 C879.3451,290.51711 869.256201,303.510773 856.603274,314.942966 C843.950346,326.375158 828.900608,335.409379 811.45406,342.045627 C794.007513,348.681876 774.303504,352 752.342035,352 C721.796641,352 694.512024,345.084918 670.488184,331.254753 C646.464343,317.424588 627.512821,297.404309 613.633619,271.193916 C599.754416,244.983523 592.814815,213.252218 592.814815,176 C592.814815,138.636248 599.838026,106.849176 613.884448,80.6387833 C627.93087,54.4283904 646.993871,34.4359949 671.073451,20.661597 C695.153031,6.88719899 722.242559,0 752.342035,0 C772.185393,0 790.607387,2.78833967 807.608016,8.36501901 C824.608646,13.9416984 839.686254,22.0557668 852.840839,32.7072243 C865.995425,43.3586819 876.72533,56.3802281 885.030556,71.7718631 C893.335782,87.1634981 898.65893,104.785805 901,124.638783 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderoff"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-rec-on-circle" fill="#EEEEEE" fill-rule="nonzero">\n <path d="M625.5,0 C970.954111,0 1251,280.045889 1251,625.5 C1251,970.954111 970.954111,1251 625.5,1251 C280.045889,1251 0,970.954111 0,625.5 C0,280.045889 280.045889,0 625.5,0 Z M626,124 C348.753056,124 124,348.753056 124,626 C124,903.246944 348.753056,1128 626,1128 C903.246944,1128 1128,903.246944 1128,626 C1128,348.753056 903.246944,124 626,124 Z"></path>\n </g>\n <g class="bb-rec-on-cont" fill="#E31810" transform="translate(86.000000, 86.000000)" fill-rule="nonzero">\n <path d="M540,0 C241.2,0 0,241.2 0,540 C0,838.8 241.2,1080 540,1080 C838.8,1080 1080,838.8 1080,540 C1080,241.2 838.8,0 540,0 Z M777.6,741.6 C777.6,761.998 761.998,777.6 741.6,777.6 L338.4,777.6 C318.002,777.6 302.4,761.998 302.4,741.6 L302.4,338.4 C302.4,318.002 318.002,302.4 338.4,302.4 L741.6,302.4 C761.998,302.4 777.6,318.002 777.6,338.4 L777.6,741.6 Z"></path>\n </g>\n </g>\n </svg>':"arrowdown"===e?'<svg class="bb-logo-arrowdown" fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m50 77.637c-1.3477 0-2.6953-0.51562-3.7266-1.543l-44.73-44.73c-2.0586-2.0586-2.0586-5.3945 0-7.4531 2.0586-2.0586 5.3945-2.0586 7.4531 0l41.004 41 41.004-41c2.0586-2.0586 5.3945-2.0586 7.4531 0 2.0586 2.0586 2.0586 5.3945 0 7.4531l-44.73 44.727c-1.0312 1.0312-2.3789 1.5469-3.7266 1.5469z"/>\n </svg>'):"arrowleft"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m70.988 1.6211c2.1875-2.168 5.7344-2.168 7.9297 0 2.1836 2.168 2.1836 5.7227 0 7.8906l-46.016 40.445 46.016 40.5c2.1836 2.168 2.1836 5.668 0 7.8906-2.1953 2.168-5.7383 2.168-7.9297 0l-50.039-44.109c-1.168-1.168-1.668-2.7227-1.5898-4.2773-0.078125-1.5 0.42188-3.0547 1.5898-4.2227l50.039-44.109z" fill-rule="evenodd"/>\n </svg>'):"close"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m72.812 33.02l-5.832-5.832-16.98 16.875-16.98-16.875-5.832 5.832 16.875 16.98-16.875 16.98 5.832 5.832 16.98-16.875 16.98 16.875 5.832-5.832-16.875-16.98z"/>\n </svg>'):"undo"===e?'<svg width="62px" height="60px" viewBox="0 0 62 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-svg-path" transform="translate(-0.000500, 0.001926)" fill-rule="nonzero">\n <path d="M28.0005,51.6270739 C24.9653,51.0684839 22.0825,49.8731739 19.5396,48.1192739 L13.8208,53.8380739 C17.9536,57.0060739 22.8403,59.0333739 28.0008,59.7286739 L28.0005,51.6270739 Z" id="Path"></path>\n <path d="M2.2705,33.9980739 C2.96581,39.1582739 4.9932,44.0450739 8.1611,48.1780739 L13.8799,42.4592739 C12.126,39.9162739 10.9307,37.0334739 10.3721,33.9983739 L2.2705,33.9980739 Z" id="Path"></path>\n <path d="M61.7305,33.9980739 L53.6289,33.9980739 C53.07031,37.0332739 51.875,39.9160739 50.1211,42.4589739 L55.8399,48.1777739 C59.0079,44.0449739 61.0352,39.1582739 61.7305,33.9977739 L61.7305,33.9980739 Z" id="Path"></path>\n <path d="M4.0005,24.9980739 L24.0005,24.9980739 L24.0005,16.9980739 L14.27,16.9980739 C17.6762,12.3613739 22.7622,9.24417393 28.442,8.31057393 C34.1178,7.38088393 39.934,8.70901393 44.645,12.0175739 C49.352,15.3222739 52.5786,20.3417739 53.6294,25.9975739 L61.731,25.9975739 C60.6646,18.0834739 56.4888,10.9235739 50.129,6.09957393 C43.7657,1.27147393 35.746,-0.818426068 27.836,0.290973932 C19.9298,1.39647393 12.793,5.61127393 8,11.9979739 L8,0.997973932 L-3.55271368e-15,0.997973932 L-3.55271368e-15,20.9979739 C-3.55271368e-15,22.0604739 0.42188,23.0760739 1.1719,23.8260739 C1.92192,24.5760739 2.9375,24.9979739 4,24.9979739 L4.0005,24.9980739 Z" id="Path"></path>\n <path d="M36.0005,51.6270739 L36.0005,59.7286739 C41.1607,59.0333639 46.0475,57.0059739 50.1805,53.8380739 L44.4617,48.1192739 C41.9187,49.8731739 39.0359,51.0684739 36.0008,51.6270739 L36.0005,51.6270739 Z" id="Path"></path>\n </g>\n </g>\n </svg>':""};function p(e){return(p="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 h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,"startTimestamp",Date.now()),f(this,"requestId",0),f(this,"requests",{}),f(this,"externalRequests",[]),f(this,"maxRequests",30),f(this,"filters",[]),f(this,"defaultBlacklist",["gleap.io"]),f(this,"blacklist",[]),f(this,"initialized",!1),f(this,"stopped",!1),f(this,"loadAllResources",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setLoadAllResources",value:function(e){this.loadAllResources=e}},{key:"isContentTypeSupported",value:function(e){if("string"!=typeof e)return!1;if(""===e)return!0;e=e.toLocaleLowerCase();for(var t=["text/","xml","json"],n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1}},{key:"getRequests",value:function(){var e=JSON.parse(JSON.stringify(Object.values(this.requests)));if(this.externalRequests&&this.externalRequests.length>0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t<e.length;t++){var n=e[t];if(n&&n.request&&n.request.headers)for(var o=0;o<this.filters.length;o++)delete n.request.headers[this.filters[o]];if(n&&n.request&&n.request.payload){var r=n.request.payload;try{r=JSON.parse(n.request.payload)}catch(l){}if(r){for(o=0;o<this.filters.length;o++)delete r[this.filters[o]];n.request.payload=JSON.stringify(r)}}if(n&&n.response&&n.response.responseText)try{var a=JSON.parse(n.response.responseText);for(o=0;o<this.filters.length;o++)delete a[this.filters[o]];n.response.responseText=JSON.stringify(a)}catch(l){}}try{if("undefined"!=typeof window&&window.performance){var i=window.performance.getEntriesByType("resource");for(t=0;t<i.length;t++){var s=i[t];s&&s.name&&(this.loadAllResources||["xmlhttprequest","fetch"].indexOf(s.initiatorType)>-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;t<c.length;t++)if(e.url&&e.url.includes(c[t]))return!1;return!0}))),e}},{key:"setMaxRequests",value:function(e){e>70&&(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<t.length;n++)delete this.requests[t[n]]}},{key:"calcRequestTime",value:function(e){if(e&&this.requests&&this.requests[e]){var t=this.requests[e].date;t&&(this.requests[e].duration=(new Date).getTime()-t.getTime())}}},{key:"getTextContentSize",value:function(e){var t=0;try{t=(new TextEncoder).encode(e).length}catch(n){try{t=encodeURI(s).split(/%..|./).length-1}catch(n){try{t=new Blob([e]).size}catch(n){t=e.length}}}return t/1024/1024}},{key:"cleanupContentSize",value:function(e){return this.getTextContentSize(e)>.15?"<content_too_large>":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":p(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,o){if(!e.stopped&&o&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[o]={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[o]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[o]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,o){if(!e.stopped&&o&&e.requests&&e.requests[o]){try{e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(o)}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[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(o),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(o),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 o=t.currentTarget,r=o.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(o.responseText)),e.requests[o.bbRequestId].success=!0,e.requests[o.bbRequestId].response={status:o.status,statusText:o.statusText,responseText:a},e.calcRequestTime(o.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,o=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return void 0===XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.gleapSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader),XMLHttpRequest.prototype.gleapSetRequestHeader&&(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.gleapSetRequestHeader(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)),o.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 o=++n.requestId;return e.onFetch(arguments,o),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,o)}return t})).catch((function(t){throw e.onFetchFailed(t,o),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var o=new FileReader;o.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},o.onerror=function(e){n(e)},o.readAsText(e)}))}}])&&h(t.prototype,n),o&&h(t,o),e}();f(g,"instance",void 0);const v=g;var m=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},y=function(e,t){return e.length>t?e.slice(0,t)+"...":e},w=function(e){try{var t=e.split("."),n=!1,o=t[t.length-2];return"co"!==o&&"com"!==o&&"gv"!==o&&"ac"!==o&&"edu"!==o&&"gov"!==o&&"mil"!==o&&"net"!==o&&"org"!==o||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(r){}return e},k=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},x=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(o){}else localStorage.removeItem(n)},C=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}catch(a){}return null},S=function(e){try{var t=w(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(n){}},I=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"apiUrl","https://api.gleap.io"),M(this,"wsApiUrl","wss://ws.gleap.io"),M(this,"sdkKey",null),M(this,"updatingSession",!1),M(this,"useCookies",!1),M(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),M(this,"ready",!1),M(this,"onSessionReadyListener",[]),M(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),M(this,"injectSession",(function(e){e&&t.session&&(e.setRequestHeader("Api-Token",t.sdkKey),e.setRequestHeader("Gleap-Id",t.session.gleapId),e.setRequestHeader("Gleap-Hash",t.session.gleapHash))})),M(this,"clearSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.session&&t.session.gleapHash&&Se.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{x("session-".concat(t.sdkKey),null)}catch(r){}if(t.useCookies)try{S("session-".concat(t.sdkKey))}catch(r){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},ae.getInstance().sendMessage({name:"session-cleared"},!0),dt.getInstance().clearAllNotifications(!1),dt.getInstance().setNotificationCount(0),vt.getInstance().removeBannerUI(),n&&!isNaN(e)){var o=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*o)}})),M(this,"validateSession",(function(e){e&&e.gleapId&&(t.session&&t.session.gleapHash&&Se.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),x("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var o="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),o="; expires="+r.toUTCString()}var a=w(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+o+"; path=/; domain="+a}catch(i){}}("session-".concat(t.sdkKey),encodeURIComponent(JSON.stringify(e)),365),t.session=e,t.ready=!0,t.session&&t.session.gleapHash&&Se.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.notifySessionReady())})),M(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{if(t.useCookies){var n=C("session-".concat(t.sdkKey));if(n){var o=JSON.parse(decodeURIComponent(n));t.validateSession(o)}}}catch(s){}if(!(t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var r=k("session-".concat(t.sdkKey));r&&t.validateSession(r)}var a=t,i=new XMLHttpRequest;i.open("POST",a.apiUrl+"/sessions"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",a.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(i.setRequestHeader("Gleap-Id",t.session.gleapId),i.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(s){}i.onreadystatechange=function(t){if(4===i.readyState)if(200===i.status||201===i.status)try{var n=JSON.parse(i.responseText);a.validateSession(n),D.getInstance().restart()}catch(s){}else 429!==i.status&&a.clearSession(e,!0)},i.send(JSON.stringify({lang:nt.getInstance().getActiveLanguage()}))})),M(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(i){}if(n)for(var o=Object.keys(n),r=0;r<o.length;r++){var a=o[r];if(JSON.stringify(t.session[a])!==JSON.stringify(n[a])&&(!t.session.customData||JSON.stringify(t.session.customData[a])!==JSON.stringify(n[a])))return!0}return!1})),M(this,"updateSession",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/sessions/partialupdate"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var i=JSON.parse(t.responseText);n.validateSession(i),o(i)}catch(a){r(a)}else r()},t.send(JSON.stringify({data:T(T({},e),{},{lang:nt.getInstance().getActiveLanguage()}),type:"js",sdkVersion:"13.2.0",ws:!0}))}))}))})),M(this,"identifySession",(function(e,n,o){if(t.checkIfSessionNeedsUpdate(e,n)){var r=t;return new Promise((function(a,i){t.setOnSessionReady((function(){if(!r.session.gleapId||!r.session.gleapHash)return i("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",r.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",r.sdkKey);try{t.setRequestHeader("Gleap-Id",r.session.gleapId),t.setRequestHeader("Gleap-Hash",r.session.gleapHash)}catch(c){}t.onerror=function(){i()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);r.validateSession(n),D.getInstance().restart(),a(n)}catch(c){i(c)}else i()};var s=T({},n);n.customData&&(delete s.customData,s=T(T({},s),n.customData)),t.send(JSON.stringify(T(T({},s),{},{userId:e,userHash:o,lang:nt.getInstance().getActiveLanguage()})))}))}))}})),M(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/outbound/producttours"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);n&&n.config&&o(n.config)}catch(a){r(a)}else r()},t.send(JSON.stringify({outboundId:e}))}))}))}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getName",value:function(){try{return this.session.name?this.session.name.split(" ")[0].split("@")[0].split(".")[0].split("+")[0]:""}catch(e){return this.session.name}}},{key:"getSession",value:function(){return this.session}},{key:"getGleapId",value:function(){return this.session&&this.session.gleapId?this.session.gleapId:null}},{key:"isUser",value:function(){return!(!this.session||!this.session.userId)}},{key:"notifySessionReady",value:function(){if(this.onSessionReadyListener.length>0)for(var e=0;e<this.onSessionReadyListener.length;e++)this.onSessionReadyListener[e]();this.onSessionReadyListener=[],ae.getInstance().sendSessionUpdate()}}])&&O(t.prototype,n),o&&O(t,o),e}();function R(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}M(E,"instance",void 0);var D=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"eventArray",[]),A(this,"streamedEventArray",[]),A(this,"eventMaxLength",500),A(this,"errorCount",0),A(this,"streamingEvents",!1),A(this,"lastUrl",void 0),A(this,"mainLoopTimeout",null),A(this,"socket",null),A(this,"connectedWebSocketGleapId",null),A(this,"connectionTimeout",null),A(this,"pingWS",null),A(this,"handleOpenBound",null),A(this,"handleErrorBound",null),A(this,"handleMessageBound",null),A(this,"handleCloseBound",null),A(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),1500)})),A(this,"streamEvents",(function(){if(!(!E.getInstance().ready||t.streamingEvents||t.errorCount>2)&&0!==t.streamedEventArray.length&&t.socket&&t.socket.readyState===t.socket.OPEN){var e=t;t.streamingEvents=!0;var n=new XMLHttpRequest;n.open("POST",E.getInstance().apiUrl+"/sessions/ping"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.getInstance().injectSession(n),n.onerror=function(){e.errorCount++,e.streamingEvents=!1},n.onreadystatechange=function(t){4===n.readyState&&(200===n.status||201===n.status?e.errorCount=0:e.errorCount++,e.streamingEvents=!1)};var o=ce.getInstance().getSessionDuration();n.send(JSON.stringify({time:o,events:t.streamedEventArray,opened:ae.getInstance().isOpened(),type:"js",sdkVersion:"13.2.0",ws:!0})),t.streamedEventArray=[]}})),this.handleOpenBound=this.handleOpen.bind(this),this.handleErrorBound=this.handleError.bind(this),this.handleMessageBound=this.handleMessage.bind(this),this.handleCloseBound=this.handleClose.bind(this)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"cleanupWebSocket",value:function(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null),this.pingWS&&clearInterval(this.pingWS),this.socket&&(this.socket.removeEventListener("open",this.handleOpenBound),this.socket.removeEventListener("error",this.handleErrorBound),this.socket.removeEventListener("message",this.handleMessageBound),this.socket.removeEventListener("close",this.handleCloseBound),this.socket.close(),this.socket=null)}},{key:"initWebSocket",value:function(){this.cleanupWebSocket(),this.connectedWebSocketGleapId=E.getInstance().session.gleapId,E.getInstance().session&&E.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(E.getInstance().wsApiUrl,"?gleapId=").concat(E.getInstance().session.gleapId,"&gleapHash=").concat(E.getInstance().session.gleapHash,"&apiKey=").concat(E.getInstance().sdkKey,"&sdkVersion=").concat("13.2.0")),this.socket.addEventListener("open",this.handleOpenBound),this.socket.addEventListener("message",this.handleMessageBound),this.socket.addEventListener("error",this.handleErrorBound),this.socket.addEventListener("close",this.handleCloseBound))}},{key:"handleOpen",value:function(e){var t=this;this.pingWS=setInterval((function(){t.socket.readyState===t.socket.OPEN&&(t.socket.send("PING"),t.socket.send(9))}),1e4),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null)}},{key:"handleMessage",value:function(e){this.processMessage(JSON.parse(e.data))}},{key:"handleError",value:function(e){}},{key:"handleClose",value:function(e){var t=this;setTimeout((function(){t.initWebSocket()}),5e3)}},{key:"processMessage",value:function(e){try{if("update"===e.name){var t=e.data,n=t.a,o=t.u;ae.getInstance().isOpened()||(n&&Zt.getInstance().performActions(n),null!=o&&dt.getInstance().setNotificationCount(o))}}catch(r){}}},{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.cleanupMainLoop()}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"cleanupMainLoop",value:function(){this.mainLoopTimeout&&(clearInterval(this.mainLoopTimeout),this.mainLoopTimeout=null)}},{key:"restart",value:function(){this.connectedWebSocketGleapId!==E.getInstance().session.gleapId&&this.initWebSocket(),this.cleanupMainLoop(),this.trackInitialEvents(),this.runEventStreamLoop()}},{key:"start",value:function(){this.startPageListener(),this.resetErrorCountLoop()}},{key:"trackInitialEvents",value:function(){e.getInstance().logEvent("sessionStarted"),e.getInstance().logCurrentPage()}},{key:"logCurrentPage",value:function(){if(!Zt.getInstance().disablePageTracking){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){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()}}])&&R(t.prototype,n),o&&R(t,o),e}();function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}A(D,"instance",void 0);var F=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},B=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"flowConfig",null),P(this,"projectActions",null),P(this,"onConfigLoadedListener",[]),P(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),P(this,"start",(function(){var e=E.getInstance(),n=k("config-".concat(e.sdkKey,"-").concat(nt.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),P(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var o=E.getInstance(),r=new XMLHttpRequest,a=nt.getInstance().getActiveLanguage();r.open("GET",o.apiUrl+"/config/"+o.sdkKey+"?lang="+a),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.injectSession(r),r.onerror=function(){n()},r.onreadystatechange=function(a){if(4===r.readyState){if(200===r.status||201===r.status)try{var i=JSON.parse(r.responseText);try{x("config-".concat(o.sdkKey,"-lang"),i)}catch(s){}return e.applyConfig(i),t()}catch(a){}n()}},r.send()}))}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;Zt.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",F(e.borderRadius,20),F(e.buttonX,20),F(e.buttonY,20),e.feedbackButtonPosition)}},{key:"notifyConfigLoaded",value:function(){if(this.onConfigLoadedListener.length>0)for(var e=0;e<this.onConfigLoadedListener.length;e++)this.onConfigLoadedListener[e]();this.onConfigLoadedListener=[]}},{key:"applyConfig",value:function(e){try{var t=e.flowConfig;this.flowConfig=t,this.applyStylesFromConfig(),ae.getInstance().sendConfigUpdate(),r.getInstance().updateFeedbackButtonState(),dt.getInstance().updateContainerStyle(),t.enableWebReplays?ze.getInstance().start():ze.getInstance().stop(),t.enableNetworkLogs&&v.getInstance().start(),v.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&v.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&v.getInstance().setBlacklist(t.networkLogBlacklist),nt.getInstance().updateRTLSupport(),Zt.enableShortcuts(!!t.enableShortcuts),this.notifyConfigLoaded()}catch(n){}}}])&&N(t.prototype,n),o&&N(t,o),e}();P(B,"instance",void 0);var j=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"],_=function(e,t,n){return o=e,r=/url\((.*?)\)/g,a=function(e){return new Promise((function(o,r){if(!e)return o(e);var a=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===a.indexOf("http")||0===a.indexOf("//")||0===a.indexOf("data"))return o(e);try{var i=a;return t&&(i=t+"/"+a),n?o("url("+i+")"):U(i).then((function(e){return o("url("+e+")")}))}catch(s){return o(e)}}))},new Promise((function(e,t){var n=[];o.replace(r,(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];var i=a.apply(void 0,[e].concat(o));n.push(i)})),Promise.all(n).then((function(t){e(o.replace(r,(function(){return t.shift()})))})).catch((function(){t()}))}));var o,r,a},U=function(e){return new Promise((function(t,n){if(e){var o=new XMLHttpRequest;o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(o.response)},o.onerror=function(e){t()},o.open("GET",e),o.responseType="blob",o.send()}else t()}))},q=function(e,t,n,o){(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(o,r){var a=0===e.indexOf("data:image/jpeg"),i=new Image;i.src=e,i.onerror=function(){r()},i.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>i.width/4&&(r=i.width/4),n>i.height/4&&(s=i.height/4);var c=i.width,l=i.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(i,0,0,c,l),o(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))})(e,500,500).then((function(e){t.src=e,n()})).catch((function(){console.warn("BB: Image resize failed."),n()}))},H=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){if(!e)return!1;for(var t=0;t<j.length;t++)if(-1!==e.indexOf(j[t]))return!0;return!1}(e.src))return t();var o=new XMLHttpRequest;o.onload=function(){var n=new FileReader;n.onloadend=function(){q(n.result,e,t)},n.onerror=function(){t()},n.readAsDataURL(o.response)},o.onerror=function(e){t()};var r=e.src;o.open("GET",r),o.responseType="blob",o.send()}else t()}))},W=function(e,t,n,o){var r=null;t.ownerNode&&(r=e.querySelector('[bb-styleid="'+o+'"]'));try{if(r){var a=null;if(""!=n){var i=e.querySelector("head"),s=window.document.createElement("style");i.appendChild(s),s.type="text/css",s.styleSheet?s.styleSheet.cssText=n:s.appendChild(window.document.createTextNode(n)),a=s}else{var c=window.document.createElement("link");c.rel="stylesheet",c.type=t.type,c.href=t.href,c.media=t.media,a=c}a&&(r.parentNode.insertBefore(a,r),r.remove())}}catch(l){}},z=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(r){}var n="";if(t)for(var o in t)t[o].cssText&&(n+=t[o].cssText);return n},G=function(e,t){for(var n=[],o=function(){var e=document.styleSheets[r];if(e.media&&"print"===e.media.mediaText)return"continue";var o=z(e);if(e&&e.ownerNode)if(""!=o){var i=document.getElementsByTagName("base");a=i.length?i[0].href.substr(location.origin.length,999):window.location.href,e.href&&(a=e.href);var s=a.substring(0,a.lastIndexOf("/"));n.push(_(o,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else n.push(Promise.resolve({styletext:o,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},r=0;r<document.styleSheets.length;r++){var a;o()}return Promise.all(n).then((function(t){if(t)for(var n=0;n<t.length;n++)W(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},V=function(e,t){return new Promise((function(n,o){return t?G(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],o=0;o<t.length;o++){var r=t[o];n.push(H(r))}return Promise.all(n)}(e).then((function(){return G(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},Z=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var o=0;o<e.adoptedStyleSheets.length;o++){var r=e.adoptedStyleSheets[o],a=z(r),i=window.document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=a:i.appendChild(window.document.createTextNode(a)),n&&i.setAttribute("bb-shadow-child",n),t.insertBefore(i,t.firstElementChild)}},K=function(e){return new Promise((function(t,n){for(var o=window.document.querySelectorAll("style, link"),r=0;r<o.length;++r)o[r].setAttribute("bb-styleid",r);var a=function(e){var t=1,n=document.createDocumentFragment();!function e(n,o,r){var a=function(t,n,o){for(;t;)e(t,n,o),t=t.nextSibling},i=n.cloneNode();if(void 0!==i.setAttribute&&(r&&i.setAttribute("bb-shadow-child",r),n instanceof HTMLCanvasElement&&i.setAttribute("bb-canvas-data",n.toDataURL()),n instanceof HTMLCanvasElement&&i.setAttribute("bb-canvas-data",n.toDataURL())),n.nodeType==Node.ELEMENT_NODE){var s=n.tagName?n.tagName.toUpperCase():n.tagName;if("IFRAME"==s||"VIDEO"==s||"EMBED"==s||"IMG"==s||"SVG"==s){var c=n.getBoundingClientRect();i.setAttribute("bb-element",!0),i.setAttribute("bb-height",c.height),i.setAttribute("bb-width",c.width)}if((n.scrollTop>0||n.scrollLeft>0)&&(i.setAttribute("bb-scrollpos",!0),i.setAttribute("bb-scrolltop",n.scrollTop),i.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;("value"===n.getAttribute("gleap-ignore")||n.classList.contains("gl-mask"))&&(l=new Array(l.length+1).join("*")),i.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||i.setAttribute("bb-data-checked",!0)}}if(o.appendChild(i),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,i,u),Z(n.shadowRoot,i,u),void 0!==i.setAttribute&&i.setAttribute("bb-shadow-parent",u)}a(n.firstChild,i)}(e,n);var o=n.querySelector("head");return o||(o=n),Z(window.document,o),n}(window.document.documentElement),i=a.querySelectorAll("link[rel=import]");for(r=0;r<i.length;++r){var s=i[r];if(s&&s.childNodes&&s.childNodes.length>0){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<l.length;++r)l[r].remove();var u="",d=a.querySelectorAll("base");for(r=0;r<d.length;++r)d[r].href&&(u=d[r].href),d[r].remove();var p=window.location.href.substring(0,window.location.href.lastIndexOf("/")),h=p+"/";u&&(u.startsWith("http")?h=u:(h=p+u).endsWith("/")||(h+="/"));var f=window.document.createElement("base");f.href=h;var g=a.querySelector("head");g.insertBefore(f,g.firstChild);var v=a.querySelectorAll(".bb-feedback-dialog-container, .bb-capture-editor-borderlayer");for(r=0;r<v.length;++r)v[r].remove();var b=a.querySelectorAll("[bb-element=true]");for(r=0;r<b.length;++r)b[r]&&(b[r].style.height=b[r].getAttribute("bb-height")+"px");V(a,e).then((function(){var e=function(e){var t="",n=window.document.doctype;if(n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),e&&e.childNodes&&e.childNodes.length>0)for(var o=0;o<e.childNodes.length;o++)e.childNodes[o]&&(t+=e.childNodes[o].outerHTML);return t}(a);t({html:e,baseUrl:p,width:window.innerWidth,height:window.innerHeight,isMobile:m()})}))}))};function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,"rerender",void 0),J(this,"stream",void 0),J(this,"mediaRecorder",void 0),J(this,"audioMuted",!1),J(this,"audioAvailable",!0),J(this,"available",!0),J(this,"isRecording",!1),J(this,"file",null),J(this,"maxRecordTime",120),J(this,"recordTime",0),J(this,"recordingTimer",null),J(this,"permissionErrorText",""),J(this,"startScreenRecording",(function(){var e=this;if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia||this.isRecording)return this.available=!1,void this.rerender();navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,3072)},height:{ideal:Math.min(window.screen.height,1728)},frameRate:{ideal:10,max:24},displaySurface:"monitor"},audio:!0}).then((function(t){e.stream=t,e.audioMuted?(e.audioAvailable=!1,e.handleRecord({stream:t})):e.startAudioRecording(),e.rerender()})).catch((function(t){window.alert(e.permissionErrorText),e.rerender()}))})),J(this,"stopScreenRecording",(function(){this.mediaRecorder&&this.stream&&this.isRecording&&(this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.mediaRecorder.stop(),this.stream.getTracks().forEach((function(e){e.stop()})),this.rerender())})),J(this,"startAudioRecording",(function(){var e=this;this.stream&&navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){for(var n=0;n<t.getAudioTracks().length;n++)e.stream.addTrack(t.getAudioTracks()[n]);e.audioMuted=!1,e.audioAvailable=!0,e.handleRecord({stream:e.stream}),e.rerender()})).catch((function(t){e.audioAvailable=!1,e.handleRecord({stream:e.stream}),e.rerender()}))})),J(this,"toggleAudio",(function(){if(this.audioMuted=!this.audioMuted,this.rerender(),this.stream)for(var e=this.stream.getAudioTracks(),t=0;t<e.length;t++){e[t].enabled=!this.audioMuted}})),J(this,"clearPreview",(function(){document.querySelector(".bb-capture-preview video").src=null,this.file=null,this.rerender()})),J(this,"handleRecord",(function(e){var t=e.stream,n=this,o=[];this.mediaRecorder=new MediaRecorder(t,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var r=document.querySelector(".bb-capture-toolbar-item-timer");this.recordingTimer=setInterval((function(){n.recordTime++;var e=n.maxRecordTime-n.recordTime;e>0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&o.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(o)},this.mediaRecorder.onstop=function(){n.prepareRecording(o)},this.mediaRecorder.start(200),n.rerender()})),J(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(){o.rerender()}),100)}var t,n,o;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<e?":":":0")+e}}])&&X(t.prototype,n),o&&X(t,o),e}();function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}J(Y,"uploadScreenRecording",(function(e){return new Promise((function(t,n){null==e&&t(null);var o=new XMLHttpRequest;o.open("POST",E.getInstance().apiUrl+"/uploads/sdk"),E.getInstance().injectSession(o);var r=new FormData;r.append("file",e),o.send(r),o.onerror=function(){n()},o.onreadystatechange=function(){4==o.readyState&&(200==o.status?t(JSON.parse(o.response).fileUrl):n())}}))}));var ee=function(){function e(t,n,o,r,a,i,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$(this,"excludeData",{}),$(this,"type","BUG"),$(this,"priority","LOW"),$(this,"customData",{}),$(this,"metaData",{}),$(this,"consoleLog",[]),$(this,"networkLogs",[]),$(this,"customEventLog",[]),$(this,"formData",{}),$(this,"isSilent",!1),$(this,"outboundId",void 0),$(this,"screenshotData",void 0),$(this,"webReplay",void 0),$(this,"screenRecordingUrl",void 0),$(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=o,this.isSilent=r,this.excludeData=a,this.outboundId=i,this.spamToken=s}var t,n,o;return t=e,(n=[{key:"takeSnapshot",value:function(){var e=this,t=Zt.getInstance();this.customData=ke.getInstance().getCustomData(),this.metaData=ce.getInstance().getMetaData(),this.consoleLog=he.getInstance().getLogs(),this.networkLogs=v.getInstance().getRequests(),this.customEventLog=D.getInstance().getEventArray();var n=[],o=t.getGlobalDataItem("webReplay");null!==o&&(this.webReplay=o);var r,a=t.getGlobalDataItem("screenRecordingData");if(null!=a){var i=Y.uploadScreenRecording(a).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(i)}if(!this.excludeData||!this.excludeData.screenshot){var s=(r=t.isLiveMode(),K(r)).then((function(n){if(n){var o=t.getGlobalDataItem("snapshotPosition");n.x=o.x,n.y=o.y,e.screenshotData=n}}));n.push(s)}return Promise.all(n)}},{key:"getData",value:function(){var e={type:this.type,priority:this.priority,customData:this.customData,metaData:this.metaData,consoleLog:this.consoleLog,networkLogs:this.networkLogs,customEventLog:this.customEventLog,formData:this.formData,isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=xt.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),o=0;o<n.length;o++){var r=n[o];!0===this.excludeData[r]&&(e[r]&&delete e[r],"screenshot"===r&&delete e.screenshotData,"replays"===r&&delete e.webReplay)}return e}},{key:"getTicketData",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var n=e.getData();t(n)})).catch((function(e){n()}))}))}},{key:"sendFeedback",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var o=e.getData(),r=new XMLHttpRequest;r.open("POST",E.getInstance().apiUrl+"/bugs/v2"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.getInstance().injectSession(r),r.onerror=function(e){n()},r.onreadystatechange=function(e){if(4===r.readyState)if(200===r.status||201===r.status)try{var o=JSON.parse(r.responseText);t(o)}catch(a){n()}else n()},r.send(JSON.stringify(o))})).catch((function(e){n()}))}))}}])&&Q(t.prototype,n),o&&Q(t,o),e}();function te(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ne(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 ne(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),re(this,"frameUrl","https://messenger-app.gleap.io"),re(this,"gleapFrameContainer",null),re(this,"gleapFrame",null),re(this,"injectedFrame",!1),re(this,"widgetOpened",!1),re(this,"listeners",[]),re(this,"appMode","widget"),re(this,"markerManager",void 0),re(this,"escListener",void 0),re(this,"frameHeight",0),re(this,"queue",[]),re(this,"urlHandler",(function(e,t){e&&e.length>0&&(t?window.open(e,"_blank").focus():window.location.href=e)})),re(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),re(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),I((function(){B.getInstance().onConfigLoaded((function(){B.getInstance().applyStylesFromConfig();var e=document.createElement("div");e.className="gleap-frame-container gleap-frame-container--hidden gl-block",e.innerHTML='<div class="gleap-frame-container-inner"><iframe src="'.concat(t.frameUrl,'" class="gleap-frame" scrolling="yes" title="Gleap Widget Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe></div>'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)}))})))})),re(this,"showImage",(function(e){I((function(){var t=document.createElement("div");t.className="gleap-image-view",t.innerHTML='<div class="gleap-image-view-close">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm97.9-320l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z"/></svg>\n </div><img class="gleap-image-view-image" src="'.concat(e,'" />'),document.body.appendChild(t);var n=function(){t.remove()};t.querySelector(".gleap-image-view-close").addEventListener("click",(function(){n()})),t.addEventListener("click",(function(e){e.target===t&&n()}))}))})),re(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",o="gleap-frame-container--survey-full",a="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",c="gleap-frame-container--no-button",l=[a,i,n,s,c,e,o],u=0;u<l.length;u++)t.gleapFrameContainer.classList.remove(l[u]);var d=void 0,p=B.getInstance().getFlowConfig();p.feedbackButtonPosition!==r.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==r.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=a),p.feedbackButtonPosition===r.FEEDBACK_BUTTON_CLASSIC_LEFT&&(d=i),p.feedbackButtonPosition===r.FEEDBACK_BUTTON_BOTTOM_LEFT&&(d=s),null===r.getInstance().buttonHidden?p.feedbackButtonPosition===r.FEEDBACK_BUTTON_NONE&&(d=c):r.getInstance().buttonHidden&&(d=c),d&&t.gleapFrameContainer.classList.add(d),"survey"===t.appMode&&t.gleapFrameContainer.classList.add(e),"survey_full"===t.appMode&&t.gleapFrameContainer.classList.add(o),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",nt.getInstance().isRTLLayout?"rtl":"ltr")}})),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setUrlHandler",value:function(e){this.urlHandler=e}},{key:"isSurvey",value:function(){return"survey"===this.appMode||"survey_full"===this.appMode}},{key:"setAppMode",value:function(e){this.appMode=e,this.updateFrameStyle();var t=document.querySelector(".gleap-frame-container-inner");"widget"!==this.appMode&&"survey_full"!==this.appMode||!t||(t.style.maxHeight="".concat(700,"px"))}},{key:"registerEscListener",value:function(){var e=this;this.escListener||(this.escListener=function(t){"Escape"===(t=t||window.event).key&&e.hideWidget()},document.addEventListener("keydown",this.escListener))}},{key:"unregisterEscListener",value:function(){this.escListener&&(document.removeEventListener("keydown",this.escListener),this.escListener=null)}},{key:"destroy",value:function(){this.gleapFrame&&this.gleapFrame.remove(),this.gleapFrameContainer&&this.gleapFrameContainer.remove(),this.injectedFrame=!1,this.widgetOpened=!1,this.markerManager=void 0,this.gleapFrameContainer=null,this.gleapFrame=null}},{key:"isOpened",value:function(){return this.widgetOpened||null!=this.markerManager}},{key:"showFrameContainer",value:function(e){var t=this;if(this.gleapFrameContainer){var n=B.getInstance().getFlowConfig(),o="gleap-frame-container--loading";this.gleapFrameContainer.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),n.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),n.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){t.gleapFrameContainer.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),Zt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),Se.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){dt.getInstance().clearAllNotifications(this.isSurvey()),dt.getInstance().setNotificationCount(0),r.getInstance().updateFeedbackButtonState()}},{key:"showWidget",value:function(){var t=this;setTimeout((function(){t.gleapFrameContainer?t.runWidgetShouldOpenCallback():e.getInstance().injectFrame(),t.updateUI()}),0)}},{key:"updateWidgetStatus",value:function(){this.sendMessage({name:"widget-status-update",data:{isWidgetOpen:this.widgetOpened}})}},{key:"hideMarkerManager",value:function(){this.markerManager&&(this.markerManager.clear(),this.markerManager=null)}},{key:"hideWidget",value:function(){this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),this.widgetOpened=!1,this.updateWidgetStatus(),r.getInstance().updateFeedbackButtonState(),Se.notifyEvent("close"),dt.getInstance().reloadNotificationsFromCache(),this.unregisterEscListener(),"undefined"!=typeof window&&void 0!==window.focus&&window.focus()}},{key:"sendMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:E.getInstance().getSession(),apiUrl:E.getInstance().apiUrl,sdkKey:E.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:B.getInstance().getFlowConfig(),overrideLanguage:nt.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new $e(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=te(this.queue);this.queue=[];for(var t=0;t<e.length;t++)this.sendMessage(e[t],!0)}},{key:"startCommunication",value:function(){var e=this;this.addMessageListener((function(t){if("ping"===t.name&&(e.sendConfigUpdate(),e.sendSessionUpdate(),e.workThroughQueue(),setTimeout((function(){e.runWidgetShouldOpenCallback()}),300)),"play-ping"===t.name&&yt.ping(),"open-image"===t.name&&e.showImage(t.data.url),"page-changed"===t.name&&(!t.data||"newsdetails"!==t.data.name&&"appextended"!==t.data.name?"extended"===e.appMode&&e.setAppMode("widget"):e.setAppMode("extended")),"collect-ticket-data"===t.name){var n={customData:ke.getInstance().getCustomData(),metaData:ce.getInstance().getMetaData(),consoleLog:he.getInstance().getLogs(),networkLogs:v.getInstance().getRequests(),customEventLog:D.getInstance().getEventArray()},o=xt.getInstance().getTags();o&&o.length>0&&(n.tags=o),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var r=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode||!r||(r.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&Se.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var a=t.data,i=!!t.newTab;e.urlHandler(a,i)}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var s=t.data.formData,c=t.data.action,l=t.data.outboundId,u=t.data.spamToken;new ee(c.feedbackType,"MEDIUM",s,!1,c.excludeData,l,u).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Se.notifyEvent("feedback-sent",s)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Se.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===vt.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),o=0;o<e.listeners.length;o++)e.listeners[o]&&e.listeners[o](n)}catch(r){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}])&&oe(t.prototype,n),o&&oe(t,o),e}();function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}re(ae,"instance",void 0);var ce=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se(this,"sessionStart",new Date),se(this,"appBuildNumber",""),se(this,"appVersionCode",""),se(this,"environment","prod")}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setAppVersionCode",value:function(e){this.getInstance().appVersionCode=e}},{key:"setAppBuildNumber",value:function(e){this.getInstance().appBuildNumber=e}}],(n=[{key:"getSessionDuration",value:function(){var e=new Date;return Math.round((e.getTime()-this.sessionStart.getTime())/1e3)}},{key:"getMetaData",value:function(){var e,t,n,o=navigator.userAgent,r=navigator.appName,a=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10);-1!==(t=o.indexOf("Opera"))?(r="Opera",a=o.substring(t+6),-1!==(t=o.indexOf("Version"))&&(a=o.substring(t+8))):-1!==(t=o.indexOf("MSIE"))?(r="Microsoft Internet Explorer",a=o.substring(t+5)):-1!==(t=o.indexOf("Chrome"))?(r="Chrome",a=o.substring(t+7)):-1!==(t=o.indexOf("Safari"))?(r="Safari",a=o.substring(t+7),-1!==(t=o.indexOf("Version"))&&(a=o.substring(t+8))):-1!==(t=o.indexOf("Firefox"))?(r="Firefox",a=o.substring(t+8)):(e=o.lastIndexOf(" ")+1)<(t=o.lastIndexOf("/"))&&(r=o.substring(e,t),a=o.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=navigator.appName)),-1!==(n=a.indexOf(";"))&&(a=a.substring(0,n)),-1!==(n=a.indexOf(" "))&&(a=a.substring(0,n)),i=parseInt(""+a,10),isNaN(i)&&(a=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10));var s="Unknown OS";return-1!==navigator.appVersion.indexOf("Win")&&(s="Windows"),-1!==navigator.appVersion.indexOf("Mac")&&(s="MacOS"),-1!==navigator.appVersion.indexOf("X11")&&(s="UNIX"),-1!==navigator.appVersion.indexOf("Linux")&&(s="Linux"),-1!==navigator.appVersion.indexOf("iPad")&&(s="iPad"),-1!==navigator.appVersion.indexOf("iPhone")&&(s="iPhone"),-1!==navigator.appVersion.indexOf("Android")&&(s="Android"),{browserName:r+"("+a+")",userAgent:o,browser:r,systemName:s,buildVersionNumber:this.appBuildNumber,releaseVersionNumber:this.appVersionCode,sessionDuration:this.getSessionDuration(),devicePixelRatio:window.devicePixelRatio,screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,currentUrl:window.location.href,language:navigator.language||navigator.userLanguage,mobile:m(),sdkVersion:"13.2.0",sdkType:"javascript",environment:this.environment}}}])&&ie(t.prototype,n),o&&ie(t,o),e}();function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}se(ce,"instance",void 0);var he=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pe(this,"logArray",[]),pe(this,"disabled",!1),pe(this,"originalConsoleLog",void 0),pe(this,"logMaxLength",500)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getLogs",value:function(){return this.logArray}},{key:"stop",value:function(){this.disabled=!0,this.originalConsoleLog&&(window.console=this.originalConsoleLog)}},{key:"addLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:y(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 o=0;o<e.length;o++)n+=e[o]+" "}catch(r){}this.addLog(n,t)}}},{key:"start",value:function(){if(!this.disabled){var e,t=this;window.console=(e=window.console,window.console&&e||(e={}),t.originalConsoleLog=e,ue(ue({},e),{},{log:function(){t.addLogWithArgs(arguments,"INFO"),e.log&&e.log.apply(e,arguments)},warn:function(){t.addLogWithArgs(arguments,"WARNING"),e.warn&&e.warn.apply(e,arguments)},error:function(){t.addLogWithArgs(arguments,"ERROR"),e.error&&e.error.apply(e,arguments)},info:function(n){t.addLogWithArgs(arguments,"INFO"),e.info&&e.info.apply(e,arguments)}}))}}}])&&de(t.prototype,n),o&&de(t,o),e}();function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}pe(he,"instance",void 0);var ge,ve,me,be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){document.addEventListener("click",(function(e){e.target&&(ae.getInstance().isOpened()||he.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=y(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),o="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(o=' id="'.concat(a,'"'));var i=e.getAttribute("class");i&&(r=' class="'.concat(i,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(o).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)}(e.target),"CLICK"))}))}}])&&fe(t.prototype,n),o&&fe(t,o),e}();function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}me=void 0,(ve="instance")in(ge=be)?Object.defineProperty(ge,ve,{value:me,enumerable:!0,configurable:!0,writable:!0}):ge[ve]=me;var ke=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),we(this,"customData",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,b(e))}},{key:"setCustomData",value:function(e,t){this.customData[e]=t}},{key:"removeCustomData",value:function(e){delete this.customData[e]}},{key:"clearCustomData",value:function(){this.customData={}}}])&&ye(t.prototype,n),o&&ye(t,o),e}();function xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}we(ke,"instance",void 0);var Se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ce(this,"eventListeners",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"notifyEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=Zt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var o=this.getInstance().eventListeners[e];if(o)for(var r=0;r<o.length;r++){var a=o[r];a&&a(t)}}},{key:"on",value:function(e,t){var n=this.getInstance();n.eventListeners[e]||(n.eventListeners[e]=[]),n.eventListeners[e].push(t)}}],(n=null)&&xe(t.prototype,n),o&&xe(t,o),e}();function Ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ce(Se,"instance",void 0);var Te=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Le(this,"customActionCallbacks",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"registerCustomAction",value:function(e){var t=this.getInstance();t.customActionCallbacks&&t.customActionCallbacks.push(e)}},{key:"triggerCustomAction",value:function(e){var t=this.getInstance();if(t.customActionCallbacks)for(var n=0;n<t.customActionCallbacks.length;n++){var o=t.customActionCallbacks[n];o&&o({name:e})}}}],(n=null)&&Ie(t.prototype,n),o&&Ie(t,o),e}();function Oe(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 o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(c){s=!0,r=c}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||Re(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 Me(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Re(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function Re(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Pe(e,t,n){return t&&Ne(e.prototype,t),n&&Ne(e,n),e}function Fe(e){return(Fe="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)}Le(Te,"instance",void 0);var Be=function(){var e,t;function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function o(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function r(e){try{var t=e.rules||e.cssRules;return t?function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t).map(a).join("")):null}catch(n){return null}}function a(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=r(e.styleSheet)||t}catch(n){}return t}(t=e||(e={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var i=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function s(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,a=e.maskInputFn,i=r||"";return(t[n.toLowerCase()]||t[o])&&(i=a?a(i):"*".repeat(i.length)),i}var c="__rrweb_original__";var l=1,u=new RegExp("[^a-z0-9-_:]");function d(){return l++}var p,h,f=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,g=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,v=/^(data:)([^,]*),(.*)/i;function m(e,t){return(e||"").replace(f,(function(e,n,o,r,a,i){var s=o||a||i,c=n||r||"";if(!s)return e;if(!g.test(s)||v.test(s))return"url(".concat(c).concat(s).concat(c,")");if("/"===s[0])return"url(".concat(c).concat(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s).concat(c,")");var l=t.split("/"),u=s.split("/");l.pop();for(var d=0,p=u;d<p.length;d++){var h=p[d];"."!==h&&(".."===h?l.pop():l.push(h))}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var b=/^[^ \t\n\r\u000c]+/,y=/^[, \t\n\r\u000c]+/;function w(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function k(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function x(){var e=document.createElement("a");return e.href="",e.href}function C(e,t,n,o){return"src"===n||"href"===n&&o&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&o&&"#"!==o[0]||"background"===n&&o&&("table"===t||"td"===t||"th"===t)?w(e,o):"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}for(var r=[];o(y),!(n>=t.length);){var a=o(b);if(","===a.slice(-1))a=w(e,a.substring(0,a.length-1)),r.push(a);else{var i="";a=w(e,a);for(var s=!1;;){var c=t.charAt(n);if(""===c){r.push((a+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,r.push((a+i).trim());break}"("===c&&(s=!0)}i+=c,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?m(o,x()):"object"===t&&"data"===n&&o?w(e,o):o}function S(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&S(e.parentNode,t,n);for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&S(e.parentNode,t,n)}function I(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t)||o.closest(".".concat(t)))return!0}else if(S(o,t,!0))return!0;return!(!n||!o.matches(n)&&!o.closest(n))}function L(t,n){var o=n.doc,a=n.mirror,i=n.blockClass,l=n.blockSelector,d=n.maskTextClass,f=n.maskTextSelector,g=n.inlineStylesheet,v=n.maskInputOptions,b=void 0===v?{}:v,y=n.maskTextFn,w=n.maskInputFn,S=n.dataURLOptions,L=void 0===S?{}:S,T=n.inlineImages,O=n.recordCanvas,M=n.keepIframeSrcFn,E=n.newlyAddedElement,R=void 0!==E&&E,A=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(o,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:A};case t.ELEMENT_NODE:return function(t,n){for(var o=n.doc,a=n.blockClass,i=n.blockSelector,l=n.inlineStylesheet,d=n.maskInputOptions,f=void 0===d?{}:d,g=n.maskInputFn,v=n.dataURLOptions,b=void 0===v?{}:v,y=n.inlineImages,w=n.recordCanvas,S=n.keepIframeSrcFn,I=n.newlyAddedElement,L=void 0!==I&&I,T=n.rootId,O=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,a,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),E={},R=t.attributes.length,A=0;A<R;A++){var D=t.attributes[A];E[D.name]=C(o,M,D.name,D.value)}if("link"===M&&l){var N=Array.from(o.styleSheets).find((function(e){return e.href===t.href})),P=null;N&&(P=r(N)),P&&(delete E.rel,delete E.href,E._cssText=m(P,N.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(P=r(t.sheet))&&(E._cssText=m(P,x()))}if("input"===M||"textarea"===M||"select"===M){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=s({type:E.type,tagName:M,value:F,maskInputOptions:f,maskInputFn:g}):B&&(E.checked=B)}if("option"===M&&(t.selected&&!f.select?E.selected=!0:delete E.selected),"canvas"===M&&w)if("2d"===t.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var o=0;o<e.height;o+=50){var r=t.getImageData,a=c in r?r[c]:r;if(new Uint32Array(a.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(b.type,b.quality));else if(!("__context"in t)){var j=t.toDataURL(b.type,b.quality),_=document.createElement("canvas");_.width=t.width,_.height=t.height,j!==_.toDataURL(b.type,b.quality)&&(E.rr_dataURL=j)}if("img"===M&&y){p||(p=o.createElement("canvas"),h=p.getContext("2d"));var U=t,q=U.crossOrigin;U.crossOrigin="anonymous";var H=function(){try{p.width=U.naturalWidth,p.height=U.naturalHeight,h.drawImage(U,0,0),E.rr_dataURL=p.toDataURL(b.type,b.quality)}catch(e){console.warn("Cannot inline img src=".concat(U.currentSrc,"! Error: ").concat(e))}q?E.crossOrigin=q:U.removeAttribute("crossorigin")};U.complete&&0!==U.naturalWidth?H():U.onload=H}if(("audio"===M||"video"===M)&&(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime),L||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),O){var W=t.getBoundingClientRect(),z=W.width,G=W.height;E={class:E.class,rr_width:"".concat(z,"px"),rr_height:"".concat(G,"px")}}return"iframe"===M&&!S(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src),{type:e.Element,tagName:M,attributes:E,childNodes:[],isSVG:k(t)||void 0,needBlock:O,rootId:T}}(t,{doc:o,blockClass:i,blockSelector:l,inlineStylesheet:g,maskInputOptions:b,maskInputFn:w,dataURLOptions:L,inlineImages:T,recordCanvas:O,keepIframeSrcFn:M,newlyAddedElement:R,rootId:A});case t.TEXT_NODE:return function(t,n){var o,r=n.maskTextClass,a=n.maskTextSelector,i=n.maskTextFn,s=n.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||null!==(o=t.parentNode.sheet)&&void 0!==o&&o.cssRules&&(l=function(e){return e.cssRules?Array.from(e.cssRules).map((function(e){return e.cssText||""})).join(""):""}(t.parentNode.sheet))}catch(y){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(y),t)}l=m(l,x())}return d&&(l="SCRIPT_PLACEHOLDER"),!u&&!d&&l&&I(t,r,a)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:d,maskTextSelector:f,maskTextFn:y,rootId:A});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:A};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:A};default:return!1}}function T(e){return void 0===e?"":e.toLowerCase()}function O(t,r){var a,i=r.doc,s=r.mirror,c=r.blockClass,l=r.blockSelector,u=r.maskTextClass,p=r.maskTextSelector,h=r.skipChild,f=void 0!==h&&h,g=r.inlineStylesheet,v=void 0===g||g,m=r.maskInputOptions,b=void 0===m?{}:m,y=r.maskTextFn,w=r.maskInputFn,k=r.slimDOMOptions,x=r.dataURLOptions,C=void 0===x?{}:x,S=r.inlineImages,I=void 0!==S&&S,M=r.recordCanvas,E=void 0!==M&&M,R=r.onSerialize,A=r.onIframeLoad,D=r.iframeLoadTimeout,N=void 0===D?5e3:D,P=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,B=void 0===F?5e3:F,j=r.keepIframeSrcFn,_=void 0===j?function(){return!1}:j,U=r.newlyAddedElement,q=void 0!==U&&U,H=r.preserveWhiteSpace,W=void 0===H||H,z=L(t,{doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,dataURLOptions:C,inlineImages:I,recordCanvas:E,keepIframeSrcFn:_,newlyAddedElement:q});if(!z)return console.warn(t,"not serialized"),null;a=s.hasNode(t)?s.getId(t):function(t,n){return!!(n.comment&&t.type===e.Comment||t.type===e.Element&&(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js"))||n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(T(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(t.attributes.name)||"icon"===T(t.attributes.rel)||"apple-touch-icon"===T(t.attributes.rel)||"shortcut icon"===T(t.attributes.rel)))||"meta"===t.tagName&&(n.headMetaDescKeywords&&T(t.attributes.name).match(/^description|keywords$/)||n.headMetaSocial&&(T(t.attributes.property).match(/^(og|twitter|fb):/)||T(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(t.attributes.name))||n.headMetaRobots&&("robots"===T(t.attributes.name)||"googlebot"===T(t.attributes.name)||"bingbot"===T(t.attributes.name))||n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"]||n.headMetaAuthorship&&("author"===T(t.attributes.name)||"generator"===T(t.attributes.name)||"framework"===T(t.attributes.name)||"publisher"===T(t.attributes.name)||"progid"===T(t.attributes.name)||T(t.attributes.property).match(/^article:/)||T(t.attributes.property).match(/^product:/))||n.headMetaVerification&&("google-site-verification"===T(t.attributes.name)||"yandex-verification"===T(t.attributes.name)||"csrf-token"===T(t.attributes.name)||"p:domain_verify"===T(t.attributes.name)||"verify-v1"===T(t.attributes.name)||"verification"===T(t.attributes.name)||"shopify-checkout-api-token"===T(t.attributes.name)))))}(z,k)||!W&&z.type===e.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?-2:d();var G=Object.assign(z,{id:a});if(s.add(t,G),-2===a)return null;R&&R(t);var V=!f;if(G.type===e.Element){V=V&&!G.needBlock,delete G.needBlock;var Z=t.shadowRoot;Z&&o(Z)&&(G.isShadowHost=!0)}if((G.type===e.Document||G.type===e.Element)&&V){k.headWhitespace&&G.type===e.Element&&"head"===G.tagName&&(W=!1);for(var K={doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_},X=0,J=Array.from(t.childNodes);X<J.length;X++){($=O(J[X],K))&&G.childNodes.push($)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(var Y=0,Q=Array.from(t.shadowRoot.childNodes);Y<Q.length;Y++){var $;($=O(Q[Y],K))&&(o(t.shadowRoot)&&($.isShadow=!0),G.childNodes.push($))}}return t.parentNode&&n(t.parentNode)&&o(t.parentNode)&&(G.isShadow=!0),G.type===e.Element&&"iframe"===G.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var r,a=!1;try{r=o.document.readyState}catch(c){return}if("complete"!==r){var i=setTimeout((function(){a||(t(),a=!0)}),n);return void e.addEventListener("load",(function(){clearTimeout(i),a=!0,t()}))}var s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}(t,(function(){var e=t.contentDocument;if(e&&A){var n=O(e,{doc:e,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_});n&&A(t,n)}}),N),G.type===e.Element&&"link"===G.tagName&&"stylesheet"===G.attributes.rel&&function(e,t,n){var o,r=!1;try{o=e.sheet}catch(i){return}if(!o){var a=setTimeout((function(){r||(t(),r=!0)}),n);e.addEventListener("load",(function(){clearTimeout(a),r=!0,t()}))}}(t,(function(){if(P){var e=O(t,{doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_});e&&P(t,e)}}),B),G}function M(e,t){var n=t||{},o=n.mirror,r=void 0===o?new i:o,a=n.blockClass,s=void 0===a?"rr-block":a,c=n.blockSelector,l=void 0===c?null:c,u=n.maskTextClass,d=void 0===u?"rr-mask":u,p=n.maskTextSelector,h=void 0===p?null:p,f=n.inlineStylesheet,g=void 0===f||f,v=n.inlineImages,m=void 0!==v&&v,b=n.recordCanvas,y=void 0!==b&&b,w=n.maskAllInputs,k=void 0!==w&&w,x=n.maskTextFn,C=n.maskInputFn,S=n.slimDOM,I=void 0!==S&&S,L=n.dataURLOptions,T=n.preserveWhiteSpace,M=n.onSerialize,E=n.onIframeLoad,R=n.iframeLoadTimeout,A=n.onStylesheetLoad,D=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn;return O(e,{doc:e,mirror:r,blockClass:s,blockSelector:l,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:x,maskInputFn:C,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:L,inlineImages:m,recordCanvas:y,preserveWhiteSpace:T,onSerialize:M,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===N?function(){return!1}:N,newlyAddedElement:!1})}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var R="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",A={map:{},getId:function(){return console.error(R),-1},getNode:function(){return console.error(R),null},removeNodeFromMap:function(){console.error(R)},has:function(){return console.error(R),!1},reset:function(){console.error(R)}};function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var c=Date.now();!r&&!1===n.leading&&(r=c);var l=t-(c-r),u=this;l<=0||l>t?(o&&(clearTimeout(o),o=null),r=c,e.apply(u,i)):!o&&!1!==n.trailing&&(o=setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(u,i)}),l))}}function N(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return N(e,t,a||{},!0)}}function P(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(a){return function(){}}}function F(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function j(e,t,n,o){if(!e)return!1;var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if("string"==typeof t){if(r.classList.contains(t)||o&&null!==r.closest("."+t))return!0}else if(S(r,t,o))return!0;return!(!n||!(e.matches(n)||o&&null!==r.closest(n)))}function _(e,t){return-2===t.getId(e)}function U(e,t){if(n(e))return!1;var o=t.getId(e);return!t.has(o)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||U(e.parentNode,t))}function q(e){return Boolean(e.changedTouches)}function H(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===r)return!0}while(r=r&&r.parentNode);return!1})}function W(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function z(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function G(e){return Boolean(null==e?void 0:e.shadowRoot)}("undefined"==typeof window?"undefined":Fe(window))<"u"&&window.Proxy&&window.Reflect&&(A=new Proxy(A,{get:function(e,t,n){return"map"===t&&console.error(R),Reflect.get(e,t,n)}}));var V=function(){function e(){De(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return Pe(e,[{key:"getId",value:function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),Z=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(Z||{}),K=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(K||{}),X=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(X||{}),J=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(J||{}),Y=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Y||{}),Q=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(Q||{});function $(e){return"__ln"in e}var ee=function(){function e(){De(this,e),this.length=0,this.head=null}return Pe(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++){var o;t=(null===(o=t)||void 0===o?void 0:o.next)||null}return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&$(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&$(e.nextSibling)&&e.nextSibling.__ln.previous){var o=e.nextSibling.__ln.previous;t.previous=o,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,o&&(o.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;!this.head||(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),te=function(e,t){return"".concat(e,"@").concat(t)},ne=function(){function e(){var t=this;De(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],o=new ee,r=function(e){for(var n=e,o=-2;-2===o;)o=(n=n&&n.nextSibling)&&t.mirror.getId(n);return o},a=function(a){var i,s,c,l,u=null;(null==(s=null==(i=a.getRootNode)?void 0:i.call(a))?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(u=a.getRootNode().host);for(var d=u;(null==(l=null==(c=null===(p=d)||void 0===p?void 0:p.getRootNode)?void 0:c.call(d))?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;){var p;d=d.getRootNode().host}var h=!(t.doc.contains(a)||d&&t.doc.contains(d));if(a.parentNode&&!h){var f=n(a.parentNode)?t.mirror.getId(u):t.mirror.getId(a.parentNode),g=r(a);if(-1===f||-1===g)return o.addNode(a);var v=O(a,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){W(e,t.mirror)&&t.iframeManager.addIframe(e),z(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),G(a)&&t.shadowDomManager.addShadowRoot(a.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});v&&e.push({parentId:f,nextId:g,node:v})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var i=0,s=Array.from(t.movedSet.values());i<s.length;i++){var c=s[i];re(t.removes,c,t.mirror)&&!t.movedSet.has(c.parentNode)||a(c)}for(var l=0,u=Array.from(t.addedSet.values());l<u.length;l++){var d=u[l];!ie(t.droppedSet,d)&&!re(t.removes,d,t.mirror)||ie(t.movedSet,d)?a(d):t.droppedSet.add(d)}for(var p=null;o.length;){var h=null;if(p){var f=t.mirror.getId(p.value.parentNode),g=r(p.value);-1!==f&&-1!==g&&(h=p)}if(!h)for(var v=o.length-1;v>=0;v--){var m=o.get(v);if(m){var b=t.mirror.getId(m.value.parentNode);if(-1===r(m.value))continue;if(-1!==b){h=m;break}var y=m.value;if(y.parentNode&&y.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var w=y.parentNode.host;if(-1!==t.mirror.getId(w)){h=m;break}}}}if(!h){for(;o.head;)o.removeNode(o.head.value);break}p=h.previous,o.removeNode(h.value),a(h.value)}var k={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};!k.texts.length&&!k.attributes.length&&!k.removes.length&&!k.adds.length||(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(k))}},this.processMutation=function(e){if(!_(e.target,t.mirror))switch(e.type){case"characterData":var r=e.target.textContent;!j(e.target,t.blockClass,t.blockSelector,!1)&&r!==e.oldValue&&t.texts.push({value:I(e.target,t.maskTextClass,t.maskTextSelector)&&r?t.maskTextFn?t.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var a=e.target,i=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(i=s({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:t.maskInputFn})),j(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var c=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===a.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(i)){if(a.contentDocument)return;e.attributeName="rr_src"}if(c||(c={node:e.target,attributes:{}},t.attributes.push(c)),"style"===e.attributeName){var l=t.doc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue),(void 0===c.attributes.style||null===c.attributes.style)&&(c.attributes.style={});for(var u=c.attributes.style,d=0,p=Array.from(a.style);d<p.length;d++){var h=p[d],f=a.style.getPropertyValue(h),g=a.style.getPropertyPriority(h);(f!==l.style.getPropertyValue(h)||g!==l.style.getPropertyPriority(h))&&(u[h]=""===g?f:[f,g])}for(var v=0,m=Array.from(l.style);v<m.length;v++){var b=m[v];""===a.style.getPropertyValue(b)&&(u[b]=!1)}}else c.attributes[e.attributeName]=C(t.doc,a.tagName,e.attributeName,i);break;case"childList":if(j(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(r){var a=t.mirror.getId(r),i=n(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);j(e.target,t.blockClass,t.blockSelector,!1)||_(r,t.mirror)||!function(e,t){return-1!==t.getId(e)}(r,t.mirror)||(t.addedSet.has(r)?(oe(t.addedSet,r),t.droppedSet.add(r)):t.addedSet.has(e.target)&&-1===a||U(e.target,t.mirror)||(t.movedSet.has(r)&&t.movedMap[te(a,i)]?oe(t.movedSet,r):t.removes.push({parentId:i,id:a,isShadow:!(!n(e.target)||!o(e.target))||void 0})),t.mapRemoves.push(r))}))}},this.genAdds=function(e,n){if(t.mirror.hasNode(e)){if(_(e,t.mirror))return;t.movedSet.add(e);var o=null;n&&t.mirror.hasNode(n)&&(o=t.mirror.getId(n)),o&&-1!==o&&(t.movedMap[te(t.mirror.getId(e),o)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);j(e,t.blockClass,t.blockSelector,!1)||e.childNodes.forEach((function(e){return t.genAdds(e)}))}}return Pe(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function oe(e,t){e.delete(t),t.childNodes.forEach((function(t){return oe(e,t)}))}function re(e,t,n){return 0!==e.length&&ae(e,t,n)}function ae(e,t,n){var o=t.parentNode;if(!o)return!1;var r=n.getId(o);return!!e.some((function(e){return e.id===r}))||ae(e,o,n)}function ie(e,t){return 0!==e.size&&se(e,t)}function se(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||se(e,n))}var ce=Object.defineProperty,le=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,fe=function(e,t,n){return t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ge=function(e,t){for(var n in t||(t={}))pe.call(t,n)&&fe(e,n,t[n]);if(de){var o,r=Ee(de(t));try{for(r.s();!(o=r.n()).done;){n=o.value;he.call(t,n)&&fe(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e},ve=[],me=("undefined"==typeof CSSGroupingRule?"undefined":Fe(CSSGroupingRule))<"u",be=("undefined"==typeof CSSMediaRule?"undefined":Fe(CSSMediaRule))<"u",ye=("undefined"==typeof CSSSupportsRule?"undefined":Fe(CSSSupportsRule))<"u",we=("undefined"==typeof CSSConditionRule?"undefined":Fe(CSSConditionRule))<"u";function ke(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function xe(e,t){var n,o,r,a=new ne;ve.push(a),a.init(e);var i=window.MutationObserver||window.__rrMutationObserver,s=null==(r=null==(o=null===(n=window)||void 0===n?void 0:n.Zone)?void 0:o.__symbol__)?void 0:r.call(o,"MutationObserver");s&&window[s]&&(i=window[s]);var c=new i(a.processMutations.bind(a));return c.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),c}function Ce(e){var t=e.mousemoveCb,n=e.sampling,o=e.doc,r=e.mirror;if(!1===n.mousemove)return function(){};var a,i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],l=D((function(e){var n=Date.now()-a;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],a=null}),s),u=D((function(e){var t=ke(e),n=q(e)?e.changedTouches[0]:e,o=n.clientX,i=n.clientY;a||(a=Date.now()),c.push({x:o,y:i,id:r.getId(t),timeOffset:Date.now()-a}),l(("undefined"==typeof DragEvent?"undefined":Fe(DragEvent))<"u"&&e instanceof DragEvent?K.Drag:e instanceof MouseEvent?K.MouseMove:K.TouchMove)}),i,{trailing:!1}),d=[E("mousemove",u,o),E("touchmove",u,o),E("drag",u,o)];return function(){d.forEach((function(e){return e()}))}}function Se(e){var t=e.mouseInteractionCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector,i=e.sampling;if(!1===i.mouseInteraction)return function(){};var s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];return Object.keys(X).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var i=e.toLowerCase(),s=function(e){return function(n){var i=ke(n);if(!j(i,r,a,!0)){var s=q(n)?n.changedTouches[0]:n;if(s){var c=o.getId(i),l=s.clientX,u=s.clientY;t({type:X[e],id:c,x:l,y:u})}}}}(e);c.push(E(i,s,n))})),function(){c.forEach((function(e){return e()}))}}function Ie(e){var t=e.scrollCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector;return E("scroll",D((function(e){var i=ke(e);if(i&&!j(i,r,a,!0)){var s=o.getId(i);if(i===n){var c=n.scrollingElement||n.documentElement;t({id:s,x:c.scrollLeft,y:c.scrollTop})}else t({id:s,x:i.scrollLeft,y:i.scrollTop})}}),e.sampling.scroll||100),n)}function Le(e){var t=e.viewportResizeCb,n=-1,o=-1;return E("resize",D((function(){var e=F(),r=B();(n!==e||o!==r)&&(t({width:Number(r),height:Number(e)}),n=e,o=r)}),200),window)}function Te(e,t){var n=ge({},e);return t||delete n.userTriggered,n}var Re=["INPUT","TEXTAREA","SELECT"],Ae=new WeakMap;function Ne(e){var t=e.inputCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector,i=e.ignoreClass,c=e.maskInputOptions,l=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=ke(e),o=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Re.indexOf(t.tagName)<0)&&!j(t,r,a,!0)){var u=t.type;if(!t.classList.contains(i)){var p=t.value,f=!1;"radio"===u||"checkbox"===u?f=t.checked:(c[t.tagName.toLowerCase()]||c[u])&&(p=s({maskInputOptions:c,tagName:t.tagName,type:u,value:p,maskInputFn:l})),h(t,Te({text:p,isChecked:f,userTriggered:o},d));var g=t.name;"radio"===u&&g&&f&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){e!==t&&h(e,Te({text:e.value,isChecked:!f,userTriggered:!1},d))}))}}}function h(e,n){var r=Ae.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Ae.set(e,n);var a=o.getId(e);t(function(e,t){return le(e,ue(t))}(ge({},n),{id:a}))}}var f=("last"===u.input?["change"]:["input","change"]).map((function(e){return E(e,p,n)})),g=n.defaultView;if(!g)return function(){f.forEach((function(e){return e()}))};var v=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),m=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push.apply(f,Me(m.map((function(e){return N(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){f.forEach((function(e){return e()}))}}function Be(e){return function(e,t){if(me&&e.parentRule instanceof CSSGroupingRule||be&&e.parentRule instanceof CSSMediaRule||ye&&e.parentRule instanceof CSSSupportsRule||we&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var o=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(o)}return t}(e,[])}function je(e,t,n){var o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function _e(e,t){var n=e.styleSheetRuleCb,o=e.mirror,r=e.stylesheetManager,a=t.win,i=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=function(e,t){var a=je(this,o,r.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:t}]}),i.apply(this,[e,t])};var s,c,l=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,removes:[{index:e}]}),l.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(s=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,replace:e}),s.apply(this,[e])}),a.CSSStyleSheet.prototype.replaceSync&&(c=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,replaceSync:e}),c.apply(this,[e])});var u={};me?u.CSSGroupingRule=a.CSSGroupingRule:(be&&(u.CSSMediaRule=a.CSSMediaRule),we&&(u.CSSConditionRule=a.CSSConditionRule),ye&&(u.CSSSupportsRule=a.CSSSupportsRule));var d={};return Object.entries(u).forEach((function(e){var t=Oe(e,2),a=t[0],i=t[1];d[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(e,t){var i=je(this.parentStyleSheet,o,r.styleMirror),s=i.id,c=i.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:[].concat(Me(Be(this)),[t||0])}]}),d[a].insertRule.apply(this,[e,t])},i.prototype.deleteRule=function(e){var t=je(this.parentStyleSheet,o,r.styleMirror),i=t.id,s=t.styleId;return(i&&-1!==i||s&&-1!==s)&&n({id:i,styleId:s,removes:[{index:[].concat(Me(Be(this)),[e])}]}),d[a].deleteRule.apply(this,[e])}})),function(){a.CSSStyleSheet.prototype.insertRule=i,a.CSSStyleSheet.prototype.deleteRule=l,s&&(a.CSSStyleSheet.prototype.replace=s),c&&(a.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach((function(e){var t=Oe(e,2),n=t[0],o=t[1];o.prototype.insertRule=d[n].insertRule,o.prototype.deleteRule=d[n].deleteRule}))}}function Ue(e,t){var n,o,r,a=e.mirror,i=e.stylesheetManager,s=null;s="#document"===t.nodeName?a.getId(t):a.getId(t.host);var c="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.ShadowRoot,l=Object.getOwnPropertyDescriptor(null==c?void 0:c.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&c&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:function(){var e;return null==(e=l.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{i.adoptStyleSheets(e,s)}catch(o){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):function(){}}function qe(e,t){var n=e.styleDeclarationCb,o=e.mirror,r=e.ignoreCSSAttributes,a=e.stylesheetManager,i=t.win,s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(e,t,i){var c;if(r.has(e))return s.apply(this,[e,t,i]);var l=je(null==(c=this.parentRule)?void 0:c.parentStyleSheet,o,a.styleMirror),u=l.id,d=l.styleId;return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,set:{property:e,value:t,priority:i},index:Be(this.parentRule)}),s.apply(this,[e,t,i])};var c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(r.has(e))return c.apply(this,[e]);var i=je(null==(t=this.parentRule)?void 0:t.parentStyleSheet,o,a.styleMirror),s=i.id,l=i.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,remove:{property:e},index:Be(this.parentRule)}),c.apply(this,[e])},function(){i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=c}}function He(e){var t=e.mediaInteractionCb,n=e.blockClass,o=e.blockSelector,r=e.mirror,a=e.sampling,i=function(e){return D((function(a){var i=ke(a);if(i&&!j(i,n,o,!0)){var s=i.currentTime,c=i.volume,l=i.muted,u=i.playbackRate;t({type:e,id:r.getId(i),currentTime:s,volume:c,muted:l,playbackRate:u})}}),a.media||500)},s=[E("play",i(Y.Play)),E("pause",i(Y.Pause)),E("seeked",i(Y.Seeked)),E("volumechange",i(Y.VolumeChange)),E("ratechange",i(Y.RateChange))];return function(){s.forEach((function(e){return e()}))}}function We(e){var t=e.fontCb,n=e.doc,o=n.defaultView;if(!o)return function(){};var r=[],a=new WeakMap,i=o.FontFace;o.FontFace=function(e,t,n){var o=new i(e,t,n);return a.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};var s=P(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=a.get(n);e&&(t(e),a.delete(n))}),0),e.apply(this,[n])}}));return r.push((function(){o.FontFace=i})),r.push(s),function(){r.forEach((function(e){return e()}))}}function ze(e){var t=e.doc,n=e.mirror,o=e.blockClass,r=e.blockSelector,a=e.selectionCb,i=!0,s=function(){var e=t.getSelection();if(!(!e||i&&null!=e&&e.isCollapsed)){i=e.isCollapsed||!1;for(var s=[],c=e.rangeCount||0,l=0;l<c;l++){var u=e.getRangeAt(l),d=u.startContainer,p=u.startOffset,h=u.endContainer,f=u.endOffset;j(d,o,r,!0)||j(h,o,r,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}a({ranges:s})}};return s(),E("selectionchange",s)}function Ge(e,t){var n=e.mutationCb,o=e.mousemoveCb,r=e.mouseInteractionCb,a=e.scrollCb,i=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,l=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,h=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),o.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),r.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),a.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),i.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),c.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),l.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),u.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),p.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)}}function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};Ge(e,t);var o,r=xe(e,e.doc),a=Ce(e),i=Se(e),s=Ie(e),c=Le(e),l=Ne(e),u=He(e),d=_e(e,{win:n}),p=Ue(e,e.doc),h=qe(e,{win:n}),f=e.collectFonts?We(e):function(){},g=ze(e),v=[],m=Ee(e.plugins);try{for(m.s();!(o=m.n()).done;){var b=o.value;v.push(b.observer(b.callback,n,b.options))}}catch(y){m.e(y)}finally{m.f()}return function(){ve.forEach((function(e){return e.reset()})),r.disconnect(),a(),i(),s(),c(),l(),u(),d(),p(),h(),f(),g(),v.forEach((function(e){return e()}))}}for(var Ze=function(){function e(t){De(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return Pe(e,[{key:"getId",value:function(e,t,n,o){var r=n||this.getIdToRemoteIdMap(e),a=o||this.getRemoteIdToIdMap(e),i=r.get(t);return i||(i=this.generateIdFn(),r.set(t,i),a.set(i,t)),i}},{key:"getIds",value:function(e,t){var n=this,o=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,o,r)}))}},{key:"getRemoteId",value:function(e,t,n){var o=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:o.get(t)||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,o=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,o)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),Ke=function(){function e(t){De(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ze(d),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ze(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return Pe(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){if("rrweb"===e.data.type){if(!e.source)return;var t=this.crossOriginIframeMap.get(e.source);if(!t)return;var n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,o=this;switch(t.type){case Z.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:Z.IncrementalSnapshot,data:{source:K.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Plugin:return t;case Z.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Z.IncrementalSnapshot:switch(t.data.source){case K.Mutation:return t.data.adds.forEach((function(t){o.replaceIds(t,e,["parentId","nextId","previousId"]),o.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((function(t){o.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){o.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case K.Drag:case K.TouchMove:case K.MouseMove:return t.data.positions.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case K.ViewportResize:return!1;case K.MediaInteraction:case K.MouseInteraction:case K.Scroll:case K.CanvasMutation:case K.Input:return this.replaceIds(t.data,e,["id"]),t;case K.StyleSheetRule:case K.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case K.Font:return t;case K.Selection:return t.data.ranges.forEach((function(t){o.replaceIds(t,e,["start","end"])})),t;case K.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((function(t){o.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,o){var r,a=Ee(o);try{for(a.s();!(r=a.n()).done;){var i=r.value;!Array.isArray(t[i])&&"number"!=typeof t[i]||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]))}}catch(s){a.e(s)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}}]),e}(),Xe=Object.defineProperty,Je=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,tt=function(e,t,n){return t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},nt=function(e,t){for(var n in t||(t={}))$e.call(t,n)&&tt(e,n,t[n]);if(Qe){var o,r=Ee(Qe(t));try{for(r.s();!(o=r.n()).done;){n=o.value;et.call(t,n)&&tt(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e},ot=function(e,t){return Je(e,Ye(t))},rt=function(){function e(t){De(this,e),this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;var n=this;this.restorePatches.push(P(Element.prototype,"attachShadow",(function(e){return function(t){var o=e.call(this,t);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}})))}return Pe(e,[{key:"addShadowRoot",value:function(e,t){var n=this;!o(e)||this.shadowDoms.has(e)||(this.shadowDoms.add(e),xe(ot(nt({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Ie(ot(nt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),Ue({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e)}),0))}},{key:"observeAttachShadow",value:function(e){if(e.contentWindow){var t=this;this.restorePatches.push(P(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(o){var r=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}}},{key:"reset",value:function(){this.restorePatches.forEach((function(e){return e()})),this.shadowDoms=new WeakSet}}]),e}(),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=("undefined"==typeof Uint8Array?"undefined":Fe(Uint8Array))>"u"?[]:new Uint8Array(256),st=0;st<at.length;st++)it[at.charCodeAt(st)]=st;var ct=new Map;var lt=function(e,t,n){if(e&&(pt(e,t)||"object"==Fe(e))){var o=function(e,t){var n=ct.get(e);return n||(n=new Map,ct.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r}};function ut(e,t,n){if(e instanceof Array)return e.map((function(e){return ut(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t<o;t+=3)r+=at[n[t]>>2],r+=at[(3&n[t])<<4|n[t+1]>>4],r+=at[(15&n[t+1])<<2|n[t+2]>>6],r+=at[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ut(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[ut(e.data,t,n),e.width,e.height]}:pt(e,t)||"object"==Fe(e)?{rr_type:e.constructor.name,index:lt(e,t,n)}:e}var dt=function(e,t,n){return Me(e).map((function(e){return ut(e,t,n)}))},pt=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function ht(e,t,n){var o=[];try{var r=P(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return j(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o].concat(a))}}));o.push(r)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){o.forEach((function(e){return e()}))}}function ft(e,t,n,o,r,a,i){var s,c=[],l=Ee(Object.getOwnPropertyNames(e));try{var u=function(){var a=s.value;if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])return"continue";var l=P(e,a,(function(e){return function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];var u=e.apply(this,c);if(lt(u,i,this),!j(this.canvas,o,r,!0)){var d=dt([].concat(c),i,this),p={type:t,property:a,args:d};n(this.canvas,p)}return u}}));c.push(l)}catch(d){var u=N(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});c.push(u)}};for(l.s();!(s=l.n()).done;)u()}catch(d){l.e(d)}finally{l.f()}return c}function gt(e,t,n){var o=void 0===t?null:t,r=function(e,t){var n=atob(e);if(t){for(var o=new Uint8Array(n.length),r=0,a=n.length;r<a;++r)o[r]=n.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(o.buffer))}return n}(e,void 0!==n&&n),a=r.indexOf("\n",10)+1,i=r.substring(a)+(o?"//# sourceMappingURL="+o:""),s=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(s)}var vt=function(e,t,n){var o;return function(r){return o=o||gt(e,t,n),new Worker(o,r)}}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixwPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylwW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgdT1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCxsPW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gdihzLGUsbil7Y29uc3QgYT1gJHtzfS0ke2V9YDtpZigiT2Zmc2NyZWVuQ2FudmFzImluIGdsb2JhbFRoaXMpe2lmKGwuaGFzKGEpKXJldHVybiBsLmdldChhKTtjb25zdCB0PW5ldyBPZmZzY3JlZW5DYW52YXMocyxlKTt0LmdldENvbnRleHQoIjJkIik7Y29uc3QgZz1hd2FpdChhd2FpdCB0LmNvbnZlcnRUb0Jsb2IobikpLmFycmF5QnVmZmVyKCksZD11KGcpO3JldHVybiBsLnNldChhLGQpLGR9ZWxzZSByZXR1cm4iIn1jb25zdCBpPXNlbGY7aS5vbm1lc3NhZ2U9YXN5bmMgZnVuY3Rpb24ocyl7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtjb25zdHtpZDplLGJpdG1hcDpuLHdpZHRoOmEsaGVpZ2h0OnQsZGF0YVVSTE9wdGlvbnM6Z309cy5kYXRhLGQ9dihhLHQsZyksaD1uZXcgT2Zmc2NyZWVuQ2FudmFzKGEsdCk7aC5nZXRDb250ZXh0KCIyZCIpLmRyYXdJbWFnZShuLDAsMCksbi5jbG9zZSgpO2NvbnN0IHc9YXdhaXQgaC5jb252ZXJ0VG9CbG9iKGcpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89dShiKTtpZighYy5oYXMoZSkmJmF3YWl0IGQ9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX1lbHNlIHJldHVybiBpLnBvc3RNZXNzYWdlKHtpZDpzLmRhdGEuaWR9KX19KSgpOwoK",null,!1),mt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,wt=function(){function e(t){var n=this;De(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var o=t.sampling,r=void 0===o?"all":o,a=t.win,i=t.blockClass,s=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===r&&this.initCanvasMutationObserver(a,i,s),c&&"number"==typeof r&&this.initCanvasFPSObserver(r,a,i,s,{dataURLOptions:l})}return Pe(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,o,r){var a=this,i=ht(t,n,o),s=new Map,c=new vt;c.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,o=n.base64,r=n.type,i=n.width,c=n.height;a.mutationCb({id:t,type:J["2D"],commands:[{property:"clearRect",args:[0,0,i,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:r}]},0,0]}]})}};var l,u=1e3/e,d=0;l=requestAnimationFrame((function e(i){d&&i-d<u||(d=i,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){j(t,n,o,!0)||e.push(t)})),e}().forEach((function(e){return function(e,t,n){return new Promise((function(o,r){var a=function(e){try{s(n.next(e))}catch(u){r(u)}},i=function(e){try{s(n.throw(e))}catch(u){r(u)}},s=function(e){return e.done?o(e.value):Promise.resolve(e.value).then(a,i)};s((n=n.apply(e,t)).next())}))}(a,null,regeneratorRuntime.mark((function t(){var n,o,a,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.mirror.getId(e),!s.get(o)){t.next=3;break}return t.abrupt("return");case 3:return s.set(o,!0),["webgl","webgl2"].includes(e.__context)&&(a=e.getContext(e.__context),!1===(null==(n=null==a?void 0:a.getContextAttributes())?void 0:n.preserveDrawingBuffer)&&(null==a||a.clear(a.COLOR_BUFFER_BIT))),t.next=6,createImageBitmap(e);case 6:i=t.sent,c.postMessage({id:o,bitmap:i,width:e.width,height:e.height,dataURLOptions:r.dataURLOptions},[i]);case 8:case"end":return t.stop()}}),t,this)})))}))),l=requestAnimationFrame(e)})),this.resetObservers=function(){i(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var o=ht(e,t,n),r=function(e,t,n,o){var r,a=[],i=Ee(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));try{var s=function(){var i=r.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var s=P(t.CanvasRenderingContext2D.prototype,i,(function(r){return function(){for(var a=this,s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return j(this.canvas,n,o,!0)||setTimeout((function(){var n=dt([].concat(c),t,a);e(a.canvas,{type:J["2D"],property:i,args:n})}),0),r.apply(this,c)}}));a.push(s)}catch(l){var c=N(t.CanvasRenderingContext2D.prototype,i,{set:function(t){e(this.canvas,{type:J["2D"],property:i,args:[t],setter:!0})}});a.push(c)}};for(i.s();!(r=i.n()).done;)s()}catch(c){i.e(c)}finally{i.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,o,r){var a=[];return a.push.apply(a,Me(ft(t.WebGLRenderingContext.prototype,J.WebGL,e,n,o,0,t))),Fe(t.WebGL2RenderingContext)<"u"&&a.push.apply(a,Me(ft(t.WebGL2RenderingContext.prototype,J.WebGL2,e,n,o,0,t))),function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){o(),r(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var o=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,o)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var o=n.map((function(e){return function(e,t){var n={};for(var o in e)bt.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&mt){var r,a=Ee(mt(e));try{for(a.s();!(r=a.n()).done;)o=r.value,t.indexOf(o)<0&&yt.call(e,o)&&(n[o]=e[o])}catch(i){a.e(i)}finally{a.f()}}return n}(e,["type"])})),r=n[0].type;this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),kt=function(){function e(t){De(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new V,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return Pe(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,o={id:t,styleIds:[]},r=[],i=Ee(e);try{for(i.s();!(n=i.n()).done;){var s=n.value,c=void 0;if(this.styleMirror.has(s))c=this.styleMirror.getId(s);else{c=this.styleMirror.add(s);var l=Array.from(s.rules||CSSRule);r.push({styleId:c,rules:l.map((function(e,t){return{rule:a(e),index:t}}))})}o.styleIds.push(c)}}catch(u){i.e(u)}finally{i.f()}r.length>0&&(o.styles=r),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),xt=Object.defineProperty,Ct=Object.defineProperties,St=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,Ot=function(e,t,n){return t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mt=function(e,t){for(var n in t||(t={}))Lt.call(t,n)&&Ot(e,n,t[n]);if(It){var o,r=Ee(It(t));try{for(r.s();!(o=r.n()).done;){n=o.value;Tt.call(t,n)&&Ot(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e};function Et(e){return function(e,t){return Ct(e,St(t))}(Mt({},e),{timestamp:Date.now()})}var Rt,At,Dt,Nt=!1,Pt=new i;function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,r=e.blockClass,a=void 0===r?"rr-block":r,i=e.blockSelector,s=void 0===i?null:i,c=e.ignoreClass,l=void 0===c?"rr-ignore":c,u=e.maskTextClass,d=void 0===u?"rr-mask":u,p=e.maskTextSelector,h=void 0===p?null:p,f=e.inlineStylesheet,g=void 0===f||f,v=e.maskAllInputs,m=e.maskInputOptions,b=e.slimDOMOptions,y=e.maskInputFn,w=e.maskTextFn,k=e.hooks,x=e.packFn,C=e.sampling,S=void 0===C?{}:C,I=e.dataURLOptions,L=void 0===I?{}:I,T=e.mousemoveWait,O=e.recordCanvas,R=void 0!==O&&O,A=e.recordCrossOriginIframes,D=void 0!==A&&A,N=e.userTriggeredOnInput,P=void 0!==N&&N,j=e.collectFonts,_=void 0!==j&&j,U=e.inlineImages,q=void 0!==U&&U,V=e.plugins,X=e.keepIframeSrcFn,J=void 0===X?function(){return!1}:X,Y=e.ignoreCSSAttributes,Q=void 0===Y?new Set([]):Y,$=!D||window.parent===window,ee=!1;if(!$)try{window.parent.document,ee=!1}catch(we){ee=!0}if($&&!t)throw new Error("emit function is required");void 0!==T&&void 0===S.mousemove&&(S.mousemove=T),Pt.reset();var te=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==m?m:{password:!0},ne=!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===b,headMetaDescKeywords:"all"===b}:b||{};H();var oe,re=0,ae=function(e){var t,n=Ee(V||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(r){n.e(r)}finally{n.f()}return x&&(e=x(e)),e};Rt=function(e,r){var a;if((null==(a=ve[0])?void 0:a.isFrozen())&&e.type!==Z.FullSnapshot&&!(e.type===Z.IncrementalSnapshot&&e.data.source===K.Mutation)&&ve.forEach((function(e){return e.unfreeze()})),$)null==t||t(ae(e),r);else if(ee){var i={type:"rrweb",event:ae(e),isCheckout:r};window.parent.postMessage(i,"*")}if(e.type===Z.FullSnapshot)oe=e,re=0;else if(e.type===Z.IncrementalSnapshot){if(e.data.source===K.Mutation&&e.data.isAttachIframe)return;re++;var s=o&&re>=o,c=n&&e.timestamp-oe.timestamp>n;(s||c)&&At(!0)}};var ie,se=function(e){Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Mutation},e)}))},ce=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Scroll},e)}))},le=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.CanvasMutation},e)}))},ue=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.AdoptedStyleSheet},e)}))},de=new kt({mutationCb:se,adoptedStyleSheetCb:ue}),pe=new Ke({mirror:Pt,mutationCb:se,stylesheetManager:de,recordCrossOriginIframes:D,wrappedEmit:Rt}),he=Ee(V||[]);try{for(he.s();!(ie=he.n()).done;){var fe=ie.value;fe.getMirror&&fe.getMirror({nodeMirror:Pt,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror})}}catch(ke){he.e(ke)}finally{he.f()}Dt=new wt({recordCanvas:R,mutationCb:le,win:window,blockClass:a,blockSelector:s,mirror:Pt,sampling:S.canvas,dataURLOptions:L});var ge=new rt({mutationCb:se,scrollCb:ce,bypassOptions:{blockClass:a,blockSelector:s,maskTextClass:d,maskTextSelector:h,inlineStylesheet:g,maskInputOptions:te,dataURLOptions:L,maskTextFn:w,maskInputFn:y,recordCanvas:R,inlineImages:q,sampling:S,slimDOMOptions:ne,iframeManager:pe,stylesheetManager:de,canvasManager:Dt,keepIframeSrcFn:J},mirror:Pt});At=function(){var e,t,n,o,r,i,c,l,u,p,f,v,m=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Rt(Et({type:Z.Meta,data:{href:window.location.href,width:B(),height:F()}}),m),de.reset(),ve.forEach((function(e){return e.lock()}));var b=M(document,{mirror:Pt,blockClass:a,blockSelector:s,maskTextClass:d,maskTextSelector:h,inlineStylesheet:g,maskAllInputs:te,maskTextFn:w,slimDOM:ne,dataURLOptions:L,recordCanvas:R,inlineImages:q,onSerialize:function(e){W(e,Pt)&&pe.addIframe(e),z(e,Pt)&&de.trackLinkElement(e),G(e)&&ge.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){pe.attachIframe(e,t),ge.observeAttachShadow(e)},onStylesheetLoad:function(e,t){de.attachLinkElement(e,t)},keepIframeSrcFn:J});if(!b)return console.warn("Failed to snapshot the document");Rt(Et({type:Z.FullSnapshot,data:{node:b,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===(e=document)||void 0===e?void 0:e.documentElement.scrollLeft)||(null==(l=null==(c=null===(t=document)||void 0===t?void 0:t.body)?void 0:c.parentElement)?void 0:l.scrollLeft)||(null==(u=null===(n=document)||void 0===n?void 0:n.body)?void 0:u.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===(o=document)||void 0===o?void 0:o.documentElement.scrollTop)||(null==(f=null==(p=null===(r=document)||void 0===r?void 0:r.body)?void 0:p.parentElement)?void 0:f.scrollTop)||(null==(v=null===(i=document)||void 0===i?void 0:i.body)?void 0:v.scrollTop)||0}}})),ve.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,Pt.getId(document))};try{var me=[];me.push(E("DOMContentLoaded",(function(){Rt(Et({type:Z.DomContentLoaded,data:{}}))})));var be=function(e){var t;return Ve({mutationCb:se,mousemoveCb:function(e,t){return Rt(Et({type:Z.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.MouseInteraction},e)}))},scrollCb:ce,viewportResizeCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.ViewportResize},e)}))},inputCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Input},e)}))},mediaInteractionCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.StyleDeclaration},e)}))},canvasMutationCb:le,fontCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Font},e)}))},selectionCb:function(e){Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Selection},e)}))},blockClass:a,ignoreClass:l,maskTextClass:d,maskTextSelector:h,maskInputOptions:te,inlineStylesheet:g,sampling:S,recordCanvas:R,inlineImages:q,userTriggeredOnInput:P,collectFonts:_,doc:e,maskInputFn:y,maskTextFn:w,keepIframeSrcFn:J,blockSelector:s,slimDOMOptions:ne,dataURLOptions:L,mirror:Pt,iframeManager:pe,stylesheetManager:de,shadowDomManager:ge,canvasManager:Dt,ignoreCSSAttributes:Q,plugins:(null==(t=null==V?void 0:V.filter((function(e){return e.observer})))?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return Rt(Et({type:Z.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},k)};pe.addLoadListener((function(e){me.push(be(e.contentDocument))}));var ye=function(){At(),me.push(be(document)),Nt=!0};return"interactive"===document.readyState||"complete"===document.readyState?ye():me.push(E("load",(function(){Rt(Et({type:Z.Load,data:{}})),ye()}),window)),function(){me.forEach((function(e){return e()})),Nt=!1}}catch(me){console.warn(me)}}return Ft.addCustomEvent=function(e,t){if(!Nt)throw new Error("please add custom event after start recording");Rt(Et({type:Z.Custom,data:{tag:e,payload:t}}))},Ft.freezePage=function(){ve.forEach((function(e){return e.freeze()}))},Ft.takeFullSnapshot=function(e){if(!Nt)throw new Error("please take full snapshot after start recording");At(e)},Ft.mirror=Pt,Ft}();function je(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _e(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 _e(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){We(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),We(this,"startDate",void 0),We(this,"events",[]),We(this,"bufferSize",0),We(this,"stopFunction",void 0),We(this,"customOptions",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setOptions",value:function(e){this.customOptions=e}},{key:"start",value:function(){this.stop(),this.startDate=Date.now();var e=this.events;try{this.stopFunction=Be(qe(qe(qe({},{inlineStylesheet:!0,blockClass:"gl-block",ignoreClass:"gl-ignore",maskTextClass:"gl-mask",dataURLOptions:{quality:.7},recordCanvas:!1,sampling:{scroll:150,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!0,TouchEnd:!1}},collectFonts:!1,recordCrossOriginIframes:!1}),this.customOptions),{},{emit:function(t){var n=function(e){var t=JSON.stringify(e);if(t.length>5e6){var n,o=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,r=je(t.matchAll(o));try{for(r.s();!(n=r.n()).done;){var a=n.value;t="image/"===a[1].toLocaleLowerCase().slice(0,6)?t.replace(a[0],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVHgBAQUA+v8ABRg5/wHSAVZN1mnaAAAAAElFTkSuQmCC"):t.replace(a[0],"")}}catch(i){r.e(i)}finally{r.f()}}return{event:JSON.parse(t),size:t.length}}(t).event;e.push(n)}}))}catch(t){console.error(t)}}},{key:"stop",value:function(){this.stopFunction&&this.stopFunction(),this.startDate=void 0,this.events=[],this.bufferSize=0}},{key:"getReplayData",value:function(){return{startDate:this.startDate,events:this.events,baseUrl:window.location.origin,width:window.innerWidth,height:window.innerHeight,isMobile:m(),type:"rrweb"}}}])&&He(t.prototype,n),o&&He(t,o),e}();function Ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}We(ze,"instance",void 0);var Ze=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ve(this,"rerender",void 0),Ve(this,"svgElement",null),Ve(this,"path",null),Ve(this,"strPath",void 0),Ve(this,"strokeWidth",12),Ve(this,"strokeWidthRect",6),Ve(this,"bufferSize",4),Ve(this,"buffer",[]),Ve(this,"startPoint",null),Ve(this,"tool","rect"),Ve(this,"color","#EB144C"),Ve(this,"mouseDown",null),Ve(this,"mouseMove",null),Ve(this,"mouseUp",null),Ve(this,"resizeListener",null),Ve(this,"pathBuffer",[]);var o=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){o.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px")},window.addEventListener("resize",this.resizeListener,!0),this.mouseDown=function(e){e.preventDefault();var t=document.querySelector(".bb-capture-toolbar-item-colorpicker");t&&(t.style.display="none"),o.fadeOutToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseDownPen(e),"rect"===o.tool&&o.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseMovePen(e),"rect"===o.tool&&o.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),o.fadeInToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseUpPen(e),"rect"===o.tool&&o.mouseUpRect(e)},this.svgElement.addEventListener("mousedown",this.mouseDown),this.svgElement.addEventListener("mousemove",this.mouseMove),this.svgElement.addEventListener("mouseup",this.mouseUp),this.svgElement.addEventListener("touchstart",this.mouseDown,!1),this.svgElement.addEventListener("touchmove",this.mouseMove,!1),this.svgElement.addEventListener("touchend",this.mouseUp,!1),setTimeout((function(){n.rerender()}),100)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){if(this.svgElement)for(;this.svgElement.firstChild;)this.svgElement.firstChild.remove()}},{key:"destroy",value:function(){this.svgElement.removeEventListener("mousedown",this.mouseDown),this.svgElement.removeEventListener("mousemove",this.mouseMove),this.svgElement.removeEventListener("mouseup",this.mouseUp),this.svgElement.removeEventListener("touchstart",this.mouseDown),this.svgElement.removeEventListener("touchmove",this.mouseMove),this.svgElement.removeEventListener("touchend",this.mouseUp),window.removeEventListener("resize",this.resizeListener)}},{key:"mouseUpPen",value:function(){this.path&&(this.path=null)}},{key:"mouseUpRect",value:function(){this.path&&(this.path=null)}},{key:"mouseMovePen",value:function(e){this.path&&(this.appendToBuffer(this.getMousePosition(e)),this.updateSvgPath())}},{key:"mouseMoveRect",value:function(e){if(this.path){var t=this.getMousePosition(e),n=Math.abs(t.x-this.startPoint.x),o=Math.abs(t.y-this.startPoint.y),r=t.x,a=t.y;t.x>this.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",o)}}},{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 o=this.getMousePosition(e);this.appendToBuffer(o),this.strPath="M"+o.x+" "+o.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].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,o,r=0,a=0,i=0;for(o=e;o<t;o++)i++,r+=(n=this.buffer[o]).x,a+=n.y;return{x:r/i,y:a/i}}return null}},{key:"updateSvgPath",value:function(){var e=this.getAveragePoint(0);if(e){this.strPath+=" L"+e.x+" "+e.y;for(var t="",n=2;n<this.buffer.length;n+=2)t+=" L"+(e=this.getAveragePoint(n)).x+" "+e.y;this.path.setAttribute("d",this.strPath+t)}}},{key:"appendToBuffer",value:function(e){for(this.buffer.push(e);this.buffer.length>this.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")}}])&&Ge(t.prototype,n),o&&Ge(t,o),e}();function Ke(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Xe(this,"keys",{37:1,38:1,39:1,40:1}),Xe(this,"supportsPassive",!1),Xe(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),Xe(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),Xe(this,"scrollDisabled",!1);var t=this;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.supportsPassive=!0,t.wheelOpt=!!t.supportsPassive&&{passive:!1}}}))}catch(n){}}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"disableScroll",value:function(){var e=this.getInstance();e.scrollDisabled||(e.scrollDisabled=!0,window.addEventListener("DOMMouseScroll",e.preventDefault,!1),window.addEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.addEventListener("touchmove",e.preventDefault,e.wheelOpt),window.addEventListener("keydown",e.preventDefaultForScrollKeys,!1))}},{key:"enableScroll",value:function(){var e=this.getInstance();e.scrollDisabled&&(e.scrollDisabled=!1,window.removeEventListener("DOMMouseScroll",e.preventDefault,!1),window.removeEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.removeEventListener("touchmove",e.preventDefault,e.wheelOpt),window.removeEventListener("keydown",e.preventDefaultForScrollKeys,!1))}}],(n=[{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"preventDefaultForScrollKeys",value:function(e){if(this.keys&&this.keys[e.keyCode])return this.preventDefault(e),!1}}])&&Ke(t.prototype,n),o&&Ke(t,o),e}();function Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xe(Je,"instance",void 0);var $e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qe(this,"type","screenshot"),Qe(this,"dragCursor",null),Qe(this,"screenRecorder",null),Qe(this,"callback",null),Qe(this,"screenDrawer",null),Qe(this,"escListener",null),Qe(this,"pageLeaveListener",null),Qe(this,"overrideLanguage",Zt.getInstance().overrideLanguage),Qe(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(ae.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,o;return t=e,o=[{key:"setPenColor",value:function(e){for(var t=document.querySelectorAll(".bb-pen-tip"),n=0;n<t.length;n++)t[n].style.fill=e}}],(n=[{key:"hideWidgetUI",value:function(){var e=document.querySelector(".bb-feedback-button");e&&(e.style.display="none");var t=document.querySelector(".bb-feedback-dialog-container");t&&(t.style.display="none")}},{key:"showWidgetUI",value:function(){"screenshot"===this.type&&Je.enableScroll(),this.screenRecorder&&this.screenRecorder.stopScreenRecording(),this.unregisterListeners(),this.cleanupMousePointer(),this.screenDrawer&&this.screenDrawer.destroy();var e=document.querySelector(".bb-capture-toolbar");e&&e.remove();var t=document.querySelector(".bb-capture-svg");t&&t.classList.add("bb-capture-svg--preview");var n=document.querySelector(".bb-capture-preview");n&&n.remove();var o=document.querySelector(".bb-feedback-button");o&&(o.style.display="flex");var r=document.querySelector(".bb-feedback-dialog-container");r&&(r.style.display="block");var a=document.querySelector(".bb-capture-dismiss");a&&(a.style.display="none");var i=document.querySelector(".bb-capture-toolbar-item-colorpicker");i&&(i.style.display="none");var s=document.querySelector(".bb-capture-editor-borderlayer");s&&(s.style.display="none")}},{key:"clear",value:function(){var e=document.querySelector(".bb-capture-editor");e&&e.remove()}},{key:"setMouseMove",value:function(e,t){this.dragCursor&&(this.dragCursor.style.left="".concat(e+6,"px"),this.dragCursor.style.top="".concat(t-26,"px"),this.dragCursor.style.right=null)}},{key:"mouseMoveEventHandler",value:function(e){var t=e.clientX,n=e.clientY;this.setMouseMove(t,n)}},{key:"touchMoveEventHandler",value:function(e){var t=e.touches[0].clientX,n=e.touches[0].clientY;this.setMouseMove(t,n)}},{key:"setupMousePointer",value:function(){var e=this;this.dragCursor=document.querySelector(".bb-capture-editor-drag-info");var t=document.querySelector(".bb-capture-svg");t.addEventListener("mouseenter",(function(t){e.dragCursor.style.opacity=1})),t.addEventListener("mouseleave",(function(t){e.dragCursor.style.opacity=0})),document.documentElement.addEventListener("mousemove",this.mouseMoveEventHandler.bind(this)),document.documentElement.addEventListener("touchmove",this.touchMoveEventHandler.bind(this))}},{key:"cleanupMousePointer",value:function(){document.documentElement.removeEventListener("mousemove",this.mouseMoveEventHandler),document.documentElement.removeEventListener("touchmove",this.touchMoveEventHandler),this.dragCursor&&this.dragCursor.remove()}},{key:"createEditorUI",value:function(){var e=document.createElement("div");e.className="bb-capture-editor",e.innerHTML='\n <div class="bb-capture-editor-borderlayer"></div>\n <svg class="bb-capture-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve"></svg>\n <div class="bb-capture-dismiss">'.concat(d("dismiss"),"</div>\n <div class='bb-capture-editor-drag-info'>").concat(d("rect"),'</div>\n <div class="bb-capture-toolbar">\n ').concat("capture"===this.type?'<div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-recording" data-type="recording">\n '.concat(d("recorderon"),"\n ").concat(d("recorderoff"),'\n <span class="bb-tooltip bb-tooltip-screen-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-item-rec" data-type="mic">\n ').concat(d("mic"),'\n <span class="bb-tooltip bb-tooltip-audio-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item-timer bb-capture-item-rec">2:00</div>\n <div class="bb-capture-toolbar-item-spacer"></div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pointer">\n ').concat(d("pointer"),"\n </div>"):"",'\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool bb-capture-toolbar-item--active" data-type="rect">\n ').concat(d("rect"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pen">\n ').concat(d("pen"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="blur">\n ').concat(d("blur"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem" data-type="colorpicker">\n <div class="bb-capture-toolbar-item-selectedcolor"></div>\n <span class="bb-tooltip">').concat(nt.translateText("pickAColor"),'</span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="undo">\n ').concat(d("undo"),'\n <span class="bb-tooltip">').concat(nt.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(nt.translateText("next"),"</div>"):"",'\n </div>\n <div class="bb-capture-toolbar-item-colorpicker">\n <div class="bb-capture-toolbar-item-color" data-color="#EB144C"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FF6705"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FDB903"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#9900EE"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#00D082"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#0A93E4"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#CCCCCC"></div>\n </div>\n <div class="bb-capture-preview">\n <div class="bb-capture-preview-inner">\n <video controls muted autoplay></video>\n <div class="bb-capture-preview-buttons">\n <div class="bb-capture-preview-retrybutton">').concat(nt.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(nt.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",nt.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,o=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,o="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&o&&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?(Zt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Je.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new Ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),o=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=o[i],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))}},i=0;i<o.length;i++)a()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e=this;document.querySelector(".bb-capture-dismiss").onclick=function(){e.dismiss()};var t=document.querySelector(".bb-capture-button-next");t&&(t.onclick=this.showNextStep.bind(this));for(var n=document.querySelector(".bb-capture-toolbar-item-colorpicker"),o=document.querySelector(".bb-capture-svg"),r=function(t,n){for(var r=document.querySelectorAll(".bb-capture-toolbar-item-tool"),a=0;a<r.length;a++)r[a].classList.remove("bb-capture-toolbar-item--active");if(n.classList.add("bb-capture-toolbar-item--active"),e.screenDrawer.setTool(t),e.dragCursor.innerHTML="","pointer"===t)o.style.pointerEvents="none";else{o.style.pointerEvents="auto";try{var i=n.querySelector("svg").cloneNode(!0);i&&e.dragCursor&&e.dragCursor.appendChild(i)}catch(s){}}},a=document.querySelectorAll(".bb-capture-toolbar-item"),i=function(){var t=a[s];t.onclick=function(){var o=t.getAttribute("data-type");n&&"colorpicker"!==o&&(n.style.display="none"),"mic"===o&&e.screenRecorder.toggleAudio(),"recording"===o&&(e.screenRecorder.isRecording?e.screenRecorder.stopScreenRecording():(e.screenRecorder.startScreenRecording(),r("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==e.type||e.screenRecorder.isRecording)&&("pen"!==o&&"blur"!==o&&"rect"!==o&&"pointer"!==o||r(o,t),"colorpicker"===o&&("flex"===n.style.display?n.style.display="none":n.style.display="flex"),"undo"===o&&e.screenDrawer.removeLastAddedPathFromSvg())}},s=0;s<a.length;s++)i()}},{key:"captureScreenDrawerRerender",value:function(){if(this.screenDrawer)for(var e="bb-capture-editor-item-inactive",t=document.querySelectorAll(".bb-capture-toolbar-item"),n=0;n<t.length;n++){var o=t[n];switch(o.getAttribute("data-type")){case"undo":null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?o.classList.remove(e):o.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&Zt.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"),o=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),i="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(i),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(i));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;l<n.length;l++){var u=n[l];switch(u.getAttribute("data-type")){case"mic":this.screenRecorder.audioAvailable&&this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.audioMuted?(u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),o.innerHTML=nt.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),o.innerHTML=nt.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),o.innerHTML=nt.translateText("browserNotSupported"))}}}}},{key:"setupScreenRecording",value:function(){var e=this;document.querySelector(".bb-capture-preview-sendbutton").onclick=this.showNextStep.bind(this),document.querySelector(".bb-capture-preview-retrybutton").onclick=function(){e.screenRecorder.clearPreview(),e.screenDrawer&&e.screenDrawer.clear()},this.screenRecorder=new Y(this.captureRenderer.bind(this),nt.translateText("accessToScreenSharingDenied"))}}])&&Ye(t.prototype,n),o&&Ye(t,o),e}();function et(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tt(this,"overrideLanguage",""),tt(this,"isRTLLayout",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=B.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=B.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),r.getInstance().updateFeedbackButtonState(),ae.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";return"undefined"!=typeof navigator&&(e=navigator.language.substring(0,2).toLowerCase()),this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&et(t.prototype,n),o&&et(t,o),e}();function ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tt(nt,"instance",void 0);var at=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),rt(this,"shortCutListener",void 0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){this.shortCutListener||(this.shortCutListener=document.addEventListener("keyup",(function(e){var t,n,o=(void 0!==(t=e).key?n=t.key:void 0!==t.keyIdentifier?n=t.keyIdentifier:void 0!==t.keyCode&&(n=t.keyCode),n);!e.ctrlKey||"u"!==o&&"U"!==o&&85!==o||Zt.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&ot(t.prototype,n),o&&ot(t,o),e}();function it(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function st(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rt(at,"instance",void 0);var ct=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),st(this,"formPreFill",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&it(t.prototype,n),o&&it(t,o),e}();function lt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}st(ct,"instance",void 0);var dt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ut(this,"notificationContainer",null),ut(this,"notifications",[]),ut(this,"unreadCount",0),ut(this,"unreadNotificationsKey","unread-notifications"),ut(this,"isTabActive",!0),ut(this,"showNotificationBadge",!0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"updateTabBarNotificationCount",value:function(){Se.notifyEvent("unread-count-changed",this.unreadCount)}},{key:"injectNotificationUI",value:function(){if(!this.notificationContainer){var e=document.createElement("div");e.className="gleap-notification-container gleap-font",document.body.appendChild(e),this.notificationContainer=e,this.updateContainerStyle(),this.reloadNotificationsFromCache()}}},{key:"reloadNotificationsFromCache",value:function(){var e=k(this.unreadNotificationsKey);e&&e.length>0&&(this.notifications=e,this.renderNotifications())}},{key:"setNotificationCount",value:function(e){ae.getInstance().isOpened()?(this.unreadCount=0,this.updateTabBarNotificationCount()):this.unreadCount=e,this.updateTabBarNotificationCount(),r.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),e.sound&&yt.ping()),this.notifications.length>3&&this.notifications.shift(),x(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=d("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[o];r=(r=t.data.text).replaceAll("{{name}}",E.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?Zt.openConversation(t.data.conversation.shareToken):t.data.news?Zt.openNewsArticle(t.data.news.id):t.data.checklist?Zt.openChecklist(t.data.checklist.id):Zt.open()},t.data.news?(n.className="gleap-notification-item-news",n.innerHTML='\n <div class="gleap-notification-item-news-container">\n '.concat(t.data.coverImageUrl&&""!==t.data.coverImageUrl&&!t.data.coverImageUrl.includes("NewsImagePlaceholder")?'<img class="gleap-notification-item-news-image" src="'.concat(t.data.coverImageUrl,'" />'):"",'\n <div class="gleap-notification-item-news-content">\n <div class="gleap-notification-item-news-content-title">').concat(r,"</div>\n ").concat(t.data.previewText&&t.data.previewText.length>0?'<div class="gleap-notification-item-news-preview">'.concat(t.data.previewText,"</div>"):"".concat(t.data.sender?'\n <div class="gleap-notification-item-news-sender">\n '.concat(t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />')," ").concat(t.data.sender.name,"</div>"):""),"\n </div>\n </div>")):t.data.checklist?((a=Math.round(t.data.currentStep/t.data.totalSteps*100))<100&&(a+=4),n.className="gleap-notification-item-checklist",n.innerHTML='\n <div class="gleap-notification-item-checklist-container">\n <div class="gleap-notification-item-checklist-content">\n <div class="gleap-notification-item-checklist-content-title">'.concat(t.data.text,'</div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(a,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")):(n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />'),'\n <div class="gleap-notification-item-container">\n ').concat(t.data.sender?'<div class="gleap-notification-item-sender">'.concat(t.data.sender.name,"</div>"):"",'\n <div class="gleap-notification-item-content">').concat(r,"</div>\n </div>")),e.notificationContainer.appendChild(n)},o=0;o<this.notifications.length;o++){var r,a;n()}}}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],x(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=B.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!==r.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==r.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===r.getInstance().buttonHidden?e.feedbackButtonPosition===r.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):r.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&lt(t.prototype,n),o&&lt(t,o),e}();function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ft(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ut(dt,"instance",void 0);var vt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gt(this,"bannerUrl","https://outboundmedia.gleap.io"),gt(this,"bannerContainer",null),gt(this,"bannerData",null),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setBannerUrl",value:function(e){this.bannerUrl=e}},{key:"startCommunication",value:function(){var e=this;window.addEventListener("message",(function(t){if(t.origin===e.bannerUrl)try{var n,o,r,a,i,s,c,l,u=JSON.parse(t.data);"banner-loaded"===u.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===u.name&&document.documentElement.style.setProperty("--gleap-margin-top",u.data.height+"px"),"banner-data-set"===u.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(n=e.bannerData)||void 0===n?void 0:n.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===u.name&&e.removeBannerUI(),"start-conversation"===u.name&&Zt.startBot(null===(o=u.data)||void 0===o?void 0:o.botId),"start-custom-action"===u.name&&Zt.triggerCustomAction(null===(r=u.data)||void 0===r?void 0:r.action),"show-form"===u.name&&Zt.startFeedbackFlow(null===(a=u.data)||void 0===a?void 0:a.formId),"show-survey"===u.name&&Zt.showSurvey(null===(i=u.data)||void 0===i?void 0:i.formId,null===(s=u.data)||void 0===s?void 0:s.surveyFormat),"show-news-article"===u.name&&Zt.openNewsArticle(null===(c=u.data)||void 0===c?void 0:c.articleId),"show-help-article"===u.name&&Zt.openHelpCenterArticle(null===(l=u.data)||void 0===l?void 0:l.articleId)}catch(d){}}))}},{key:"removeBannerUI",value:function(){this.bannerContainer&&(document.body.removeChild(this.bannerContainer),this.bannerContainer=null),document.body.classList.remove("gleap-b-shown"),document.body.classList.remove("gleap-b-f")}},{key:"injectBannerUI",value:function(e){if(this.bannerContainer||!document.body)return!1;this.bannerData=e;var t=document.createElement("div");t.className="gleap-b",t.innerHTML='<iframe src="'.concat(this.bannerUrl,'" class="gleap-b-frame" scrolling="no" title="Gleap Banner" role="dialog" frameborder="0"></iframe>'),document.body.appendChild(t),this.bannerContainer=t}},{key:"sendMessage",value:function(e){try{var t=document.querySelector(".gleap-b-frame");t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(ht(ht({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&ft(t.prototype,n),o&&ft(t,o),e}();function mt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}gt(vt,"instance",void 0);var yt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"playSound",value:function(e){this.settings.play=e}},{key:"ping",value:function(){try{if(!this.settings.play)return;this.audio||(this.audio=new Audio("https://js.gleap.io/res/ping.mp3"));var e=this.audio.play();void 0!==e&&e.then((function(e){})).catch((function(e){}))}catch(t){}}}],(n=null)&&mt(t.prototype,n),o&&mt(t,o),e}();function wt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bt(yt,"audio",void 0),bt(yt,"settings",{play:!0});var xt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kt(this,"tags",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getTags",value:function(){return this.tags}},{key:"setTags",value:function(e){this.tags=e}}])&&wt(t.prototype,n),o&&wt(t,o),e}();function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kt(xt,"instance",void 0);var Tt=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Lt(this,"libraryInstance",null),Lt(this,"lastUrl",void 0),Lt(this,"injectedFrame",!1),Lt(this,"gleapFrameContainer",null),Lt(this,"gleapCollapseUI",null),Lt(this,"injectedCollapseUI",!1),Lt(this,"gleapFrame",null),Lt(this,"configData",null),Lt(this,"status","navigate"),Lt(this,"toggleCollapseUI",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n="gleap-admin-collapse-ui-active",o="gleap-admin-frame-container-active",r=function(e,t){return e&&e.classList.contains(t)};(!e||r(t.gleapCollapseUI,n)&&r(t.gleapFrameContainer,o))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(n),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(o))})),Lt(this,"injectCollapseUI",(function(){if(!t.injectedCollapseUI){t.injectedCollapseUI=!0;var e=document.createElement("div");e.className="gleap-admin-collapse-ui",e.innerHTML='<div class="gleap-admin-collapse-ui-icon">\n '.concat(d("arrowdown"),"\n </div>"),document.body.appendChild(e),t.gleapCollapseUI=e,e.addEventListener("click",(function(){t.toggleCollapseUI()}))}})),Lt(this,"injectFrame",(function(){if(!t.injectedFrame){t.injectedFrame=!0;var e=document.createElement("div");e.className="gleap-admin-frame-container",e.innerHTML='<iframe src="https://app.gleap.io/producttourbuilder" class="gleap-admin-frame" scrolling="no" title="Gleap Admin Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>',document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-admin-frame")}}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.sendMessageToTourBuilder({name:"page-changed",data:{page:e}}))}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"loadScript",value:function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=function(){"function"==typeof t&&t()},n.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||n.onload()},document.head.appendChild(n)}},{key:"loadAdminScript",value:function(){var e=this;this.loadScript("https://jsadminhelper.gleap.io/index.js",(function(){window.GleapHelper&&(e.libraryInstance=new window.GleapHelper.default,e.libraryInstance&&(e.libraryInstance.onElementPicked=function(t){e.toggleCollapseUI(!0),e.sendMessageToTourBuilder({name:"element-picked",data:{selector:t}})},e.injectFrame(),e.injectCollapseUI(),e.setFrameHeight("loading")))}))}},{key:"setFrameHeight",value:function(e){if(this.gleapFrameContainer){var t="";t="picker"===e||"navigate"===e?"65px":"editor"===e?"100vh":"0px",this.gleapFrameContainer.style.height=t}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!window.gleapAdminDisabled){var t=this;window.addEventListener("message",(function(n){if(n.origin&&"https://app.gleap.io"!==!n.origin)try{var o=JSON.parse(n.data);if("admin"===o.type&&"load"===o.name&&(t.configData=o.data,t.loadAdminScript()),"tourbuilder"===o.type){if("loaddata"===o.name&&e.sendMessageToTourBuilder({name:"data",data:t.configData}),"save"===o.name&&e.sendMessage({name:"save",data:o.data}),"click"===o.name)try{document.querySelector(o.data.selector).click()}catch(r){console.log(r)}"status-changed"===o.name&&(t.status=o.data,e.setFrameHeight(t.status),t.libraryInstance.stopPicker(),"picker"===t.status&&t.libraryInstance.startPicker())}}catch(a){}})),this.sendMessage({name:"init"}),this.startPageListener()}}},{key:"sendMessage",value:function(e){try{window&&window.opener&&window.opener.postMessage(JSON.stringify(St(St({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify(St(St({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&It(t.prototype,n),o&&It(t,o),e}();function Ot(e){return function(e){if(Array.isArray(e))return Mt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Mt(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 Mt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lt(Tt,"instance",void 0);const Dt=function(){var e={};function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=Rt({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},t)}function n(t){return t?e[t]:e}function o(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function r(e){var t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap((function(e){var n=e.matches(t),o=Array.from(e.querySelectorAll(t));return[].concat(Ot(n?[e]:[]),Ot(o))})).filter((function(e){return"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)}))}function a(e){if(e&&!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)){var t=n("smoothScroll");e.scrollIntoView({behavior:!t||i(e)?"auto":"smooth",inline:"center",block:"center"})}}function i(e){if(e&&e.parentElement){var t=e.parentElement;return t.scrollHeight>t.clientHeight}}var s={};function c(e,t){s[e]=t}function l(e){return e?s[e]:s}function u(){s={}}var d={};function p(e,t){d[e]=t}function h(e){var t;null==(t=d[e])||t.call(d)}function f(){d={}}function g(e){if(e){var t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};c("__activeStagePosition",n),m(n)}}function v(e){var t=function(e){var t=window.innerWidth,o=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),r.setAttribute("viewBox","0 0 ".concat(t," ").concat(o)),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",b(e)),a.style.fill=n("overlayColor")||"rgb(0,0,0)",a.style.opacity="".concat(n("overlayOpacity")),a.style.pointerEvents="auto",a.style.cursor="auto",r.appendChild(a),r}(e);document.body.appendChild(t),L(t,(function(e){"path"===e.target.tagName&&h("overlayClick")})),c("__overlaySvg",t)}function m(e){var t=l("__overlaySvg");if(t){var n=t.firstElementChild;if("path"!==(null==n?void 0:n.tagName))throw new Error("no path element found in stage svg");n.setAttribute("d",b(e))}else v(e)}function b(e){var t=window.innerWidth,o=window.innerHeight,r=n("stagePadding")||0,a=n("stageRadius")||0,i=e.width+2*r,s=e.height+2*r,c=Math.min(a,i/2,s/2),l=Math.floor(Math.max(c,0)),u=e.x-r+l,d=e.y-r,p=i-2*l,h=s-2*l;return"M".concat(t,",0L0,0L0,").concat(o,"L").concat(t,",").concat(o,"L").concat(t,",0Z\n M").concat(u,",").concat(d," h").concat(p," a").concat(l,",").concat(l," 0 0 1 ").concat(l,",").concat(l," v").concat(h," a").concat(l,",").concat(l," 0 0 1 -").concat(l,",").concat(l," h-").concat(p," a").concat(l,",").concat(l," 0 0 1 -").concat(l,",-").concat(l," v-").concat(h," a").concat(l,",").concat(l," 0 0 1 ").concat(l,",-").concat(l," z")}function y(){var e=l("__overlaySvg");e&&e.remove()}function w(e){var t=e.element,r="string"==typeof t?document.querySelector(t):t;r||(r=function(){var e=document.getElementById("gleap-tour-dummy-element");if(e)return e;var t=document.createElement("div");return t.id="gleap-tour-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t){var r,i,s=400,u=Date.now(),d=l("__activeStep"),p=l("__activeElement")||e,h=!p||p===e,f="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===p.id,b=n("animate"),y=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),k=(null==d?void 0:d.onDeselected)||n("onDeselected"),x=n(),C=l();!h&&k&&k(v?void 0:p,d,{config:x,state:C});y&&y(f?void 0:e,t,{config:x,state:C});var S=!h&&b,I=!1;(function(){var e=l("popover");if(!e)return;e.wrapper.style.display="none"})(),c("previousStep",d),c("previousElement",p),c("activeStep",t),c("activeElement",e);var L=function r(){if(l("__transitionCallback")===r){var a=Date.now()-u,i=s-a<=s/2;t.popover&&i&&!I&&S&&(M(e,t),I=!0),n("animate")&&a<s?function(e,t,n,r){var a=l("__activeStagePosition"),i=a||n.getBoundingClientRect(),s=r.getBoundingClientRect();m(a={x:o(e,i.x,s.x-i.x,t),y:o(e,i.y,s.y-i.y,t),width:o(e,i.width,s.width-i.width,t),height:o(e,i.height,s.height-i.height,t)}),c("__activeStagePosition",a)}(a,s,p,e):(g(e),w&&w(f?void 0:e,t,{config:n(),state:l()}),c("__transitionCallback",void 0),c("__previousStep",d),c("__previousElement",p),c("__activeStep",t),c("__activeElement",e)),window.requestAnimationFrame(r)}};c("__transitionCallback",L),window.requestAnimationFrame(L),a(e),!S&&t.popover&&M(e,t);p.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),p.removeAttribute("aria-haspopup"),p.removeAttribute("aria-expanded"),p.removeAttribute("aria-controls"),null!==(r=null!==(i=t.disableActiveInteraction)&&void 0!==i?i:n("disableActiveInteraction"))&&void 0!==r&&r&&e.classList.add("gleap-tour-no-interaction");e.classList.add("gleap-tour-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","gleap-tour-popover-content")}(r,e)}function k(){var e=l("__activeElement"),t=l("__activeStep");e&&(g(e),function(){var e=l("__activeStagePosition"),t=l("__overlaySvg");if(e)if(t){var n=window.innerWidth,o=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(o))}else console.warn("No stage svg found.")}(),D(e,t))}function x(){var e;null==(e=document.getElementById("gleap-tour-dummy-element"))||e.remove(),document.querySelectorAll(".gleap-tour-active-element").forEach((function(e){e.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}))}function C(){var e=l("__resizeTimeout");e&&window.cancelAnimationFrame(e),c("__resizeTimeout",window.requestAnimationFrame(k))}function S(e){var t;if(l("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=l("__activeElement"),o=null==(t=l("popover"))?void 0:t.wrapper,a=r([].concat(Ot(o?[o]:[]),Ot(n?[n]:[]))),i=a[0],s=a[a.length-1];if(e.preventDefault(),e.shiftKey){var c=a[a.indexOf(document.activeElement)-1]||s;null==c||c.focus()}else{var u=a[a.indexOf(document.activeElement)+1]||i;null==u||u.focus()}}}function I(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?h("escapePress"):"ArrowRight"===e.key?h("arrowRightPress"):"ArrowLeft"===e.key&&h("arrowLeftPress"))}function L(e,t,n){var o=function(t,o){var r=t.target;e.contains(r)&&(n&&!n(r)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==o||o(t))},r=!0;document.addEventListener("pointerdown",o,r),document.addEventListener("mousedown",o,r),document.addEventListener("pointerup",o,r),document.addEventListener("mouseup",o,r),document.addEventListener("click",(function(e){o(e,t)}),r)}function T(){window.addEventListener("keyup",I,!1),window.addEventListener("keydown",S,!1),window.addEventListener("resize",C),window.addEventListener("scroll",C)}function O(){window.removeEventListener("keyup",I),window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}function M(e,t){var o,i,s=l("popover");s&&document.body.removeChild(s.wrapper),s=function(){var e=document.createElement("div");e.classList.add("gleap-tour-popover");var t=document.createElement("div");t.classList.add("gleap-tour-popover-arrow");var n=document.createElement("header");n.id="gleap-tour-popover-title",n.classList.add("gleap-tour-popover-title"),n.style.display="none",n.innerText="Popover Title";var o=document.createElement("div");o.id="gleap-tour-popover-description",o.classList.add("gleap-tour-popover-description"),o.style.display="none",o.innerText="Popover description is here";var r=document.createElement("button");r.type="button",r.classList.add("gleap-tour-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";var a=document.createElement("footer");a.classList.add("gleap-tour-popover-footer");var i=document.createElement("span");i.classList.add("gleap-tour-popover-progress-text"),i.innerText="";var s=document.createElement("span");s.classList.add("gleap-tour-popover-navigation-btns");var c=document.createElement("button");c.type="button",c.classList.add("gleap-tour-popover-prev-btn"),c.innerHTML="&larr; Previous";var l=document.createElement("button");return l.type="button",l.classList.add("gleap-tour-popover-next-btn"),l.innerHTML="Next &rarr;",s.appendChild(c),s.appendChild(l),a.appendChild(i),a.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(a),{wrapper:e,arrow:t,title:n,description:o,footer:a,previousButton:c,nextButton:l,closeButton:r,footerButtons:s,progress:i}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},d=u.title,p=u.description,f=u.showButtons,g=u.disableButtons,v=u.showProgress,m=u.nextBtnText,b=void 0===m?n("nextBtnText")||"Next":m,y=u.prevBtnText,w=void 0===y?n("prevBtnText")||"Previous":y,k=u.progressText,x=void 0===k?n("progressText")||"{current} of {total}":k;s.nextButton.innerHTML=b,s.previousButton.innerHTML=w,s.progress.innerHTML=x,d?(s.title.innerHTML=d,s.title.style.display="block"):s.title.style.display="none",p?(s.description.innerHTML=p,s.description.style.display="block"):s.description.style.display="none";var C=f||n("showButtons"),S=v||n("showProgress")||!1,I=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||S;s.closeButton.style.display=C.includes("close")?"block":"none",I?(s.footer.style.display="flex",s.progress.style.display=S?"block":"none",s.nextButton.style.display=C.includes("next")?"block":"none",s.previousButton.style.display=C.includes("previous")?"block":"none"):s.footer.style.display="none";var T=g||n("disableButtons")||[];(null==T?void 0:T.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var O=s.wrapper;O.style.display="block",O.style.left="",O.style.top="",O.style.bottom="",O.style.right="",O.id="gleap-tour-popover-content",O.setAttribute("role","dialog"),O.setAttribute("aria-labelledby","gleap-tour-popover-title"),O.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var M=(null==(o=t.popover)?void 0:o.popoverClass)||n("popoverClass")||"";O.className="gleap-tour-popover ".concat(M).trim(),L(s.wrapper,(function(o){var r,a,i,s=o.target,c=(null==(r=t.popover)?void 0:r.onNextClick)||n("onNextClick"),u=(null==(a=t.popover)?void 0:a.onPrevClick)||n("onPrevClick"),d=(null==(i=t.popover)?void 0:i.onCloseClick)||n("onCloseClick");return s.classList.contains("gleap-tour-popover-next-btn")?c?c(e,t,{config:n(),state:l()}):h("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:l()}):h("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?d?d(e,t,{config:n(),state:l()}):h("closeClick"):void 0}),(function(e){return!(null==s?void 0:s.description.contains(e))&&!(null==s?void 0:s.title.contains(e))&&"string"==typeof e.className&&e.className.includes("gleap-tour-popover")})),c("popover",s);var E=(null==(i=t.popover)?void 0:i.onPopoverRender)||n("onPopoverRender");E&&E(s,{config:n(),state:l()}),D(e,t),a(O);var R=e.classList.contains("gleap-tour-dummy-element"),A=r([O].concat(Ot(R?[]:[e])));A.length>0&&A[0].focus()}function E(){var e=l("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),o=n("stagePadding")||0,r=n("popoverOffset")||0;return{width:t.width+o+r,height:t.height+o+r,realWidth:t.width,realHeight:t.height}}}function R(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,a=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-o.realHeight-a.width),a.width):"end"===e?Math.max(Math.min(n.top-(null==o?void 0:o.realHeight)+n.height+r,window.innerHeight-(null==o?void 0:o.realHeight)-a.width),a.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==o?void 0:o.realHeight)/2,window.innerHeight-(null==o?void 0:o.realHeight)-a.width),a.width):0}function A(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,a=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-o.realWidth-a.width),a.width):"end"===e?Math.max(Math.min(n.left-(null==o?void 0:o.realWidth)+n.width+r,window.innerWidth-(null==o?void 0:o.realWidth)-a.width),a.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==o?void 0:o.realWidth)/2,window.innerWidth-(null==o?void 0:o.realWidth)-a.width),a.width):0}function D(e,t){var o=l("popover");if(o){var r=(null==t?void 0:t.popover)||{},a=r.align,i=void 0===a?"start":a,s=r.side,c=void 0===s?"left":s,u=i,d="gleap-tour-dummy-element"===e.id?"over":c,p=n("stagePadding")||0,h=E(),f=o.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),v=g.top-h.height,m=v>=0,b=window.innerHeight-(g.bottom+h.height),y=b>=0,w=g.left-h.width,k=w>=0,x=window.innerWidth-(g.right+h.width),C=x>=0,S=!(m||y||k||C),I=d;if("top"===d&&m?C=k=y=!1:"bottom"===d&&y?C=k=m=!1:"left"===d&&k?C=m=y=!1:"right"===d&&C&&(k=m=y=!1),"over"===d){var L=window.innerWidth/2-h.realWidth/2,T=window.innerHeight/2-h.realHeight/2;o.wrapper.style.left="".concat(L,"px"),o.wrapper.style.right="auto",o.wrapper.style.top="".concat(T,"px"),o.wrapper.style.bottom="auto"}else if(S){var O=window.innerWidth/2-(null==h?void 0:h.realWidth)/2;o.wrapper.style.left="".concat(O,"px"),o.wrapper.style.right="auto",o.wrapper.style.bottom="".concat(10,"px"),o.wrapper.style.top="auto"}else if(k){var M=Math.min(w,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),D=R(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.left="".concat(M,"px"),o.wrapper.style.top="".concat(D,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="left"}else if(C){var N=Math.min(x,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),P=R(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.right="".concat(N,"px"),o.wrapper.style.top="".concat(P,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.left="auto",I="right"}else if(m){var F=Math.min(v,window.innerHeight-h.realHeight-f.width),B=A(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.top="".concat(F,"px"),o.wrapper.style.left="".concat(B,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="top"}else if(y){var j=Math.min(b,window.innerHeight-(null==h?void 0:h.realHeight)-f.width),_=A(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.left="".concat(_,"px"),o.wrapper.style.bottom="".concat(j,"px"),o.wrapper.style.top="auto",o.wrapper.style.right="auto",I="bottom"}S?o.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var o=l("popover");if(!o)return;var r=n.getBoundingClientRect(),a=E(),i=o.arrow,s=a.width,c=window.innerWidth,u=r.width,d=r.left,p=a.height,h=window.innerHeight,f=r.top,g=r.height;i.className="gleap-tour-popover-arrow";var v=t,m=e;"top"===t?(d+u<=0?(v="right",m="end"):d+u-s<=0&&(v="top",m="start"),d>=c?(v="left",m="end"):d+s>=c&&(v="top",m="end")):"bottom"===t?(d+u<=0?(v="right",m="start"):d+u-s<=0&&(v="bottom",m="start"),d>=c?(v="left",m="start"):d+s>=c&&(v="bottom",m="end")):"left"===t?(f+g<=0?(v="bottom",m="end"):f+g-p<=0&&(v="left",m="start"),f>=h?(v="top",m="end"):f+p>=h&&(v="left",m="end")):"right"===t&&(f+g<=0?(v="bottom",m="start"):f+g-p<=0&&(v="right",m="start"),f>=h?(v="top",m="start"):f+p>=h&&(v="right",m="end"));v?(i.classList.add("gleap-tour-popover-arrow-side-".concat(v)),i.classList.add("gleap-tour-popover-arrow-align-".concat(m))):i.classList.add("gleap-tour-popover-arrow-none")}(u,I,e)}}function N(){var e,t=l("popover");t&&(null==(e=t.wrapper.parentElement)||e.removeChild(t.wrapper))}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function o(){n("allowClose")&&v()}function r(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e+1;t[o]?g(o):v()}}function a(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e-1;t[o]?g(o):v()}}function i(e){(n("steps")||[])[e]?g(e):v()}function s(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),o=l("__activeStep"),r=l("__activeElement");if(void 0!==t&&void 0!==o)if(void 0!==l("activeIndex")){var i=(null==(e=o.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(i)return i(r,o,{config:n(),state:l()});a()}}}function d(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),o=l("__activeStep"),a=l("__activeElement");if(void 0!==t&&void 0!==o){var i=(null==(e=o.popover)?void 0:e.onNextClick)||n("onNextClick");if(i)return i(a,o,{config:n(),state:l()});r()}}}function h(){l("isInitialized")||(c("isInitialized",!0),document.body.classList.add("gleap-tour-active",n("animate")?"gleap-tour-fade":"gleap-tour-simple"),T(),p("overlayClick",o),p("escapePress",o),p("arrowLeftPress",s),p("arrowRightPress",d))}function g(){var e,t,o,r,a,i,s,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,d=n("steps");if(!d)return console.error("No steps to drive through"),void v();if(d[u]){c("__activeOnDestroyed",document.activeElement),c("activeIndex",u);var p=d[u],h=d[u+1],f=d[u-1],m=(null==(e=p.popover)?void 0:e.doneBtnText)||n("doneBtnText")||"Done",b=n("allowClose"),y=void 0!==(null==(t=p.popover)?void 0:t.showProgress)?null==(o=p.popover)?void 0:o.showProgress:n("showProgress"),k=(null==(r=p.popover)?void 0:r.progressText)||n("progressText")||"{{current}} of {{total}}",x=k.replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(d.length)),C=(null==(a=p.popover)?void 0:a.showButtons)||n("showButtons"),S=["next","previous"].concat(Ot(b?["close"]:[])).filter((function(e){return!(null==C?void 0:C.length)||C.includes(e)})),I=(null==(i=p.popover)?void 0:i.onNextClick)||n("onNextClick"),L=(null==(s=p.popover)?void 0:s.onPrevClick)||n("onPrevClick"),T=(null==(l=p.popover)?void 0:l.onCloseClick)||n("onCloseClick");w(Rt(Rt({},p),{},{popover:Rt({showButtons:S,nextBtnText:h?void 0:m,disableButtons:Ot(f?[]:["previous"]),showProgress:y,progressText:x,onNextClick:I||function(){h?g(u+1):v()},onPrevClick:L||function(){g(u-1)},onCloseClick:T||function(){v()}},(null==p?void 0:p.popover)||{})}))}else v()}function v(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=l("__activeElement"),o=l("__activeStep"),r=l("__activeOnDestroyed"),a=n("onDestroyStarted");if(e&&a){var i=!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id);a(i?void 0:t,o,{config:n(),state:l()})}else{var s=(null==o?void 0:o.onDeselected)||n("onDeselected"),c=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),O(),N(),x(),y(),f(),u(),t&&o){var d="gleap-tour-dummy-element"===t.id;s&&s(d?void 0:t,o,{config:n(),state:l()}),c&&c(d?void 0:t,o,{config:n(),state:l()})}r&&r.focus()}}return t(e),{isActive:function(){return l("isInitialized")||!1},refresh:C,drive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;h(),g(e)},setConfig:t,setSteps:function(e){u(),t(Rt(Rt({},n()),{},{steps:e}))},getConfig:n,getState:l,getActiveIndex:function(){return l("activeIndex")},isFirstStep:function(){return 0===l("activeIndex")},isLastStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&t===e.length-1},getActiveStep:function(){return l("activeStep")},getActiveElement:function(){return l("activeElement")},getPreviousElement:function(){return l("previousElement")},getPreviousStep:function(){return l("previousStep")},moveNext:r,movePrevious:a,moveTo:i,hasNextStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t+1]},hasPreviousStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t-1]},highlight:function(e){h(),w(Rt(Rt({},e),{},{popover:e.popover?Rt({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){v(!1)}}}}();function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){Bt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Bt(this,"productTourData",void 0),Bt(this,"productTourId",void 0),Bt(this,"onCompletion",void 0),Bt(this,"unmuted",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"startWithConfig",value:function(e,t,n){return this.productTourId=e,this.productTourData=t,this.onCompletion=n,this.start()}},{key:"start",value:function(){var e,t=this.productTourData;if(t){this.unmuted=!1;for(var n=t.steps,o=this,r=[],a=0;a<n.length;a++){var i=n[a],s="CLICK"===i.mode,c="",l=!1;if("video-pointer"===i.type)c='<div class="gleap-tour-video">\n <video class="gleap-tour-video-obj" muted autoplay>\n <source src="'.concat(i.videoUrl,'" type="video/mp4">\n </video>\n <div class="gleap-tour-video-playpause">').concat(d("unmute"),"</div>\n </div>");else{var u="";t.sender&&t.sender.firstName&&(l=!0,u='<div class="gleap-tour-sender">\n <div class="gleap-tour-sender-image" style="background-image: url(\''.concat(t.sender.profileImageUrl,'\');"></div>\n <div class="gleap-tour-sender-name">').concat(t.sender.firstName,"</div>\n </div>")),c="".concat(u,'<div class="gleap-tour-message">').concat(i.message,"</div>")}var p={disableActiveInteraction:!s,popover:Pt({description:c,popoverClass:"gleap-tour-popover-".concat(i.type," ").concat(!l&&"gleap-tour-popover-no-sender"," ").concat(t.allowClose&&"gleap-tour-popover-can-close")},s?{showButtons:[]}:{})};i.selector&&i.selector.length>0&&(p.element=i.selector),r.push(p)}var h=["next","close"];t.backButton&&h.push("previous");var f=Dt((Bt(e={showProgress:!0,steps:r},"showProgress",n.length>1),Bt(e,"allowClose",t.allowClose),Bt(e,"nextBtnText",t.nextText),Bt(e,"doneBtnText",t.doneText),Bt(e,"prevBtnText",t.prevText),Bt(e,"showButtons",h),Bt(e,"onDestroyStarted",(function(){f.hasNextStep()?f.destroy():(f.destroy(),o.onCompletion&&o.onCompletion({tourId:o.productTourId})),document.removeEventListener("click",g)})),Bt(e,"onPopoverRender",(function(e){e&&function(){for(var e=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),t=function(){setTimeout((function(){f.refresh()}),500),setTimeout((function(){f.refresh()}),750)},n=0;n<e.length;n++){var o=e[n];"IMG"===o.tagName?(o.addEventListener("load",(function(){t()})),o.addEventListener("error",(function(){t()}))):"VIDEO"===o.tagName&&(o.addEventListener("canplaythrough",(function(){t()})),o.addEventListener("error",(function(){t()})))}}();var t="gleap-tour-video--playing",n=document.querySelector(".gleap-tour-video-obj");if(n){var r=n.closest(".gleap-tour-video");o.unmuted&&n&&(n.pause(),n.muted=!1,n.play(),r.classList.add(t)),n.addEventListener("ended",(function(){a.innerHTML=d("replay"),r.classList.remove(t)}));var a=document.querySelector(".gleap-tour-video-playpause");a&&a.addEventListener("click",(function(){n.muted?(o.unmuted=!0,n.pause(),n.currentTime=0,n.muted=!1,n.play(),a.innerHTML=d("mute"),r.classList.add(t)):n.paused?(n.muted=!1,n.play(),a.innerHTML=d("mute"),r.classList.add(t)):(n.pause(),a.innerHTML=d("unmute"),r.classList.remove(t))}))}})),e));f.drive(),document.addEventListener("click",g)}function g(e){document.querySelector(".gleap-tour-popover").contains(e.target)||f.moveNext()}}}])&&Ft(t.prototype,n),o&&Ft(t,o),e}();function _t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bt(jt,"instance",void 0),"undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype&&void 0===HTMLCanvasElement.prototype.__originalGetContext&&(HTMLCanvasElement.prototype.__originalGetContext=HTMLCanvasElement.prototype.getContext,HTMLCanvasElement.prototype.getContext=function(e,t){return this.__originalGetContext(e,qt(qt({},t),{},{preserveDrawingBuffer:!0}))});var Wt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ht(this,"initialized",!1),Ht(this,"offlineMode",!1),Ht(this,"disablePageTracking",!1),Ht(this,"disableInAppNotifications",!1),Ht(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(ce.getInstance(),he.getInstance().start(),be.getInstance().start(),Tt.getInstance().start())}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){ce.getInstance().environment=e}},{key:"setTags",value:function(e){xt.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){ae.getInstance().setUrlHandler(e)}},{key:"setOfflineMode",value:function(e){this.getInstance().offlineMode=e}},{key:"setDisableInAppNotifications",value:function(e){this.getInstance().disableInAppNotifications=e}},{key:"setDisablePageTracking",value:function(e){this.getInstance().disablePageTracking=e}},{key:"disableConsoleLogOverwrite",value:function(){he.getInstance().stop()}},{key:"attachNetworkLogs",value:function(e){v.getInstance().externalRequests=b(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";he.getInstance().addLog(e,t)}},{key:"initialize",value:function(t){var n=this.getInstance();if(n.initialized)console.warn("Gleap already initialized.");else{n.initialized=!0;var o=E.getInstance();o.sdkKey=t,o.setOnSessionReady((function(){setTimeout((function(){B.getInstance().start().then((function(){D.getInstance().start(),I((function(){r.getInstance().injectFeedbackButton(),dt.getInstance().injectNotificationUI(),e.checkForUrlParams(),Se.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),o.startSession()}}},{key:"checkForUrlParams",value:function(){if("undefined"!=typeof window&&window.location.search)try{var t=new URLSearchParams(window.location.search),n=t.get("gleap_feedback");n&&n.length>0&&e.startFeedbackFlow(n);var o=t.get("gleap_survey"),r=t.get("gleap_survey_format");o&&o.length>0&&e.showSurvey(o,"survey_full"===r?"survey_full":"survey");var a=t.get("gleap_tour");if(a&&a.length>0){var i=parseInt(t.get("gleap_tour_delay"));isNaN(i)&&(i=4),setTimeout((function(){e.startProductTour(a)}),1e3*i)}}catch(s){}}},{key:"destroy",value:function(){ze.getInstance().stop(),D.getInstance().stop(),ae.getInstance().destroy(),r.getInstance().toggleFeedbackButton(!1),dt.getInstance().clearAllNotifications(!0),E.getInstance().clearSession(0,!1),vt.getInstance().removeBannerUI()}},{key:"closeBanner",value:function(){vt.getInstance().removeBannerUI()}},{key:"setUseCookies",value:function(e){E.getInstance().useCookies=e}},{key:"identify",value:function(e,t,n){return E.getInstance().identifySession(e,b(t),n)}},{key:"updateContact",value:function(e){return E.getInstance().updateSession(b(e))}},{key:"clearIdentity",value:function(){E.getInstance().clearSession()}},{key:"getIdentity",value:function(){return E.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=E.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ae.getInstance().isOpened()}},{key:"hide",value:function(){ae.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){v.getInstance().setMaxRequests(e)}},{key:"setReplayOptions",value:function(e){ze.getInstance().setOptions(e)}},{key:"close",value:function(){ae.getInstance().hideWidget()}},{key:"open",value:function(){ae.getInstance().setAppMode("widget"),ae.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){D.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){D.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);ct.getInstance().formPreFill=t,ae.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Se.on(e,t)}},{key:"enableShortcuts",value:function(e){e?at.getInstance().start():at.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){r.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ce.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ce.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){E.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){E.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){vt.getInstance().setBannerUrl(e)}},{key:"setFrameUrl",value:function(e){ae.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"playSound",value:function(e){yt.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=dt.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){nt.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:r.FEEDBACK_BUTTON_BOTTOM_LEFT;I((function(){u(e,t,n,a,o,i,s,c)}))}},{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",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,o)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=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=o?b(o):{},a=E.getInstance();if(a.ready){var i=e||{};a.session.email&&(i.reportedBy=a.session.email);var s=new ee("CRASH",n,i,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"survey";e.startFeedbackFlowWithOptions(t,{hideBackButton:!0,format:n},!0)}},{key:"startClassicForm",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{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]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.autostartDrawing,a=n.hideBackButton,i=n.format,s=E.getInstance();if(s.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var c="start-feedbackflow";o&&(c="start-survey"),ae.getInstance().setAppMode(o?i:"widget"),ae.getInstance().sendMessage({name:c,data:{flow:t,hideBackButton:a,format:i}},!0),r?ae.getInstance().showDrawingScreen("screenshot"):ae.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"startConversation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.startBot("",t)}},{key:"startBot",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),ae.getInstance().showWidget()}},{key:"openHelpCenterCollection",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openChecklists",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-checklists",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"startChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!!e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"start-checklist",data:{outboundId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=this;E.getInstance().startProductTourConfig(e).then((function(n){t.startProductTourWithConfig(e,n)})).catch((function(e){}))}},{key:"startProductTourWithConfig",value:function(t,n){jt.getInstance().startWithConfig(t,n,(function(t){var n={tourId:t.tourId};Se.notifyEvent("productTourCompleted",n),e.trackEvent("tour-".concat(t.tourId,"-completed"),n)}))}},{key:"showBanner",value:function(e){try{vt.getInstance().showBanner(e)}catch(t){}}},{key:"showNotification",value:function(e){dt.getInstance().showNotification(e)}}],(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(){ae.getInstance().destroy(),B.getInstance().start().then((function(){r.getInstance().refresh(),dt.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n<t.length;n++){var o=t[n];o&&o.actionType&&("notification"===o.actionType?this.disableInAppNotifications||e.showNotification(o):"banner"===o.actionType?e.showBanner(o):"tour"===o.actionType?e.startProductTourWithConfig(o.outbound,o.data):e.showSurvey(o.actionType,o.format))}}},{key:"setGlobalDataItem",value:function(e,t){this.globalData[e]=t}},{key:"getGlobalDataItem",value:function(e){return this.globalData[e]}},{key:"takeCurrentReplay",value:function(){var e=ze.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}])&&_t(t.prototype,n),o&&_t(t,o),e}();if(Ht(Wt,"invoked",!0),Ht(Wt,"silentCrashReportSent",!1),Ht(Wt,"instance",void 0),"undefined"!=typeof window){var zt=window.GleapActions;if(zt&&zt.length>0)for(var Gt=0;Gt<zt.length;Gt++){var Vt=zt[Gt];Vt&&Vt.e&&Wt[Vt.e]&&Wt[Vt.e].apply(Wt,Vt.a)}}const Zt=Wt,Kt=Zt;return t=t.default})()}));
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 o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.d(t,{default:()=>Kt});var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"feedbackButton",null),o(this,"injectedFeedbackButton",!1),o(this,"buttonHidden",null),o(this,"lastButtonIcon",null)}var t,r,a;return t=e,a=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(r=[{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),dt.getInstance().updateContainerStyle()}},{key:"feedbackButtonPressed",value:function(){var e=ae.getInstance();e.isOpened()?e.hideWidget():(e.setAppMode("widget"),e.showWidget())}},{key:"injectFeedbackButton",value:function(){var e=this;if(!this.injectedFeedbackButton){this.injectedFeedbackButton=!0;var t=document.createElement("div");t.onclick=function(){e.feedbackButtonPressed()},document.body.appendChild(t),this.feedbackButton=t,this.updateFeedbackButtonState()}}},{key:"updateNotificationBadge",value:function(e){var t=document.querySelector(".bb-notification-bubble");if(t){var n="bb-notification-bubble--hidden";e>0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"refresh",value:function(){document.querySelector(".bb-feedback-button")?(this.updateFeedbackButtonText(),this.updateFeedbackButtonState()):(this.injectedFeedbackButton=!1,this.injectFeedbackButton())}},{key:"updateFeedbackButtonText",value:function(){var t=B.getInstance().getFlowConfig();if(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT){var n=document.querySelector(".bb-feedback-button-classic");n&&(n.innerText=t.widgetButtonText)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=B.getInstance().getFlowConfig(),n="";n=t.buttonLogo?'<img class="bb-logo-logo" src="'.concat(t.buttonLogo,'" alt="Feedback Button" />'):d("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-font gl-block",this.feedbackButton.setAttribute("dir",nt.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.classList.add("bb-feedback-button--classic-button-style"),this.feedbackButton.innerHTML='<div class="bb-feedback-button-classic '.concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?"bb-feedback-button-classic--left":"").concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM?"bb-feedback-button-classic--bottom":"",'">').concat(t.widgetButtonText,"</div>")):n!==this.lastButtonIcon&&(this.feedbackButton.innerHTML='<div class="bb-feedback-button-icon">'.concat(n).concat(d("arrowdown","#fff"),'</div><div class="bb-notification-bubble bb-notification-bubble--hidden"></div>')),this.lastButtonIcon=n;var o=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(o=!0):e.getInstance().buttonHidden&&(o=!0),o&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ae.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=ae.getInstance().appMode;"survey"!==r&&"survey_full"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||E.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&n(t.prototype,r),a&&n(t,a),e}();function a(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 o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(c){s=!0,r=c}finally{try{i||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,o=new Array(t);n<t;n++)o[n]=e[n];return o}o(r,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),o(r,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),o(r,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),o(r,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),o(r,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),o(r,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),o(r,"instance",void 0);var c=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var n=a(e.match(/.{2}/g),3),o=n[0],r=n[1],i=n[2],s=[parseInt(o,16)+t,parseInt(r,16)+t,parseInt(i,16)+t];o=s[0],r=s[1],i=s[2],o=Math.max(Math.min(255,o),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var c=(o.length<2?"0":"")+o,l=(r.length<2?"0":"")+r,u=(i.length<2?"0":"")+i;return"#".concat(c).concat(l).concat(u)},l=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"},u=function(e,t,n,o,a,i,s,u){var d=l(e),p=l(n),h=l(a),f=l(t),g="#ffffff"===h,v=c(t,"#ffffff"===f?-35:-15),m=c(a,g?100:-120),b=c(a,g?30:-12),y=c(a,g?80:-30),w=(o=parseInt(o,10),Math.round(1.05*o)),k=Math.round(.8*o),x=Math.round(.6*o),C=Math.round(.4*o),S=Math.round(.25*o),I=57+s;u===r.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(u&&u.includes("CLASSIC")||u===r.FEEDBACK_BUTTON_NONE)&&(I=s);var L='\n .gleap-font, .gleap-font * {\n font-style: normal;\n font-variant-caps: normal;\n font-variant-ligatures: normal;\n font-variant-numeric: normal;\n font-variant-east-asian: normal;\n font-weight: normal;\n font-stretch: normal;\n font-size: 100%;\n line-height: 1;\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n }\n .gleap-frame-container {\n right: '.concat(i,"px;\n bottom: ").concat(61+s,"px;\n width: calc(100% - 40px);\n max-width: 400px;\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(k,"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 transition: max-width 0.3s ease-out;\n }\n\n :root {\n --gleap-margin-top: 50px;\n }\n\n .gleap-b-frame {\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: auto;\n padding: 0px;\n margin: 0px;\n }\n\n .gleap-b-shown {\n transition: margin 0.3s ease-out;\n margin-top: var(--gleap-margin-top);\n position: relative;\n z-index: 10000;\n }\n\n .gleap-b-f {\n margin-top: 0px;\n }\n\n .gleap-b {\n display: none;\n position: absolute;\n top: calc(-1 * var(--gleap-margin-top));\n left: 0px;\n width: 100vw;\n height: var(--gleap-margin-top);\n }\n\n @keyframes gleapSlideIn {\n from {\n top: calc(-1 * var(--gleap-margin-top));\n }\n to {\n top: 10px;\n }\n }\n\n .gleap-b-f .gleap-b {\n position: fixed;\n top: 10px;\n animation: gleapSlideIn .25s ease-out forwards;\n max-width: 800px;\n width: calc(100% - 20px);\n left: 50%;\n z-index: ").concat(2147483699,";\n transform: translateX(-50%);\n border-radius: ").concat(C,"px;\n overflow: hidden;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 5px 5px rgba(0, 0, 0, 0.05);\n }\n\n .gleap-b-shown .gleap-b {\n display: block;\n }\n\n .gleap-image-view {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n z-index: ").concat(2147483699,";\n background-color: ").concat(h,"cc;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-image-view-image {\n width: 90%;\n height: auto;\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n }\n\n .gleap-image-view-close {\n position: fixed;\n top: 20px;\n right: 20px;\n width: 32px;\n height: 32px;\n opacity: 0.8;\n z-index: ").concat(2147483740,";\n box-shadow: 0px 5px 18px rgba(0, 0, 0, 0.16);\n cursor: pointer;\n }\n\n .gleap-image-view-close:hover {\n opacity: 1;\n }\n\n .gleap-image-view-close svg path {\n fill: ").concat(a,";\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(v," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(a,"1A 70%,\n ").concat(a," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(s,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !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 max-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: 640px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(k,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(61+s,"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(I,"px;\n right: ").concat(i,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 100%;\n max-width: min(340px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(s,"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: 28px;\n height: 28px;\n background-color: ").concat(m,";\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 @media only screen and (max-width: 450px) {\n .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\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(a,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(a,";\n border-radius: ").concat(m,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-checklist-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n width: 100%;\n width: min(310px, 70vw);\n max-width: min(310px, 70vw);\n }\n\n .gleap-notification-item-checklist-content-title {\n color: ").concat(h,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 10px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-checklist-content-progress {\n width: 100%;\n height: 8px;\n border-radius: 8px;\n background-color: ").concat(b,";\n }\n\n .gleap-notification-item-checklist-content-progress-inner {\n height: 100%;\n border-radius: 8px;\n background-color: ").concat(e,";\n }\n\n .gleap-notification-item-checklist-content-next {\n color: ").concat(m,";\n font-size: 15px;\n font-weight: normal;\n line-height: 21px;\n margin-top: 10px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n }\n\n .gleap-notification-item-checklist-content-next svg {\n height: 18px;\n margin-right: 5px;\n width: auto;\n }\n\n .gleap-notification-item-checklist-content-next b {\n font-size: 15px;\n font-weight: normal;\n color: ").concat(h,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n cursor: pointer;\n }\n\n .gleap-notification-item-news-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n }\n\n .gleap-notification-item-news-preview {\n color: ").concat(m,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n overflow-wrap: break-word;\n word-break: break-word;\n display: block;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender {\n display: flex;\n align-items: center;\n color: ").concat(m,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n }\n\n .gleap-notification-item-news-content-title {\n color: ").concat(h,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 6px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender img {\n border-radius: 100%;\n height: 20px;\n margin-right: 8px;\n object-fit: cover;\n width: 20px;\n }\n\n .gleap-notification-item-news-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(a,";\n border-radius: ").concat(m,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-news-image {\n background-color: ").concat(m,";\n height: 170px;\n object-fit: cover;\n width: 100%;\n }\n\n .gleap-notification-item-news:hover .gleap-notification-item-news-content-title {\n color: ").concat(e,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n cursor: pointer;\n }\n\n .gleap-notification-item img {\n width: 32px;\n height: 32px;\n min-width: 32px;\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(x,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(a,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(h,';\n position: relative;\n }\n\n .gleap-notification-item-container::after {\n content: " ";\n position: absolute;\n bottom: 0px;\n width: 0px;\n height: 0px;\n left: -6px;\n border-style: solid;\n border-width: 0px 0px 10px 6px;\n border-color: transparent transparent ').concat(a,";\n }\n\n .gleap-notification-item-sender {\n color: ").concat(m,";\n line-height: 20px;\n }\n\n .gleap-notification-item-content {\n line-height: 20px;\n color: ").concat(h,";\n margin-top: 4px;\n min-width: min(200px, 50vw);\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+s,"px);\n max-height: ").concat(700,'px;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: calc(100vh - 40px);\n }\n \n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(k,"px);\n top: ").concat(k,"px;\n background-color: ").concat(a,";\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 pointer-events: auto;\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(s,"px;\n right: ").concat(i,"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(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: ").concat(i,'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: -5px;\n right: -5px;\n min-width: 20px;\n padding: 0px 4px;\n height: 20px;\n border-radius: 20px;\n background-color: red;\n color: #fff;\n font-size: 11px;\n font-family: sans-serif;\n text-align: center;\n line-height: 20px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 48px;\n height: 48px;\n border-radius: 48px;\n background-color: #485bff;\n transition: box-shadow, transform 0.2s 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 }\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(i,"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(i,"px;\n right: auto;\n }\n\n .bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n \n .bb-feedback-button--open.bb-feedback-button--classic-button-style {\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: 30px;\n height: 30px;\n top: 9px;\n left: 9px;\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: 14px;\n height: 14px;\n top: 17px;\n left: 17px;\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 transform: scale(1.1);\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: fixed;\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-editor-borderlayer {\n border: 4px solid #eb144c !important;\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(S,"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(S,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(d,';\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 font-family: sans-serif;\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 font-family: sans-serif;\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(h,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(b,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(y,";\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(b,";\n }\n .bb-tooltip {\n border-radius: ").concat(C,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(y,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(d,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-button-next {\n color: ").concat(d,";\n background-color: ").concat(e,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(a,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(m,";\n }\n .bb-svg-path {\n fill: ").concat(h,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(a,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(a,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(b,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(C,"px;\n border-top-right-radius: ").concat(C,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(p,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(p,";\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(p,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-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\n .gleap-tour-sender {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-bottom: 20px;\n }\n\n .gleap-tour-sender-image {\n width: 32px;\n height: 32px;\n border-radius: 32px;\n margin-right: 10px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: 550px;\n max-width: 550px;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: calc(100vw - 40px);\n max-width: calc(100vw - 40px);\n }\n }\n\n .gleap-tour-message,\n .gleap-tour-message p,\n .gleap-tour-message ul {\n color: ").concat(h,";\n }\n\n .gleap-tour-message p {\n line-height: 1.3;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-message {\n max-height: calc(80vh - 100px) !important;\n overflow-y: auto;\n min-width: 270px;\n }\n\n .gleap-tour-message iframe {\n width: 100%;\n height: 300px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-sender-name {\n font-size: 15px;\n }\n\n .gleap-tour-video {\n width: 100%;\n max-width: 100%;\n }\n\n .gleap-tour-video--playing .gleap-tour-video-playpause {\n opacity: 0;\n }\n \n .gleap-tour-video--playing:hover .gleap-tour-video-playpause {\n opacity: 1;\n }\n\n .gleap-tour-popover-video-pointer {\n padding: 0px !important;\n border-radius: 8px;\n position: relative;\n background-color: transparent !important;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer {\n position: absolute;\n top: 0px;\n left: 20px;\n right: 20px;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer button {\n padding: 5px 12px;\n }\n\n .gleap-tour-popover-video-pointer.gleap-tour-popover-can-close .gleap-tour-popover-footer {\n right: 40px !important;\n }\n\n .gleap-tour-popover-video-pointer:hover .gleap-tour-popover-footer {\n opacity: 1;\n }\n\n .gleap-tour-popover-pointer.gleap-tour-popover-no-sender .gleap-tour-message {\n padding-right: 20px;\n }\n\n .gleap-tour-video video {\n width: 100%;\n max-width: 100%;\n height: auto;\n border: none;\n outline: none;\n display: block;\n border-radius: 8px;\n }\n\n .gleap-admin-collapse-ui {\n z-index: ").concat(2147483635,";\n cursor: pointer;\n position: fixed;\n bottom: 75px;\n right: 20px;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;\n }\n\n .gleap-admin-collapse-ui svg {\n width: 20px;\n height: 14px;\n margin-top: 6px;\n fill: #000 !important;\n }\n\n .gleap-admin-collapse-ui-active {\n bottom: 20px !important;\n }\n\n .gleap-admin-collapse-ui-active svg {\n transform: rotate(180deg);\n }\n\n .gleap-admin-frame-container-active {\n display: none !important;\n }\n\n .gleap-admin-frame-container {\n position: fixed;\n bottom: 0px;\n left: 0px;\n right: 0px;\n width: 100vw;\n z-index: ").concat(2147483640,";\n }\n\n .gleap-admin-frame {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n display: block;\n }\n \n .gleap-tour-message .linktype-link {\n display: inline-block !important;\n background-color: transparent !important;\n color: ").concat(n," !important;\n }\n\n .gleap-tour-message .linktype-button {\n display: inline-block !important;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 10px 20px;\n background-color: ").concat(n," !important;\n color: ").concat(p," !important;\n }\n\n .gleap-tour-message img {\n width: 100%;\n max-width: 100%;\n min-height: 260px;\n height: auto;\n margin-top: 10px;\n margin-bottom: 10px;\n object-fit: cover;\n }\n\n .gleap-tour-active .gleap-tour-overlay {\n pointer-events: none;\n }\n \n .gleap-tour-active * {\n pointer-events: none;\n }\n \n .gleap-tour-active .gleap-tour-active-element,\n .gleap-tour-active .gleap-tour-active-element *,\n .gleap-tour-popover,\n .gleap-tour-popover * {\n pointer-events: auto;\n }\n \n @keyframes animate-fade-in {\n 0% {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n .gleap-tour-fade .gleap-tour-overlay {\n animation: animate-fade-in 200ms ease-in-out;\n }\n \n .gleap-tour-fade .gleap-tour-popover {\n animation: animate-fade-in 200ms;\n }\n\n .gleap-tour-video-playpause {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 8px;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-arrow {\n display: none !important;\n }\n\n .gleap-tour-video-playpause svg {\n width: 34px;\n height: auto;\n fill: #fff;\n }\n \n /* Popover styles */\n .gleap-tour-popover {\n all: unset;\n box-sizing: border-box;\n color: #2d2d2d;\n margin: 0;\n padding: 15px;\n border-radius: ").concat(C,'px;\n min-width: 250px;\n max-width: 300px;\n box-shadow: 0 1px 10px #0006;\n z-index: 1000000000;\n position: fixed;\n top: 0;\n right: 0;\n background-color: #fff;\n }\n \n .gleap-tour-popover * {\n font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;\n }\n \n .gleap-tour-popover-title {\n font: 19px / normal sans-serif;\n font-weight: 700;\n display: block;\n position: relative;\n line-height: 1.5;\n zoom: 1;\n margin: 0;\n }\n \n .gleap-tour-popover-close-btn {\n all: unset;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n font-size: 30px;\n font-weight: 500;\n line-height: 32px;\n color: #d2d2d2;\n z-index: 1;\n text-align: center;\n transition: color;\n transition-duration: 200ms;\n }\n \n .gleap-tour-popover-close-btn:hover,\n .gleap-tour-popover-close-btn:focus {\n color: #2d2d2d;\n }\n \n .gleap-tour-popover-title[style*="block"] + .gleap-tour-popover-description {\n margin-top: 5px;\n }\n \n .gleap-tour-popover-description {\n margin-bottom: 0;\n font: 15px / normal sans-serif;\n line-height: 1.5;\n font-weight: 400;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer {\n margin-top: 15px;\n text-align: right;\n zoom: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .gleap-tour-popover-progress-text {\n font-size: 13px;\n font-weight: 400;\n color: #727272;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer button {\n background-color: ').concat(e,";\n color: ").concat(d,";\n border-radius: ").concat(S,"px;\n box-sizing: border-box;\n padding: 10px 20px;\n font-size: 14px;\n font-weight: bold;\n line-height: 21px;\n border: none;\n text-align: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: none !important;\n outline: none !important;\n }\n\n .gleap-tour-popover-prev-btn {\n color: ").concat(h," !important;\n background-color: ").concat(b," !important;\n margin-right: 3px;\n }\n\n .gleap-tour-popover-prev-btn:hover {\n background-color: ").concat(e,"22 !important;\n color: ").concat(e,' !important;\n }\n \n .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n \n /* Disable the scrolling of parent element if it has an active element*/\n :not(body):has(> .gleap-tour-active-element) {\n overflow: hidden !important;\n }\n \n .gleap-tour-no-interaction, .gleap-tour-no-interaction * {\n pointer-events: none !important;\n }\n \n .gleap-tour-popover-navigation-btns {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n \n .gleap-tour-popover-navigation-btns button + button {\n margin-left: 4px;\n }\n \n .gleap-tour-popover-arrow {\n content: "";\n position: absolute;\n border: 5px solid #fff;\n }\n \n .gleap-tour-popover-arrow-side-over {\n display: none;\n }\n \n /** Popover Arrow Sides **/\n .gleap-tour-popover-arrow-side-left {\n left: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-right {\n right: 100%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-top {\n top: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-bottom {\n bottom: 100%;\n border-left-color: transparent;\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-center {\n display: none;\n }\n \n /* Left/Start + Right/Start */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-start {\n top: 15px;\n }\n \n /* Top/Start + Bottom/Start */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-start {\n left: 15px;\n }\n \n /* End/Left + End/Right */\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-left,\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-right {\n bottom: 15px;\n }\n \n /* Top/End + Bottom/End */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-end,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-end {\n right: 15px;\n }\n \n /* Left/Center + Right/Center */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-center {\n top: 50%;\n margin-top: -5px;\n }\n \n /* Top/Center + Bottom/Center */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-center {\n left: 50%;\n margin-left: -5px;\n }\n \n /* No arrow */\n .gleap-tour-popover-arrow-none {\n display: none;\n } \n '),T=document.querySelector(".gleap-styles");T&&T.remove();var O=document.createElement("style");O.innerHTML=L,O.className="gleap-styles",document.body.appendChild(O)},d=function(e,t){return"button"===e?'<svg class="bb-logo-logo bb-logo-logo--default" width="700px" height="700px" viewBox="0 0 700 700" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(77.000000, 119.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M476.856373,0 L68.122339,0 C30.601832,0 0,30.5935323 0,67.1461527 L0,372.655827 C0,410.166158 30.601832,439.80198 68.122339,439.80198 L170.305847,439.80198 L170.305847,528.23059 C170.305847,538.605788 182.280477,544.671288 190.657396,538.552581 L323.602398,438.844269 L476.877661,438.844269 C514.398168,438.844269 545,408.250737 545,371.698116 L545,67.1461527 C544.978712,30.5935323 515.28163,0 476.856373,0 Z"></path>\n </g>\n </g>\n</svg>':"unmute"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.1 386.2C556.7 352 576 306.3 576 256c0-60.1-27.7-113.8-70.9-149c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C507.3 170.7 528 210.9 528 256c0 39.1-15.6 74.5-40.9 100.5L449 326.6c19-17.5 31-42.7 31-70.6c0-30.1-13.9-56.9-35.4-74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C425.1 227.6 432 241 432 256s-6.9 28.4-17.7 37.3c-1.3 1-2.4 2.2-3.4 3.4L352 250.6V64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L197.8 129.8 38.8 5.1zM352 373.3L82.9 161.3C53.8 167.4 32 193.1 32 224v64c0 35.3 28.7 64 64 64h67.8L298.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S352 460.6 352 448V373.3z"/></svg>':"mute"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>':"replay"===e?'<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M48.5 224H40C26.7 224 16 213.3 16 200V72C16 62.3 21.8 53.5 30.8 49.8C39.8 46.1 50.1 48.1 57 55L98.6 96.6C186.2 10.1 327.3 10.4 414.4 97.6C501.9 185.1 501.9 326.9 414.4 414.4C326.9 501.9 185.1 501.9 97.6 414.4C85.1 401.9 85.1 381.6 97.6 369.1C110.1 356.6 130.4 356.6 142.9 369.1C205.4 431.6 306.7 431.6 369.2 369.1C431.7 306.6 431.7 205.3 369.2 142.8C307 80.6 206.5 80.3 143.9 141.8L185 183C191.9 189.9 193.9 200.2 190.2 209.2C186.5 218.2 177.7 224 168 224H48.5Z" />\n </svg>':"dismiss"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M294.6 166.6L317.3 144 272 98.7l-22.6 22.6L160 210.7 70.6 121.4 48 98.7 2.7 144l22.6 22.6L114.7 256 25.4 345.4 2.7 368 48 413.3l22.6-22.6L160 301.3l89.4 89.4L272 413.3 317.3 368l-22.6-22.6L205.3 256l89.4-89.4z"/></svg>':"blur"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>\n</svg>':"pen"===e?'<svg width="1072px" height="1034px" viewBox="0 0 1072 1034" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-907.000000, -217.000000)" fill-rule="nonzero">\n <g transform="translate(907.268457, 217.009827)">\n <g transform="translate(132.335119, 0.000000)" fill="#000" class="bb-svg-path">\n <path d="M20.3764235,730.530173 L10.1884235,720.342173 C-0.791576454,709.362173 -3.16357645,692.432173 4.37592355,678.858173 L83.1809235,537.018173 C71.7589235,502.979173 82.3098335,463.998173 112.254924,440.706173 L655.334924,18.3161733 C689.951924,-8.6058267 739.197924,-5.5388267 770.214924,25.4684733 L913.774924,169.028473 C944.782924,200.040473 947.848924,249.286473 920.927224,283.908473 L498.537224,826.988473 C496.322424,829.836173 493.935624,832.543173 491.384924,835.090073 C467.271924,859.207073 432.513924,866.195073 402.232924,856.063073 L260.382924,934.868073 C246.804924,942.407173 229.874924,940.036073 218.894924,929.055573 L208.706924,918.867573 L20.3764235,730.530173 Z M866.006424,241.190173 C871.393124,234.264373 870.779824,224.417173 864.576724,218.213173 L721.016724,74.6531733 C714.813624,68.4500733 704.965724,67.8367733 698.043724,73.2234733 L154.963724,495.613473 C147.381724,501.507973 146.018424,512.433473 151.912924,520.015473 C152.358234,520.585783 152.834804,521.128773 153.346524,521.636573 L417.586524,785.886573 C424.379524,792.675673 435.391524,792.675673 442.180524,785.886573 C442.692244,785.374853 443.168804,784.831873 443.610224,784.265473 L866.006424,241.190173 Z M342.796424,809.480173 L129.746424,596.430173 L77.9264235,689.707173 L249.516424,861.297173 L342.796424,809.480173 Z"></path>\n </g>\n <g transform="translate(-0.000000, 755.530173)" fill="#EB144C">\n <path d="M124.711543,0 L313.042043,188.3374 L233.288043,268.0914 C222.003043,279.3764 204.483043,281.5324 190.800043,273.3219 L16.8900429,168.9719 C-2.51595711,157.3309 -5.80895711,130.5499 10.1908429,114.5499 L124.711543,0 Z" class="bb-pen-tip"></path>\n </g>\n </g>\n </g>\n </g>\n</svg>':"rect"===e?'<svg width="339px" height="241px" viewBox="0 0 339 241" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.000865, 0.000000)" fill-rule="nonzero">\n <g transform="translate(0.000865, 0.000000)" fill="#000000" class="bb-svg-path">\n <path d="M339,0 L339,241 L0,241 L0,0 L339,0 Z M312.826351,26.168387 L26.1855674,26.168387 L26.1855674,214.41156 L312.826351,214.41156 L312.826351,26.168387 Z"></path>\n </g>\n <g transform="translate(0.000000, 83.206095)" fill="#EB144C" class="bb-pen-tip">\n <path d="M0,0 L26.186,26.186 L26.1864325,131.205465 L131.204,131.205 L157.792,157.793 L0.000865118243,157.793905 L0,0 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"pointer"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path d="m1050.7 508.95-225.94 157.5 160.31 160.31c4.4531 4.4531 6.9141 10.43 6.9141 16.758s-2.4609 12.305-6.9141 16.758l-126.09 126.09c-4.4531 4.4531-10.43 6.9141-16.758 6.9141-6.3281 0-12.188-2.4609-16.758-6.9141l-160.2-160.43-157.62 225.94c-3.3984 4.9219-9.0234 7.8516-14.883 7.8516-0.70313 0-1.5234 0-2.2266-0.11719-6.7969-0.82031-12.422-5.2734-14.766-11.719l-333.16-880.55c-2.5781-6.6797-0.9375-14.297 4.2188-19.336 5.0391-5.0391 12.656-6.6797 19.336-4.2188l880.66 333.05c6.3281 2.3438 10.781 8.0859 11.602 14.766 0.82031 6.7969-2.1094 13.359-7.7344 17.344z" fill="#333"/>\n </svg>':"clip"===e?'<svg width="600px" height="1126px" viewBox="0 0 600 1126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.002000, 0.501000)" fill="#333333" fill-rule="nonzero">\n <path d="M225.002,1124.999 C165.33,1124.999 108.102,1101.292 65.902,1059.097 C23.707,1016.902 5.68434189e-14,959.671 5.68434189e-14,899.997 L5.68434189e-14,299.997 C5.68434189e-14,220.431 31.605,144.127 87.867,87.867 C144.129,31.605 220.437,-4.26325641e-14 299.997,-4.26325641e-14 C379.557,-4.26325641e-14 455.867,31.605 512.127,87.867 C568.389,144.129 599.994,220.437 599.994,299.997 L599.994,1012.497 C599.994,1025.895 592.8456,1038.274 581.244,1044.974 C569.642,1051.6732 555.346,1051.6732 543.744,1044.974 C532.142,1038.2748 524.994,1025.896 524.994,1012.497 L524.994,299.997 C524.994,240.325 501.287,183.097 459.092,140.897 C416.897,98.702 359.666,74.995 299.992,74.995 C240.318,74.995 183.092,98.702 140.892,140.897 C98.697,183.092 74.99,240.323 74.99,299.997 L74.99,899.997 C74.99,953.587 103.58,1003.107 149.99,1029.897 C196.4,1056.694 253.58,1056.694 299.99,1029.897 C346.4,1003.104 374.99,953.585 374.99,899.997 L374.99,337.497 C374.99,310.704 360.697,285.942 337.49,272.544 C314.283,259.149 285.697,259.149 262.49,272.544 C239.283,285.942 224.99,310.704 224.99,337.497 L224.99,824.997 C224.99,838.395 217.8416,850.774 206.24,857.474 C194.638,864.1732 180.342,864.1732 168.74,857.474 C157.138,850.7748 149.99,838.396 149.99,824.997 L149.99,337.497 C149.99,283.907 178.58,234.387 224.99,207.597 C271.4,180.8 328.58,180.8 374.99,207.597 C421.4,234.39 449.99,283.909 449.99,337.497 L449.99,899.997 C449.99,959.669 426.283,1016.897 384.088,1059.097 C341.893,1101.292 284.662,1124.999 224.988,1124.999 L225.002,1124.999 Z" id="Path"></path>\n </g>\n </g>\n</svg>':"mic"===e?'<svg\n width="1200pt"\n height="1200pt"\n version="1.1"\n viewBox="0 0 1200 1200"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g class="bb-svg-path">\n <path\n d="m600 862.5c144.75 0 262.5-117.75 262.5-262.5v-300c0-144.75-117.75-262.5-262.5-262.5s-262.5 117.75-262.5 262.5v300c0 144.75 117.75 262.5 262.5 262.5z"\n />\n <path\n d="m1012.5 600c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 186.11-151.41 337.5-337.5 337.5s-337.5-151.39-337.5-337.5c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 214.8 165.08 391.57 375 410.6v114.4c0 20.727 16.793 37.5 37.5 37.5s37.5-16.773 37.5-37.5v-114.4c209.92-19.031 375-195.8 375-410.6z"\n />\n </g>\n </svg>':"camera"===e?'<svg width="1155px" height="1004px" viewBox="0 0 1155 1004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="#333333" fill-rule="nonzero">\n <g transform="translate(128.324095, 0.000000)">\n <path d="M42.7803063,0.00413459787 C31.4357421,0.00413459787 20.5549853,4.41399115 12.5336107,12.2572687 C4.51223664,20.1005462 0.00420584816,30.741831 0.00420584816,41.8370305 L0.00420584816,251.00151 C-0.156199045,262.200455 4.27736739,272.989996 12.315738,280.963903 C20.3585574,288.938257 31.3288589,293.431222 42.7803063,293.431222 C54.2317532,293.431222 65.2018267,288.938592 73.2448746,280.963903 C81.2832452,272.989549 85.7172445,262.200455 85.5564062,251.00151 L85.5564062,83.6699265 L256.660808,83.6699265 C268.112255,83.8267939 279.145066,79.4909873 287.298762,71.6298611 C295.452913,63.7643845 300.04718,53.0359758 300.04718,41.8370305 C300.04718,30.6380854 295.453255,19.9098998 287.298762,12.0441998 C279.144611,4.18307356 268.112255,-0.153157091 256.660808,0.00413459787 L42.7803063,0.00413459787 Z"></path>\n <path d="M983.227131,710.59444 C971.895913,710.764382 961.099907,715.326799 953.20401,723.279287 C945.312674,731.227538 940.964345,741.91668 941.119476,752.99849 L941.119476,920.330075 L770.015075,920.330075 C758.563631,920.173205 747.530815,924.509015 739.377123,932.370139 C731.222968,940.235615 726.628705,950.964028 726.628705,962.16297 C726.628705,973.361918 731.222627,984.090105 739.377123,991.955802 C747.531272,999.816926 758.563631,1004.15316 770.015075,1003.99587 L983.895579,1003.99587 C995.24014,1003.99587 1006.1209,999.586011 1014.14227,991.742733 C1022.16365,983.899455 1026.67168,973.258169 1026.67168,962.16297 L1026.67168,752.99849 C1026.83208,741.690223 1022.30053,730.801401 1014.11489,722.812989 C1005.93394,714.825472 994.790363,710.415949 983.227131,710.59444 L983.227131,710.59444 Z"></path>\n <path d="M983.227131,375.93127 C971.895913,376.101212 961.099907,380.66363 953.20401,388.61612 C945.312674,396.56437 940.964345,407.253512 941.119476,418.335325 L941.119476,585.66691 C940.959072,596.865853 945.39264,607.655394 953.431008,615.629303 C961.47383,623.603658 972.444131,628.096618 983.895579,628.096618 C995.347023,628.096618 1006.3171,623.603989 1014.36015,615.629303 C1022.39852,607.654947 1026.83251,596.865853 1026.67168,585.66691 L1026.67168,418.335325 C1026.83208,407.027056 1022.30053,396.138232 1014.11489,388.149822 C1005.93394,380.162305 994.790363,375.752783 983.227131,375.93127 L983.227131,375.93127 Z"></path>\n <path d="M769.974012,0.00413459787 C758.522563,-0.152733184 747.489752,4.18307356 739.336055,12.0441998 C731.181906,19.9096767 726.587637,30.6380854 726.587637,41.8370305 C726.587637,53.0359758 731.181564,63.7641611 739.336055,71.6298611 C747.490209,79.4909873 758.522563,83.8272181 769.974012,83.6699265 L941.078414,83.6699265 L941.078414,251.00151 C940.918009,262.200455 945.351572,272.989996 953.389945,280.963903 C961.432763,288.938257 972.403063,293.431222 983.854512,293.431222 C995.30596,293.431222 1006.27603,288.938592 1014.31908,280.963903 C1022.35745,272.989549 1026.79145,262.200455 1026.63061,251.00151 L1026.63061,41.8370305 C1026.63061,30.7426118 1022.12133,20.1017733 1014.10121,12.2572687 C1006.08109,4.41276405 995.199876,0.00413459787 983.854512,0.00413459787 L769.974012,0.00413459787 Z"></path>\n <path d="M427.765208,0.00413459787 C416.31376,-0.152733184 405.280949,4.18307356 397.127256,12.0441998 C388.973102,19.9096767 384.378838,30.6380854 384.378838,41.8370305 C384.378838,53.0359758 388.972761,63.7641611 397.127256,71.6298611 C405.281406,79.4909873 416.31376,83.8272181 427.765208,83.6699265 L598.86961,83.6699265 C610.321058,83.8267939 621.35387,79.4909873 629.507562,71.6298611 C637.661716,63.7643845 642.255985,53.0359758 642.255985,41.8370305 C642.255985,30.6380854 637.662058,19.9098998 629.507562,12.0441998 C621.353413,4.18307356 610.321058,-0.153157091 598.86961,0.00413459787 L427.765208,0.00413459787 Z"></path>\n </g>\n <g transform="translate(0.000000, 427.000000)">\n <path d="M768.516184,22.1826583 C752.659627,13.73125 732.573775,13.73125 717.773442,24.29375 L562.379192,124.6375 L562.379192,31.6875 C562.379192,13.7330104 548.635081,0 530.666079,0 L31.7131123,0 C13.7441105,0 0,13.7330104 0,31.6875 L0,475.3125 C0,493.26699 13.7441105,507 31.7131123,507 L530.666079,507 C548.635081,507 562.379192,493.26699 562.379192,475.3125 L562.379192,382.3625 L717.773442,482.70625 C726.231681,487.9875 735.742444,491.157658 745.257258,491.157658 C753.715498,491.157658 761.113815,489.046567 769.572406,484.820862 C786.485185,475.313732 796,458.414612 796,439.400352 L796,68.6566021 C794.943601,48.5869719 785.428963,31.6878521 768.516184,22.1807219 L768.516184,22.1826583 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderon"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g>\n <circle fill="#E31810" cx="625.5" cy="625.5" r="625.5"></circle>\n <circle fill="#F71008" cx="625" cy="625" r="507"></circle>\n <g transform="translate(175.000000, 449.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M0,347.097493 L0,4.90250696 L135.528311,4.90250696 C161.471024,4.90250696 183.639743,9.49741034 202.034469,18.6872171 C220.429194,27.8770239 234.46286,40.8541449 244.135466,57.6185803 C253.808072,74.3830156 258.644376,94.0714804 258.644376,116.683975 C258.644376,139.40786 253.724206,158.929238 243.883867,175.248107 C234.043527,191.566976 219.814173,204.070682 201.195803,212.759227 C182.577434,221.447772 160.073248,225.792044 133.683247,225.792044 L42.9396629,225.792044 L42.9396629,167.64563 L121.941933,167.64563 C135.807866,167.64563 147.325536,165.751973 156.494943,161.964659 C165.66435,158.177344 172.51345,152.496373 177.042243,144.921744 C181.571035,137.347116 183.835432,127.934526 183.835432,116.683975 C183.835432,105.322032 181.571035,95.7423543 177.042243,87.9449425 C172.51345,80.1475308 165.636395,74.2159282 156.411077,70.1501349 C147.185759,66.0843416 135.584222,64.051445 121.606467,64.051445 L72.6284142,64.051445 L72.6284142,347.097493 L0,347.097493 Z M185.512762,191.37204 L270.888889,347.097493 L190.712487,347.097493 L107.181424,191.37204 L185.512762,191.37204 Z"></path>\n <polygon points="309.166667 347.097493 309.166667 4.90250696 540.126846 4.90250696 540.126846 64.5527072 381.634607 64.5527072 381.634607 146.091356 528.244113 146.091356 528.244113 205.741556 381.634607 205.741556 381.634607 287.447293 540.796296 287.447293 540.796296 347.097493"></polygon>\n <path d="M901,124.638783 L827.757943,124.638783 C826.420189,115.158428 823.68894,106.709759 819.564197,99.2927757 C815.439454,91.8757921 810.144176,85.5462611 803.678363,80.3041825 C797.212549,75.0621039 789.77129,71.0468948 781.354585,68.2585551 C772.93788,65.4702155 763.824427,64.0760456 754.014228,64.0760456 C736.288981,64.0760456 720.849065,68.4537389 707.69448,77.2091255 C694.539894,85.964512 684.339516,98.6793409 677.093346,115.353612 C669.847176,132.027883 666.224091,152.243346 666.224091,176 C666.224091,200.425856 669.875046,220.948035 677.176956,237.56654 C684.478866,254.185044 694.707113,266.732573 707.861699,275.209125 C721.016285,283.685678 736.233242,287.923954 753.51257,287.923954 C763.21129,287.923954 772.213263,286.641318 780.518488,284.076046 C788.823714,281.510773 796.209233,277.746515 802.675047,272.78327 C809.14086,267.820025 814.519748,261.769328 818.81171,254.631179 C823.103672,247.493029 826.08575,239.351077 827.757943,230.205323 L901,230.539924 C899.104848,246.26616 894.394837,261.406844 886.869968,275.961977 C879.3451,290.51711 869.256201,303.510773 856.603274,314.942966 C843.950346,326.375158 828.900608,335.409379 811.45406,342.045627 C794.007513,348.681876 774.303504,352 752.342035,352 C721.796641,352 694.512024,345.084918 670.488184,331.254753 C646.464343,317.424588 627.512821,297.404309 613.633619,271.193916 C599.754416,244.983523 592.814815,213.252218 592.814815,176 C592.814815,138.636248 599.838026,106.849176 613.884448,80.6387833 C627.93087,54.4283904 646.993871,34.4359949 671.073451,20.661597 C695.153031,6.88719899 722.242559,0 752.342035,0 C772.185393,0 790.607387,2.78833967 807.608016,8.36501901 C824.608646,13.9416984 839.686254,22.0557668 852.840839,32.7072243 C865.995425,43.3586819 876.72533,56.3802281 885.030556,71.7718631 C893.335782,87.1634981 898.65893,104.785805 901,124.638783 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderoff"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-rec-on-circle" fill="#EEEEEE" fill-rule="nonzero">\n <path d="M625.5,0 C970.954111,0 1251,280.045889 1251,625.5 C1251,970.954111 970.954111,1251 625.5,1251 C280.045889,1251 0,970.954111 0,625.5 C0,280.045889 280.045889,0 625.5,0 Z M626,124 C348.753056,124 124,348.753056 124,626 C124,903.246944 348.753056,1128 626,1128 C903.246944,1128 1128,903.246944 1128,626 C1128,348.753056 903.246944,124 626,124 Z"></path>\n </g>\n <g class="bb-rec-on-cont" fill="#E31810" transform="translate(86.000000, 86.000000)" fill-rule="nonzero">\n <path d="M540,0 C241.2,0 0,241.2 0,540 C0,838.8 241.2,1080 540,1080 C838.8,1080 1080,838.8 1080,540 C1080,241.2 838.8,0 540,0 Z M777.6,741.6 C777.6,761.998 761.998,777.6 741.6,777.6 L338.4,777.6 C318.002,777.6 302.4,761.998 302.4,741.6 L302.4,338.4 C302.4,318.002 318.002,302.4 338.4,302.4 L741.6,302.4 C761.998,302.4 777.6,318.002 777.6,338.4 L777.6,741.6 Z"></path>\n </g>\n </g>\n </svg>':"arrowdown"===e?'<svg class="bb-logo-arrowdown" fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m50 77.637c-1.3477 0-2.6953-0.51562-3.7266-1.543l-44.73-44.73c-2.0586-2.0586-2.0586-5.3945 0-7.4531 2.0586-2.0586 5.3945-2.0586 7.4531 0l41.004 41 41.004-41c2.0586-2.0586 5.3945-2.0586 7.4531 0 2.0586 2.0586 2.0586 5.3945 0 7.4531l-44.73 44.727c-1.0312 1.0312-2.3789 1.5469-3.7266 1.5469z"/>\n </svg>'):"arrowleft"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m70.988 1.6211c2.1875-2.168 5.7344-2.168 7.9297 0 2.1836 2.168 2.1836 5.7227 0 7.8906l-46.016 40.445 46.016 40.5c2.1836 2.168 2.1836 5.668 0 7.8906-2.1953 2.168-5.7383 2.168-7.9297 0l-50.039-44.109c-1.168-1.168-1.668-2.7227-1.5898-4.2773-0.078125-1.5 0.42188-3.0547 1.5898-4.2227l50.039-44.109z" fill-rule="evenodd"/>\n </svg>'):"close"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m72.812 33.02l-5.832-5.832-16.98 16.875-16.98-16.875-5.832 5.832 16.875 16.98-16.875 16.98 5.832 5.832 16.98-16.875 16.98 16.875 5.832-5.832-16.875-16.98z"/>\n </svg>'):"undo"===e?'<svg width="62px" height="60px" viewBox="0 0 62 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-svg-path" transform="translate(-0.000500, 0.001926)" fill-rule="nonzero">\n <path d="M28.0005,51.6270739 C24.9653,51.0684839 22.0825,49.8731739 19.5396,48.1192739 L13.8208,53.8380739 C17.9536,57.0060739 22.8403,59.0333739 28.0008,59.7286739 L28.0005,51.6270739 Z" id="Path"></path>\n <path d="M2.2705,33.9980739 C2.96581,39.1582739 4.9932,44.0450739 8.1611,48.1780739 L13.8799,42.4592739 C12.126,39.9162739 10.9307,37.0334739 10.3721,33.9983739 L2.2705,33.9980739 Z" id="Path"></path>\n <path d="M61.7305,33.9980739 L53.6289,33.9980739 C53.07031,37.0332739 51.875,39.9160739 50.1211,42.4589739 L55.8399,48.1777739 C59.0079,44.0449739 61.0352,39.1582739 61.7305,33.9977739 L61.7305,33.9980739 Z" id="Path"></path>\n <path d="M4.0005,24.9980739 L24.0005,24.9980739 L24.0005,16.9980739 L14.27,16.9980739 C17.6762,12.3613739 22.7622,9.24417393 28.442,8.31057393 C34.1178,7.38088393 39.934,8.70901393 44.645,12.0175739 C49.352,15.3222739 52.5786,20.3417739 53.6294,25.9975739 L61.731,25.9975739 C60.6646,18.0834739 56.4888,10.9235739 50.129,6.09957393 C43.7657,1.27147393 35.746,-0.818426068 27.836,0.290973932 C19.9298,1.39647393 12.793,5.61127393 8,11.9979739 L8,0.997973932 L-3.55271368e-15,0.997973932 L-3.55271368e-15,20.9979739 C-3.55271368e-15,22.0604739 0.42188,23.0760739 1.1719,23.8260739 C1.92192,24.5760739 2.9375,24.9979739 4,24.9979739 L4.0005,24.9980739 Z" id="Path"></path>\n <path d="M36.0005,51.6270739 L36.0005,59.7286739 C41.1607,59.0333639 46.0475,57.0059739 50.1805,53.8380739 L44.4617,48.1192739 C41.9187,49.8731739 39.0359,51.0684739 36.0008,51.6270739 L36.0005,51.6270739 Z" id="Path"></path>\n </g>\n </g>\n </svg>':""};function p(e){return(p="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 h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,"startTimestamp",Date.now()),f(this,"requestId",0),f(this,"requests",{}),f(this,"externalRequests",[]),f(this,"maxRequests",30),f(this,"filters",[]),f(this,"defaultBlacklist",["gleap.io"]),f(this,"blacklist",[]),f(this,"initialized",!1),f(this,"stopped",!1),f(this,"loadAllResources",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setLoadAllResources",value:function(e){this.loadAllResources=e}},{key:"isContentTypeSupported",value:function(e){if("string"!=typeof e)return!1;if(""===e)return!0;e=e.toLocaleLowerCase();for(var t=["text/","xml","json"],n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1}},{key:"getRequests",value:function(){var e=JSON.parse(JSON.stringify(Object.values(this.requests)));if(this.externalRequests&&this.externalRequests.length>0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t<e.length;t++){var n=e[t];if(n&&n.request&&n.request.headers)for(var o=0;o<this.filters.length;o++)delete n.request.headers[this.filters[o]];if(n&&n.request&&n.request.payload){var r=n.request.payload;try{r=JSON.parse(n.request.payload)}catch(l){}if(r){for(o=0;o<this.filters.length;o++)delete r[this.filters[o]];n.request.payload=JSON.stringify(r)}}if(n&&n.response&&n.response.responseText)try{var a=JSON.parse(n.response.responseText);for(o=0;o<this.filters.length;o++)delete a[this.filters[o]];n.response.responseText=JSON.stringify(a)}catch(l){}}try{if("undefined"!=typeof window&&window.performance){var i=window.performance.getEntriesByType("resource");for(t=0;t<i.length;t++){var s=i[t];s&&s.name&&(this.loadAllResources||["xmlhttprequest","fetch"].indexOf(s.initiatorType)>-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;t<c.length;t++)if(e.url&&e.url.includes(c[t]))return!1;return!0}))),e}},{key:"setMaxRequests",value:function(e){e>70&&(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<t.length;n++)delete this.requests[t[n]]}},{key:"calcRequestTime",value:function(e){if(e&&this.requests&&this.requests[e]){var t=this.requests[e].date;t&&(this.requests[e].duration=(new Date).getTime()-t.getTime())}}},{key:"getTextContentSize",value:function(e){var t=0;try{t=(new TextEncoder).encode(e).length}catch(n){try{t=encodeURI(s).split(/%..|./).length-1}catch(n){try{t=new Blob([e]).size}catch(n){t=e.length}}}return t/1024/1024}},{key:"cleanupContentSize",value:function(e){return this.getTextContentSize(e)>.15?"<content_too_large>":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":p(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,o){if(!e.stopped&&o&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[o]={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[o]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[o]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,o){if(!e.stopped&&o&&e.requests&&e.requests[o]){try{e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(o)}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[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(o),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(o),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 o=t.currentTarget,r=o.responseType,a="<"+r+">";""!==r&&"text"!==r||(a=e.cleanupContentSize(o.responseText)),e.requests[o.bbRequestId].success=!0,e.requests[o.bbRequestId].response={status:o.status,statusText:o.statusText,responseText:a},e.calcRequestTime(o.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,o=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return void 0===XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.gleapSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader),XMLHttpRequest.prototype.gleapSetRequestHeader&&(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.gleapSetRequestHeader(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)),o.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 o=++n.requestId;return e.onFetch(arguments,o),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,o)}return t})).catch((function(t){throw e.onFetchFailed(t,o),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var o=new FileReader;o.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},o.onerror=function(e){n(e)},o.readAsText(e)}))}}])&&h(t.prototype,n),o&&h(t,o),e}();f(g,"instance",void 0);const v=g;var m=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},y=function(e,t){return e.length>t?e.slice(0,t)+"...":e},w=function(e){try{var t=e.split("."),n=!1,o=t[t.length-2];return"co"!==o&&"com"!==o&&"gv"!==o&&"ac"!==o&&"edu"!==o&&"gov"!==o&&"mil"!==o&&"net"!==o&&"org"!==o||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(r){}return e},k=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},x=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(o){}else localStorage.removeItem(n)},C=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}catch(a){}return null},S=function(e){try{var t=w(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(n){}},I=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"apiUrl","https://api.gleap.io"),M(this,"wsApiUrl","wss://ws.gleap.io"),M(this,"sdkKey",null),M(this,"updatingSession",!1),M(this,"useCookies",!1),M(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),M(this,"ready",!1),M(this,"onSessionReadyListener",[]),M(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),M(this,"injectSession",(function(e){e&&t.session&&(e.setRequestHeader("Api-Token",t.sdkKey),e.setRequestHeader("Gleap-Id",t.session.gleapId),e.setRequestHeader("Gleap-Hash",t.session.gleapHash))})),M(this,"clearSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.session&&t.session.gleapHash&&Se.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{x("session-".concat(t.sdkKey),null)}catch(r){}if(t.useCookies)try{S("session-".concat(t.sdkKey))}catch(r){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},ae.getInstance().sendMessage({name:"session-cleared"},!0),dt.getInstance().clearAllNotifications(!1),dt.getInstance().setNotificationCount(0),vt.getInstance().removeBannerUI(),n&&!isNaN(e)){var o=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*o)}})),M(this,"validateSession",(function(e){e&&e.gleapId&&(t.session&&t.session.gleapHash&&Se.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),x("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var o="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),o="; expires="+r.toUTCString()}var a=w(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+o+"; path=/; domain="+a}catch(i){}}("session-".concat(t.sdkKey),encodeURIComponent(JSON.stringify(e)),365),t.session=e,t.ready=!0,t.session&&t.session.gleapHash&&Se.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.notifySessionReady())})),M(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{if(t.useCookies){var n=C("session-".concat(t.sdkKey));if(n){var o=JSON.parse(decodeURIComponent(n));t.validateSession(o)}}}catch(s){}if(!(t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var r=k("session-".concat(t.sdkKey));r&&t.validateSession(r)}var a=t,i=new XMLHttpRequest;i.open("POST",a.apiUrl+"/sessions"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",a.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(i.setRequestHeader("Gleap-Id",t.session.gleapId),i.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(s){}i.onreadystatechange=function(t){if(4===i.readyState)if(200===i.status||201===i.status)try{var n=JSON.parse(i.responseText);a.validateSession(n),D.getInstance().restart()}catch(s){}else 429!==i.status&&a.clearSession(e,!0)},i.send(JSON.stringify({lang:nt.getInstance().getActiveLanguage()}))})),M(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(i){}if(n)for(var o=Object.keys(n),r=0;r<o.length;r++){var a=o[r];if(JSON.stringify(t.session[a])!==JSON.stringify(n[a])&&(!t.session.customData||JSON.stringify(t.session.customData[a])!==JSON.stringify(n[a])))return!0}return!1})),M(this,"updateSession",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/sessions/partialupdate"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var i=JSON.parse(t.responseText);n.validateSession(i),o(i)}catch(a){r(a)}else r()},t.send(JSON.stringify({data:T(T({},e),{},{lang:nt.getInstance().getActiveLanguage()}),type:"js",sdkVersion:"13.2.2",ws:!0}))}))}))})),M(this,"identifySession",(function(e,n,o){if(t.checkIfSessionNeedsUpdate(e,n)){var r=t;return new Promise((function(a,i){t.setOnSessionReady((function(){if(!r.session.gleapId||!r.session.gleapHash)return i("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",r.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",r.sdkKey);try{t.setRequestHeader("Gleap-Id",r.session.gleapId),t.setRequestHeader("Gleap-Hash",r.session.gleapHash)}catch(c){}t.onerror=function(){i()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);r.validateSession(n),D.getInstance().restart(),a(n)}catch(c){i(c)}else i()};var s=T({},n);n.customData&&(delete s.customData,s=T(T({},s),n.customData)),t.send(JSON.stringify(T(T({},s),{},{userId:e,userHash:o,lang:nt.getInstance().getActiveLanguage()})))}))}))}})),M(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/outbound/producttours"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);n&&n.config&&o(n.config)}catch(a){r(a)}else r()},t.send(JSON.stringify({outboundId:e}))}))}))}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getName",value:function(){try{return this.session.name?this.session.name.split(" ")[0].split("@")[0].split(".")[0].split("+")[0]:""}catch(e){return this.session.name}}},{key:"getSession",value:function(){return this.session}},{key:"getGleapId",value:function(){return this.session&&this.session.gleapId?this.session.gleapId:null}},{key:"isUser",value:function(){return!(!this.session||!this.session.userId)}},{key:"notifySessionReady",value:function(){if(this.onSessionReadyListener.length>0)for(var e=0;e<this.onSessionReadyListener.length;e++)this.onSessionReadyListener[e]();this.onSessionReadyListener=[],ae.getInstance().sendSessionUpdate()}}])&&O(t.prototype,n),o&&O(t,o),e}();function R(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}M(E,"instance",void 0);var D=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"eventArray",[]),A(this,"streamedEventArray",[]),A(this,"eventMaxLength",500),A(this,"errorCount",0),A(this,"streamingEvents",!1),A(this,"lastUrl",void 0),A(this,"mainLoopTimeout",null),A(this,"socket",null),A(this,"connectedWebSocketGleapId",null),A(this,"connectionTimeout",null),A(this,"pingWS",null),A(this,"handleOpenBound",null),A(this,"handleErrorBound",null),A(this,"handleMessageBound",null),A(this,"handleCloseBound",null),A(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),1500)})),A(this,"streamEvents",(function(){if(!(!E.getInstance().ready||t.streamingEvents||t.errorCount>2)&&0!==t.streamedEventArray.length&&t.socket&&t.socket.readyState===t.socket.OPEN){var e=t;t.streamingEvents=!0;var n=new XMLHttpRequest;n.open("POST",E.getInstance().apiUrl+"/sessions/ping"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.getInstance().injectSession(n),n.onerror=function(){e.errorCount++,e.streamingEvents=!1},n.onreadystatechange=function(t){4===n.readyState&&(200===n.status||201===n.status?e.errorCount=0:e.errorCount++,e.streamingEvents=!1)};var o=ce.getInstance().getSessionDuration();n.send(JSON.stringify({time:o,events:t.streamedEventArray,opened:ae.getInstance().isOpened(),type:"js",sdkVersion:"13.2.2",ws:!0})),t.streamedEventArray=[]}})),this.handleOpenBound=this.handleOpen.bind(this),this.handleErrorBound=this.handleError.bind(this),this.handleMessageBound=this.handleMessage.bind(this),this.handleCloseBound=this.handleClose.bind(this)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"cleanupWebSocket",value:function(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null),this.pingWS&&clearInterval(this.pingWS),this.socket&&(this.socket.removeEventListener("open",this.handleOpenBound),this.socket.removeEventListener("error",this.handleErrorBound),this.socket.removeEventListener("message",this.handleMessageBound),this.socket.removeEventListener("close",this.handleCloseBound),this.socket.close(),this.socket=null)}},{key:"initWebSocket",value:function(){this.cleanupWebSocket(),this.connectedWebSocketGleapId=E.getInstance().session.gleapId,E.getInstance().session&&E.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(E.getInstance().wsApiUrl,"?gleapId=").concat(E.getInstance().session.gleapId,"&gleapHash=").concat(E.getInstance().session.gleapHash,"&apiKey=").concat(E.getInstance().sdkKey,"&sdkVersion=").concat("13.2.2")),this.socket.addEventListener("open",this.handleOpenBound),this.socket.addEventListener("message",this.handleMessageBound),this.socket.addEventListener("error",this.handleErrorBound),this.socket.addEventListener("close",this.handleCloseBound))}},{key:"handleOpen",value:function(e){var t=this;this.pingWS=setInterval((function(){t.socket.readyState===t.socket.OPEN&&(t.socket.send("PING"),t.socket.send(9))}),1e4),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null)}},{key:"handleMessage",value:function(e){this.processMessage(JSON.parse(e.data))}},{key:"handleError",value:function(e){}},{key:"handleClose",value:function(e){var t=this;setTimeout((function(){t.initWebSocket()}),5e3)}},{key:"processMessage",value:function(e){try{if("update"===e.name){var t=e.data,n=t.a,o=t.u;ae.getInstance().isOpened()||(n&&Zt.getInstance().performActions(n),null!=o&&dt.getInstance().setNotificationCount(o))}}catch(r){}}},{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.cleanupMainLoop()}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"cleanupMainLoop",value:function(){this.mainLoopTimeout&&(clearInterval(this.mainLoopTimeout),this.mainLoopTimeout=null)}},{key:"restart",value:function(){this.connectedWebSocketGleapId!==E.getInstance().session.gleapId&&this.initWebSocket(),this.cleanupMainLoop(),this.trackInitialEvents(),this.runEventStreamLoop()}},{key:"start",value:function(){this.startPageListener(),this.resetErrorCountLoop()}},{key:"trackInitialEvents",value:function(){e.getInstance().logEvent("sessionStarted"),e.getInstance().logCurrentPage()}},{key:"logCurrentPage",value:function(){if(!Zt.getInstance().disablePageTracking){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){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()}}])&&R(t.prototype,n),o&&R(t,o),e}();function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}A(D,"instance",void 0);var F=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},B=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"flowConfig",null),P(this,"projectActions",null),P(this,"onConfigLoadedListener",[]),P(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),P(this,"start",(function(){var e=E.getInstance(),n=k("config-".concat(e.sdkKey,"-").concat(nt.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),P(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var o=E.getInstance(),r=new XMLHttpRequest,a=nt.getInstance().getActiveLanguage();r.open("GET",o.apiUrl+"/config/"+o.sdkKey+"?lang="+a),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.injectSession(r),r.onerror=function(){n()},r.onreadystatechange=function(a){if(4===r.readyState){if(200===r.status||201===r.status)try{var i=JSON.parse(r.responseText);try{x("config-".concat(o.sdkKey,"-lang"),i)}catch(s){}return e.applyConfig(i),t()}catch(a){}n()}},r.send()}))}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;Zt.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",F(e.borderRadius,20),F(e.buttonX,20),F(e.buttonY,20),e.feedbackButtonPosition)}},{key:"notifyConfigLoaded",value:function(){if(this.onConfigLoadedListener.length>0)for(var e=0;e<this.onConfigLoadedListener.length;e++)this.onConfigLoadedListener[e]();this.onConfigLoadedListener=[]}},{key:"applyConfig",value:function(e){try{var t=e.flowConfig;this.flowConfig=t,this.applyStylesFromConfig(),ae.getInstance().sendConfigUpdate(),r.getInstance().updateFeedbackButtonState(),dt.getInstance().updateContainerStyle(),t.enableWebReplays?ze.getInstance().start():ze.getInstance().stop(),t.enableNetworkLogs&&v.getInstance().start(),v.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&v.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&v.getInstance().setBlacklist(t.networkLogBlacklist),nt.getInstance().updateRTLSupport(),Zt.enableShortcuts(!!t.enableShortcuts),this.notifyConfigLoaded()}catch(n){}}}])&&N(t.prototype,n),o&&N(t,o),e}();P(B,"instance",void 0);var j=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"],_=function(e,t,n){return o=e,r=/url\((.*?)\)/g,a=function(e){return new Promise((function(o,r){if(!e)return o(e);var a=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===a.indexOf("http")||0===a.indexOf("//")||0===a.indexOf("data"))return o(e);try{var i=a;return t&&(i=t+"/"+a),n?o("url("+i+")"):U(i).then((function(e){return o("url("+e+")")}))}catch(s){return o(e)}}))},new Promise((function(e,t){var n=[];o.replace(r,(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];var i=a.apply(void 0,[e].concat(o));n.push(i)})),Promise.all(n).then((function(t){e(o.replace(r,(function(){return t.shift()})))})).catch((function(){t()}))}));var o,r,a},U=function(e){return new Promise((function(t,n){if(e){var o=new XMLHttpRequest;o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(o.response)},o.onerror=function(e){t()},o.open("GET",e),o.responseType="blob",o.send()}else t()}))},q=function(e,t,n,o){(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(o,r){var a=0===e.indexOf("data:image/jpeg"),i=new Image;i.src=e,i.onerror=function(){r()},i.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>i.width/4&&(r=i.width/4),n>i.height/4&&(s=i.height/4);var c=i.width,l=i.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(i,0,0,c,l),o(a?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))})(e,500,500).then((function(e){t.src=e,n()})).catch((function(){console.warn("BB: Image resize failed."),n()}))},H=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){if(!e)return!1;for(var t=0;t<j.length;t++)if(-1!==e.indexOf(j[t]))return!0;return!1}(e.src))return t();var o=new XMLHttpRequest;o.onload=function(){var n=new FileReader;n.onloadend=function(){q(n.result,e,t)},n.onerror=function(){t()},n.readAsDataURL(o.response)},o.onerror=function(e){t()};var r=e.src;o.open("GET",r),o.responseType="blob",o.send()}else t()}))},W=function(e,t,n,o){var r=null;t.ownerNode&&(r=e.querySelector('[bb-styleid="'+o+'"]'));try{if(r){var a=null;if(""!=n){var i=e.querySelector("head"),s=window.document.createElement("style");i.appendChild(s),s.type="text/css",s.styleSheet?s.styleSheet.cssText=n:s.appendChild(window.document.createTextNode(n)),a=s}else{var c=window.document.createElement("link");c.rel="stylesheet",c.type=t.type,c.href=t.href,c.media=t.media,a=c}a&&(r.parentNode.insertBefore(a,r),r.remove())}}catch(l){}},z=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(r){}var n="";if(t)for(var o in t)t[o].cssText&&(n+=t[o].cssText);return n},G=function(e,t){for(var n=[],o=function(){var e=document.styleSheets[r];if(e.media&&"print"===e.media.mediaText)return"continue";var o=z(e);if(e&&e.ownerNode)if(""!=o){var i=document.getElementsByTagName("base");a=i.length?i[0].href.substr(location.origin.length,999):window.location.href,e.href&&(a=e.href);var s=a.substring(0,a.lastIndexOf("/"));n.push(_(o,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else n.push(Promise.resolve({styletext:o,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},r=0;r<document.styleSheets.length;r++){var a;o()}return Promise.all(n).then((function(t){if(t)for(var n=0;n<t.length;n++)W(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},V=function(e,t){return new Promise((function(n,o){return t?G(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],o=0;o<t.length;o++){var r=t[o];n.push(H(r))}return Promise.all(n)}(e).then((function(){return G(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},Z=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var o=0;o<e.adoptedStyleSheets.length;o++){var r=e.adoptedStyleSheets[o],a=z(r),i=window.document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=a:i.appendChild(window.document.createTextNode(a)),n&&i.setAttribute("bb-shadow-child",n),t.insertBefore(i,t.firstElementChild)}},K=function(e){return new Promise((function(t,n){for(var o=window.document.querySelectorAll("style, link"),r=0;r<o.length;++r)o[r].setAttribute("bb-styleid",r);var a=function(e){var t=1,n=document.createDocumentFragment();!function e(n,o,r){var a=function(t,n,o){for(;t;)e(t,n,o),t=t.nextSibling},i=n.cloneNode();if(void 0!==i.setAttribute&&(r&&i.setAttribute("bb-shadow-child",r),n instanceof HTMLCanvasElement&&i.setAttribute("bb-canvas-data",n.toDataURL()),n instanceof HTMLCanvasElement&&i.setAttribute("bb-canvas-data",n.toDataURL())),n.nodeType==Node.ELEMENT_NODE){var s=n.tagName?n.tagName.toUpperCase():n.tagName;if("IFRAME"==s||"VIDEO"==s||"EMBED"==s||"IMG"==s||"SVG"==s){var c=n.getBoundingClientRect();i.setAttribute("bb-element",!0),i.setAttribute("bb-height",c.height),i.setAttribute("bb-width",c.width)}if((n.scrollTop>0||n.scrollLeft>0)&&(i.setAttribute("bb-scrollpos",!0),i.setAttribute("bb-scrolltop",n.scrollTop),i.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;("value"===n.getAttribute("gleap-ignore")||n.classList.contains("gl-mask"))&&(l=new Array(l.length+1).join("*")),i.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||i.setAttribute("bb-data-checked",!0)}}if(o.appendChild(i),n.shadowRoot){var u=t;t++,a(n.shadowRoot.firstChild,i,u),Z(n.shadowRoot,i,u),void 0!==i.setAttribute&&i.setAttribute("bb-shadow-parent",u)}a(n.firstChild,i)}(e,n);var o=n.querySelector("head");return o||(o=n),Z(window.document,o),n}(window.document.documentElement),i=a.querySelectorAll("link[rel=import]");for(r=0;r<i.length;++r){var s=i[r];if(s&&s.childNodes&&s.childNodes.length>0){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<l.length;++r)l[r].remove();var u="",d=a.querySelectorAll("base");for(r=0;r<d.length;++r)d[r].href&&(u=d[r].href),d[r].remove();var p=window.location.href.substring(0,window.location.href.lastIndexOf("/")),h=p+"/";u&&(u.startsWith("http")?h=u:(h=p+u).endsWith("/")||(h+="/"));var f=window.document.createElement("base");f.href=h;var g=a.querySelector("head");g.insertBefore(f,g.firstChild);var v=a.querySelectorAll(".bb-feedback-dialog-container, .bb-capture-editor-borderlayer");for(r=0;r<v.length;++r)v[r].remove();var b=a.querySelectorAll("[bb-element=true]");for(r=0;r<b.length;++r)b[r]&&(b[r].style.height=b[r].getAttribute("bb-height")+"px");V(a,e).then((function(){var e=function(e){var t="",n=window.document.doctype;if(n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),e&&e.childNodes&&e.childNodes.length>0)for(var o=0;o<e.childNodes.length;o++)e.childNodes[o]&&(t+=e.childNodes[o].outerHTML);return t}(a);t({html:e,baseUrl:p,width:window.innerWidth,height:window.innerHeight,isMobile:m()})}))}))};function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,"rerender",void 0),J(this,"stream",void 0),J(this,"mediaRecorder",void 0),J(this,"audioMuted",!1),J(this,"audioAvailable",!0),J(this,"available",!0),J(this,"isRecording",!1),J(this,"file",null),J(this,"maxRecordTime",120),J(this,"recordTime",0),J(this,"recordingTimer",null),J(this,"permissionErrorText",""),J(this,"startScreenRecording",(function(){var e=this;if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia||this.isRecording)return this.available=!1,void this.rerender();navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,3072)},height:{ideal:Math.min(window.screen.height,1728)},frameRate:{ideal:10,max:24},displaySurface:"monitor"},audio:!0}).then((function(t){e.stream=t,e.audioMuted?(e.audioAvailable=!1,e.handleRecord({stream:t})):e.startAudioRecording(),e.rerender()})).catch((function(t){window.alert(e.permissionErrorText),e.rerender()}))})),J(this,"stopScreenRecording",(function(){this.mediaRecorder&&this.stream&&this.isRecording&&(this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.mediaRecorder.stop(),this.stream.getTracks().forEach((function(e){e.stop()})),this.rerender())})),J(this,"startAudioRecording",(function(){var e=this;this.stream&&navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){for(var n=0;n<t.getAudioTracks().length;n++)e.stream.addTrack(t.getAudioTracks()[n]);e.audioMuted=!1,e.audioAvailable=!0,e.handleRecord({stream:e.stream}),e.rerender()})).catch((function(t){e.audioAvailable=!1,e.handleRecord({stream:e.stream}),e.rerender()}))})),J(this,"toggleAudio",(function(){if(this.audioMuted=!this.audioMuted,this.rerender(),this.stream)for(var e=this.stream.getAudioTracks(),t=0;t<e.length;t++){e[t].enabled=!this.audioMuted}})),J(this,"clearPreview",(function(){document.querySelector(".bb-capture-preview video").src=null,this.file=null,this.rerender()})),J(this,"handleRecord",(function(e){var t=e.stream,n=this,o=[];this.mediaRecorder=new MediaRecorder(t,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var r=document.querySelector(".bb-capture-toolbar-item-timer");this.recordingTimer=setInterval((function(){n.recordTime++;var e=n.maxRecordTime-n.recordTime;e>0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&o.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(o)},this.mediaRecorder.onstop=function(){n.prepareRecording(o)},this.mediaRecorder.start(200),n.rerender()})),J(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(){o.rerender()}),100)}var t,n,o;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<e?":":":0")+e}}])&&X(t.prototype,n),o&&X(t,o),e}();function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}J(Y,"uploadScreenRecording",(function(e){return new Promise((function(t,n){null==e&&t(null);var o=new XMLHttpRequest;o.open("POST",E.getInstance().apiUrl+"/uploads/sdk"),E.getInstance().injectSession(o);var r=new FormData;r.append("file",e),o.send(r),o.onerror=function(){n()},o.onreadystatechange=function(){4==o.readyState&&(200==o.status?t(JSON.parse(o.response).fileUrl):n())}}))}));var ee=function(){function e(t,n,o,r,a,i,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$(this,"excludeData",{}),$(this,"type","BUG"),$(this,"priority","LOW"),$(this,"customData",{}),$(this,"metaData",{}),$(this,"consoleLog",[]),$(this,"networkLogs",[]),$(this,"customEventLog",[]),$(this,"formData",{}),$(this,"isSilent",!1),$(this,"outboundId",void 0),$(this,"screenshotData",void 0),$(this,"webReplay",void 0),$(this,"screenRecordingUrl",void 0),$(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=o,this.isSilent=r,this.excludeData=a,this.outboundId=i,this.spamToken=s}var t,n,o;return t=e,(n=[{key:"takeSnapshot",value:function(){var e=this,t=Zt.getInstance();this.customData=ke.getInstance().getCustomData(),this.metaData=ce.getInstance().getMetaData(),this.consoleLog=he.getInstance().getLogs(),this.networkLogs=v.getInstance().getRequests(),this.customEventLog=D.getInstance().getEventArray();var n=[],o=t.getGlobalDataItem("webReplay");null!==o&&(this.webReplay=o);var r,a=t.getGlobalDataItem("screenRecordingData");if(null!=a){var i=Y.uploadScreenRecording(a).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(i)}if(!this.excludeData||!this.excludeData.screenshot){var s=(r=t.isLiveMode(),K(r)).then((function(n){if(n){var o=t.getGlobalDataItem("snapshotPosition");n.x=o.x,n.y=o.y,e.screenshotData=n}}));n.push(s)}return Promise.all(n)}},{key:"getData",value:function(){var e={type:this.type,priority:this.priority,customData:this.customData,metaData:this.metaData,consoleLog:this.consoleLog,networkLogs:this.networkLogs,customEventLog:this.customEventLog,formData:this.formData,isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=xt.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),o=0;o<n.length;o++){var r=n[o];!0===this.excludeData[r]&&(e[r]&&delete e[r],"screenshot"===r&&delete e.screenshotData,"replays"===r&&delete e.webReplay)}return e}},{key:"getTicketData",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var n=e.getData();t(n)})).catch((function(e){n()}))}))}},{key:"sendFeedback",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var o=e.getData(),r=new XMLHttpRequest;r.open("POST",E.getInstance().apiUrl+"/bugs/v2"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.getInstance().injectSession(r),r.onerror=function(e){n()},r.onreadystatechange=function(e){if(4===r.readyState)if(200===r.status||201===r.status)try{var o=JSON.parse(r.responseText);t(o)}catch(a){n()}else n()},r.send(JSON.stringify(o))})).catch((function(e){n()}))}))}}])&&Q(t.prototype,n),o&&Q(t,o),e}();function te(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ne(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 ne(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),re(this,"frameUrl","https://messenger-app.gleap.io"),re(this,"gleapFrameContainer",null),re(this,"gleapFrame",null),re(this,"injectedFrame",!1),re(this,"widgetOpened",!1),re(this,"listeners",[]),re(this,"appMode","widget"),re(this,"markerManager",void 0),re(this,"escListener",void 0),re(this,"frameHeight",0),re(this,"queue",[]),re(this,"urlHandler",(function(e,t){e&&e.length>0&&(t?window.open(e,"_blank").focus():window.location.href=e)})),re(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),re(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),I((function(){B.getInstance().onConfigLoaded((function(){B.getInstance().applyStylesFromConfig();var e=document.createElement("div");e.className="gleap-frame-container gleap-frame-container--hidden gl-block",e.innerHTML='<div class="gleap-frame-container-inner"><iframe src="'.concat(t.frameUrl,'" class="gleap-frame" scrolling="yes" title="Gleap Widget Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe></div>'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)}))})))})),re(this,"showImage",(function(e){I((function(){var t=document.createElement("div");t.className="gleap-image-view",t.innerHTML='<div class="gleap-image-view-close">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm97.9-320l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z"/></svg>\n </div><img class="gleap-image-view-image" src="'.concat(e,'" />'),document.body.appendChild(t);var n=function(){t.remove()};t.querySelector(".gleap-image-view-close").addEventListener("click",(function(){n()})),t.addEventListener("click",(function(e){e.target===t&&n()}))}))})),re(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",o="gleap-frame-container--survey-full",a="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",c="gleap-frame-container--no-button",l=[a,i,n,s,c,e,o],u=0;u<l.length;u++)t.gleapFrameContainer.classList.remove(l[u]);var d=void 0,p=B.getInstance().getFlowConfig();p.feedbackButtonPosition!==r.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==r.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=a),p.feedbackButtonPosition===r.FEEDBACK_BUTTON_CLASSIC_LEFT&&(d=i),p.feedbackButtonPosition===r.FEEDBACK_BUTTON_BOTTOM_LEFT&&(d=s),null===r.getInstance().buttonHidden?p.feedbackButtonPosition===r.FEEDBACK_BUTTON_NONE&&(d=c):r.getInstance().buttonHidden&&(d=c),d&&t.gleapFrameContainer.classList.add(d),"survey"===t.appMode&&t.gleapFrameContainer.classList.add(e),"survey_full"===t.appMode&&t.gleapFrameContainer.classList.add(o),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",nt.getInstance().isRTLLayout?"rtl":"ltr")}})),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setUrlHandler",value:function(e){this.urlHandler=e}},{key:"isSurvey",value:function(){return"survey"===this.appMode||"survey_full"===this.appMode}},{key:"setAppMode",value:function(e){this.appMode=e,this.updateFrameStyle();var t=document.querySelector(".gleap-frame-container-inner");"widget"!==this.appMode&&"survey_full"!==this.appMode||!t||(t.style.maxHeight="".concat(700,"px"))}},{key:"registerEscListener",value:function(){var e=this;this.escListener||(this.escListener=function(t){"Escape"===(t=t||window.event).key&&e.hideWidget()},document.addEventListener("keydown",this.escListener))}},{key:"unregisterEscListener",value:function(){this.escListener&&(document.removeEventListener("keydown",this.escListener),this.escListener=null)}},{key:"destroy",value:function(){this.gleapFrame&&this.gleapFrame.remove(),this.gleapFrameContainer&&this.gleapFrameContainer.remove(),this.injectedFrame=!1,this.widgetOpened=!1,this.markerManager=void 0,this.gleapFrameContainer=null,this.gleapFrame=null}},{key:"isOpened",value:function(){return this.widgetOpened||null!=this.markerManager}},{key:"showFrameContainer",value:function(e){var t=this;if(this.gleapFrameContainer){var n=B.getInstance().getFlowConfig(),o="gleap-frame-container--loading";this.gleapFrameContainer.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),n.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),n.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){t.gleapFrameContainer.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),Zt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),Se.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){dt.getInstance().clearAllNotifications(this.isSurvey()),dt.getInstance().setNotificationCount(0),r.getInstance().updateFeedbackButtonState()}},{key:"showWidget",value:function(){var t=this;setTimeout((function(){t.gleapFrameContainer?t.runWidgetShouldOpenCallback():e.getInstance().injectFrame(),t.updateUI()}),0)}},{key:"updateWidgetStatus",value:function(){this.sendMessage({name:"widget-status-update",data:{isWidgetOpen:this.widgetOpened}})}},{key:"hideMarkerManager",value:function(){this.markerManager&&(this.markerManager.clear(),this.markerManager=null)}},{key:"hideWidget",value:function(){this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),this.widgetOpened=!1,this.updateWidgetStatus(),r.getInstance().updateFeedbackButtonState(),Se.notifyEvent("close"),dt.getInstance().reloadNotificationsFromCache(),this.unregisterEscListener(),"undefined"!=typeof window&&void 0!==window.focus&&window.focus()}},{key:"sendMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:E.getInstance().getSession(),apiUrl:E.getInstance().apiUrl,sdkKey:E.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:B.getInstance().getFlowConfig(),overrideLanguage:nt.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new $e(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=te(this.queue);this.queue=[];for(var t=0;t<e.length;t++)this.sendMessage(e[t],!0)}},{key:"startCommunication",value:function(){var e=this;this.addMessageListener((function(t){if("ping"===t.name&&(e.sendConfigUpdate(),e.sendSessionUpdate(),e.workThroughQueue(),setTimeout((function(){e.runWidgetShouldOpenCallback()}),300)),"play-ping"===t.name&&yt.ping(),"open-image"===t.name&&e.showImage(t.data.url),"page-changed"===t.name&&(!t.data||"newsdetails"!==t.data.name&&"appextended"!==t.data.name?"extended"===e.appMode&&e.setAppMode("widget"):e.setAppMode("extended")),"collect-ticket-data"===t.name){var n={customData:ke.getInstance().getCustomData(),metaData:ce.getInstance().getMetaData(),consoleLog:he.getInstance().getLogs(),networkLogs:v.getInstance().getRequests(),customEventLog:D.getInstance().getEventArray()},o=xt.getInstance().getTags();o&&o.length>0&&(n.tags=o),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var r=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode||!r||(r.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&Se.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var a=t.data,i=!!t.newTab;e.urlHandler(a,i)}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var s=t.data.formData,c=t.data.action,l=t.data.outboundId,u=t.data.spamToken;new ee(c.feedbackType,"MEDIUM",s,!1,c.excludeData,l,u).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Se.notifyEvent("feedback-sent",s)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Se.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===vt.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),o=0;o<e.listeners.length;o++)e.listeners[o]&&e.listeners[o](n)}catch(r){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}])&&oe(t.prototype,n),o&&oe(t,o),e}();function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}re(ae,"instance",void 0);var ce=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se(this,"sessionStart",new Date),se(this,"appBuildNumber",""),se(this,"appVersionCode",""),se(this,"environment","prod")}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setAppVersionCode",value:function(e){this.getInstance().appVersionCode=e}},{key:"setAppBuildNumber",value:function(e){this.getInstance().appBuildNumber=e}}],(n=[{key:"getSessionDuration",value:function(){var e=new Date;return Math.round((e.getTime()-this.sessionStart.getTime())/1e3)}},{key:"getMetaData",value:function(){var e,t,n,o=navigator.userAgent,r=navigator.appName,a=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10);-1!==(t=o.indexOf("Opera"))?(r="Opera",a=o.substring(t+6),-1!==(t=o.indexOf("Version"))&&(a=o.substring(t+8))):-1!==(t=o.indexOf("MSIE"))?(r="Microsoft Internet Explorer",a=o.substring(t+5)):-1!==(t=o.indexOf("Chrome"))?(r="Chrome",a=o.substring(t+7)):-1!==(t=o.indexOf("Safari"))?(r="Safari",a=o.substring(t+7),-1!==(t=o.indexOf("Version"))&&(a=o.substring(t+8))):-1!==(t=o.indexOf("Firefox"))?(r="Firefox",a=o.substring(t+8)):(e=o.lastIndexOf(" ")+1)<(t=o.lastIndexOf("/"))&&(r=o.substring(e,t),a=o.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=navigator.appName)),-1!==(n=a.indexOf(";"))&&(a=a.substring(0,n)),-1!==(n=a.indexOf(" "))&&(a=a.substring(0,n)),i=parseInt(""+a,10),isNaN(i)&&(a=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10));var s="Unknown OS";return-1!==navigator.appVersion.indexOf("Win")&&(s="Windows"),-1!==navigator.appVersion.indexOf("Mac")&&(s="MacOS"),-1!==navigator.appVersion.indexOf("X11")&&(s="UNIX"),-1!==navigator.appVersion.indexOf("Linux")&&(s="Linux"),-1!==navigator.appVersion.indexOf("iPad")&&(s="iPad"),-1!==navigator.appVersion.indexOf("iPhone")&&(s="iPhone"),-1!==navigator.appVersion.indexOf("Android")&&(s="Android"),{browserName:r+"("+a+")",userAgent:o,browser:r,systemName:s,buildVersionNumber:this.appBuildNumber,releaseVersionNumber:this.appVersionCode,sessionDuration:this.getSessionDuration(),devicePixelRatio:window.devicePixelRatio,screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,currentUrl:window.location.href,language:navigator.language||navigator.userLanguage,mobile:m(),sdkVersion:"13.2.2",sdkType:"javascript",environment:this.environment}}}])&&ie(t.prototype,n),o&&ie(t,o),e}();function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}se(ce,"instance",void 0);var he=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pe(this,"logArray",[]),pe(this,"disabled",!1),pe(this,"originalConsoleLog",void 0),pe(this,"logMaxLength",500)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getLogs",value:function(){return this.logArray}},{key:"stop",value:function(){this.disabled=!0,this.originalConsoleLog&&(window.console=this.originalConsoleLog)}},{key:"addLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:y(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 o=0;o<e.length;o++)n+=e[o]+" "}catch(r){}this.addLog(n,t)}}},{key:"start",value:function(){if(!this.disabled){var e,t=this;window.console=(e=window.console,window.console&&e||(e={}),t.originalConsoleLog=e,ue(ue({},e),{},{log:function(){t.addLogWithArgs(arguments,"INFO"),e.log&&e.log.apply(e,arguments)},warn:function(){t.addLogWithArgs(arguments,"WARNING"),e.warn&&e.warn.apply(e,arguments)},error:function(){t.addLogWithArgs(arguments,"ERROR"),e.error&&e.error.apply(e,arguments)},info:function(n){t.addLogWithArgs(arguments,"INFO"),e.info&&e.info.apply(e,arguments)}}))}}}])&&de(t.prototype,n),o&&de(t,o),e}();function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}pe(he,"instance",void 0);var ge,ve,me,be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){document.addEventListener("click",(function(e){e.target&&(ae.getInstance().isOpened()||he.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=y(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),o="",r="";if(void 0!==e.getAttribute){var a=e.getAttribute("id");a&&(o=' id="'.concat(a,'"'));var i=e.getAttribute("class");i&&(r=' class="'.concat(i,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(o).concat(r).concat(l).concat(n).concat(c,"/").concat(s).concat(l)}(e.target),"CLICK"))}))}}])&&fe(t.prototype,n),o&&fe(t,o),e}();function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}me=void 0,(ve="instance")in(ge=be)?Object.defineProperty(ge,ve,{value:me,enumerable:!0,configurable:!0,writable:!0}):ge[ve]=me;var ke=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),we(this,"customData",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,b(e))}},{key:"setCustomData",value:function(e,t){this.customData[e]=t}},{key:"removeCustomData",value:function(e){delete this.customData[e]}},{key:"clearCustomData",value:function(){this.customData={}}}])&&ye(t.prototype,n),o&&ye(t,o),e}();function xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}we(ke,"instance",void 0);var Se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ce(this,"eventListeners",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"notifyEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=Zt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var o=this.getInstance().eventListeners[e];if(o)for(var r=0;r<o.length;r++){var a=o[r];a&&a(t)}}},{key:"on",value:function(e,t){var n=this.getInstance();n.eventListeners[e]||(n.eventListeners[e]=[]),n.eventListeners[e].push(t)}}],(n=null)&&xe(t.prototype,n),o&&xe(t,o),e}();function Ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ce(Se,"instance",void 0);var Te=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Le(this,"customActionCallbacks",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"registerCustomAction",value:function(e){var t=this.getInstance();t.customActionCallbacks&&t.customActionCallbacks.push(e)}},{key:"triggerCustomAction",value:function(e){var t=this.getInstance();if(t.customActionCallbacks)for(var n=0;n<t.customActionCallbacks.length;n++){var o=t.customActionCallbacks[n];o&&o({name:e})}}}],(n=null)&&Ie(t.prototype,n),o&&Ie(t,o),e}();function Oe(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 o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(c){s=!0,r=c}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||Re(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 Me(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Re(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function Re(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Pe(e,t,n){return t&&Ne(e.prototype,t),n&&Ne(e,n),e}function Fe(e){return(Fe="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)}Le(Te,"instance",void 0);var Be=function(){var e,t;function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function o(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function r(e){try{var t=e.rules||e.cssRules;return t?function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t).map(a).join("")):null}catch(n){return null}}function a(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=r(e.styleSheet)||t}catch(n){}return t}(t=e||(e={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var i=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function s(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,a=e.maskInputFn,i=r||"";return(t[n.toLowerCase()]||t[o])&&(i=a?a(i):"*".repeat(i.length)),i}var c="__rrweb_original__";var l=1,u=new RegExp("[^a-z0-9-_:]");function d(){return l++}var p,h,f=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,g=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,v=/^(data:)([^,]*),(.*)/i;function m(e,t){return(e||"").replace(f,(function(e,n,o,r,a,i){var s=o||a||i,c=n||r||"";if(!s)return e;if(!g.test(s)||v.test(s))return"url(".concat(c).concat(s).concat(c,")");if("/"===s[0])return"url(".concat(c).concat(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s).concat(c,")");var l=t.split("/"),u=s.split("/");l.pop();for(var d=0,p=u;d<p.length;d++){var h=p[d];"."!==h&&(".."===h?l.pop():l.push(h))}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var b=/^[^ \t\n\r\u000c]+/,y=/^[, \t\n\r\u000c]+/;function w(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function k(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function x(){var e=document.createElement("a");return e.href="",e.href}function C(e,t,n,o){return"src"===n||"href"===n&&o&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&o&&"#"!==o[0]||"background"===n&&o&&("table"===t||"td"===t||"th"===t)?w(e,o):"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}for(var r=[];o(y),!(n>=t.length);){var a=o(b);if(","===a.slice(-1))a=w(e,a.substring(0,a.length-1)),r.push(a);else{var i="";a=w(e,a);for(var s=!1;;){var c=t.charAt(n);if(""===c){r.push((a+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,r.push((a+i).trim());break}"("===c&&(s=!0)}i+=c,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?m(o,x()):"object"===t&&"data"===n&&o?w(e,o):o}function S(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&S(e.parentNode,t,n);for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&S(e.parentNode,t,n)}function I(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t)||o.closest(".".concat(t)))return!0}else if(S(o,t,!0))return!0;return!(!n||!o.matches(n)&&!o.closest(n))}function L(t,n){var o=n.doc,a=n.mirror,i=n.blockClass,l=n.blockSelector,d=n.maskTextClass,f=n.maskTextSelector,g=n.inlineStylesheet,v=n.maskInputOptions,b=void 0===v?{}:v,y=n.maskTextFn,w=n.maskInputFn,S=n.dataURLOptions,L=void 0===S?{}:S,T=n.inlineImages,O=n.recordCanvas,M=n.keepIframeSrcFn,E=n.newlyAddedElement,R=void 0!==E&&E,A=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(o,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:A};case t.ELEMENT_NODE:return function(t,n){for(var o=n.doc,a=n.blockClass,i=n.blockSelector,l=n.inlineStylesheet,d=n.maskInputOptions,f=void 0===d?{}:d,g=n.maskInputFn,v=n.dataURLOptions,b=void 0===v?{}:v,y=n.inlineImages,w=n.recordCanvas,S=n.keepIframeSrcFn,I=n.newlyAddedElement,L=void 0!==I&&I,T=n.rootId,O=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,a,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),E={},R=t.attributes.length,A=0;A<R;A++){var D=t.attributes[A];E[D.name]=C(o,M,D.name,D.value)}if("link"===M&&l){var N=Array.from(o.styleSheets).find((function(e){return e.href===t.href})),P=null;N&&(P=r(N)),P&&(delete E.rel,delete E.href,E._cssText=m(P,N.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(P=r(t.sheet))&&(E._cssText=m(P,x()))}if("input"===M||"textarea"===M||"select"===M){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=s({type:E.type,tagName:M,value:F,maskInputOptions:f,maskInputFn:g}):B&&(E.checked=B)}if("option"===M&&(t.selected&&!f.select?E.selected=!0:delete E.selected),"canvas"===M&&w)if("2d"===t.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var o=0;o<e.height;o+=50){var r=t.getImageData,a=c in r?r[c]:r;if(new Uint32Array(a.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(b.type,b.quality));else if(!("__context"in t)){var j=t.toDataURL(b.type,b.quality),_=document.createElement("canvas");_.width=t.width,_.height=t.height,j!==_.toDataURL(b.type,b.quality)&&(E.rr_dataURL=j)}if("img"===M&&y){p||(p=o.createElement("canvas"),h=p.getContext("2d"));var U=t,q=U.crossOrigin;U.crossOrigin="anonymous";var H=function(){try{p.width=U.naturalWidth,p.height=U.naturalHeight,h.drawImage(U,0,0),E.rr_dataURL=p.toDataURL(b.type,b.quality)}catch(e){console.warn("Cannot inline img src=".concat(U.currentSrc,"! Error: ").concat(e))}q?E.crossOrigin=q:U.removeAttribute("crossorigin")};U.complete&&0!==U.naturalWidth?H():U.onload=H}if(("audio"===M||"video"===M)&&(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime),L||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),O){var W=t.getBoundingClientRect(),z=W.width,G=W.height;E={class:E.class,rr_width:"".concat(z,"px"),rr_height:"".concat(G,"px")}}return"iframe"===M&&!S(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src),{type:e.Element,tagName:M,attributes:E,childNodes:[],isSVG:k(t)||void 0,needBlock:O,rootId:T}}(t,{doc:o,blockClass:i,blockSelector:l,inlineStylesheet:g,maskInputOptions:b,maskInputFn:w,dataURLOptions:L,inlineImages:T,recordCanvas:O,keepIframeSrcFn:M,newlyAddedElement:R,rootId:A});case t.TEXT_NODE:return function(t,n){var o,r=n.maskTextClass,a=n.maskTextSelector,i=n.maskTextFn,s=n.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||null!==(o=t.parentNode.sheet)&&void 0!==o&&o.cssRules&&(l=function(e){return e.cssRules?Array.from(e.cssRules).map((function(e){return e.cssText||""})).join(""):""}(t.parentNode.sheet))}catch(y){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(y),t)}l=m(l,x())}return d&&(l="SCRIPT_PLACEHOLDER"),!u&&!d&&l&&I(t,r,a)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:d,maskTextSelector:f,maskTextFn:y,rootId:A});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:A};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:A};default:return!1}}function T(e){return void 0===e?"":e.toLowerCase()}function O(t,r){var a,i=r.doc,s=r.mirror,c=r.blockClass,l=r.blockSelector,u=r.maskTextClass,p=r.maskTextSelector,h=r.skipChild,f=void 0!==h&&h,g=r.inlineStylesheet,v=void 0===g||g,m=r.maskInputOptions,b=void 0===m?{}:m,y=r.maskTextFn,w=r.maskInputFn,k=r.slimDOMOptions,x=r.dataURLOptions,C=void 0===x?{}:x,S=r.inlineImages,I=void 0!==S&&S,M=r.recordCanvas,E=void 0!==M&&M,R=r.onSerialize,A=r.onIframeLoad,D=r.iframeLoadTimeout,N=void 0===D?5e3:D,P=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,B=void 0===F?5e3:F,j=r.keepIframeSrcFn,_=void 0===j?function(){return!1}:j,U=r.newlyAddedElement,q=void 0!==U&&U,H=r.preserveWhiteSpace,W=void 0===H||H,z=L(t,{doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,dataURLOptions:C,inlineImages:I,recordCanvas:E,keepIframeSrcFn:_,newlyAddedElement:q});if(!z)return console.warn(t,"not serialized"),null;a=s.hasNode(t)?s.getId(t):function(t,n){return!!(n.comment&&t.type===e.Comment||t.type===e.Element&&(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js"))||n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(T(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(t.attributes.name)||"icon"===T(t.attributes.rel)||"apple-touch-icon"===T(t.attributes.rel)||"shortcut icon"===T(t.attributes.rel)))||"meta"===t.tagName&&(n.headMetaDescKeywords&&T(t.attributes.name).match(/^description|keywords$/)||n.headMetaSocial&&(T(t.attributes.property).match(/^(og|twitter|fb):/)||T(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(t.attributes.name))||n.headMetaRobots&&("robots"===T(t.attributes.name)||"googlebot"===T(t.attributes.name)||"bingbot"===T(t.attributes.name))||n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"]||n.headMetaAuthorship&&("author"===T(t.attributes.name)||"generator"===T(t.attributes.name)||"framework"===T(t.attributes.name)||"publisher"===T(t.attributes.name)||"progid"===T(t.attributes.name)||T(t.attributes.property).match(/^article:/)||T(t.attributes.property).match(/^product:/))||n.headMetaVerification&&("google-site-verification"===T(t.attributes.name)||"yandex-verification"===T(t.attributes.name)||"csrf-token"===T(t.attributes.name)||"p:domain_verify"===T(t.attributes.name)||"verify-v1"===T(t.attributes.name)||"verification"===T(t.attributes.name)||"shopify-checkout-api-token"===T(t.attributes.name)))))}(z,k)||!W&&z.type===e.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?-2:d();var G=Object.assign(z,{id:a});if(s.add(t,G),-2===a)return null;R&&R(t);var V=!f;if(G.type===e.Element){V=V&&!G.needBlock,delete G.needBlock;var Z=t.shadowRoot;Z&&o(Z)&&(G.isShadowHost=!0)}if((G.type===e.Document||G.type===e.Element)&&V){k.headWhitespace&&G.type===e.Element&&"head"===G.tagName&&(W=!1);for(var K={doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_},X=0,J=Array.from(t.childNodes);X<J.length;X++){($=O(J[X],K))&&G.childNodes.push($)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(var Y=0,Q=Array.from(t.shadowRoot.childNodes);Y<Q.length;Y++){var $;($=O(Q[Y],K))&&(o(t.shadowRoot)&&($.isShadow=!0),G.childNodes.push($))}}return t.parentNode&&n(t.parentNode)&&o(t.parentNode)&&(G.isShadow=!0),G.type===e.Element&&"iframe"===G.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var r,a=!1;try{r=o.document.readyState}catch(c){return}if("complete"!==r){var i=setTimeout((function(){a||(t(),a=!0)}),n);return void e.addEventListener("load",(function(){clearTimeout(i),a=!0,t()}))}var s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}(t,(function(){var e=t.contentDocument;if(e&&A){var n=O(e,{doc:e,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_});n&&A(t,n)}}),N),G.type===e.Element&&"link"===G.tagName&&"stylesheet"===G.attributes.rel&&function(e,t,n){var o,r=!1;try{o=e.sheet}catch(i){return}if(!o){var a=setTimeout((function(){r||(t(),r=!0)}),n);e.addEventListener("load",(function(){clearTimeout(a),r=!0,t()}))}}(t,(function(){if(P){var e=O(t,{doc:i,mirror:s,blockClass:c,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:y,maskInputFn:w,slimDOMOptions:k,dataURLOptions:C,inlineImages:I,recordCanvas:E,preserveWhiteSpace:W,onSerialize:R,onIframeLoad:A,iframeLoadTimeout:N,onStylesheetLoad:P,stylesheetLoadTimeout:B,keepIframeSrcFn:_});e&&P(t,e)}}),B),G}function M(e,t){var n=t||{},o=n.mirror,r=void 0===o?new i:o,a=n.blockClass,s=void 0===a?"rr-block":a,c=n.blockSelector,l=void 0===c?null:c,u=n.maskTextClass,d=void 0===u?"rr-mask":u,p=n.maskTextSelector,h=void 0===p?null:p,f=n.inlineStylesheet,g=void 0===f||f,v=n.inlineImages,m=void 0!==v&&v,b=n.recordCanvas,y=void 0!==b&&b,w=n.maskAllInputs,k=void 0!==w&&w,x=n.maskTextFn,C=n.maskInputFn,S=n.slimDOM,I=void 0!==S&&S,L=n.dataURLOptions,T=n.preserveWhiteSpace,M=n.onSerialize,E=n.onIframeLoad,R=n.iframeLoadTimeout,A=n.onStylesheetLoad,D=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn;return O(e,{doc:e,mirror:r,blockClass:s,blockSelector:l,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:x,maskInputFn:C,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:L,inlineImages:m,recordCanvas:y,preserveWhiteSpace:T,onSerialize:M,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===N?function(){return!1}:N,newlyAddedElement:!1})}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var R="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",A={map:{},getId:function(){return console.error(R),-1},getNode:function(){return console.error(R),null},removeNodeFromMap:function(){console.error(R)},has:function(){return console.error(R),!1},reset:function(){console.error(R)}};function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var c=Date.now();!r&&!1===n.leading&&(r=c);var l=t-(c-r),u=this;l<=0||l>t?(o&&(clearTimeout(o),o=null),r=c,e.apply(u,i)):!o&&!1!==n.trailing&&(o=setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(u,i)}),l))}}function N(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return N(e,t,a||{},!0)}}function P(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(a){return function(){}}}function F(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function j(e,t,n,o){if(!e)return!1;var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if("string"==typeof t){if(r.classList.contains(t)||o&&null!==r.closest("."+t))return!0}else if(S(r,t,o))return!0;return!(!n||!(e.matches(n)||o&&null!==r.closest(n)))}function _(e,t){return-2===t.getId(e)}function U(e,t){if(n(e))return!1;var o=t.getId(e);return!t.has(o)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||U(e.parentNode,t))}function q(e){return Boolean(e.changedTouches)}function H(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===r)return!0}while(r=r&&r.parentNode);return!1})}function W(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function z(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function G(e){return Boolean(null==e?void 0:e.shadowRoot)}("undefined"==typeof window?"undefined":Fe(window))<"u"&&window.Proxy&&window.Reflect&&(A=new Proxy(A,{get:function(e,t,n){return"map"===t&&console.error(R),Reflect.get(e,t,n)}}));var V=function(){function e(){De(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return Pe(e,[{key:"getId",value:function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),Z=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(Z||{}),K=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(K||{}),X=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(X||{}),J=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(J||{}),Y=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Y||{}),Q=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(Q||{});function $(e){return"__ln"in e}var ee=function(){function e(){De(this,e),this.length=0,this.head=null}return Pe(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++){var o;t=(null===(o=t)||void 0===o?void 0:o.next)||null}return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&$(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&$(e.nextSibling)&&e.nextSibling.__ln.previous){var o=e.nextSibling.__ln.previous;t.previous=o,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,o&&(o.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;!this.head||(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),te=function(e,t){return"".concat(e,"@").concat(t)},ne=function(){function e(){var t=this;De(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],o=new ee,r=function(e){for(var n=e,o=-2;-2===o;)o=(n=n&&n.nextSibling)&&t.mirror.getId(n);return o},a=function(a){var i,s,c,l,u=null;(null==(s=null==(i=a.getRootNode)?void 0:i.call(a))?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(u=a.getRootNode().host);for(var d=u;(null==(l=null==(c=null===(p=d)||void 0===p?void 0:p.getRootNode)?void 0:c.call(d))?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;){var p;d=d.getRootNode().host}var h=!(t.doc.contains(a)||d&&t.doc.contains(d));if(a.parentNode&&!h){var f=n(a.parentNode)?t.mirror.getId(u):t.mirror.getId(a.parentNode),g=r(a);if(-1===f||-1===g)return o.addNode(a);var v=O(a,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){W(e,t.mirror)&&t.iframeManager.addIframe(e),z(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),G(a)&&t.shadowDomManager.addShadowRoot(a.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});v&&e.push({parentId:f,nextId:g,node:v})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var i=0,s=Array.from(t.movedSet.values());i<s.length;i++){var c=s[i];re(t.removes,c,t.mirror)&&!t.movedSet.has(c.parentNode)||a(c)}for(var l=0,u=Array.from(t.addedSet.values());l<u.length;l++){var d=u[l];!ie(t.droppedSet,d)&&!re(t.removes,d,t.mirror)||ie(t.movedSet,d)?a(d):t.droppedSet.add(d)}for(var p=null;o.length;){var h=null;if(p){var f=t.mirror.getId(p.value.parentNode),g=r(p.value);-1!==f&&-1!==g&&(h=p)}if(!h)for(var v=o.length-1;v>=0;v--){var m=o.get(v);if(m){var b=t.mirror.getId(m.value.parentNode);if(-1===r(m.value))continue;if(-1!==b){h=m;break}var y=m.value;if(y.parentNode&&y.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var w=y.parentNode.host;if(-1!==t.mirror.getId(w)){h=m;break}}}}if(!h){for(;o.head;)o.removeNode(o.head.value);break}p=h.previous,o.removeNode(h.value),a(h.value)}var k={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};!k.texts.length&&!k.attributes.length&&!k.removes.length&&!k.adds.length||(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(k))}},this.processMutation=function(e){if(!_(e.target,t.mirror))switch(e.type){case"characterData":var r=e.target.textContent;!j(e.target,t.blockClass,t.blockSelector,!1)&&r!==e.oldValue&&t.texts.push({value:I(e.target,t.maskTextClass,t.maskTextSelector)&&r?t.maskTextFn?t.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var a=e.target,i=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(i=s({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:t.maskInputFn})),j(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var c=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===a.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(i)){if(a.contentDocument)return;e.attributeName="rr_src"}if(c||(c={node:e.target,attributes:{}},t.attributes.push(c)),"style"===e.attributeName){var l=t.doc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue),(void 0===c.attributes.style||null===c.attributes.style)&&(c.attributes.style={});for(var u=c.attributes.style,d=0,p=Array.from(a.style);d<p.length;d++){var h=p[d],f=a.style.getPropertyValue(h),g=a.style.getPropertyPriority(h);(f!==l.style.getPropertyValue(h)||g!==l.style.getPropertyPriority(h))&&(u[h]=""===g?f:[f,g])}for(var v=0,m=Array.from(l.style);v<m.length;v++){var b=m[v];""===a.style.getPropertyValue(b)&&(u[b]=!1)}}else c.attributes[e.attributeName]=C(t.doc,a.tagName,e.attributeName,i);break;case"childList":if(j(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(r){var a=t.mirror.getId(r),i=n(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);j(e.target,t.blockClass,t.blockSelector,!1)||_(r,t.mirror)||!function(e,t){return-1!==t.getId(e)}(r,t.mirror)||(t.addedSet.has(r)?(oe(t.addedSet,r),t.droppedSet.add(r)):t.addedSet.has(e.target)&&-1===a||U(e.target,t.mirror)||(t.movedSet.has(r)&&t.movedMap[te(a,i)]?oe(t.movedSet,r):t.removes.push({parentId:i,id:a,isShadow:!(!n(e.target)||!o(e.target))||void 0})),t.mapRemoves.push(r))}))}},this.genAdds=function(e,n){if(t.mirror.hasNode(e)){if(_(e,t.mirror))return;t.movedSet.add(e);var o=null;n&&t.mirror.hasNode(n)&&(o=t.mirror.getId(n)),o&&-1!==o&&(t.movedMap[te(t.mirror.getId(e),o)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);j(e,t.blockClass,t.blockSelector,!1)||e.childNodes.forEach((function(e){return t.genAdds(e)}))}}return Pe(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function oe(e,t){e.delete(t),t.childNodes.forEach((function(t){return oe(e,t)}))}function re(e,t,n){return 0!==e.length&&ae(e,t,n)}function ae(e,t,n){var o=t.parentNode;if(!o)return!1;var r=n.getId(o);return!!e.some((function(e){return e.id===r}))||ae(e,o,n)}function ie(e,t){return 0!==e.size&&se(e,t)}function se(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||se(e,n))}var ce=Object.defineProperty,le=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,fe=function(e,t,n){return t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ge=function(e,t){for(var n in t||(t={}))pe.call(t,n)&&fe(e,n,t[n]);if(de){var o,r=Ee(de(t));try{for(r.s();!(o=r.n()).done;){n=o.value;he.call(t,n)&&fe(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e},ve=[],me=("undefined"==typeof CSSGroupingRule?"undefined":Fe(CSSGroupingRule))<"u",be=("undefined"==typeof CSSMediaRule?"undefined":Fe(CSSMediaRule))<"u",ye=("undefined"==typeof CSSSupportsRule?"undefined":Fe(CSSSupportsRule))<"u",we=("undefined"==typeof CSSConditionRule?"undefined":Fe(CSSConditionRule))<"u";function ke(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function xe(e,t){var n,o,r,a=new ne;ve.push(a),a.init(e);var i=window.MutationObserver||window.__rrMutationObserver,s=null==(r=null==(o=null===(n=window)||void 0===n?void 0:n.Zone)?void 0:o.__symbol__)?void 0:r.call(o,"MutationObserver");s&&window[s]&&(i=window[s]);var c=new i(a.processMutations.bind(a));return c.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),c}function Ce(e){var t=e.mousemoveCb,n=e.sampling,o=e.doc,r=e.mirror;if(!1===n.mousemove)return function(){};var a,i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],l=D((function(e){var n=Date.now()-a;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],a=null}),s),u=D((function(e){var t=ke(e),n=q(e)?e.changedTouches[0]:e,o=n.clientX,i=n.clientY;a||(a=Date.now()),c.push({x:o,y:i,id:r.getId(t),timeOffset:Date.now()-a}),l(("undefined"==typeof DragEvent?"undefined":Fe(DragEvent))<"u"&&e instanceof DragEvent?K.Drag:e instanceof MouseEvent?K.MouseMove:K.TouchMove)}),i,{trailing:!1}),d=[E("mousemove",u,o),E("touchmove",u,o),E("drag",u,o)];return function(){d.forEach((function(e){return e()}))}}function Se(e){var t=e.mouseInteractionCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector,i=e.sampling;if(!1===i.mouseInteraction)return function(){};var s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];return Object.keys(X).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var i=e.toLowerCase(),s=function(e){return function(n){var i=ke(n);if(!j(i,r,a,!0)){var s=q(n)?n.changedTouches[0]:n;if(s){var c=o.getId(i),l=s.clientX,u=s.clientY;t({type:X[e],id:c,x:l,y:u})}}}}(e);c.push(E(i,s,n))})),function(){c.forEach((function(e){return e()}))}}function Ie(e){var t=e.scrollCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector;return E("scroll",D((function(e){var i=ke(e);if(i&&!j(i,r,a,!0)){var s=o.getId(i);if(i===n){var c=n.scrollingElement||n.documentElement;t({id:s,x:c.scrollLeft,y:c.scrollTop})}else t({id:s,x:i.scrollLeft,y:i.scrollTop})}}),e.sampling.scroll||100),n)}function Le(e){var t=e.viewportResizeCb,n=-1,o=-1;return E("resize",D((function(){var e=F(),r=B();(n!==e||o!==r)&&(t({width:Number(r),height:Number(e)}),n=e,o=r)}),200),window)}function Te(e,t){var n=ge({},e);return t||delete n.userTriggered,n}var Re=["INPUT","TEXTAREA","SELECT"],Ae=new WeakMap;function Ne(e){var t=e.inputCb,n=e.doc,o=e.mirror,r=e.blockClass,a=e.blockSelector,i=e.ignoreClass,c=e.maskInputOptions,l=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=ke(e),o=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Re.indexOf(t.tagName)<0)&&!j(t,r,a,!0)){var u=t.type;if(!t.classList.contains(i)){var p=t.value,f=!1;"radio"===u||"checkbox"===u?f=t.checked:(c[t.tagName.toLowerCase()]||c[u])&&(p=s({maskInputOptions:c,tagName:t.tagName,type:u,value:p,maskInputFn:l})),h(t,Te({text:p,isChecked:f,userTriggered:o},d));var g=t.name;"radio"===u&&g&&f&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){e!==t&&h(e,Te({text:e.value,isChecked:!f,userTriggered:!1},d))}))}}}function h(e,n){var r=Ae.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Ae.set(e,n);var a=o.getId(e);t(function(e,t){return le(e,ue(t))}(ge({},n),{id:a}))}}var f=("last"===u.input?["change"]:["input","change"]).map((function(e){return E(e,p,n)})),g=n.defaultView;if(!g)return function(){f.forEach((function(e){return e()}))};var v=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),m=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push.apply(f,Me(m.map((function(e){return N(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){f.forEach((function(e){return e()}))}}function Be(e){return function(e,t){if(me&&e.parentRule instanceof CSSGroupingRule||be&&e.parentRule instanceof CSSMediaRule||ye&&e.parentRule instanceof CSSSupportsRule||we&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var o=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(o)}return t}(e,[])}function je(e,t,n){var o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function _e(e,t){var n=e.styleSheetRuleCb,o=e.mirror,r=e.stylesheetManager,a=t.win,i=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=function(e,t){var a=je(this,o,r.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:t}]}),i.apply(this,[e,t])};var s,c,l=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,removes:[{index:e}]}),l.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(s=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,replace:e}),s.apply(this,[e])}),a.CSSStyleSheet.prototype.replaceSync&&(c=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=function(e){var t=je(this,o,r.styleMirror),a=t.id,i=t.styleId;return(a&&-1!==a||i&&-1!==i)&&n({id:a,styleId:i,replaceSync:e}),c.apply(this,[e])});var u={};me?u.CSSGroupingRule=a.CSSGroupingRule:(be&&(u.CSSMediaRule=a.CSSMediaRule),we&&(u.CSSConditionRule=a.CSSConditionRule),ye&&(u.CSSSupportsRule=a.CSSSupportsRule));var d={};return Object.entries(u).forEach((function(e){var t=Oe(e,2),a=t[0],i=t[1];d[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(e,t){var i=je(this.parentStyleSheet,o,r.styleMirror),s=i.id,c=i.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:[].concat(Me(Be(this)),[t||0])}]}),d[a].insertRule.apply(this,[e,t])},i.prototype.deleteRule=function(e){var t=je(this.parentStyleSheet,o,r.styleMirror),i=t.id,s=t.styleId;return(i&&-1!==i||s&&-1!==s)&&n({id:i,styleId:s,removes:[{index:[].concat(Me(Be(this)),[e])}]}),d[a].deleteRule.apply(this,[e])}})),function(){a.CSSStyleSheet.prototype.insertRule=i,a.CSSStyleSheet.prototype.deleteRule=l,s&&(a.CSSStyleSheet.prototype.replace=s),c&&(a.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach((function(e){var t=Oe(e,2),n=t[0],o=t[1];o.prototype.insertRule=d[n].insertRule,o.prototype.deleteRule=d[n].deleteRule}))}}function Ue(e,t){var n,o,r,a=e.mirror,i=e.stylesheetManager,s=null;s="#document"===t.nodeName?a.getId(t):a.getId(t.host);var c="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.ShadowRoot,l=Object.getOwnPropertyDescriptor(null==c?void 0:c.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&c&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:function(){var e;return null==(e=l.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{i.adoptStyleSheets(e,s)}catch(o){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):function(){}}function qe(e,t){var n=e.styleDeclarationCb,o=e.mirror,r=e.ignoreCSSAttributes,a=e.stylesheetManager,i=t.win,s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(e,t,i){var c;if(r.has(e))return s.apply(this,[e,t,i]);var l=je(null==(c=this.parentRule)?void 0:c.parentStyleSheet,o,a.styleMirror),u=l.id,d=l.styleId;return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,set:{property:e,value:t,priority:i},index:Be(this.parentRule)}),s.apply(this,[e,t,i])};var c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(r.has(e))return c.apply(this,[e]);var i=je(null==(t=this.parentRule)?void 0:t.parentStyleSheet,o,a.styleMirror),s=i.id,l=i.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,remove:{property:e},index:Be(this.parentRule)}),c.apply(this,[e])},function(){i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=c}}function He(e){var t=e.mediaInteractionCb,n=e.blockClass,o=e.blockSelector,r=e.mirror,a=e.sampling,i=function(e){return D((function(a){var i=ke(a);if(i&&!j(i,n,o,!0)){var s=i.currentTime,c=i.volume,l=i.muted,u=i.playbackRate;t({type:e,id:r.getId(i),currentTime:s,volume:c,muted:l,playbackRate:u})}}),a.media||500)},s=[E("play",i(Y.Play)),E("pause",i(Y.Pause)),E("seeked",i(Y.Seeked)),E("volumechange",i(Y.VolumeChange)),E("ratechange",i(Y.RateChange))];return function(){s.forEach((function(e){return e()}))}}function We(e){var t=e.fontCb,n=e.doc,o=n.defaultView;if(!o)return function(){};var r=[],a=new WeakMap,i=o.FontFace;o.FontFace=function(e,t,n){var o=new i(e,t,n);return a.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};var s=P(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=a.get(n);e&&(t(e),a.delete(n))}),0),e.apply(this,[n])}}));return r.push((function(){o.FontFace=i})),r.push(s),function(){r.forEach((function(e){return e()}))}}function ze(e){var t=e.doc,n=e.mirror,o=e.blockClass,r=e.blockSelector,a=e.selectionCb,i=!0,s=function(){var e=t.getSelection();if(!(!e||i&&null!=e&&e.isCollapsed)){i=e.isCollapsed||!1;for(var s=[],c=e.rangeCount||0,l=0;l<c;l++){var u=e.getRangeAt(l),d=u.startContainer,p=u.startOffset,h=u.endContainer,f=u.endOffset;j(d,o,r,!0)||j(h,o,r,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}a({ranges:s})}};return s(),E("selectionchange",s)}function Ge(e,t){var n=e.mutationCb,o=e.mousemoveCb,r=e.mouseInteractionCb,a=e.scrollCb,i=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,l=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,h=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),o.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),r.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),a.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),i.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),c.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),l.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),u.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),p.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)}}function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};Ge(e,t);var o,r=xe(e,e.doc),a=Ce(e),i=Se(e),s=Ie(e),c=Le(e),l=Ne(e),u=He(e),d=_e(e,{win:n}),p=Ue(e,e.doc),h=qe(e,{win:n}),f=e.collectFonts?We(e):function(){},g=ze(e),v=[],m=Ee(e.plugins);try{for(m.s();!(o=m.n()).done;){var b=o.value;v.push(b.observer(b.callback,n,b.options))}}catch(y){m.e(y)}finally{m.f()}return function(){ve.forEach((function(e){return e.reset()})),r.disconnect(),a(),i(),s(),c(),l(),u(),d(),p(),h(),f(),g(),v.forEach((function(e){return e()}))}}for(var Ze=function(){function e(t){De(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return Pe(e,[{key:"getId",value:function(e,t,n,o){var r=n||this.getIdToRemoteIdMap(e),a=o||this.getRemoteIdToIdMap(e),i=r.get(t);return i||(i=this.generateIdFn(),r.set(t,i),a.set(i,t)),i}},{key:"getIds",value:function(e,t){var n=this,o=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,o,r)}))}},{key:"getRemoteId",value:function(e,t,n){var o=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:o.get(t)||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,o=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,o)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),Ke=function(){function e(t){De(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ze(d),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ze(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return Pe(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){if("rrweb"===e.data.type){if(!e.source)return;var t=this.crossOriginIframeMap.get(e.source);if(!t)return;var n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,o=this;switch(t.type){case Z.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:Z.IncrementalSnapshot,data:{source:K.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Plugin:return t;case Z.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Z.IncrementalSnapshot:switch(t.data.source){case K.Mutation:return t.data.adds.forEach((function(t){o.replaceIds(t,e,["parentId","nextId","previousId"]),o.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((function(t){o.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){o.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case K.Drag:case K.TouchMove:case K.MouseMove:return t.data.positions.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case K.ViewportResize:return!1;case K.MediaInteraction:case K.MouseInteraction:case K.Scroll:case K.CanvasMutation:case K.Input:return this.replaceIds(t.data,e,["id"]),t;case K.StyleSheetRule:case K.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case K.Font:return t;case K.Selection:return t.data.ranges.forEach((function(t){o.replaceIds(t,e,["start","end"])})),t;case K.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((function(t){o.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,o){var r,a=Ee(o);try{for(a.s();!(r=a.n()).done;){var i=r.value;!Array.isArray(t[i])&&"number"!=typeof t[i]||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]))}}catch(s){a.e(s)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}}]),e}(),Xe=Object.defineProperty,Je=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,tt=function(e,t,n){return t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},nt=function(e,t){for(var n in t||(t={}))$e.call(t,n)&&tt(e,n,t[n]);if(Qe){var o,r=Ee(Qe(t));try{for(r.s();!(o=r.n()).done;){n=o.value;et.call(t,n)&&tt(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e},ot=function(e,t){return Je(e,Ye(t))},rt=function(){function e(t){De(this,e),this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;var n=this;this.restorePatches.push(P(Element.prototype,"attachShadow",(function(e){return function(t){var o=e.call(this,t);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}})))}return Pe(e,[{key:"addShadowRoot",value:function(e,t){var n=this;!o(e)||this.shadowDoms.has(e)||(this.shadowDoms.add(e),xe(ot(nt({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Ie(ot(nt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),Ue({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e)}),0))}},{key:"observeAttachShadow",value:function(e){if(e.contentWindow){var t=this;this.restorePatches.push(P(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(o){var r=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}}},{key:"reset",value:function(){this.restorePatches.forEach((function(e){return e()})),this.shadowDoms=new WeakSet}}]),e}(),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=("undefined"==typeof Uint8Array?"undefined":Fe(Uint8Array))>"u"?[]:new Uint8Array(256),st=0;st<at.length;st++)it[at.charCodeAt(st)]=st;var ct=new Map;var lt=function(e,t,n){if(e&&(pt(e,t)||"object"==Fe(e))){var o=function(e,t){var n=ct.get(e);return n||(n=new Map,ct.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r}};function ut(e,t,n){if(e instanceof Array)return e.map((function(e){return ut(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t<o;t+=3)r+=at[n[t]>>2],r+=at[(3&n[t])<<4|n[t+1]>>4],r+=at[(15&n[t+1])<<2|n[t+2]>>6],r+=at[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ut(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[ut(e.data,t,n),e.width,e.height]}:pt(e,t)||"object"==Fe(e)?{rr_type:e.constructor.name,index:lt(e,t,n)}:e}var dt=function(e,t,n){return Me(e).map((function(e){return ut(e,t,n)}))},pt=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function ht(e,t,n){var o=[];try{var r=P(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return j(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o].concat(a))}}));o.push(r)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){o.forEach((function(e){return e()}))}}function ft(e,t,n,o,r,a,i){var s,c=[],l=Ee(Object.getOwnPropertyNames(e));try{var u=function(){var a=s.value;if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])return"continue";var l=P(e,a,(function(e){return function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];var u=e.apply(this,c);if(lt(u,i,this),!j(this.canvas,o,r,!0)){var d=dt([].concat(c),i,this),p={type:t,property:a,args:d};n(this.canvas,p)}return u}}));c.push(l)}catch(d){var u=N(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});c.push(u)}};for(l.s();!(s=l.n()).done;)u()}catch(d){l.e(d)}finally{l.f()}return c}function gt(e,t,n){var o=void 0===t?null:t,r=function(e,t){var n=atob(e);if(t){for(var o=new Uint8Array(n.length),r=0,a=n.length;r<a;++r)o[r]=n.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(o.buffer))}return n}(e,void 0!==n&&n),a=r.indexOf("\n",10)+1,i=r.substring(a)+(o?"//# sourceMappingURL="+o:""),s=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(s)}var vt=function(e,t,n){var o;return function(r){return o=o||gt(e,t,n),new Worker(o,r)}}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixwPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylwW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgdT1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCxsPW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gdihzLGUsbil7Y29uc3QgYT1gJHtzfS0ke2V9YDtpZigiT2Zmc2NyZWVuQ2FudmFzImluIGdsb2JhbFRoaXMpe2lmKGwuaGFzKGEpKXJldHVybiBsLmdldChhKTtjb25zdCB0PW5ldyBPZmZzY3JlZW5DYW52YXMocyxlKTt0LmdldENvbnRleHQoIjJkIik7Y29uc3QgZz1hd2FpdChhd2FpdCB0LmNvbnZlcnRUb0Jsb2IobikpLmFycmF5QnVmZmVyKCksZD11KGcpO3JldHVybiBsLnNldChhLGQpLGR9ZWxzZSByZXR1cm4iIn1jb25zdCBpPXNlbGY7aS5vbm1lc3NhZ2U9YXN5bmMgZnVuY3Rpb24ocyl7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtjb25zdHtpZDplLGJpdG1hcDpuLHdpZHRoOmEsaGVpZ2h0OnQsZGF0YVVSTE9wdGlvbnM6Z309cy5kYXRhLGQ9dihhLHQsZyksaD1uZXcgT2Zmc2NyZWVuQ2FudmFzKGEsdCk7aC5nZXRDb250ZXh0KCIyZCIpLmRyYXdJbWFnZShuLDAsMCksbi5jbG9zZSgpO2NvbnN0IHc9YXdhaXQgaC5jb252ZXJ0VG9CbG9iKGcpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89dShiKTtpZighYy5oYXMoZSkmJmF3YWl0IGQ9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX1lbHNlIHJldHVybiBpLnBvc3RNZXNzYWdlKHtpZDpzLmRhdGEuaWR9KX19KSgpOwoK",null,!1),mt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,wt=function(){function e(t){var n=this;De(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var o=t.sampling,r=void 0===o?"all":o,a=t.win,i=t.blockClass,s=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===r&&this.initCanvasMutationObserver(a,i,s),c&&"number"==typeof r&&this.initCanvasFPSObserver(r,a,i,s,{dataURLOptions:l})}return Pe(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,o,r){var a=this,i=ht(t,n,o),s=new Map,c=new vt;c.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,o=n.base64,r=n.type,i=n.width,c=n.height;a.mutationCb({id:t,type:J["2D"],commands:[{property:"clearRect",args:[0,0,i,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:r}]},0,0]}]})}};var l,u=1e3/e,d=0;l=requestAnimationFrame((function e(i){d&&i-d<u||(d=i,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){j(t,n,o,!0)||e.push(t)})),e}().forEach((function(e){return function(e,t,n){return new Promise((function(o,r){var a=function(e){try{s(n.next(e))}catch(u){r(u)}},i=function(e){try{s(n.throw(e))}catch(u){r(u)}},s=function(e){return e.done?o(e.value):Promise.resolve(e.value).then(a,i)};s((n=n.apply(e,t)).next())}))}(a,null,regeneratorRuntime.mark((function t(){var n,o,a,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.mirror.getId(e),!s.get(o)){t.next=3;break}return t.abrupt("return");case 3:return s.set(o,!0),["webgl","webgl2"].includes(e.__context)&&(a=e.getContext(e.__context),!1===(null==(n=null==a?void 0:a.getContextAttributes())?void 0:n.preserveDrawingBuffer)&&(null==a||a.clear(a.COLOR_BUFFER_BIT))),t.next=6,createImageBitmap(e);case 6:i=t.sent,c.postMessage({id:o,bitmap:i,width:e.width,height:e.height,dataURLOptions:r.dataURLOptions},[i]);case 8:case"end":return t.stop()}}),t,this)})))}))),l=requestAnimationFrame(e)})),this.resetObservers=function(){i(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var o=ht(e,t,n),r=function(e,t,n,o){var r,a=[],i=Ee(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));try{var s=function(){var i=r.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var s=P(t.CanvasRenderingContext2D.prototype,i,(function(r){return function(){for(var a=this,s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return j(this.canvas,n,o,!0)||setTimeout((function(){var n=dt([].concat(c),t,a);e(a.canvas,{type:J["2D"],property:i,args:n})}),0),r.apply(this,c)}}));a.push(s)}catch(l){var c=N(t.CanvasRenderingContext2D.prototype,i,{set:function(t){e(this.canvas,{type:J["2D"],property:i,args:[t],setter:!0})}});a.push(c)}};for(i.s();!(r=i.n()).done;)s()}catch(c){i.e(c)}finally{i.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,o,r){var a=[];return a.push.apply(a,Me(ft(t.WebGLRenderingContext.prototype,J.WebGL,e,n,o,0,t))),Fe(t.WebGL2RenderingContext)<"u"&&a.push.apply(a,Me(ft(t.WebGL2RenderingContext.prototype,J.WebGL2,e,n,o,0,t))),function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){o(),r(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var o=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,o)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var o=n.map((function(e){return function(e,t){var n={};for(var o in e)bt.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&mt){var r,a=Ee(mt(e));try{for(a.s();!(r=a.n()).done;)o=r.value,t.indexOf(o)<0&&yt.call(e,o)&&(n[o]=e[o])}catch(i){a.e(i)}finally{a.f()}}return n}(e,["type"])})),r=n[0].type;this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),kt=function(){function e(t){De(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new V,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return Pe(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,o={id:t,styleIds:[]},r=[],i=Ee(e);try{for(i.s();!(n=i.n()).done;){var s=n.value,c=void 0;if(this.styleMirror.has(s))c=this.styleMirror.getId(s);else{c=this.styleMirror.add(s);var l=Array.from(s.rules||CSSRule);r.push({styleId:c,rules:l.map((function(e,t){return{rule:a(e),index:t}}))})}o.styleIds.push(c)}}catch(u){i.e(u)}finally{i.f()}r.length>0&&(o.styles=r),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),xt=Object.defineProperty,Ct=Object.defineProperties,St=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,Ot=function(e,t,n){return t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mt=function(e,t){for(var n in t||(t={}))Lt.call(t,n)&&Ot(e,n,t[n]);if(It){var o,r=Ee(It(t));try{for(r.s();!(o=r.n()).done;){n=o.value;Tt.call(t,n)&&Ot(e,n,t[n])}}catch(a){r.e(a)}finally{r.f()}}return e};function Et(e){return function(e,t){return Ct(e,St(t))}(Mt({},e),{timestamp:Date.now()})}var Rt,At,Dt,Nt=!1,Pt=new i;function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,r=e.blockClass,a=void 0===r?"rr-block":r,i=e.blockSelector,s=void 0===i?null:i,c=e.ignoreClass,l=void 0===c?"rr-ignore":c,u=e.maskTextClass,d=void 0===u?"rr-mask":u,p=e.maskTextSelector,h=void 0===p?null:p,f=e.inlineStylesheet,g=void 0===f||f,v=e.maskAllInputs,m=e.maskInputOptions,b=e.slimDOMOptions,y=e.maskInputFn,w=e.maskTextFn,k=e.hooks,x=e.packFn,C=e.sampling,S=void 0===C?{}:C,I=e.dataURLOptions,L=void 0===I?{}:I,T=e.mousemoveWait,O=e.recordCanvas,R=void 0!==O&&O,A=e.recordCrossOriginIframes,D=void 0!==A&&A,N=e.userTriggeredOnInput,P=void 0!==N&&N,j=e.collectFonts,_=void 0!==j&&j,U=e.inlineImages,q=void 0!==U&&U,V=e.plugins,X=e.keepIframeSrcFn,J=void 0===X?function(){return!1}:X,Y=e.ignoreCSSAttributes,Q=void 0===Y?new Set([]):Y,$=!D||window.parent===window,ee=!1;if(!$)try{window.parent.document,ee=!1}catch(we){ee=!0}if($&&!t)throw new Error("emit function is required");void 0!==T&&void 0===S.mousemove&&(S.mousemove=T),Pt.reset();var te=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==m?m:{password:!0},ne=!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===b,headMetaDescKeywords:"all"===b}:b||{};H();var oe,re=0,ae=function(e){var t,n=Ee(V||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(r){n.e(r)}finally{n.f()}return x&&(e=x(e)),e};Rt=function(e,r){var a;if((null==(a=ve[0])?void 0:a.isFrozen())&&e.type!==Z.FullSnapshot&&!(e.type===Z.IncrementalSnapshot&&e.data.source===K.Mutation)&&ve.forEach((function(e){return e.unfreeze()})),$)null==t||t(ae(e),r);else if(ee){var i={type:"rrweb",event:ae(e),isCheckout:r};window.parent.postMessage(i,"*")}if(e.type===Z.FullSnapshot)oe=e,re=0;else if(e.type===Z.IncrementalSnapshot){if(e.data.source===K.Mutation&&e.data.isAttachIframe)return;re++;var s=o&&re>=o,c=n&&e.timestamp-oe.timestamp>n;(s||c)&&At(!0)}};var ie,se=function(e){Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Mutation},e)}))},ce=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Scroll},e)}))},le=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.CanvasMutation},e)}))},ue=function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.AdoptedStyleSheet},e)}))},de=new kt({mutationCb:se,adoptedStyleSheetCb:ue}),pe=new Ke({mirror:Pt,mutationCb:se,stylesheetManager:de,recordCrossOriginIframes:D,wrappedEmit:Rt}),he=Ee(V||[]);try{for(he.s();!(ie=he.n()).done;){var fe=ie.value;fe.getMirror&&fe.getMirror({nodeMirror:Pt,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror})}}catch(ke){he.e(ke)}finally{he.f()}Dt=new wt({recordCanvas:R,mutationCb:le,win:window,blockClass:a,blockSelector:s,mirror:Pt,sampling:S.canvas,dataURLOptions:L});var ge=new rt({mutationCb:se,scrollCb:ce,bypassOptions:{blockClass:a,blockSelector:s,maskTextClass:d,maskTextSelector:h,inlineStylesheet:g,maskInputOptions:te,dataURLOptions:L,maskTextFn:w,maskInputFn:y,recordCanvas:R,inlineImages:q,sampling:S,slimDOMOptions:ne,iframeManager:pe,stylesheetManager:de,canvasManager:Dt,keepIframeSrcFn:J},mirror:Pt});At=function(){var e,t,n,o,r,i,c,l,u,p,f,v,m=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Rt(Et({type:Z.Meta,data:{href:window.location.href,width:B(),height:F()}}),m),de.reset(),ve.forEach((function(e){return e.lock()}));var b=M(document,{mirror:Pt,blockClass:a,blockSelector:s,maskTextClass:d,maskTextSelector:h,inlineStylesheet:g,maskAllInputs:te,maskTextFn:w,slimDOM:ne,dataURLOptions:L,recordCanvas:R,inlineImages:q,onSerialize:function(e){W(e,Pt)&&pe.addIframe(e),z(e,Pt)&&de.trackLinkElement(e),G(e)&&ge.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){pe.attachIframe(e,t),ge.observeAttachShadow(e)},onStylesheetLoad:function(e,t){de.attachLinkElement(e,t)},keepIframeSrcFn:J});if(!b)return console.warn("Failed to snapshot the document");Rt(Et({type:Z.FullSnapshot,data:{node:b,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===(e=document)||void 0===e?void 0:e.documentElement.scrollLeft)||(null==(l=null==(c=null===(t=document)||void 0===t?void 0:t.body)?void 0:c.parentElement)?void 0:l.scrollLeft)||(null==(u=null===(n=document)||void 0===n?void 0:n.body)?void 0:u.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===(o=document)||void 0===o?void 0:o.documentElement.scrollTop)||(null==(f=null==(p=null===(r=document)||void 0===r?void 0:r.body)?void 0:p.parentElement)?void 0:f.scrollTop)||(null==(v=null===(i=document)||void 0===i?void 0:i.body)?void 0:v.scrollTop)||0}}})),ve.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,Pt.getId(document))};try{var me=[];me.push(E("DOMContentLoaded",(function(){Rt(Et({type:Z.DomContentLoaded,data:{}}))})));var be=function(e){var t;return Ve({mutationCb:se,mousemoveCb:function(e,t){return Rt(Et({type:Z.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.MouseInteraction},e)}))},scrollCb:ce,viewportResizeCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.ViewportResize},e)}))},inputCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Input},e)}))},mediaInteractionCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.StyleDeclaration},e)}))},canvasMutationCb:le,fontCb:function(e){return Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Font},e)}))},selectionCb:function(e){Rt(Et({type:Z.IncrementalSnapshot,data:Mt({source:K.Selection},e)}))},blockClass:a,ignoreClass:l,maskTextClass:d,maskTextSelector:h,maskInputOptions:te,inlineStylesheet:g,sampling:S,recordCanvas:R,inlineImages:q,userTriggeredOnInput:P,collectFonts:_,doc:e,maskInputFn:y,maskTextFn:w,keepIframeSrcFn:J,blockSelector:s,slimDOMOptions:ne,dataURLOptions:L,mirror:Pt,iframeManager:pe,stylesheetManager:de,shadowDomManager:ge,canvasManager:Dt,ignoreCSSAttributes:Q,plugins:(null==(t=null==V?void 0:V.filter((function(e){return e.observer})))?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return Rt(Et({type:Z.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},k)};pe.addLoadListener((function(e){me.push(be(e.contentDocument))}));var ye=function(){At(),me.push(be(document)),Nt=!0};return"interactive"===document.readyState||"complete"===document.readyState?ye():me.push(E("load",(function(){Rt(Et({type:Z.Load,data:{}})),ye()}),window)),function(){me.forEach((function(e){return e()})),Nt=!1}}catch(me){console.warn(me)}}return Ft.addCustomEvent=function(e,t){if(!Nt)throw new Error("please add custom event after start recording");Rt(Et({type:Z.Custom,data:{tag:e,payload:t}}))},Ft.freezePage=function(){ve.forEach((function(e){return e.freeze()}))},Ft.takeFullSnapshot=function(e){if(!Nt)throw new Error("please take full snapshot after start recording");At(e)},Ft.mirror=Pt,Ft}();function je(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _e(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 _e(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){We(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),We(this,"startDate",void 0),We(this,"events",[]),We(this,"bufferSize",0),We(this,"stopFunction",void 0),We(this,"customOptions",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setOptions",value:function(e){this.customOptions=e}},{key:"start",value:function(){this.stop(),this.startDate=Date.now();var e=this.events;try{this.stopFunction=Be(qe(qe(qe({},{inlineStylesheet:!0,blockClass:"gl-block",ignoreClass:"gl-ignore",maskTextClass:"gl-mask",dataURLOptions:{quality:.7},recordCanvas:!1,sampling:{scroll:150,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!0,TouchEnd:!1}},collectFonts:!1,recordCrossOriginIframes:!1}),this.customOptions),{},{emit:function(t){var n=function(e){var t=JSON.stringify(e);if(t.length>5e6){var n,o=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,r=je(t.matchAll(o));try{for(r.s();!(n=r.n()).done;){var a=n.value;t="image/"===a[1].toLocaleLowerCase().slice(0,6)?t.replace(a[0],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVHgBAQUA+v8ABRg5/wHSAVZN1mnaAAAAAElFTkSuQmCC"):t.replace(a[0],"")}}catch(i){r.e(i)}finally{r.f()}}return{event:JSON.parse(t),size:t.length}}(t).event;e.push(n)}}))}catch(t){console.error(t)}}},{key:"stop",value:function(){this.stopFunction&&this.stopFunction(),this.startDate=void 0,this.events=[],this.bufferSize=0}},{key:"getReplayData",value:function(){return{startDate:this.startDate,events:this.events,baseUrl:window.location.origin,width:window.innerWidth,height:window.innerHeight,isMobile:m(),type:"rrweb"}}}])&&He(t.prototype,n),o&&He(t,o),e}();function Ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}We(ze,"instance",void 0);var Ze=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ve(this,"rerender",void 0),Ve(this,"svgElement",null),Ve(this,"path",null),Ve(this,"strPath",void 0),Ve(this,"strokeWidth",12),Ve(this,"strokeWidthRect",6),Ve(this,"bufferSize",4),Ve(this,"buffer",[]),Ve(this,"startPoint",null),Ve(this,"tool","rect"),Ve(this,"color","#EB144C"),Ve(this,"mouseDown",null),Ve(this,"mouseMove",null),Ve(this,"mouseUp",null),Ve(this,"resizeListener",null),Ve(this,"pathBuffer",[]);var o=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){o.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px")},window.addEventListener("resize",this.resizeListener,!0),this.mouseDown=function(e){e.preventDefault();var t=document.querySelector(".bb-capture-toolbar-item-colorpicker");t&&(t.style.display="none"),o.fadeOutToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseDownPen(e),"rect"===o.tool&&o.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseMovePen(e),"rect"===o.tool&&o.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),o.fadeInToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseUpPen(e),"rect"===o.tool&&o.mouseUpRect(e)},this.svgElement.addEventListener("mousedown",this.mouseDown),this.svgElement.addEventListener("mousemove",this.mouseMove),this.svgElement.addEventListener("mouseup",this.mouseUp),this.svgElement.addEventListener("touchstart",this.mouseDown,!1),this.svgElement.addEventListener("touchmove",this.mouseMove,!1),this.svgElement.addEventListener("touchend",this.mouseUp,!1),setTimeout((function(){n.rerender()}),100)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){if(this.svgElement)for(;this.svgElement.firstChild;)this.svgElement.firstChild.remove()}},{key:"destroy",value:function(){this.svgElement.removeEventListener("mousedown",this.mouseDown),this.svgElement.removeEventListener("mousemove",this.mouseMove),this.svgElement.removeEventListener("mouseup",this.mouseUp),this.svgElement.removeEventListener("touchstart",this.mouseDown),this.svgElement.removeEventListener("touchmove",this.mouseMove),this.svgElement.removeEventListener("touchend",this.mouseUp),window.removeEventListener("resize",this.resizeListener)}},{key:"mouseUpPen",value:function(){this.path&&(this.path=null)}},{key:"mouseUpRect",value:function(){this.path&&(this.path=null)}},{key:"mouseMovePen",value:function(e){this.path&&(this.appendToBuffer(this.getMousePosition(e)),this.updateSvgPath())}},{key:"mouseMoveRect",value:function(e){if(this.path){var t=this.getMousePosition(e),n=Math.abs(t.x-this.startPoint.x),o=Math.abs(t.y-this.startPoint.y),r=t.x,a=t.y;t.x>this.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",o)}}},{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 o=this.getMousePosition(e);this.appendToBuffer(o),this.strPath="M"+o.x+" "+o.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].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,o,r=0,a=0,i=0;for(o=e;o<t;o++)i++,r+=(n=this.buffer[o]).x,a+=n.y;return{x:r/i,y:a/i}}return null}},{key:"updateSvgPath",value:function(){var e=this.getAveragePoint(0);if(e){this.strPath+=" L"+e.x+" "+e.y;for(var t="",n=2;n<this.buffer.length;n+=2)t+=" L"+(e=this.getAveragePoint(n)).x+" "+e.y;this.path.setAttribute("d",this.strPath+t)}}},{key:"appendToBuffer",value:function(e){for(this.buffer.push(e);this.buffer.length>this.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")}}])&&Ge(t.prototype,n),o&&Ge(t,o),e}();function Ke(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Xe(this,"keys",{37:1,38:1,39:1,40:1}),Xe(this,"supportsPassive",!1),Xe(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),Xe(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),Xe(this,"scrollDisabled",!1);var t=this;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.supportsPassive=!0,t.wheelOpt=!!t.supportsPassive&&{passive:!1}}}))}catch(n){}}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"disableScroll",value:function(){var e=this.getInstance();e.scrollDisabled||(e.scrollDisabled=!0,window.addEventListener("DOMMouseScroll",e.preventDefault,!1),window.addEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.addEventListener("touchmove",e.preventDefault,e.wheelOpt),window.addEventListener("keydown",e.preventDefaultForScrollKeys,!1))}},{key:"enableScroll",value:function(){var e=this.getInstance();e.scrollDisabled&&(e.scrollDisabled=!1,window.removeEventListener("DOMMouseScroll",e.preventDefault,!1),window.removeEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.removeEventListener("touchmove",e.preventDefault,e.wheelOpt),window.removeEventListener("keydown",e.preventDefaultForScrollKeys,!1))}}],(n=[{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"preventDefaultForScrollKeys",value:function(e){if(this.keys&&this.keys[e.keyCode])return this.preventDefault(e),!1}}])&&Ke(t.prototype,n),o&&Ke(t,o),e}();function Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xe(Je,"instance",void 0);var $e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qe(this,"type","screenshot"),Qe(this,"dragCursor",null),Qe(this,"screenRecorder",null),Qe(this,"callback",null),Qe(this,"screenDrawer",null),Qe(this,"escListener",null),Qe(this,"pageLeaveListener",null),Qe(this,"overrideLanguage",Zt.getInstance().overrideLanguage),Qe(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(ae.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,o;return t=e,o=[{key:"setPenColor",value:function(e){for(var t=document.querySelectorAll(".bb-pen-tip"),n=0;n<t.length;n++)t[n].style.fill=e}}],(n=[{key:"hideWidgetUI",value:function(){var e=document.querySelector(".bb-feedback-button");e&&(e.style.display="none");var t=document.querySelector(".bb-feedback-dialog-container");t&&(t.style.display="none")}},{key:"showWidgetUI",value:function(){"screenshot"===this.type&&Je.enableScroll(),this.screenRecorder&&this.screenRecorder.stopScreenRecording(),this.unregisterListeners(),this.cleanupMousePointer(),this.screenDrawer&&this.screenDrawer.destroy();var e=document.querySelector(".bb-capture-toolbar");e&&e.remove();var t=document.querySelector(".bb-capture-svg");t&&t.classList.add("bb-capture-svg--preview");var n=document.querySelector(".bb-capture-preview");n&&n.remove();var o=document.querySelector(".bb-feedback-button");o&&(o.style.display="flex");var r=document.querySelector(".bb-feedback-dialog-container");r&&(r.style.display="block");var a=document.querySelector(".bb-capture-dismiss");a&&(a.style.display="none");var i=document.querySelector(".bb-capture-toolbar-item-colorpicker");i&&(i.style.display="none");var s=document.querySelector(".bb-capture-editor-borderlayer");s&&(s.style.display="none")}},{key:"clear",value:function(){var e=document.querySelector(".bb-capture-editor");e&&e.remove()}},{key:"setMouseMove",value:function(e,t){this.dragCursor&&(this.dragCursor.style.left="".concat(e+6,"px"),this.dragCursor.style.top="".concat(t-26,"px"),this.dragCursor.style.right=null)}},{key:"mouseMoveEventHandler",value:function(e){var t=e.clientX,n=e.clientY;this.setMouseMove(t,n)}},{key:"touchMoveEventHandler",value:function(e){var t=e.touches[0].clientX,n=e.touches[0].clientY;this.setMouseMove(t,n)}},{key:"setupMousePointer",value:function(){var e=this;this.dragCursor=document.querySelector(".bb-capture-editor-drag-info");var t=document.querySelector(".bb-capture-svg");t.addEventListener("mouseenter",(function(t){e.dragCursor.style.opacity=1})),t.addEventListener("mouseleave",(function(t){e.dragCursor.style.opacity=0})),document.documentElement.addEventListener("mousemove",this.mouseMoveEventHandler.bind(this)),document.documentElement.addEventListener("touchmove",this.touchMoveEventHandler.bind(this))}},{key:"cleanupMousePointer",value:function(){document.documentElement.removeEventListener("mousemove",this.mouseMoveEventHandler),document.documentElement.removeEventListener("touchmove",this.touchMoveEventHandler),this.dragCursor&&this.dragCursor.remove()}},{key:"createEditorUI",value:function(){var e=document.createElement("div");e.className="bb-capture-editor",e.innerHTML='\n <div class="bb-capture-editor-borderlayer"></div>\n <svg class="bb-capture-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve"></svg>\n <div class="bb-capture-dismiss">'.concat(d("dismiss"),"</div>\n <div class='bb-capture-editor-drag-info'>").concat(d("rect"),'</div>\n <div class="bb-capture-toolbar">\n ').concat("capture"===this.type?'<div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-recording" data-type="recording">\n '.concat(d("recorderon"),"\n ").concat(d("recorderoff"),'\n <span class="bb-tooltip bb-tooltip-screen-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-item-rec" data-type="mic">\n ').concat(d("mic"),'\n <span class="bb-tooltip bb-tooltip-audio-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item-timer bb-capture-item-rec">2:00</div>\n <div class="bb-capture-toolbar-item-spacer"></div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pointer">\n ').concat(d("pointer"),"\n </div>"):"",'\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool bb-capture-toolbar-item--active" data-type="rect">\n ').concat(d("rect"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pen">\n ').concat(d("pen"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="blur">\n ').concat(d("blur"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem" data-type="colorpicker">\n <div class="bb-capture-toolbar-item-selectedcolor"></div>\n <span class="bb-tooltip">').concat(nt.translateText("pickAColor"),'</span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="undo">\n ').concat(d("undo"),'\n <span class="bb-tooltip">').concat(nt.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(nt.translateText("next"),"</div>"):"",'\n </div>\n <div class="bb-capture-toolbar-item-colorpicker">\n <div class="bb-capture-toolbar-item-color" data-color="#EB144C"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FF6705"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FDB903"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#9900EE"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#00D082"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#0A93E4"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#CCCCCC"></div>\n </div>\n <div class="bb-capture-preview">\n <div class="bb-capture-preview-inner">\n <video controls muted autoplay></video>\n <div class="bb-capture-preview-buttons">\n <div class="bb-capture-preview-retrybutton">').concat(nt.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(nt.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",nt.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,o=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,o="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&o&&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?(Zt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Je.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new Ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),o=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),a=function(){var a=o[i],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))}},i=0;i<o.length;i++)a()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e=this;document.querySelector(".bb-capture-dismiss").onclick=function(){e.dismiss()};var t=document.querySelector(".bb-capture-button-next");t&&(t.onclick=this.showNextStep.bind(this));for(var n=document.querySelector(".bb-capture-toolbar-item-colorpicker"),o=document.querySelector(".bb-capture-svg"),r=function(t,n){for(var r=document.querySelectorAll(".bb-capture-toolbar-item-tool"),a=0;a<r.length;a++)r[a].classList.remove("bb-capture-toolbar-item--active");if(n.classList.add("bb-capture-toolbar-item--active"),e.screenDrawer.setTool(t),e.dragCursor.innerHTML="","pointer"===t)o.style.pointerEvents="none";else{o.style.pointerEvents="auto";try{var i=n.querySelector("svg").cloneNode(!0);i&&e.dragCursor&&e.dragCursor.appendChild(i)}catch(s){}}},a=document.querySelectorAll(".bb-capture-toolbar-item"),i=function(){var t=a[s];t.onclick=function(){var o=t.getAttribute("data-type");n&&"colorpicker"!==o&&(n.style.display="none"),"mic"===o&&e.screenRecorder.toggleAudio(),"recording"===o&&(e.screenRecorder.isRecording?e.screenRecorder.stopScreenRecording():(e.screenRecorder.startScreenRecording(),r("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==e.type||e.screenRecorder.isRecording)&&("pen"!==o&&"blur"!==o&&"rect"!==o&&"pointer"!==o||r(o,t),"colorpicker"===o&&("flex"===n.style.display?n.style.display="none":n.style.display="flex"),"undo"===o&&e.screenDrawer.removeLastAddedPathFromSvg())}},s=0;s<a.length;s++)i()}},{key:"captureScreenDrawerRerender",value:function(){if(this.screenDrawer)for(var e="bb-capture-editor-item-inactive",t=document.querySelectorAll(".bb-capture-toolbar-item"),n=0;n<t.length;n++){var o=t[n];switch(o.getAttribute("data-type")){case"undo":null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?o.classList.remove(e):o.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&Zt.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"),o=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),a=document.querySelector(".bb-capture-editor"),i="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(a.classList.add(i),a.classList.remove(s)):(a.classList.add(s),a.classList.remove(i));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;l<n.length;l++){var u=n[l];switch(u.getAttribute("data-type")){case"mic":this.screenRecorder.audioAvailable&&this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.audioMuted?(u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=nt.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),o.innerHTML=nt.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),o.innerHTML=nt.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),o.innerHTML=nt.translateText("browserNotSupported"))}}}}},{key:"setupScreenRecording",value:function(){var e=this;document.querySelector(".bb-capture-preview-sendbutton").onclick=this.showNextStep.bind(this),document.querySelector(".bb-capture-preview-retrybutton").onclick=function(){e.screenRecorder.clearPreview(),e.screenDrawer&&e.screenDrawer.clear()},this.screenRecorder=new Y(this.captureRenderer.bind(this),nt.translateText("accessToScreenSharingDenied"))}}])&&Ye(t.prototype,n),o&&Ye(t,o),e}();function et(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tt(this,"overrideLanguage",""),tt(this,"isRTLLayout",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=B.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=B.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),r.getInstance().updateFeedbackButtonState(),ae.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";return"undefined"!=typeof navigator&&(e=navigator.language.substring(0,2).toLowerCase()),this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&et(t.prototype,n),o&&et(t,o),e}();function ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tt(nt,"instance",void 0);var at=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),rt(this,"shortCutListener",void 0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){this.shortCutListener||(this.shortCutListener=document.addEventListener("keyup",(function(e){var t,n,o=(void 0!==(t=e).key?n=t.key:void 0!==t.keyIdentifier?n=t.keyIdentifier:void 0!==t.keyCode&&(n=t.keyCode),n);!e.ctrlKey||"u"!==o&&"U"!==o&&85!==o||Zt.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&ot(t.prototype,n),o&&ot(t,o),e}();function it(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function st(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rt(at,"instance",void 0);var ct=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),st(this,"formPreFill",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&it(t.prototype,n),o&&it(t,o),e}();function lt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}st(ct,"instance",void 0);var dt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ut(this,"notificationContainer",null),ut(this,"notifications",[]),ut(this,"unreadCount",0),ut(this,"unreadNotificationsKey","unread-notifications"),ut(this,"isTabActive",!0),ut(this,"showNotificationBadge",!0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"updateTabBarNotificationCount",value:function(){Se.notifyEvent("unread-count-changed",this.unreadCount)}},{key:"injectNotificationUI",value:function(){if(!this.notificationContainer){var e=document.createElement("div");e.className="gleap-notification-container gleap-font",document.body.appendChild(e),this.notificationContainer=e,this.updateContainerStyle(),this.reloadNotificationsFromCache()}}},{key:"reloadNotificationsFromCache",value:function(){var e=k(this.unreadNotificationsKey);e&&e.length>0&&(this.notifications=e,this.renderNotifications())}},{key:"setNotificationCount",value:function(e){ae.getInstance().isOpened()?(this.unreadCount=0,this.updateTabBarNotificationCount()):this.unreadCount=e,this.updateTabBarNotificationCount(),r.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),e.sound&&yt.ping()),this.notifications.length>3&&this.notifications.shift(),x(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=d("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[o];r=(r=t.data.text).replaceAll("{{name}}",E.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?Zt.openConversation(t.data.conversation.shareToken):t.data.news?Zt.openNewsArticle(t.data.news.id):t.data.checklist?Zt.openChecklist(t.data.checklist.id):Zt.open()},t.data.news?(n.className="gleap-notification-item-news",n.innerHTML='\n <div class="gleap-notification-item-news-container">\n '.concat(t.data.coverImageUrl&&""!==t.data.coverImageUrl&&!t.data.coverImageUrl.includes("NewsImagePlaceholder")?'<img class="gleap-notification-item-news-image" src="'.concat(t.data.coverImageUrl,'" />'):"",'\n <div class="gleap-notification-item-news-content">\n <div class="gleap-notification-item-news-content-title">').concat(r,"</div>\n ").concat(t.data.previewText&&t.data.previewText.length>0?'<div class="gleap-notification-item-news-preview">'.concat(t.data.previewText,"</div>"):"".concat(t.data.sender?'\n <div class="gleap-notification-item-news-sender">\n '.concat(t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />')," ").concat(t.data.sender.name,"</div>"):""),"\n </div>\n </div>")):t.data.checklist?((a=Math.round(t.data.currentStep/t.data.totalSteps*100))<100&&(a+=4),n.className="gleap-notification-item-checklist",n.innerHTML='\n <div class="gleap-notification-item-checklist-container">\n <div class="gleap-notification-item-checklist-content">\n <div class="gleap-notification-item-checklist-content-title">'.concat(t.data.text,'</div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(a,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")):(n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />'),'\n <div class="gleap-notification-item-container">\n ').concat(t.data.sender?'<div class="gleap-notification-item-sender">'.concat(t.data.sender.name,"</div>"):"",'\n <div class="gleap-notification-item-content">').concat(r,"</div>\n </div>")),e.notificationContainer.appendChild(n)},o=0;o<this.notifications.length;o++){var r,a;n()}}}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],x(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=B.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!==r.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==r.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===r.getInstance().buttonHidden?e.feedbackButtonPosition===r.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):r.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&lt(t.prototype,n),o&&lt(t,o),e}();function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ft(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ut(dt,"instance",void 0);var vt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),gt(this,"bannerUrl","https://outboundmedia.gleap.io"),gt(this,"bannerContainer",null),gt(this,"bannerData",null),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setBannerUrl",value:function(e){this.bannerUrl=e}},{key:"startCommunication",value:function(){var e=this;window.addEventListener("message",(function(t){if(t.origin===e.bannerUrl)try{var n,o,r,a,i,s,c,l,u=JSON.parse(t.data);"banner-loaded"===u.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===u.name&&document.documentElement.style.setProperty("--gleap-margin-top",u.data.height+"px"),"banner-data-set"===u.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(n=e.bannerData)||void 0===n?void 0:n.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===u.name&&e.removeBannerUI(),"start-conversation"===u.name&&Zt.startBot(null===(o=u.data)||void 0===o?void 0:o.botId),"start-custom-action"===u.name&&Zt.triggerCustomAction(null===(r=u.data)||void 0===r?void 0:r.action),"show-form"===u.name&&Zt.startFeedbackFlow(null===(a=u.data)||void 0===a?void 0:a.formId),"show-survey"===u.name&&Zt.showSurvey(null===(i=u.data)||void 0===i?void 0:i.formId,null===(s=u.data)||void 0===s?void 0:s.surveyFormat),"show-news-article"===u.name&&Zt.openNewsArticle(null===(c=u.data)||void 0===c?void 0:c.articleId),"show-help-article"===u.name&&Zt.openHelpCenterArticle(null===(l=u.data)||void 0===l?void 0:l.articleId)}catch(d){}}))}},{key:"removeBannerUI",value:function(){this.bannerContainer&&(document.body.removeChild(this.bannerContainer),this.bannerContainer=null),document.body.classList.remove("gleap-b-shown"),document.body.classList.remove("gleap-b-f")}},{key:"injectBannerUI",value:function(e){if(this.bannerContainer||!document.body)return!1;this.bannerData=e;var t=document.createElement("div");t.className="gleap-b",t.innerHTML='<iframe src="'.concat(this.bannerUrl,'" class="gleap-b-frame" scrolling="no" title="Gleap Banner" role="dialog" frameborder="0"></iframe>'),document.body.appendChild(t),this.bannerContainer=t}},{key:"sendMessage",value:function(e){try{var t=document.querySelector(".gleap-b-frame");t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(ht(ht({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&ft(t.prototype,n),o&&ft(t,o),e}();function mt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}gt(vt,"instance",void 0);var yt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"playSound",value:function(e){this.settings.play=e}},{key:"ping",value:function(){try{if(!this.settings.play)return;this.audio||(this.audio=new Audio("https://js.gleap.io/res/ping.mp3"));var e=this.audio.play();void 0!==e&&e.then((function(e){})).catch((function(e){}))}catch(t){}}}],(n=null)&&mt(t.prototype,n),o&&mt(t,o),e}();function wt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bt(yt,"audio",void 0),bt(yt,"settings",{play:!0});var xt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kt(this,"tags",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getTags",value:function(){return this.tags}},{key:"setTags",value:function(e){this.tags=e}}])&&wt(t.prototype,n),o&&wt(t,o),e}();function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kt(xt,"instance",void 0);var Tt=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Lt(this,"libraryInstance",null),Lt(this,"lastUrl",void 0),Lt(this,"injectedFrame",!1),Lt(this,"gleapFrameContainer",null),Lt(this,"gleapCollapseUI",null),Lt(this,"injectedCollapseUI",!1),Lt(this,"gleapFrame",null),Lt(this,"configData",null),Lt(this,"status","navigate"),Lt(this,"toggleCollapseUI",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n="gleap-admin-collapse-ui-active",o="gleap-admin-frame-container-active",r=function(e,t){return e&&e.classList.contains(t)};(!e||r(t.gleapCollapseUI,n)&&r(t.gleapFrameContainer,o))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(n),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(o))})),Lt(this,"injectCollapseUI",(function(){if(!t.injectedCollapseUI){t.injectedCollapseUI=!0;var e=document.createElement("div");e.className="gleap-admin-collapse-ui",e.innerHTML='<div class="gleap-admin-collapse-ui-icon">\n '.concat(d("arrowdown"),"\n </div>"),document.body.appendChild(e),t.gleapCollapseUI=e,e.addEventListener("click",(function(){t.toggleCollapseUI()}))}})),Lt(this,"injectFrame",(function(){if(!t.injectedFrame){t.injectedFrame=!0;var e=document.createElement("div");e.className="gleap-admin-frame-container",e.innerHTML='<iframe src="https://app.gleap.io/producttourbuilder" class="gleap-admin-frame" scrolling="no" title="Gleap Admin Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>',document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-admin-frame")}}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.sendMessageToTourBuilder({name:"page-changed",data:{page:e}}))}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"loadScript",value:function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=function(){"function"==typeof t&&t()},n.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||n.onload()},document.head.appendChild(n)}},{key:"loadAdminScript",value:function(){var e=this;this.loadScript("https://jsadminhelper.gleap.io/index.js",(function(){window.GleapHelper&&(e.libraryInstance=new window.GleapHelper.default,e.libraryInstance&&(e.libraryInstance.onElementPicked=function(t){e.toggleCollapseUI(!0),e.sendMessageToTourBuilder({name:"element-picked",data:{selector:t}})},e.injectFrame(),e.injectCollapseUI(),e.setFrameHeight("loading")))}))}},{key:"setFrameHeight",value:function(e){if(this.gleapFrameContainer){var t="";t="picker"===e||"navigate"===e?"65px":"editor"===e?"100vh":"0px",this.gleapFrameContainer.style.height=t}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!window.gleapAdminDisabled){var t=this;window.addEventListener("message",(function(n){if(n.origin&&"https://app.gleap.io"!==!n.origin)try{var o=JSON.parse(n.data);if("admin"===o.type&&"load"===o.name&&(t.configData=o.data,t.loadAdminScript()),"tourbuilder"===o.type){if("loaddata"===o.name&&e.sendMessageToTourBuilder({name:"data",data:t.configData}),"save"===o.name&&e.sendMessage({name:"save",data:o.data}),"click"===o.name)try{document.querySelector(o.data.selector).click()}catch(r){console.log(r)}"status-changed"===o.name&&(t.status=o.data,e.setFrameHeight(t.status),t.libraryInstance.stopPicker(),"picker"===t.status&&t.libraryInstance.startPicker())}}catch(a){}})),this.sendMessage({name:"init"}),this.startPageListener()}}},{key:"sendMessage",value:function(e){try{window&&window.opener&&window.opener.postMessage(JSON.stringify(St(St({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify(St(St({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&It(t.prototype,n),o&&It(t,o),e}();function Ot(e){return function(e){if(Array.isArray(e))return Mt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Mt(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 Mt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lt(Tt,"instance",void 0);const Dt=function(){var e={};function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=Rt({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},t)}function n(t){return t?e[t]:e}function o(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function r(e){var t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap((function(e){var n=e.matches(t),o=Array.from(e.querySelectorAll(t));return[].concat(Ot(n?[e]:[]),Ot(o))})).filter((function(e){return"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)}))}function a(e){if(e&&!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)){var t=n("smoothScroll");e.scrollIntoView({behavior:!t||i(e)?"auto":"smooth",inline:"center",block:"center"})}}function i(e){if(e&&e.parentElement){var t=e.parentElement;return t.scrollHeight>t.clientHeight}}var s={};function c(e,t){s[e]=t}function l(e){return e?s[e]:s}function u(){s={}}var d={};function p(e,t){d[e]=t}function h(e){var t;null==(t=d[e])||t.call(d)}function f(){d={}}function g(e){if(e){var t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};c("__activeStagePosition",n),m(n)}}function v(e){var t=function(e){var t=window.innerWidth,o=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),r.setAttribute("viewBox","0 0 ".concat(t," ").concat(o)),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",b(e)),a.style.fill=n("overlayColor")||"rgb(0,0,0)",a.style.opacity="".concat(n("overlayOpacity")),a.style.pointerEvents="auto",a.style.cursor="auto",r.appendChild(a),r}(e);document.body.appendChild(t),L(t,(function(e){"path"===e.target.tagName&&h("overlayClick")})),c("__overlaySvg",t)}function m(e){var t=l("__overlaySvg");if(t){var n=t.firstElementChild;if("path"!==(null==n?void 0:n.tagName))throw new Error("no path element found in stage svg");n.setAttribute("d",b(e))}else v(e)}function b(e){var t=window.innerWidth,o=window.innerHeight,r=n("stagePadding")||0,a=n("stageRadius")||0,i=e.width+2*r,s=e.height+2*r,c=Math.min(a,i/2,s/2),l=Math.floor(Math.max(c,0)),u=e.x-r+l,d=e.y-r,p=i-2*l,h=s-2*l;return"M".concat(t,",0L0,0L0,").concat(o,"L").concat(t,",").concat(o,"L").concat(t,",0Z\n M").concat(u,",").concat(d," h").concat(p," a").concat(l,",").concat(l," 0 0 1 ").concat(l,",").concat(l," v").concat(h," a").concat(l,",").concat(l," 0 0 1 -").concat(l,",").concat(l," h-").concat(p," a").concat(l,",").concat(l," 0 0 1 -").concat(l,",-").concat(l," v-").concat(h," a").concat(l,",").concat(l," 0 0 1 ").concat(l,",-").concat(l," z")}function y(){var e=l("__overlaySvg");e&&e.remove()}function w(e){var t=e.element,r="string"==typeof t?document.querySelector(t):t;r||(r=function(){var e=document.getElementById("gleap-tour-dummy-element");if(e)return e;var t=document.createElement("div");return t.id="gleap-tour-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t){var r,i,s=400,u=Date.now(),d=l("__activeStep"),p=l("__activeElement")||e,h=!p||p===e,f="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===p.id,b=n("animate"),y=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),k=(null==d?void 0:d.onDeselected)||n("onDeselected"),x=n(),C=l();!h&&k&&k(v?void 0:p,d,{config:x,state:C});y&&y(f?void 0:e,t,{config:x,state:C});var S=!h&&b,I=!1;(function(){var e=l("popover");if(!e)return;e.wrapper.style.display="none"})(),c("previousStep",d),c("previousElement",p),c("activeStep",t),c("activeElement",e);var L=function r(){if(l("__transitionCallback")===r){var a=Date.now()-u,i=s-a<=s/2;t.popover&&i&&!I&&S&&(M(e,t),I=!0),n("animate")&&a<s?function(e,t,n,r){var a=l("__activeStagePosition"),i=a||n.getBoundingClientRect(),s=r.getBoundingClientRect();m(a={x:o(e,i.x,s.x-i.x,t),y:o(e,i.y,s.y-i.y,t),width:o(e,i.width,s.width-i.width,t),height:o(e,i.height,s.height-i.height,t)}),c("__activeStagePosition",a)}(a,s,p,e):(g(e),w&&w(f?void 0:e,t,{config:n(),state:l()}),c("__transitionCallback",void 0),c("__previousStep",d),c("__previousElement",p),c("__activeStep",t),c("__activeElement",e)),window.requestAnimationFrame(r)}};c("__transitionCallback",L),window.requestAnimationFrame(L),a(e),!S&&t.popover&&M(e,t);p.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),p.removeAttribute("aria-haspopup"),p.removeAttribute("aria-expanded"),p.removeAttribute("aria-controls"),null!==(r=null!==(i=t.disableActiveInteraction)&&void 0!==i?i:n("disableActiveInteraction"))&&void 0!==r&&r&&e.classList.add("gleap-tour-no-interaction");e.classList.add("gleap-tour-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","gleap-tour-popover-content")}(r,e)}function k(){var e=l("__activeElement"),t=l("__activeStep");e&&(g(e),function(){var e=l("__activeStagePosition"),t=l("__overlaySvg");if(e)if(t){var n=window.innerWidth,o=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(o))}else console.warn("No stage svg found.")}(),D(e,t))}function x(){var e;null==(e=document.getElementById("gleap-tour-dummy-element"))||e.remove(),document.querySelectorAll(".gleap-tour-active-element").forEach((function(e){e.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}))}function C(){var e=l("__resizeTimeout");e&&window.cancelAnimationFrame(e),c("__resizeTimeout",window.requestAnimationFrame(k))}function S(e){var t;if(l("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=l("__activeElement"),o=null==(t=l("popover"))?void 0:t.wrapper,a=r([].concat(Ot(o?[o]:[]),Ot(n?[n]:[]))),i=a[0],s=a[a.length-1];if(e.preventDefault(),e.shiftKey){var c=a[a.indexOf(document.activeElement)-1]||s;null==c||c.focus()}else{var u=a[a.indexOf(document.activeElement)+1]||i;null==u||u.focus()}}}function I(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?h("escapePress"):"ArrowRight"===e.key?h("arrowRightPress"):"ArrowLeft"===e.key&&h("arrowLeftPress"))}function L(e,t,n){var o=function(t,o){var r=t.target;e.contains(r)&&(n&&!n(r)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==o||o(t))},r=!0;document.addEventListener("pointerdown",o,r),document.addEventListener("mousedown",o,r),document.addEventListener("pointerup",o,r),document.addEventListener("mouseup",o,r),document.addEventListener("click",(function(e){o(e,t)}),r)}function T(){window.addEventListener("keyup",I,!1),window.addEventListener("keydown",S,!1),window.addEventListener("resize",C),window.addEventListener("scroll",C)}function O(){window.removeEventListener("keyup",I),window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}function M(e,t){var o,i,s=l("popover");s&&document.body.removeChild(s.wrapper),s=function(){var e=document.createElement("div");e.classList.add("gleap-tour-popover");var t=document.createElement("div");t.classList.add("gleap-tour-popover-arrow");var n=document.createElement("header");n.id="gleap-tour-popover-title",n.classList.add("gleap-tour-popover-title"),n.style.display="none",n.innerText="Popover Title";var o=document.createElement("div");o.id="gleap-tour-popover-description",o.classList.add("gleap-tour-popover-description"),o.style.display="none",o.innerText="Popover description is here";var r=document.createElement("button");r.type="button",r.classList.add("gleap-tour-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";var a=document.createElement("footer");a.classList.add("gleap-tour-popover-footer");var i=document.createElement("span");i.classList.add("gleap-tour-popover-progress-text"),i.innerText="";var s=document.createElement("span");s.classList.add("gleap-tour-popover-navigation-btns");var c=document.createElement("button");c.type="button",c.classList.add("gleap-tour-popover-prev-btn"),c.innerHTML="&larr; Previous";var l=document.createElement("button");return l.type="button",l.classList.add("gleap-tour-popover-next-btn"),l.innerHTML="Next &rarr;",s.appendChild(c),s.appendChild(l),a.appendChild(i),a.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(a),{wrapper:e,arrow:t,title:n,description:o,footer:a,previousButton:c,nextButton:l,closeButton:r,footerButtons:s,progress:i}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},d=u.title,p=u.description,f=u.showButtons,g=u.disableButtons,v=u.showProgress,m=u.nextBtnText,b=void 0===m?n("nextBtnText")||"Next":m,y=u.prevBtnText,w=void 0===y?n("prevBtnText")||"Previous":y,k=u.progressText,x=void 0===k?n("progressText")||"{current} of {total}":k;s.nextButton.innerHTML=b,s.previousButton.innerHTML=w,s.progress.innerHTML=x,d?(s.title.innerHTML=d,s.title.style.display="block"):s.title.style.display="none",p?(s.description.innerHTML=p,s.description.style.display="block"):s.description.style.display="none";var C=f||n("showButtons"),S=v||n("showProgress")||!1,I=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||S;s.closeButton.style.display=C.includes("close")?"block":"none",I?(s.footer.style.display="flex",s.progress.style.display=S?"block":"none",s.nextButton.style.display=C.includes("next")?"block":"none",s.previousButton.style.display=C.includes("previous")?"block":"none"):s.footer.style.display="none";var T=g||n("disableButtons")||[];(null==T?void 0:T.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var O=s.wrapper;O.style.display="block",O.style.left="",O.style.top="",O.style.bottom="",O.style.right="",O.id="gleap-tour-popover-content",O.setAttribute("role","dialog"),O.setAttribute("aria-labelledby","gleap-tour-popover-title"),O.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var M=(null==(o=t.popover)?void 0:o.popoverClass)||n("popoverClass")||"";O.className="gleap-tour-popover ".concat(M).trim(),L(s.wrapper,(function(o){var r,a,i,s=o.target,c=(null==(r=t.popover)?void 0:r.onNextClick)||n("onNextClick"),u=(null==(a=t.popover)?void 0:a.onPrevClick)||n("onPrevClick"),d=(null==(i=t.popover)?void 0:i.onCloseClick)||n("onCloseClick");return s.classList.contains("gleap-tour-popover-next-btn")?c?c(e,t,{config:n(),state:l()}):h("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:l()}):h("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?d?d(e,t,{config:n(),state:l()}):h("closeClick"):void 0}),(function(e){return!(null==s?void 0:s.description.contains(e))&&!(null==s?void 0:s.title.contains(e))&&"string"==typeof e.className&&e.className.includes("gleap-tour-popover")})),c("popover",s);var E=(null==(i=t.popover)?void 0:i.onPopoverRender)||n("onPopoverRender");E&&E(s,{config:n(),state:l()}),D(e,t),a(O);var R=e.classList.contains("gleap-tour-dummy-element"),A=r([O].concat(Ot(R?[]:[e])));A.length>0&&A[0].focus()}function E(){var e=l("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),o=n("stagePadding")||0,r=n("popoverOffset")||0;return{width:t.width+o+r,height:t.height+o+r,realWidth:t.width,realHeight:t.height}}}function R(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,a=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-o.realHeight-a.width),a.width):"end"===e?Math.max(Math.min(n.top-(null==o?void 0:o.realHeight)+n.height+r,window.innerHeight-(null==o?void 0:o.realHeight)-a.width),a.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==o?void 0:o.realHeight)/2,window.innerHeight-(null==o?void 0:o.realHeight)-a.width),a.width):0}function A(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,a=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-o.realWidth-a.width),a.width):"end"===e?Math.max(Math.min(n.left-(null==o?void 0:o.realWidth)+n.width+r,window.innerWidth-(null==o?void 0:o.realWidth)-a.width),a.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==o?void 0:o.realWidth)/2,window.innerWidth-(null==o?void 0:o.realWidth)-a.width),a.width):0}function D(e,t){var o=l("popover");if(o){var r=(null==t?void 0:t.popover)||{},a=r.align,i=void 0===a?"start":a,s=r.side,c=void 0===s?"left":s,u=i,d="gleap-tour-dummy-element"===e.id?"over":c,p=n("stagePadding")||0,h=E(),f=o.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),v=g.top-h.height,m=v>=0,b=window.innerHeight-(g.bottom+h.height),y=b>=0,w=g.left-h.width,k=w>=0,x=window.innerWidth-(g.right+h.width),C=x>=0,S=!(m||y||k||C),I=d;if("top"===d&&m?C=k=y=!1:"bottom"===d&&y?C=k=m=!1:"left"===d&&k?C=m=y=!1:"right"===d&&C&&(k=m=y=!1),"over"===d){var L=window.innerWidth/2-h.realWidth/2,T=window.innerHeight/2-h.realHeight/2;o.wrapper.style.left="".concat(L,"px"),o.wrapper.style.right="auto",o.wrapper.style.top="".concat(T,"px"),o.wrapper.style.bottom="auto"}else if(S){var O=window.innerWidth/2-(null==h?void 0:h.realWidth)/2;o.wrapper.style.left="".concat(O,"px"),o.wrapper.style.right="auto",o.wrapper.style.bottom="".concat(10,"px"),o.wrapper.style.top="auto"}else if(k){var M=Math.min(w,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),D=R(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.left="".concat(M,"px"),o.wrapper.style.top="".concat(D,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="left"}else if(C){var N=Math.min(x,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),P=R(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.right="".concat(N,"px"),o.wrapper.style.top="".concat(P,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.left="auto",I="right"}else if(m){var F=Math.min(v,window.innerHeight-h.realHeight-f.width),B=A(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.top="".concat(F,"px"),o.wrapper.style.left="".concat(B,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="top"}else if(y){var j=Math.min(b,window.innerHeight-(null==h?void 0:h.realHeight)-f.width),_=A(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});o.wrapper.style.left="".concat(_,"px"),o.wrapper.style.bottom="".concat(j,"px"),o.wrapper.style.top="auto",o.wrapper.style.right="auto",I="bottom"}S?o.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var o=l("popover");if(!o)return;var r=n.getBoundingClientRect(),a=E(),i=o.arrow,s=a.width,c=window.innerWidth,u=r.width,d=r.left,p=a.height,h=window.innerHeight,f=r.top,g=r.height;i.className="gleap-tour-popover-arrow";var v=t,m=e;"top"===t?(d+u<=0?(v="right",m="end"):d+u-s<=0&&(v="top",m="start"),d>=c?(v="left",m="end"):d+s>=c&&(v="top",m="end")):"bottom"===t?(d+u<=0?(v="right",m="start"):d+u-s<=0&&(v="bottom",m="start"),d>=c?(v="left",m="start"):d+s>=c&&(v="bottom",m="end")):"left"===t?(f+g<=0?(v="bottom",m="end"):f+g-p<=0&&(v="left",m="start"),f>=h?(v="top",m="end"):f+p>=h&&(v="left",m="end")):"right"===t&&(f+g<=0?(v="bottom",m="start"):f+g-p<=0&&(v="right",m="start"),f>=h?(v="top",m="start"):f+p>=h&&(v="right",m="end"));v?(i.classList.add("gleap-tour-popover-arrow-side-".concat(v)),i.classList.add("gleap-tour-popover-arrow-align-".concat(m))):i.classList.add("gleap-tour-popover-arrow-none")}(u,I,e)}}function N(){var e,t=l("popover");t&&(null==(e=t.wrapper.parentElement)||e.removeChild(t.wrapper))}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function o(){n("allowClose")&&v()}function r(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e+1;t[o]?g(o):v()}}function a(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e-1;t[o]?g(o):v()}}function i(e){(n("steps")||[])[e]?g(e):v()}function s(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),o=l("__activeStep"),r=l("__activeElement");if(void 0!==t&&void 0!==o)if(void 0!==l("activeIndex")){var i=(null==(e=o.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(i)return i(r,o,{config:n(),state:l()});a()}}}function d(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),o=l("__activeStep"),a=l("__activeElement");if(void 0!==t&&void 0!==o){var i=(null==(e=o.popover)?void 0:e.onNextClick)||n("onNextClick");if(i)return i(a,o,{config:n(),state:l()});r()}}}function h(){l("isInitialized")||(c("isInitialized",!0),document.body.classList.add("gleap-tour-active",n("animate")?"gleap-tour-fade":"gleap-tour-simple"),T(),p("overlayClick",o),p("escapePress",o),p("arrowLeftPress",s),p("arrowRightPress",d))}function g(){var e,t,o,r,a,i,s,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,d=n("steps");if(!d)return console.error("No steps to drive through"),void v();if(d[u]){c("__activeOnDestroyed",document.activeElement),c("activeIndex",u);var p=d[u],h=d[u+1],f=d[u-1],m=(null==(e=p.popover)?void 0:e.doneBtnText)||n("doneBtnText")||"Done",b=n("allowClose"),y=void 0!==(null==(t=p.popover)?void 0:t.showProgress)?null==(o=p.popover)?void 0:o.showProgress:n("showProgress"),k=(null==(r=p.popover)?void 0:r.progressText)||n("progressText")||"{{current}} of {{total}}",x=k.replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(d.length)),C=(null==(a=p.popover)?void 0:a.showButtons)||n("showButtons"),S=["next","previous"].concat(Ot(b?["close"]:[])).filter((function(e){return!(null==C?void 0:C.length)||C.includes(e)})),I=(null==(i=p.popover)?void 0:i.onNextClick)||n("onNextClick"),L=(null==(s=p.popover)?void 0:s.onPrevClick)||n("onPrevClick"),T=(null==(l=p.popover)?void 0:l.onCloseClick)||n("onCloseClick");w(Rt(Rt({},p),{},{popover:Rt({showButtons:S,nextBtnText:h?void 0:m,disableButtons:Ot(f?[]:["previous"]),showProgress:y,progressText:x,onNextClick:I||function(){h?g(u+1):v()},onPrevClick:L||function(){g(u-1)},onCloseClick:T||function(){v()}},(null==p?void 0:p.popover)||{})}))}else v()}function v(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=l("__activeElement"),o=l("__activeStep"),r=l("__activeOnDestroyed"),a=n("onDestroyStarted");if(e&&a){var i=!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id);a(i?void 0:t,o,{config:n(),state:l()})}else{var s=(null==o?void 0:o.onDeselected)||n("onDeselected"),c=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),O(),N(),x(),y(),f(),u(),t&&o){var d="gleap-tour-dummy-element"===t.id;s&&s(d?void 0:t,o,{config:n(),state:l()}),c&&c(d?void 0:t,o,{config:n(),state:l()})}r&&r.focus()}}return t(e),{isActive:function(){return l("isInitialized")||!1},refresh:C,drive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;h(),g(e)},setConfig:t,setSteps:function(e){u(),t(Rt(Rt({},n()),{},{steps:e}))},getConfig:n,getState:l,getActiveIndex:function(){return l("activeIndex")},isFirstStep:function(){return 0===l("activeIndex")},isLastStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&t===e.length-1},getActiveStep:function(){return l("activeStep")},getActiveElement:function(){return l("activeElement")},getPreviousElement:function(){return l("previousElement")},getPreviousStep:function(){return l("previousStep")},moveNext:r,movePrevious:a,moveTo:i,hasNextStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t+1]},hasPreviousStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t-1]},highlight:function(e){h(),w(Rt(Rt({},e),{},{popover:e.popover?Rt({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){v(!1)}}}}();function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){Bt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Bt(this,"productTourData",void 0),Bt(this,"productTourId",void 0),Bt(this,"onCompletion",void 0),Bt(this,"unmuted",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"startWithConfig",value:function(e,t,n){return this.productTourId=e,this.productTourData=t,this.onCompletion=n,this.start()}},{key:"start",value:function(){var e,t=this.productTourData;if(t){this.unmuted=!1;for(var n=t.steps,o=this,r=[],a=0;a<n.length;a++){var i=n[a],s="CLICK"===i.mode,c="",l=!1;if("video-pointer"===i.type)c='<div class="gleap-tour-video">\n <video class="gleap-tour-video-obj" muted autoplay>\n <source src="'.concat(i.videoUrl,'" type="video/mp4">\n </video>\n <div class="gleap-tour-video-playpause">').concat(d("unmute"),"</div>\n </div>");else{var u="";t.sender&&t.sender.firstName&&(l=!0,u='<div class="gleap-tour-sender">\n <div class="gleap-tour-sender-image" style="background-image: url(\''.concat(t.sender.profileImageUrl,'\');"></div>\n <div class="gleap-tour-sender-name">').concat(t.sender.firstName,"</div>\n </div>")),c="".concat(u,'<div class="gleap-tour-message">').concat(i.message,"</div>")}var p={disableActiveInteraction:!s,popover:Pt({description:c,popoverClass:"gleap-tour-popover-".concat(i.type," ").concat(!l&&"gleap-tour-popover-no-sender"," ").concat(t.allowClose&&"gleap-tour-popover-can-close")},s?{showButtons:[]}:{})};i.selector&&i.selector.length>0&&(p.element=i.selector),r.push(p)}var h=["next","close"];t.backButton&&h.push("previous");var f=Dt((Bt(e={showProgress:!0,steps:r},"showProgress",n.length>1),Bt(e,"allowClose",t.allowClose),Bt(e,"nextBtnText",t.nextText),Bt(e,"doneBtnText",t.doneText),Bt(e,"prevBtnText",t.prevText),Bt(e,"showButtons",h),Bt(e,"onDestroyStarted",(function(){f.hasNextStep()?f.destroy():(f.destroy(),o.onCompletion&&o.onCompletion({tourId:o.productTourId})),document.removeEventListener("click",g)})),Bt(e,"onPopoverRender",(function(e){e&&function(){for(var e=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),t=function(){setTimeout((function(){f.refresh()}),500),setTimeout((function(){f.refresh()}),750)},n=0;n<e.length;n++){var o=e[n];"IMG"===o.tagName?(o.addEventListener("load",(function(){t()})),o.addEventListener("error",(function(){t()}))):"VIDEO"===o.tagName&&(o.addEventListener("canplaythrough",(function(){t()})),o.addEventListener("error",(function(){t()})))}}();var t="gleap-tour-video--playing",n=document.querySelector(".gleap-tour-video-obj");if(n){var r=n.closest(".gleap-tour-video");o.unmuted&&n&&(n.pause(),n.muted=!1,n.play(),r.classList.add(t)),n.addEventListener("ended",(function(){a.innerHTML=d("replay"),r.classList.remove(t)}));var a=document.querySelector(".gleap-tour-video-playpause");a&&a.addEventListener("click",(function(){n.muted?(o.unmuted=!0,n.pause(),n.currentTime=0,n.muted=!1,n.play(),a.innerHTML=d("mute"),r.classList.add(t)):n.paused?(n.muted=!1,n.play(),a.innerHTML=d("mute"),r.classList.add(t)):(n.pause(),a.innerHTML=d("unmute"),r.classList.remove(t))}))}})),e));f.drive(),document.addEventListener("click",g)}function g(e){document.querySelector(".gleap-tour-popover").contains(e.target)||f.moveNext()}}}])&&Ft(t.prototype,n),o&&Ft(t,o),e}();function _t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bt(jt,"instance",void 0),"undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype&&void 0===HTMLCanvasElement.prototype.__originalGetContext&&(HTMLCanvasElement.prototype.__originalGetContext=HTMLCanvasElement.prototype.getContext,HTMLCanvasElement.prototype.getContext=function(e,t){return this.__originalGetContext(e,qt(qt({},t),{},{preserveDrawingBuffer:!0}))});var Wt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ht(this,"initialized",!1),Ht(this,"offlineMode",!1),Ht(this,"disablePageTracking",!1),Ht(this,"disableInAppNotifications",!1),Ht(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(ce.getInstance(),he.getInstance().start(),be.getInstance().start(),Tt.getInstance().start())}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){ce.getInstance().environment=e}},{key:"setTags",value:function(e){xt.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){ae.getInstance().setUrlHandler(e)}},{key:"setOfflineMode",value:function(e){this.getInstance().offlineMode=e}},{key:"setDisableInAppNotifications",value:function(e){this.getInstance().disableInAppNotifications=e}},{key:"setDisablePageTracking",value:function(e){this.getInstance().disablePageTracking=e}},{key:"disableConsoleLogOverwrite",value:function(){he.getInstance().stop()}},{key:"attachNetworkLogs",value:function(e){v.getInstance().externalRequests=b(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";he.getInstance().addLog(e,t)}},{key:"initialize",value:function(t){var n=this.getInstance();if(n.initialized)console.warn("Gleap already initialized.");else{n.initialized=!0;var o=E.getInstance();o.sdkKey=t,o.setOnSessionReady((function(){setTimeout((function(){B.getInstance().start().then((function(){D.getInstance().start(),I((function(){r.getInstance().injectFeedbackButton(),dt.getInstance().injectNotificationUI(),e.checkForUrlParams(),Se.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),o.startSession()}}},{key:"checkForUrlParams",value:function(){if("undefined"!=typeof window&&window.location.search)try{var t=new URLSearchParams(window.location.search),n=t.get("gleap_feedback");n&&n.length>0&&e.startFeedbackFlow(n);var o=t.get("gleap_survey"),r=t.get("gleap_survey_format");o&&o.length>0&&e.showSurvey(o,"survey_full"===r?"survey_full":"survey");var a=t.get("gleap_tour");if(a&&a.length>0){var i=parseInt(t.get("gleap_tour_delay"));isNaN(i)&&(i=4),setTimeout((function(){e.startProductTour(a)}),1e3*i)}}catch(s){}}},{key:"destroy",value:function(){ze.getInstance().stop(),D.getInstance().stop(),ae.getInstance().destroy(),r.getInstance().toggleFeedbackButton(!1),dt.getInstance().clearAllNotifications(!0),E.getInstance().clearSession(0,!1),vt.getInstance().removeBannerUI()}},{key:"closeBanner",value:function(){vt.getInstance().removeBannerUI()}},{key:"setUseCookies",value:function(e){E.getInstance().useCookies=e}},{key:"identify",value:function(e,t,n){return E.getInstance().identifySession(e,b(t),n)}},{key:"updateContact",value:function(e){return E.getInstance().updateSession(b(e))}},{key:"clearIdentity",value:function(){E.getInstance().clearSession()}},{key:"getIdentity",value:function(){return E.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=E.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ae.getInstance().isOpened()}},{key:"hide",value:function(){ae.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){v.getInstance().setMaxRequests(e)}},{key:"startNetworkLogger",value:function(){v.getInstance().start()}},{key:"setNetworkLoggerBlacklist",value:function(e){v.getInstance().setBlacklist(e)}},{key:"setNetworkLoggerFilters",value:function(e){v.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){ze.getInstance().setOptions(e)}},{key:"close",value:function(){ae.getInstance().hideWidget()}},{key:"open",value:function(){ae.getInstance().setAppMode("widget"),ae.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){D.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){D.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);ct.getInstance().formPreFill=t,ae.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Se.on(e,t)}},{key:"enableShortcuts",value:function(e){e?at.getInstance().start():at.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){r.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ce.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ce.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){E.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){E.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){vt.getInstance().setBannerUrl(e)}},{key:"setFrameUrl",value:function(e){ae.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"playSound",value:function(e){yt.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=dt.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){nt.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:r.FEEDBACK_BUTTON_BOTTOM_LEFT;I((function(){u(e,t,n,a,o,i,s,c)}))}},{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",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,o)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=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=o?b(o):{},a=E.getInstance();if(a.ready){var i=e||{};a.session.email&&(i.reportedBy=a.session.email);var s=new ee("CRASH",n,i,!0,r);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"survey";e.startFeedbackFlowWithOptions(t,{hideBackButton:!0,format:n},!0)}},{key:"startClassicForm",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{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]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.autostartDrawing,a=n.hideBackButton,i=n.format,s=E.getInstance();if(s.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var c="start-feedbackflow";o&&(c="start-survey"),ae.getInstance().setAppMode(o?i:"widget"),ae.getInstance().sendMessage({name:c,data:{flow:t,hideBackButton:a,format:i}},!0),r?ae.getInstance().showDrawingScreen("screenshot"):ae.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"startConversation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.startBot("",t)}},{key:"startBot",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),ae.getInstance().showWidget()}},{key:"openHelpCenterCollection",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openChecklists",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-checklists",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"startChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!!e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"start-checklist",data:{outboundId:e,hideBackButton:!t}},!0),ae.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),ae.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ae.getInstance().setAppMode("widget"),ae.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ae.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=this;E.getInstance().startProductTourConfig(e).then((function(n){t.startProductTourWithConfig(e,n)})).catch((function(e){}))}},{key:"startProductTourWithConfig",value:function(t,n){jt.getInstance().startWithConfig(t,n,(function(t){var n={tourId:t.tourId};Se.notifyEvent("productTourCompleted",n),e.trackEvent("tour-".concat(t.tourId,"-completed"),n)}))}},{key:"showBanner",value:function(e){try{vt.getInstance().showBanner(e)}catch(t){}}},{key:"showNotification",value:function(e){dt.getInstance().showNotification(e)}}],(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(){ae.getInstance().destroy(),B.getInstance().start().then((function(){r.getInstance().refresh(),dt.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n<t.length;n++){var o=t[n];o&&o.actionType&&("notification"===o.actionType?this.disableInAppNotifications||e.showNotification(o):"banner"===o.actionType?e.showBanner(o):"tour"===o.actionType?e.startProductTourWithConfig(o.outbound,o.data):e.showSurvey(o.actionType,o.format))}}},{key:"setGlobalDataItem",value:function(e,t){this.globalData[e]=t}},{key:"getGlobalDataItem",value:function(e){return this.globalData[e]}},{key:"takeCurrentReplay",value:function(){var e=ze.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}])&&_t(t.prototype,n),o&&_t(t,o),e}();if(Ht(Wt,"invoked",!0),Ht(Wt,"silentCrashReportSent",!1),Ht(Wt,"instance",void 0),"undefined"!=typeof window){var zt=window.GleapActions;if(zt&&zt.length>0)for(var Gt=0;Gt<zt.length;Gt++){var Vt=zt[Gt];Vt&&Vt.e&&Wt[Vt.e]&&Wt[Vt.e].apply(Wt,Vt.a)}}const Zt=Wt,Kt=Zt;return t=t.default})()}));