releasebird-javascript-sdk 1.0.69 → 1.0.72

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.Rbird=t():e.Rbird=t()}(this,()=>(()=>{"use strict";var e={195:(e,t,n)=>{n.d(t,{AC:()=>s,AX:()=>i,K4:()=>u,_$:()=>r,fK:()=>c,kY:()=>h,mm:()=>l,t0:()=>a,tj:()=>o,vd:()=>d});var r=function(e,t,n,r,o,i,a){var s=" \n cta_button {\n background-color: none;\n border: none;\n background-color: #294eab;\n border-radius: 5px;\n font-weight: bold;\n color: white;\n cursor: pointer;\n font-family: inherit;\n}\n\n.cta__modal--standard {\n width: 420px !important;\n}\n\n.cta__modal--big {\n width: 680px !important;\n}\n \n\n.cta__modal-dimmer {\n position: fixed;\n display: none;\n z-index: 9999998;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n}\n\n\n.circle {\n width: 200px;\n height: 200px;\n border-radius: 50%;\n background-color: #3498db;\n margin-right: 20px;\n}\n\n.vertical-text {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n transform: rotate(180deg);\n color: black;\n font-size: 18px;\n}\n\n.feedbackButtonText {\n margin-top: 20px;\n --webkit-transform: rotate(90deg); /* Safari and Chrome */\n --moz-transform: rotate(90deg); /* Firefox */\n --ms-transform: rotate(90deg); /* IE 9 */\n --o-transform: rotate(90deg); /* Opera */\n transform: rotate(90deg);\n --webkit-transform: translate(-50%, 50%);\n\n}\n\n.cta__modal-dimmer--visible {\n display: block;\n animation: show 0.2s;\n animation-fill-mode: forwards;\n}\n\n.cta__modal {\n position: fixed;\n outline: none;\n z-index: 9999999;\n background-color: transparent;\n display: none !important;\n width: ".concat(a?"100% !important":"450px",";\n border-radius: ").concat(a?0:"24","px;\n font-family: inherit;\n overflow-y: hidden;\n height: ").concat(a?"100%":"725px",";\n max-height: ").concat(a?"100%":"calc(100vh - 160px)",";\n text-align: center;\n bottom: ").concat(a?0:i+30,"px;\n right: ").concat("right"!==r||a?"unset":o+10+"px",";\n left: ").concat("left"!==r||a?"unset":o+10+"px",";\n top: ").concat(a?0:"unset","px;\n margin-top: ").concat(a?0:"80px","px;\n box-shadow: rgba(9, 14, 21, 0.16) 0px 5px 40px 0px;\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .cta__modal {\n width: 100% !important;\n height: 100vh !important;\n max-height: 100vh !important;\n bottom: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 0 !important;\n transform: none !important;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {\n .cta__modal {\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100vh !important;\n bottom: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 0 !important;\n transform: none !important;\n overflow: hidden !important;\n }\n\n .rbird-content-iframe {\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n }\n}\n\n/* iOS-spezifische Anpassung für dynamische Viewport-Höhe */\n@supports (-webkit-touch-callout: none) {\n .cta__modal {\n height: 100dvh !important;\n max-height: 100dvh !important;\n }\n\n .rbird-content-iframe {\n height: 100dvh !important;\n }\n}\n\n.cta__modal_loading {\n position: fixed;\n outline: none;\n z-index: 1000000;\n background-color: white;\n display: none !important;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n font-family: inherit;\n overflow-y: auto;\n height: 650px;\n text-align: center;\n}\n\n.cta__modal--visible {\n display: block !important;\n animation: show 0.3s;\n animation-fill-mode: forwards;\n margin-bottom: 25px;\n}\n\n.cta__modal img {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.launcherButton {\n backgroundColor:transparent;\n width:50px;\n height:50px;\n z-index: 10000000;\n position:fixed;\n bottom:").concat(i,"px;\n right:").concat("right"===r?o+"px":"unset",";\n left:").concat("left"===r?o+"px":"unset",";\n cursor:pointer;\n}\n\n.launcherButton5 {\n backgroundColor:transparent;\n width:70px;\n height:50px;\n z-index: 10000000;\n position:fixed;\n bottom:").concat(i,"px;\n right:").concat("right"===r?o+"px":"unset",";\n left:").concat("left"===r?o+"px":"unset",";\n cursor:pointer;\n}\n\n.rbird_badge {\n position: fixed;\n bottom: ").concat(i+35,"px;\n right: ").concat("right"===r?o-10+"px":"unset",";\n left: ").concat("left"===r?o+35+"px":"unset",";\n z-index: 10000000;\n padding: 5px 10px;\n border-radius: 50%;\n background-color: red;\n color: white;\n font-size: 12px;\n}\n\n/* Modal Content/Box */\n.modal-content {\n background-color: #fefefe;\n margin: 15% auto; /* 15% from the top and centered */\n padding: 20px;\n border: 1px solid #888;\n width: 80%; /* Could be more or less, depending on screen size */\n}\n\n.markerBoundary {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n width: calc(100%);\n height: calc(100% - 12px);\n border: 6px solid red;\n z-index: 100000;\n}\n\n.screenshotCloseButton {\n position: absolute;\n top: 0;\n cursor: pointer;\n right: 0;\n text-align: center;\n padding: 5px;\n width: 50px;\n background-color: red;\n color: white;\n font-weight: 500;\n font-family: Arial, serif;\n}\n\n.editorButtons {\n position: absolute;\n top: 10px;\n left: 50%;\n height: 25px;\n width: 200px;\n background-color: white;\n border: 1px solid lightgrey;\n border-radius: 5px;\n}\n\n\n#myImg {\n border-radius: 5px;\n cursor: pointer;\n transition: 0.3s;\n}\n\n#myImg:hover {opacity: 0.7;}\n\n/* The Modal (background) */\n.modalImageViewer {\n position: fixed; /* Stay in place */\n z-index: 10000000000; /* Sit on top */\n padding-top: 100px; /* Location of the box */\n left: 0;\n top: 0;\n width: 100%; /* Full width */\n height: 100%; /* Full height */\n overflow: auto; /* Enable scroll if needed */\n background-color: rgb(0,0,0); /* Fallback color */\n background-color: rgba(0,0,0,0.9); /* Black w/ opacity */\n}\n\n/* Modal Content (image) */\n.modal-content-imageViewer {\n margin: auto;\n display: block;\n width: 80%;\n max-width: 700px;\n}\n\n/* Caption of Modal Image */\n#caption {\n margin: auto;\n display: block;\n width: 80%;\n max-width: 700px;\n text-align: center;\n color: #ccc;\n padding: 10px 0;\n height: 150px;\n}\n\n/* Add Animation */\n.modal-content, #caption {\n animation-name: zoom;\n animation-duration: 0.6s;\n}\n\n@keyframes zoom {\n from {transform: scale(0.1)}\n to {transform: scale(1)}\n}\n\n/* The Close Button */\n.rbird_close {\n position: absolute;\n top: 15px;\n right: 35px;\n color: #f1f1f1;\n font-size: 40px;\n font-weight: bold;\n transition: 0.3s;\n}\n\n.hideWidgetButton {\nwidth: 15px;\nheight: 15px;\nposition: fixed;\ncursor: pointer;\nbottom: ").concat(i+45,"px;\nright: ").concat("right"===r?o-15+"px":"unset",";\nleft: ").concat("left"===r?o-15+"px":"unset",";\nz-index: 10000000;\n}\n\n.rbird_closeclose:hover,\n.rbird_closeclose:focus {\n color: #bbb;\n text-decoration: none;\n cursor: pointer;\n}\n\n.rbird-content-iframe {\nwidth: 100%; \nheight: 100%; \nbackground: transparent\n}\n\n/* 100% Image Width on Smaller Screens */\n@media only screen and (max-width: 700px){\n .modal-content {\n width: 100%;\n }\n}\n\n.rbird-screenshot-loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 900000010;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.95);\n padding: 30px 40px;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n}\n\n.rbird-screenshot-loader-spinner {\n border: 4px solid #f3f3f3;\n border-top: 4px solid #3498db;\n border-radius: 50%;\n width: 50px;\n height: 50px;\n animation: rbird-spin 1s linear infinite;\n margin: 0 auto 15px;\n}\n\n.rbird-screenshot-loader-text {\n color: #333;\n font-size: 16px;\n font-weight: 500;\n font-family: Arial, sans-serif;\n}\n\n@keyframes rbird-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n }"),c=document.querySelector(".rbird-styles");c&&c.remove();var l=document.createElement("style");return l.innerHTML=s,l.className="rbird-styles",document.body.appendChild(l),""};function o(e){return'<svg id="Ebene_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 149.04 149.04">\n <circle cx="74.52" cy="74.52" r="74.52"\n transform="translate(-10.8 136.39) rotate(-80.95)"\n fill="'.concat(e,'"/>\n <path fill="#ffffff"\n d="m74.48,27.59c-28.91,0-52.34,20.8-52.34,46.47,0,13.06,6.07,24.85,15.84,33.29v18.58l23.44-6.87c4.18.95,8.55,1.46,13.06,1.46,28.91,0,52.34-20.8,52.34-46.47s-23.44-46.47-52.34-46.47Z"/>\n</svg>')}function i(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <g>\n <path fill="#ffffff" className="st1" d="M100.3,97.3H33l17.9-17.9V48l5.5-5.5h43.8l5.5,5.5v43.8L100.3,97.3z M43.4,93h55.1l3-3V49.7l-3-3H58.3l-3,3\n v31.4L43.4,93z"/>\n </g>\n</svg>')}function a(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <path fill="#ffffff" className="st1" d="M108.8,37c-9-9.1-21-14.1-33.8-14.1c-12.8,0-24.8,5-33.8,14.1c-9,9.1-14,21.2-14,34c0,7.5,1.8,15,5.1,21.7\n c-1.6,6.4-6.1,11.7-12.1,14.4c-1.4,0.5-1.8,2.4-0.8,3.5c4,4.5,9.7,7.1,15.7,7.1c5.5,0,10.7-2.2,14.5-6c7.6,4.8,16.3,7.3,25.4,7.3\n c12.8,0,24.8-5,33.8-14.1c9-9.1,14-21.2,14-34S117.8,46,108.8,37L108.8,37z M75,114.6c-8.8,0-17.2-2.6-24.5-7.6l0,0\n c-0.9-0.6-2.2-0.5-3,0.4c-3.1,3.7-7.7,5.8-12.5,5.8c-3.7,0-7.3-1.3-10.2-3.6c6.1-3.6,10.5-9.7,12-16.8c0.1-0.6,0-1.1-0.2-1.6\n c-3.3-6.2-5-13.2-5-20.3c0-24.1,19.4-43.7,43.3-43.7s43.3,19.6,43.3,43.7S98.9,114.6,75,114.6L75,114.6z"/>\n</svg>')}function s(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <g id="text_chat">\n <g>\n <path fill="#ffffff" className="st1" d="M74.5,31.6c-23.7,0-42.9,19.2-42.9,42.9c0,6.5,1.5,12.9,4.3,18.7l-2.4,10.6c-0.7,3.3-0.1,6.4,1.7,8.6\n c2.2,2.8,5.9,3.9,10,3l10.6-2.3c5.8,2.8,12.3,4.3,18.7,4.3c23.7,0,42.9-19.2,42.9-42.9S98.2,31.6,74.5,31.6z"/>\n <g>\n <path fill="#ffffff" className="st1" d="M87.4,70.2H61.6c-2.4,0-4.3-1.9-4.3-4.3c0-2.4,1.9-4.3,4.3-4.3h25.7c2.4,0,4.3,1.9,4.3,4.3\n C91.7,68.3,89.8,70.2,87.4,70.2z"/>\n </g>\n <g>\n <path fill="#ffffff" className="st1"\n d="M74.5,87.4H61.6c-2.4,0-4.3-1.9-4.3-4.3s1.9-4.3,4.3-4.3h12.9c2.4,0,4.3,1.9,4.3,4.3S76.9,87.4,74.5,87.4z"\n />\n </g>\n </g>\n </g>\n</svg>')}function c(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <path fill="#ffffff" className="st1" d="M112.5,47.2c2.2,4.3,2.2,9.9,2.2,21.2v4.8c0,6.8,0,10.2-0.8,13c-1.9,6.6-7.1,11.7-13.6,13.6\n c-2.8,0.8-6.2,0.8-13,0.8h-2.2l-0.3,0c-4.1,0-8.1,1.3-11.5,3.7l-0.2,0.2l-10.5,7.5c-3.6,2.6-8.3-1.1-6.7-5.2c1.2-2.9-1-6.1-4.1-6.1\n h-2.4c-8.4,0-15.2-6.8-15.2-15.2v-17c0-11.3,0-16.9,2.2-21.2c1.9-3.8,5-6.9,8.8-8.8c4.3-2.2,9.9-2.2,21.2-2.2h16.1\n c11.3,0,16.9,0,21.2,2.2C107.5,40.4,110.6,43.5,112.5,47.2L112.5,47.2z M58.4,57.4c-1.7,0-3,1.4-3,3s1.4,3,3,3h32.2c1.7,0,3-1.4,3-3\n s-1.4-3-3-3H58.4z M66.5,73.5c-1.7,0-3,1.4-3,3c0,1.7,1.4,3,3,3h16.1c1.7,0,3-1.4,3-3c0-1.7-1.4-3-3-3H66.5z"/>\n</svg>')}function l(e){return'<svg version="1.1" id="Ebene_2" xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 3437.83 2395.28">\n <g id="Layer_1">\n <polygon fill="'.concat(e,'"\n points="404.34 1465.87 202.48 2395.28 949.73 1971.67 404.34 1465.87"/>\n <path fill="').concat(e,'"\n d="m3436.45,1275.75C3204.96,2696.73-100.03,2331.34,2.33,885.09,240.59-504.37,3514.92-169.98,3436.45,1275.75Z"/>\n <path fill="#ffffff"\n d="m759.32,1060.6c-17.38-7.23-39.16-13.43-64.74-18.44l-.34-.06c-.67-.11-1.33-.25-1.97-.43-1.22-.33-2.51-.62-3.83-.85-1-.23-2.01-.41-3.07-.55-.25-.03-.5-.08-.76-.14l-.59-.13c-16.86-3.33-30.03-6.51-39.15-9.44-7.87-2.52-14.24-6.33-19.48-11.64-4.35-4.41-6.46-10.6-6.46-18.93v-.27c0-9.45,4.18-16.37,13.16-21.77,10.61-6.38,26.42-9.62,46.99-9.62,13.82,0,28.57,2.7,43.82,8.04,15.5,5.42,30.6,13.17,44.88,23.03l10.87,7.51,41.85-83.7-8.25-5.65c-13.2-9.05-27.35-16.89-42.06-23.3-14.73-6.42-30-11.39-45.38-14.79-15.48-3.42-30.88-5.15-45.74-5.15-32.19,0-60.21,5.12-83.27,15.2-23.74,10.39-42.16,25.79-54.76,45.77-12.51,19.86-18.86,43.92-18.86,71.5v.27c0,31.23,6.92,56,20.58,73.63,13.41,17.32,30.04,29.64,49.41,36.6,17.97,6.46,40.76,11.89,67.75,16.14l5.41.74c.83.21,1.66.35,2.48.42l1.07.19c14.41,2.26,26.3,4.79,35.35,7.52,7.65,2.31,13.85,5.87,18.41,10.57,3.84,3.96,5.71,9.51,5.71,16.97v.27c0,10.99-4.64,18.96-14.61,25.08-11.48,7.06-28.45,10.64-50.41,10.64-19.62,0-39-3.22-57.61-9.56-18.49-6.3-34.99-15.35-49.05-26.9l-10.58-8.69-45.86,81.61,7.39,6.11c13.18,10.89,28.3,20.32,44.94,28.02,16.54,7.65,34.43,13.54,53.18,17.5,18.69,3.94,38.06,5.94,57.58,5.94,33.03,0,61.85-5.04,85.67-14.99,24.56-10.25,43.59-25.48,56.58-45.26,12.95-19.73,19.52-43.57,19.52-70.86v-.54c0-29.11-6.39-52.69-19.01-70.08-12.42-17.12-28.16-29.74-46.8-37.5Z"/>\n <path fill="#ffffff"\n d="m1067.48,1143.49c0,19.67-4.92,34.26-15.04,44.6-10.05,10.27-24.27,15.27-43.48,15.27s-33.09-4.98-43.04-15.24c-10.05-10.35-14.93-24.95-14.93-44.63v-265.13h-97.28v263.23c0,32.62,6.08,61.07,18.07,84.57,12.25,24,30.39,42.54,53.92,55.1,23.1,12.33,51.11,18.58,83.26,18.58s60.2-6.25,83.38-18.57c23.62-12.55,41.85-31.08,54.19-55.07,12.09-23.51,18.23-51.98,18.23-84.6v-263.23h-97.28v265.13Z"/>\n <path fill="#ffffff"\n d="m1457.81,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.06,16.96-69.01s-5.7-49.19-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.38,136.32c-2.82,5.52-6.61,9.64-11.56,12.62-5.01,3.01-10.76,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.44,20.27Z"/>\n <path fill="#ffffff"\n d="m1798.27,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.05,16.96-69.01s-5.7-49.2-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.37,136.32c-2.83,5.52-6.61,9.65-11.56,12.62-5.01,3.01-10.75,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.43,20.27Z"/>\n <path fill="#ffffff"\n d="m2127.18,893.76c-23.42-12.92-50.7-19.47-81.1-19.47s-57.69,6.55-81.1,19.47c-23.64,13.05-42.19,31.74-55.13,55.57-12.8,23.57-19.3,51.11-19.3,81.84v111.77c0,30.74,6.49,58.27,19.3,81.84,12.95,23.83,31.5,42.53,55.13,55.57,23.4,12.92,50.69,19.47,81.1,19.47s57.69-6.55,81.1-19.47c23.64-13.05,42.19-31.74,55.13-55.57,12.8-23.57,19.3-51.11,19.3-81.84v-111.77c0-30.74-6.49-58.27-19.3-81.84-12.94-23.82-31.49-42.52-55.13-55.57Zm-25.57,251.08c0,11.8-2.34,22.23-6.95,31.01-4.51,8.57-10.7,14.99-18.94,19.62-8.34,4.69-18.32,7.07-29.64,7.07s-21.3-2.38-29.64-7.07c-8.24-4.63-14.43-11.05-18.94-19.62-4.62-8.77-6.95-19.2-6.95-31.01v-115.57c0-11.81,2.34-22.24,6.96-31.01,4.51-8.57,10.7-14.99,18.93-19.62,8.34-4.69,18.31-7.07,29.64-7.07s21.3,2.38,29.64,7.07c8.23,4.63,14.42,11.05,18.93,19.62,4.62,8.78,6.96,19.22,6.96,31.01v115.57Z"/>\n <path fill="#ffffff"\n d="m2499.13,1120.82c18.38-10.85,32.78-26.34,42.79-46.06,9.83-19.36,14.81-41.96,14.81-67.18s-4.98-47.82-14.81-67.19c-10.01-19.71-24.35-35.2-42.63-46.04-18.18-10.79-39.41-16.26-63.1-16.26h-184.28v417.67h97.28v-158.7h26.89l88.92,158.7h116.71l-97.24-167.69c5.07-2.07,9.96-4.49,14.65-7.26Zm-45.87-93.53c-2.27,5.06-5.3,8.79-9.25,11.38-3.91,2.57-8.42,3.82-13.78,3.82h-81.03v-69.83h81.03c5.54,0,10.14,1.25,14.05,3.81,3.96,2.6,6.98,6.32,9.25,11.38,2.47,5.51,3.73,12.11,3.74,19.61-.16,7.58-1.51,14.25-4.01,19.83Z"/>\n <polygon fill="#ffffff"\n points="2559.82 878.36 2559.82 972.93 2667.24 972.93 2667.24 1295.76 2764.53 1295.76 2764.53 972.93 2871.96 972.93 2871.96 878.36 2559.82 878.36"/>\n </g>\n</svg>')}function u(e){return'<svg version="1.1" id="Ebene_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3437.83 2395.28">\n <g id="Layer_1">\n\n <path fill="'.concat(e,'"\n d="m3436.45,1275.75C3204.96,2696.73-100.03,2331.34,2.33,885.09,240.59-504.37,3514.92-169.98,3436.45,1275.75Z"/>\n <path fill="#ffffff"\n d="m759.32,1060.6c-17.38-7.23-39.16-13.43-64.74-18.44l-.34-.06c-.67-.11-1.33-.25-1.97-.43-1.22-.33-2.51-.62-3.83-.85-1-.23-2.01-.41-3.07-.55-.25-.03-.5-.08-.76-.14l-.59-.13c-16.86-3.33-30.03-6.51-39.15-9.44-7.87-2.52-14.24-6.33-19.48-11.64-4.35-4.41-6.46-10.6-6.46-18.93v-.27c0-9.45,4.18-16.37,13.16-21.77,10.61-6.38,26.42-9.62,46.99-9.62,13.82,0,28.57,2.7,43.82,8.04,15.5,5.42,30.6,13.17,44.88,23.03l10.87,7.51,41.85-83.7-8.25-5.65c-13.2-9.05-27.35-16.89-42.06-23.3-14.73-6.42-30-11.39-45.38-14.79-15.48-3.42-30.88-5.15-45.74-5.15-32.19,0-60.21,5.12-83.27,15.2-23.74,10.39-42.16,25.79-54.76,45.77-12.51,19.86-18.86,43.92-18.86,71.5v.27c0,31.23,6.92,56,20.58,73.63,13.41,17.32,30.04,29.64,49.41,36.6,17.97,6.46,40.76,11.89,67.75,16.14l5.41.74c.83.21,1.66.35,2.48.42l1.07.19c14.41,2.26,26.3,4.79,35.35,7.52,7.65,2.31,13.85,5.87,18.41,10.57,3.84,3.96,5.71,9.51,5.71,16.97v.27c0,10.99-4.64,18.96-14.61,25.08-11.48,7.06-28.45,10.64-50.41,10.64-19.62,0-39-3.22-57.61-9.56-18.49-6.3-34.99-15.35-49.05-26.9l-10.58-8.69-45.86,81.61,7.39,6.11c13.18,10.89,28.3,20.32,44.94,28.02,16.54,7.65,34.43,13.54,53.18,17.5,18.69,3.94,38.06,5.94,57.58,5.94,33.03,0,61.85-5.04,85.67-14.99,24.56-10.25,43.59-25.48,56.58-45.26,12.95-19.73,19.52-43.57,19.52-70.86v-.54c0-29.11-6.39-52.69-19.01-70.08-12.42-17.12-28.16-29.74-46.8-37.5Z"/>\n <path fill="#ffffff"\n d="m1067.48,1143.49c0,19.67-4.92,34.26-15.04,44.6-10.05,10.27-24.27,15.27-43.48,15.27s-33.09-4.98-43.04-15.24c-10.05-10.35-14.93-24.95-14.93-44.63v-265.13h-97.28v263.23c0,32.62,6.08,61.07,18.07,84.57,12.25,24,30.39,42.54,53.92,55.1,23.1,12.33,51.11,18.58,83.26,18.58s60.2-6.25,83.38-18.57c23.62-12.55,41.85-31.08,54.19-55.07,12.09-23.51,18.23-51.98,18.23-84.6v-263.23h-97.28v265.13Z"/>\n <path fill="#ffffff"\n d="m1457.81,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.06,16.96-69.01s-5.7-49.19-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.38,136.32c-2.82,5.52-6.61,9.64-11.56,12.62-5.01,3.01-10.76,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.44,20.27Z"/>\n <path fill="#ffffff"\n d="m1798.27,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.05,16.96-69.01s-5.7-49.2-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.37,136.32c-2.83,5.52-6.61,9.65-11.56,12.62-5.01,3.01-10.75,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.43,20.27Z"/>\n <path fill="#ffffff"\n d="m2127.18,893.76c-23.42-12.92-50.7-19.47-81.1-19.47s-57.69,6.55-81.1,19.47c-23.64,13.05-42.19,31.74-55.13,55.57-12.8,23.57-19.3,51.11-19.3,81.84v111.77c0,30.74,6.49,58.27,19.3,81.84,12.95,23.83,31.5,42.53,55.13,55.57,23.4,12.92,50.69,19.47,81.1,19.47s57.69-6.55,81.1-19.47c23.64-13.05,42.19-31.74,55.13-55.57,12.8-23.57,19.3-51.11,19.3-81.84v-111.77c0-30.74-6.49-58.27-19.3-81.84-12.94-23.82-31.49-42.52-55.13-55.57Zm-25.57,251.08c0,11.8-2.34,22.23-6.95,31.01-4.51,8.57-10.7,14.99-18.94,19.62-8.34,4.69-18.32,7.07-29.64,7.07s-21.3-2.38-29.64-7.07c-8.24-4.63-14.43-11.05-18.94-19.62-4.62-8.77-6.95-19.2-6.95-31.01v-115.57c0-11.81,2.34-22.24,6.96-31.01,4.51-8.57,10.7-14.99,18.93-19.62,8.34-4.69,18.31-7.07,29.64-7.07s21.3,2.38,29.64,7.07c8.23,4.63,14.42,11.05,18.93,19.62,4.62,8.78,6.96,19.22,6.96,31.01v115.57Z"/>\n <path fill="#ffffff"\n d="m2499.13,1120.82c18.38-10.85,32.78-26.34,42.79-46.06,9.83-19.36,14.81-41.96,14.81-67.18s-4.98-47.82-14.81-67.19c-10.01-19.71-24.35-35.2-42.63-46.04-18.18-10.79-39.41-16.26-63.1-16.26h-184.28v417.67h97.28v-158.7h26.89l88.92,158.7h116.71l-97.24-167.69c5.07-2.07,9.96-4.49,14.65-7.26Zm-45.87-93.53c-2.27,5.06-5.3,8.79-9.25,11.38-3.91,2.57-8.42,3.82-13.78,3.82h-81.03v-69.83h81.03c5.54,0,10.14,1.25,14.05,3.81,3.96,2.6,6.98,6.32,9.25,11.38,2.47,5.51,3.73,12.11,3.74,19.61-.16,7.58-1.51,14.25-4.01,19.83Z"/>\n <polygon fill="#ffffff"\n points="2559.82 878.36 2559.82 972.93 2667.24 972.93 2667.24 1295.76 2764.53 1295.76 2764.53 972.93 2871.96 972.93 2871.96 878.36 2559.82 878.36"/>\n </g>\n</svg>')}function d(e){return'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"\n x="0px"\n y="0px"\n viewBox="0 0 494.08 494.08" style="enable-background:new 0 0 494.08 494.08;">\n <g>\n <path fill="'.concat(e,'" d="M247.04,0C110.604,0,0,110.604,0,247.04s110.604,247.04,247.04,247.04s247.04-110.604,247.04-247.04\n C493.845,110.701,383.379,0.235,247.04,0z M247.04,298.667l-79.787-80.64l14.293-13.653l65.493,64l65.493-64l14.72,14.507\n L247.04,298.667z"/>\n </g>\n </svg>')}var h='<svg id="Layer_1" enable-background="new 0 0 64 64" viewBox="0 0 64 64"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="m34.8 32 19.8-19.8c.8-.8.8-2 0-2.8s-2-.8-2.8 0l-19.8 19.8-19.8-19.8c-.8-.8-2-.8-2.8 0s-.8 2 0 2.8l19.8 19.8-19.8 19.8c-.8.8-.8 2 0 2.8s2 .8 2.8 0l19.8-19.8 19.8 19.8c.8.8 2 .8 2.8 0s.8-2 0-2.8z"/>\n </svg>'},499:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(537),o=n(708);function i(e){return i="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},i(e)}function a(){a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:I(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",y="suspendedYield",g="executing",v="completed",m={};function b(){}function w(){}function x(){}var k={};d(k,c,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(j([])));E&&E!==n&&r.call(E,c)&&(k=E);var L=x.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(o,a,s,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==i(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,s,c)},function(e){n("throw",e,s,c)}):t.resolve(d).then(function(e){u.value=e,s(u)},function(e){return n("throw",e,s,c)})}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return a=a?a.then(o,o):o()}})}function I(t,n,r){var o=p;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=M(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?v:y,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return w.prototype=x,o(L,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},C(T.prototype),d(T.prototype,l,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new T(h(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(L),d(L,u,"Generator"),d(L,c,function(){return this}),d(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;B(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function s(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"widgetSettings",void 0),l(this,"apiKey",void 0),l(this,"anonymousIdentifier",void 0),l(this,"identify",void 0)}return t=e,n=[{key:"generateRandomString",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;n<60;n++)t+=e.charAt(Math.floor(62*Math.random()));return t}},{key:"init",value:function(e){var t,n=this;return"undefined"==typeof window?Promise.resolve(null):(this.apiKey=e,this.identify=null===(t=this.getState())||void 0===t?void 0:t.identify,new Promise(function(t,i){var c=new XMLHttpRequest;c.open("GET","".concat("https://api.releasebird.com/papi","/ewidget")),c.setRequestHeader("Content-Type","application/json;charset=UTF-8"),c.setRequestHeader("apiKey",e),c.onerror=function(){i(new Error("Network error"))};var l=n;c.onreadystatechange=function(){var e,n=(e=a().mark(function e(n){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c.readyState!==XMLHttpRequest.DONE){e.next=16;break}if(200!==c.status&&201!==c.status){e.next=15;break}return e.prev=2,l.widgetSettings=JSON.parse(c.responseText),o.default.setStyles(l.widgetSettings.backgroundColor,l.widgetSettings.textColor,l.widgetSettings.launcherColor,l.widgetSettings.launcherPosition,l.widgetSettings.spaceLeftRight,l.widgetSettings.spaceBottom),e.next=7,r.A.getInstance().renderWebsiteWidget();case 7:t(l.widgetSettings),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),i(new Error("Error parsing widget settings"));case 13:e.next=16;break;case 15:i(new Error("Request failed with status ".concat(c.status)));case 16:case"end":return e.stop()}},e,null,[[2,10]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s(i,r,o,a,c,"next",e)}function c(e){s(i,r,o,a,c,"throw",e)}a(void 0)})});return function(e){return n.apply(this,arguments)}}(),c.send();var u=window.localStorage.getItem("Rbird_I");if(u)n.anonymousIdentifier=u;else{var d=n.generateRandomString();window.localStorage.setItem("Rbird_I",d),n.anonymousIdentifier=d}n.anonymousIdentifier=n.anonymousIdentifier.replace('"',""),setInterval(function(){var t,r=n.getState();if(null!=r&&r.identify&&null!=r&&null!==(t=r.identify)&&void 0!==t&&t.properties.external_user_id){var o=new XMLHttpRequest;o.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/ping")),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("apiKey",e),o.send(JSON.stringify(r.identify))}},3e4)}))}},{key:"getState",value:function(){if("undefined"==typeof window)return null;var e=window.localStorage.getItem("rbird_state");return e?JSON.parse(e):e?void 0:((e={}).identify={},e.identify.properties={},window.localStorage.setItem("rbird_state",JSON.stringify(e)),e)}},{key:"logout",value:function(){if("undefined"!=typeof window){window.localStorage.removeItem("rbird_state");var t=this.generateRandomString();window.localStorage.setItem("Rbird_I",t),r.A.getInstance().updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(e.getInstance().apiKey,"&tab=HOME&people=null&hash=null&ai=").concat(t))}}},{key:"trackEvent",value:function(e,t){if("undefined"!=typeof window&&window.localStorage.getItem("rbird_state")){var n,r=JSON.parse(window.localStorage.getItem("rbird_state")),o={};o.name=e,o.peopleId=null==r||null===(n=r.identify)||void 0===n?void 0:n.people,o.data=t||{};var i=new XMLHttpRequest;i.open("POST","".concat("https://api.releasebird.com/papi","/events")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),i.setRequestHeader("apiKey",this.apiKey),i.onerror=function(e){},i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||i.status)},i.send(JSON.stringify(o))}}},{key:"identifyUser",value:function(t,n){if("undefined"!=typeof window){var o=this.getState();o.identify.properties=t,o.identify.hash=n;var i=new XMLHttpRequest;i.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/identify")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),i.setRequestHeader("apiKey",this.apiKey),i.onerror=function(e){};var a=this;i.onreadystatechange=function(t){if(4===i.readyState&&(200===i.status||201===i.status))try{var s=JSON.parse(i.responseText);s.valid&&(o.identify.people=s.peopleId,o.identify.company=s.companyId,n&&(o.identify.hash=n),window.localStorage.setItem("rbird_state",JSON.stringify(o)),r.A.getInstance().updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(e.getInstance().apiKey,"&tab=HOME&people=").concat(s.peopleId,"&hash=").concat(n,"&ai=").concat(a.anonymousIdentifier)))}catch(c){}},i.send(JSON.stringify(o.identify))}}}],i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&c(t.prototype,n),i&&c(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i}();l(d,"instance",void 0)},537:(e,t,n)=>{function r(e){return r="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},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{A:()=>q});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"hasClass",value:function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},{key:"addClass",value:function(e,t){e.classList?e.classList.add(t):hasClass(e,t)||(e.className+=" "+t)}},{key:"removeClass",value:function(e,t){if(e.classList)e.classList.remove(t);else if(hasClass(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}}],(t=null)&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function s(e){return s="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},s(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"showImage",value:function(e){var t=document.createElement("div");t.id="myModal",t.className="modalImageViewer";var n=document.createElement("span");n.className="rbird_close",n.onclick=function(){return document.body.removeChild(t)},n.textContent="x";var r=document.createElement("img");r.className="modal-content-imageViewer",r.src=e,t.appendChild(n),t.appendChild(r),document.body.appendChild(t)}}],(t=null)&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),d=n(195),h=n(499);function f(e){return f="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},f(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function g(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var b="http://www.w3.org/2000/svg",w=function(){return g(function e(t,n){var r=this;p(this,e),v(this,"shapes",void 0),v(this,"colors",void 0),v(this,"fills",void 0),v(this,"sizes",void 0),v(this,"resets",void 0),v(this,"reset",void 0),v(this,"settings",void 0),v(this,"closeColorPicker",function(){var e=document.getElementById("rbirdColorPicker");e&&document.body.removeChild(e)}),v(this,"openColorPicker",function(){var e=document.createElement("div");e.id="rbirdColorPicker",e.style.display="flex",e.style.gap="10px",e.style.padding="15px",e.style.cursor="pointer",e.style.backgroundColor="white",e.style.position="absolute",e.style.top="80px",e.style.zIndex="900000000000",e.style.left="50%",e.style.transform="translateX(-50%)",e.style.border="1px solid #e5e7eb",e.style.borderRadius="8px",e.style.boxShadow="0 4px 6px rgba(0, 0, 0, 0.1)",document.body.appendChild(e);[{name:"black",hex:"#000000"},{name:"red",hex:"#ef4444"},{name:"blue",hex:"#3b82f6"},{name:"yellow",hex:"#fbbf24"},{name:"green",hex:"#10b981"}].forEach(function(t){var n=document.createElement("div");n.style.cursor="pointer",n.style.transition="transform 0.2s",n.addEventListener("mouseenter",function(){n.style.transform="scale(1.1)"}),n.addEventListener("mouseleave",function(){n.style.transform="scale(1)"}),n.addEventListener("click",function(e){r.onClick("color",t.name),r.colors[0]&&(r.colors[0].innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="24pt" width="24pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+t.hex+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n'),r.closeColorPicker()}),n.innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="28pt" width="28pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+t.hex+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n',e.appendChild(n)}),e.addEventListener("click",function(e){return r.closeColorPicker()})}),this.reset=n,this.settings=t},[{key:"setShapes",value:function(e){var t=this,n=[],r=document.createElement("button");r.addEventListener("click",function(e){return t.onClick("shape","path")}),r.style.background="none",r.style.boxShadow="none",r.style.border="none",r.style.cursor="pointer",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.style.padding="5px",r.innerHTML='<svg fill="none" height="20pt" viewBox="0 0 120 120" width="20px" xmlns="http://www.w3.org/2000/svg">\n <path clip-rule="evenodd"\n d="m76.25 82.5c-.6904 0-1.25.5596-1.25 1.25s.5596 1.25 1.25 1.25h21.25c6.904 0 12.5 5.5964 12.5 12.5 0 6.904-5.596 12.5-12.5 12.5h-71.5c-2.2091 0-4-1.791-4-4s1.7909-4 4-4h71.5c2.4853 0 4.5-2.0147 4.5-4.5s-2.0147-4.5-4.5-4.5h-21.25c-5.1086 0-9.25-4.1414-9.25-9.25s4.1414-9.25 9.25-9.25h24.75c2.209 0 4 1.7909 4 4s-1.791 4-4 4z"\n fill="#ffd482" fill-rule="evenodd"/>\n <path d="m37.626 72.6258c-1.0469-1.0469-2.4429-1.6793-3.9205-1.5873-3.232.2012-9.1224 1.1271-12.6358 5.0559-7.0697 7.9054-5.1282 17.0827-8.9811 19.7647-5.51917 3.8419-.6888 14.1409 13.9114 14.1409 11.321 0 20.5606-5.883 22.7243-23.246.2166-1.7381-.4371-3.4669-1.6756-4.7055z"\n fill="#ffba33"/>\n <path d="m34.0099 80.1329c-2.3432-2.3431-2.3432-6.1421 0-8.4853l58.1289-58.1289c3.9053-3.90529 10.2372-3.90528 14.1422 0l.7.7005c3.906 3.9052 3.906 10.2368 0 14.1421l-58.1285 58.1289c-2.3431 2.3432-6.1421 2.3432-8.4853 0z"\n fill="#944700"/>\n</svg>',r.value="path",n.push(r);var o=document.createElement("button");o.addEventListener("click",function(e){return t.onClick("shape","rect")}),o.style.background="none",o.style.cursor="pointer",o.style.boxShadow="none",o.style.border="none",o.style.touchAction="manipulation",o.style.webkitTapHighlightColor="transparent",o.style.padding="5px",o.innerHTML='<svg id="Layer_1" enable-background="new 0 0 48 48" height="20pt" viewBox="0 0 48 48" width="20pt"\n xmlns="http://www.w3.org/2000/svg">\n <path d="m44 12.5h-40c-.83 0-1.5.67-1.5 1.5v20c0 .83.67 1.5 1.5 1.5h40c.83 0 1.5-.67 1.5-1.5v-20c0-.83-.67-1.5-1.5-1.5zm-1.5 20h-37v-17h37z"/>\n</svg>',o.value="rect",n.push(o);var i=document.createElement("button");i.addEventListener("click",function(e){return t.onClick("shape","circle")}),i.style.background="none",i.style.cursor="pointer",i.style.boxShadow="none",i.style.border="none",i.style.touchAction="manipulation",i.style.webkitTapHighlightColor="transparent",i.style.padding="5px",i.innerHTML='<svg height="20pt" viewBox="0 0 512 512" width="20pt" xmlns="http://www.w3.org/2000/svg">\n <path d="m256 512c-68.378906 0-132.667969-26.628906-181.019531-74.980469-48.351563-48.351562-74.980469-112.640625-74.980469-181.019531s26.628906-132.667969 74.980469-181.019531c48.351562-48.351563 112.640625-74.980469 181.019531-74.980469s132.667969 26.628906 181.019531 74.980469c48.351563 48.351562 74.980469 112.640625 74.980469 181.019531s-26.628906 132.667969-74.980469 181.019531c-48.351562 48.351563-112.640625 74.980469-181.019531 74.980469zm0-482c-124.617188 0-226 101.382812-226 226s101.382812 226 226 226 226-101.382812 226-226-101.382812-226-226-226zm0 0"/>\n <path d="m256 512c-68.378906 0-132.667969-26.628906-181.019531-74.980469-48.351563-48.351562-74.980469-112.640625-74.980469-181.019531s26.628906-132.667969 74.980469-181.019531c48.351562-48.351563 112.640625-74.980469 181.019531-74.980469s132.667969 26.628906 181.019531 74.980469c48.351563 48.351562 74.980469 112.640625 74.980469 181.019531s-26.628906 132.667969-74.980469 181.019531c-48.351562 48.351563-112.640625 74.980469-181.019531 74.980469zm0-482c-124.617188 0-226 101.382812-226 226s101.382812 226 226 226 226-101.382812 226-226-101.382812-226-226-226zm0 0"/>\n</svg>',i.value="circle",n.push(i);var a=document.createElement("button");a.style.background="none",a.style.boxShadow="none",a.style.cursor="pointer",a.style.border="none",a.style.touchAction="manipulation",a.style.webkitTapHighlightColor="transparent",a.style.padding="5px",a.addEventListener("click",function(e){return t.onClick("shape","ellipse")}),a.innerHTML='<svg clip-rule="evenodd" fill-rule="evenodd" height="20pt" stroke-linejoin="round" stroke-miterlimit="2"\n viewBox="0 0 24 24" width="20pt" xmlns="http://www.w3.org/2000/svg">\n <g id="Icon">\n <path d="m12 5.25c-3.509 0-6.615 1.048-8.544 2.627-1.407 1.151-2.206 2.588-2.206 4.123s.799 2.972 2.206 4.123c1.929 1.579 5.035 2.627 8.544 2.627s6.615-1.048 8.544-2.627c1.407-1.151 2.206-2.588 2.206-4.123s-.799-2.972-2.206-4.123c-1.929-1.579-5.035-2.627-8.544-2.627zm0 1.5c3.114 0 5.883.887 7.595 2.288 1.02.835 1.655 1.848 1.655 2.962s-.635 2.127-1.655 2.962c-1.712 1.401-4.481 2.288-7.595 2.288s-5.883-.887-7.595-2.288c-1.02-.835-1.655-1.848-1.655-2.962s.635-2.127 1.655-2.962c1.712-1.401 4.481-2.288 7.595-2.288z"/>\n </g>\n</svg>',a.value="ellipse",n.push(a),this.shapes=n}},{key:"setResets",value:function(){var e=this,t=document.createElement("button");t.addEventListener("click",function(t){return e.reset()}),t.style.border="none",t.style.background="none",t.style.cursor="pointer",t.style.padding="5px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.touchAction="manipulation",t.style.webkitTapHighlightColor="transparent",t.title="Undo last drawing",t.innerHTML='<svg id="Capa_1" enable-background="new 0 0 511.697 511.697" height="20pt" viewBox="0 0 511.697 511.697" width="20pt"\n xmlns="http://www.w3.org/2000/svg">\n <g>\n <path clip-rule="evenodd"\n d="m450.09 150.319c82.253 82.41 82.126 215.896-.284 298.149-39.451 39.376-92.891 61.526-148.63 61.606h-301.176v-60.235h301.176c83.167-.214 150.414-67.809 150.199-150.976-.214-82.864-67.335-149.985-150.199-150.199h-98.676v86.806l-202.5-116.922 202.5-116.926v86.807h98.678c55.893.006 109.48 22.278 148.912 61.89z"\n fill="#6b7280" fill-rule="evenodd"/>\n </g>\n</svg>',this.resets=[t]}},{key:"setColors",value:function(e){var t=this,n=[],r=document.createElement("div");r.id="colorCircle",r.addEventListener("click",function(e){return t.openColorPicker()}),r.style.cursor="pointer",r.style.padding="5px",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.title="Select color",r.innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="24pt" width="24pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+this.settings.color+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n',n.push(r),this.colors=n}},{key:"setFills",value:function(e){this.fills=[]}},{key:"setSizes",value:function(e){this.sizes=[]}},{key:"getElement",value:function(){this.updateButtons();var e=document.createElement("div");e.classList.add("menu"),e.style.display="flex",e.style.alignItems="center",e.style.gap="15px",e.style.flexWrap="wrap";var t=document.createElement("div");t.style.display="flex",t.style.gap="5px",t.style.alignItems="center",t.style.paddingRight="15px",t.style.borderRight="1px solid #ddd",this.shapes.forEach(function(e){return t.appendChild(e)}),e.appendChild(t);var n=document.createElement("div");n.style.display="flex",n.style.gap="5px",n.style.alignItems="center",n.style.paddingRight="15px",n.style.borderRight="1px solid #ddd",this.colors.forEach(function(e){return n.appendChild(e)}),e.appendChild(n);var r=document.createElement("div");r.style.display="flex",r.style.gap="5px",r.style.alignItems="center",this.resets.forEach(function(e){return r.appendChild(e)}),e.appendChild(r);var o=document.createElement("div");return o.style.backgroundColor="#10b981",o.style.color="white",o.style.fontWeight="600",o.innerHTML="Take Screenshot",o.style.padding="10px 20px",o.style.fontFamily="Arial, sans-serif",o.style.fontSize="15px",o.style.borderRadius="8px",o.style.cursor="pointer",o.style.touchAction="manipulation",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.webkitTapHighlightColor="transparent",o.style.transition="background-color 0.2s",o.style.whiteSpace="nowrap",o.addEventListener("mouseenter",function(){o.style.backgroundColor="#059669"}),o.addEventListener("mouseleave",function(){o.style.backgroundColor="#10b981"}),window.innerWidth<=768&&(o.style.fontSize="14px",o.style.padding="8px 16px",e.style.gap="8px",t.style.paddingRight="8px",n.style.paddingRight="8px"),o.addEventListener("click",function(e){M.getInstance().screenshot()}),o.addEventListener("touchstart",function(e){e.stopPropagation()}),e.appendChild(o),e}},{key:"onClick",value:function(e,t){this.settings[e]=t,this.updateButtons()}},{key:"updateButtons",value:function(){var e=this;Object.keys(this.settings).forEach(function(t){e[t+"s"].forEach(function(n){n.value==e.settings[t]?n.classList.add("selected"):n.classList.remove("selected")})})}}])}(),x=function(){return g(function e(t){var n,r;p(this,e),v(this,"svg",void 0),v(this,"objects",[]),v(this,"codeSection",void 0),v(this,"originalMousePosition",null),v(this,"lastMousePosition",null),v(this,"currentMousePosition",null),v(this,"createdObject",null),v(this,"focusedObject",null),v(this,"menuSettings",void 0),this.svg=e.createSVG(t.dimension),this.attachEvents(this.svg);var o=this.createMenu();this.codeSection=document.createElement("pre");var i,a=document.createElement("div");a.classList.add("svg-editor"),a.style.height="100%",a.appendChild(o),a.appendChild(this.svg),null==t||null===(n=t.element)||void 0===n||n.appendChild(a),0===(null==t||null===(r=t.element)||void 0===r?void 0:r.getElementsByClassName("svg-editor").length)&&(null==t||null===(i=t.element)||void 0===i||i.appendChild(a))},[{key:"reset",value:function(){var e=this.objects.pop();e&&this.svg.removeChild(e)}},{key:"attachEvents",value:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this)),e.addEventListener("mousemove",this.onMouseMove.bind(this)),e.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("touchstart",this.onTouchStart.bind(this),{passive:!1}),e.addEventListener("touchmove",this.onTouchMove.bind(this),{passive:!1}),e.addEventListener("touchend",this.onTouchEnd.bind(this)),e.addEventListener("touchcancel",this.onTouchEnd.bind(this))}},{key:"createMenu",value:function(){var e=this;this.menuSettings={shape:"path",color:"black",fill:"none",size:5,reset:"reset"};var t=new w(this.menuSettings,function(){return e.reset()});t.setColors(["black","red","blue","yellow"]),t.setFills(["none","black","red","blue","yellow"]),t.setSizes([1,2,3,4,5]),t.setShapes(["rect","line","circle","ellipse","path"]),t.setResets();var n=t.getElement();return n.style.position="absolute",n.style.top="10px",n.style.left="50%",n.style.backgroundColor="white",n.style.border="1px solid lightgrey",n.style.padding="10px",n.style.borderRadius="8px",n.style.transform="translateX(-50%)",n.style.touchAction="manipulation",n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.zIndex="900000001",window.innerWidth<=768&&(n.style.padding="8px",n.style.top="5px",n.style.maxWidth="95vw",n.style.overflowX="auto"),n}},{key:"updateCode",value:function(){this.codeSection.innerText=this.svg.innerHTML.replace(new RegExp("><","g"),">\n<")}},{key:"getEventPosition",value:function(e){if(e.touches&&e.touches.length>0){var t=e.touches[0],n=this.svg.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}return{x:e.offsetX,y:e.offsetY}}},{key:"onTouchStart",value:function(e){e.preventDefault(),this.onMouseDown(e)}},{key:"onTouchMove",value:function(e){e.preventDefault(),this.onMouseMove(e)}},{key:"onTouchEnd",value:function(e){this.onMouseUp()}},{key:"onMouseDown",value:function(e){this.createdObject=document.createElementNS(b,this.menuSettings.shape),this.createdObject.setAttributeNS(null,"fill",this.menuSettings.fill),this.createdObject.setAttributeNS(null,"stroke",this.menuSettings.color),this.createdObject.setAttributeNS(null,"stroke-width",String(this.menuSettings.size)),this.svg.appendChild(this.createdObject);var t=this.getEventPosition(e);if(this.originalMousePosition=this.lastMousePosition=this.currentMousePosition=t,"path"===this.menuSettings.shape){var n="M "+this.currentMousePosition.x+" "+this.currentMousePosition.y;this.createdObject.setAttributeNS(null,"d",n)}}},{key:"onMouseMove",value:function(e){null!==this.originalMousePosition&&(this.lastMousePosition=this.currentMousePosition,this.currentMousePosition=this.getEventPosition(e),this.updateCurrentObject())}},{key:"onMouseUp",value:function(){var e,t,n,r;(null===(e=this.originalMousePosition)||void 0===e?void 0:e.x)!=(null===(t=this.currentMousePosition)||void 0===t?void 0:t.x)||(null===(n=this.originalMousePosition)||void 0===n?void 0:n.y)!=(null===(r=this.currentMousePosition)||void 0===r?void 0:r.y)?(this.objects.push(this.createdObject),this.focus(this.createdObject)):"path"!==this.menuSettings.shape&&this.svg.removeChild(this.createdObject),this.originalMousePosition=this.lastMousePosition=this.currentMousePosition=null,this.createdObject=null}},{key:"focus",value:function(e){}},{key:"updateCurrentObject",value:function(){var e,t,n,r,o,i,a,s,c={x:Math.min(null===(e=this.currentMousePosition)||void 0===e?void 0:e.x,null===(t=this.originalMousePosition)||void 0===t?void 0:t.x),y:Math.min(null===(n=this.currentMousePosition)||void 0===n?void 0:n.y,null===(r=this.originalMousePosition)||void 0===r?void 0:r.y)},l=Math.max(null===(o=this.currentMousePosition)||void 0===o?void 0:o.x,null===(i=this.originalMousePosition)||void 0===i?void 0:i.x),u=Math.max(null===(a=this.currentMousePosition)||void 0===a?void 0:a.y,null===(s=this.originalMousePosition)||void 0===s?void 0:s.y);switch(this.menuSettings.shape){case"line":this.createdObject.setAttributeNS(null,"x1",String(this.originalMousePosition.x)),this.createdObject.setAttributeNS(null,"y1",String(this.originalMousePosition.y)),this.createdObject.setAttributeNS(null,"x2",String(this.currentMousePosition.x)),this.createdObject.setAttributeNS(null,"y2",String(this.currentMousePosition.y));break;case"rect":this.createdObject.setAttributeNS(null,"x",String(c.x)),this.createdObject.setAttributeNS(null,"y",String(c.y)),this.createdObject.setAttributeNS(null,"width",String(l-c.x)),this.createdObject.setAttributeNS(null,"height",String(u-c.y));break;case"circle":this.createdObject.setAttributeNS(null,"cx",String((c.x+l)/2)),this.createdObject.setAttributeNS(null,"cy",String((c.y+u)/2));var d=Math.max(l-c.x,u-c.y)/2;this.createdObject.setAttributeNS(null,"r",String(d));break;case"ellipse":this.createdObject.setAttributeNS(null,"cx",String((c.x+l)/2)),this.createdObject.setAttributeNS(null,"cy",String((c.y+u)/2)),this.createdObject.setAttributeNS(null,"rx",String((l-c.x)/2)),this.createdObject.setAttributeNS(null,"ry",String((u-c.y)/2));break;case"path":var h=this.createdObject.getAttribute("d")+" l ";h+=this.currentMousePosition.x-this.lastMousePosition.x,h+=" ",h+=this.currentMousePosition.y-this.lastMousePosition.y,this.createdObject.setAttributeNS(null,"d",h)}this.updateCode()}}],[{key:"createSVG",value:function(e){var t=document.createElementNS(b,"svg");return t.setAttribute("width",e.width),t.setAttribute("height",e.height),t}}])}();function k(e){return k="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},k(e)}function S(){S=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",y="completed",g={};function v(){}function m(){}function b(){}var w={};l(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(j([])));E&&E!==n&&r.call(E,a)&&(w=E);var L=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(o,i,a,s){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==k(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function I(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=M(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?y:f,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(k(t)+" is not iterable")}return m.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},C(T.prototype),l(T.prototype,s,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new T(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(L),l(L,c,"Generator"),l(L,a,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;B(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function E(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,s,"next",e)}function s(e){E(i,r,o,a,s,"throw",e)}a(void 0)})}}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function T(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==k(t)?t:t+""}var M=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),T(this,"boundary",void 0)}return t=e,r=[{key:"getRbirdWebsiteWidget",value:function(){return n(537).A}},{key:"activateMarker",value:function(e){var t=this;document.body.style.overflow="hidden",this.getRbirdWebsiteWidget().getInstance().closeWebsiteWidget(),this.boundary=document.createElement("div"),this.boundary.id="markerBoundary",this.boundary.className="markerBoundary",this.boundary.style.display="block",this.boundary.style.height="100%",e||(this.boundary.style.pointerEvents="none");var n=document.createElement("div");n.id="screenshotCloseButton",n.className="screenshotCloseButton",n.innerText="Close",n.onclick=function(){document.body.removeChild(t.boundary)},this.boundary.appendChild(n),document.body.appendChild(this.boundary),new x({element:this.boundary,dimension:{width:"100%",height:"100%"}})}},{key:"deactivateMarker",value:function(){document.body.style.overflow="auto",document.body.removeChild(this.boundary),this.getRbirdWebsiteWidget().getInstance().openWebsiteWidget()}},{key:"showLoader",value:function(){var e=document.createElement("div");e.id="rbirdScreenshotLoader",e.className="rbird-screenshot-loader";var t=document.createElement("div");t.className="rbird-screenshot-loader-spinner";var n=document.createElement("div");return n.className="rbird-screenshot-loader-text",n.textContent="Creating screenshot...",e.appendChild(t),e.appendChild(n),document.body.appendChild(e),e}},{key:"hideLoader",value:function(){var e=document.getElementById("rbirdScreenshotLoader");e&&document.body.removeChild(e)}},{key:"screenshot",value:function(){var e=this,t=this.showLoader(),n=!1,r=setTimeout(function(){n||(console.error("[Screenshot] Timeout - screenshot took too long"),e.hideLoader(),e.deactivateMarker(),alert("Screenshot took too long to generate. Please try again with a simpler page or contact support."))},45e3);setTimeout(function(){console.log("[Screenshot] Starting HTML export method...");var o=document.getElementById("screenshotCloseButton"),i=document.querySelector(".menu"),a=o?o.style.visibility:null,s=i?i.style.visibility:null;t.style.visibility="hidden",o&&(o.style.visibility="hidden"),i&&(i.style.visibility="hidden"),requestAnimationFrame(L(S().mark(function c(){var l;return S().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,e.exportHTML();case 3:l=c.sent,console.log("[Screenshot] HTML exported, sending to backend..."),e.renderScreenshotOnBackend(l).then(function(c){console.log("[Screenshot] Screenshot received from backend!"),n=!0,clearTimeout(r),t.style.visibility="visible",o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader();var l,u=e.getRbirdWebsiteWidget().getInstance();u.iframe&&(null===(l=u.iframe.contentWindow)||void 0===l||l.postMessage({type:"screenshot",screenshot:c},"*")),e.deactivateMarker()}).catch(function(c){console.error("[Screenshot] Backend rendering failed:",c),n=!0,clearTimeout(r),t.style.visibility="visible",o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader(),e.deactivateMarker(),alert("Screenshot could not be created. Please try again or contact support.")}),c.next=19;break;case 8:c.prev=8,c.t0=c.catch(0),console.error("[Screenshot] HTML export failed:",c.t0),n=!0,clearTimeout(r),t.style.visibility="visible",o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader(),e.deactivateMarker(),alert("Screenshot could not be created. Please try again or contact support.");case 19:case"end":return c.stop()}},c,null,[[0,8]])})))},100)}},{key:"exportHTML",value:(h=L(S().mark(function e(){var t,n;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("[Screenshot] Exporting HTML with inline resources..."),this.captureScrollPositions(),t=document.documentElement.cloneNode(!0),["#rbirdScreenshotLoader","#screenshotCloseButton",".menu","script","noscript",'iframe[src*="cookiehub"]','iframe[src*="google"]','iframe[src*="facebook"]'].forEach(function(e){t.querySelectorAll(e).forEach(function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}),e.next=7,this.downloadAllImages(t);case 7:return e.next=9,this.downloadAllCSS(t);case 9:return n="<!DOCTYPE html>"+t.outerHTML,console.log("[Screenshot] Exported HTML: ".concat(n.length," bytes")),e.abrupt("return",n);case 13:case"end":return e.stop()}},e,this)})),function(){return h.apply(this,arguments)})},{key:"captureScrollPositions",value:function(){console.log("[Screenshot] Capturing scroll positions...");var e=0;document.querySelectorAll("*").forEach(function(t,n){if(!(t.closest("#rbirdScreenshotLoader")||t.closest("#screenshotCloseButton")||t.closest(".menu")||t.closest(".markerBoundary"))){var r=t.scrollLeft,o=t.scrollTop;(r>0||o>0)&&(t.id||t.setAttribute("data-rbird-scroll-id","rbird-scroll-".concat(n)),r>0&&t.setAttribute("data-rbird-scroll-left",r.toString()),o>0&&t.setAttribute("data-rbird-scroll-top",o.toString()),e++,console.log("[Screenshot] Captured scroll position for element: scrollLeft=".concat(r,", scrollTop=").concat(o)))}});var t=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop;t>0&&document.body.setAttribute("data-rbird-scroll-left",t.toString()),n>0&&document.body.setAttribute("data-rbird-scroll-top",n.toString()),console.log("[Screenshot] Captured scroll positions for ".concat(e," elements"))}},{key:"downloadAllImages",value:(d=L(S().mark(function e(t){var n,r,o,i,a,s,c,l=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.querySelectorAll("img"),r=[],o=0,i=0,a=S().mark(function e(){var t;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(t=n[s]).src&&!t.src.startsWith("data:")&&r.push(l.fetchImageAsDataURL(t.src).then(function(e){return e?(o+=e.length,l.resizeImage(e,500,500,.7)):null}).then(function(e){e&&(i+=e.length,t.src=e)}).catch(function(e){console.warn("[Screenshot] Failed to load/resize image:",t.src,e)}));case 2:case"end":return e.stop()}},e)}),s=0;case 6:if(!(s<n.length)){e.next=11;break}return e.delegateYield(a(),"t0",8);case 8:s++,e.next=6;break;case 11:return e.next=13,Promise.all(r);case 13:o>0&&(c=Math.round(100*(1-i/o)),console.log("[Screenshot] Image optimization: ".concat(o," -> ").concat(i," bytes (").concat(c,"% reduction)")));case 14:case"end":return e.stop()}},e)})),function(e){return d.apply(this,arguments)})},{key:"resizeImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.7;return new Promise(function(o,i){var a=new Image;a.onload=function(){var i=a.width,s=a.height;if(i>t||s>n){var c=i/s;i>s?s=(i=t)/c:i=(s=n)*c}var l=document.createElement("canvas");l.width=i,l.height=s;var u,d=l.getContext("2d"),h=e.includes("data:image/png"),f=e.includes("data:image/gif"),p=e.includes("data:image/webp"),y=e.includes("data:image/svg"),g=h||f||p||y;g?d.clearRect(0,0,i,s):(d.fillStyle="#FFFFFF",d.fillRect(0,0,i,s)),d.drawImage(a,0,0,i,s),u=g?l.toDataURL("image/png"):l.toDataURL("image/jpeg",r),o(u)},a.onerror=function(){i(new Error("Failed to load image for resizing"))},a.src=e})}},{key:"fetchImageAsDataURL",value:function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n(new Error("Failed to read image"))},e.readAsDataURL(r.response)},r.onerror=function(){n(new Error("Failed to fetch image"))},r.open("GET",e),r.responseType="blob",r.send()})}},{key:"downloadAllCSS",value:(u=L(S().mark(function e(t){var n,r,o,i,a,s,c,l,u,d,h,f;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[Screenshot] Processing ".concat(document.styleSheets.length," stylesheets...")),n=[],r=[],o=0;case 4:if(!(o<document.styleSheets.length)){e.next=56;break}if(i=document.styleSheets[o],e.prev=6,!i.href||!(i.href.includes("fonts.googleapis.com")||i.href.includes("fonts.gstatic.com")||i.href.includes("use.typekit.net")||i.href.includes("cloud.typography.com")||i.href.includes("fontawesome")||i.href.includes("font-awesome")||i.href.includes("fa-")||i.href.includes("bootstrap-icons")||i.href.includes("material-icons")||i.href.includes("material-symbols")||i.href.includes("ionicons")||i.href.includes("feather-icons")||i.href.includes("heroicons")||i.href.includes("/icons")||i.href.includes("icon.css")||i.href.includes("icons.css"))){e.next=11;break}return console.log("[Screenshot] Skipping font/icon service stylesheet: ".concat(i.href)),r.push(i.href),e.abrupt("continue",53);case 11:if(a="",e.prev=12,i.cssRules){for(s=0;s<i.cssRules.length;s++)a+=i.cssRules[s].cssText+"\n";console.log("[Screenshot] Extracted ".concat(i.cssRules.length," rules from stylesheet ").concat(o))}e.next=36;break;case 16:if(e.prev=16,e.t0=e.catch(12),!i.href){e.next=35;break}return console.log("[Screenshot] CORS blocked stylesheet ".concat(o,", fetching: ").concat(i.href)),e.prev=20,e.next=23,fetch(i.href);case 23:return c=e.sent,e.next=26,c.text();case 26:a=e.sent,console.log("[Screenshot] Fetched ".concat(a.length," bytes from ").concat(i.href)),e.next=33;break;case 30:e.prev=30,e.t1=e.catch(20),console.warn("[Screenshot] Failed to fetch CORS-blocked stylesheet:",i.href,e.t1);case 33:e.next=36;break;case 35:console.warn("[Screenshot] CORS blocked stylesheet with no href:",e.t0);case 36:if(!a){e.next=48;break}return l=i.href?i.href.substring(0,i.href.lastIndexOf("/")):window.location.href.substring(0,window.location.href.lastIndexOf("/")),e.next=40,this.loadCSSUrlResources(a,l);case 40:u=e.sent,d=t.querySelector("head"),(h=document.createElement("style")).type="text/css",h.setAttribute("data-original-href",i.href||"inline"),h.appendChild(document.createTextNode(u)),d.appendChild(h),n.push(i.href||"inline");case 48:e.next=53;break;case 50:e.prev=50,e.t2=e.catch(6),console.warn("[Screenshot] Failed to process stylesheet:",i.href,e.t2);case 53:o++,e.next=4;break;case 56:console.log("[Screenshot] Successfully processed ".concat(n.length," stylesheets")),f=t.querySelectorAll('link[rel="stylesheet"]'),console.log("[Screenshot] Removing ".concat(f.length," original link tags (keeping font/icon services)")),f.forEach(function(e){var t=e.getAttribute("href");t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")||t.includes("use.typekit.net")||t.includes("cloud.typography.com")||t.includes("fontawesome")||t.includes("font-awesome")||t.includes("fa-")||t.includes("bootstrap-icons")||t.includes("material-icons")||t.includes("material-symbols")||t.includes("ionicons")||t.includes("feather-icons")||t.includes("heroicons")||t.includes("/icons")||t.includes("icon.css")||t.includes("icons.css"))||e.remove()});case 60:case"end":return e.stop()}},e,this,[[6,50],[12,16],[20,30]])})),function(e){return u.apply(this,arguments)})},{key:"loadCSSUrlResources",value:(l=L(S().mark(function e(t,n){var r,o,i,a,s,c,l,u,d=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=/url\(['"]?([^'"()]+)['"]?\)/g,o=[];null!==(i=r.exec(t));)o.push(i);a=[".woff2",".woff",".ttf",".eot",".otf"],s=[".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp"],c=S().mark(function e(){var r,o,i,c,h,f,p,y;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u[l],!(o=r[1]).startsWith("data:")){e.next=4;break}return e.abrupt("return",1);case 4:return i=o.toLowerCase(),c=a.some(function(e){return i.includes(e)}),h=s.some(function(e){return i.includes(e)}),e.prev=7,f=o.startsWith("http://")||o.startsWith("https://")||o.startsWith("//")?o.startsWith("//")?"https:"+o:o:new URL(o,n+"/").href,console.log("[Screenshot] Processing CSS resource: ".concat(f," (font: ").concat(c,", image: ").concat(h,")")),e.next=12,d.fetchResourceAsDataURL(f);case 12:if(!(p=e.sent)){e.next=33;break}if(!c){e.next=19;break}t=t.split(r[0]).join("url(".concat(p,")")),console.log("[Screenshot] Embedded font: ".concat(o)),e.next=33;break;case 19:if(!h){e.next=32;break}return e.prev=20,e.next=23,d.resizeImage(p,500,500,.7);case 23:(y=e.sent)&&(t=t.split(r[0]).join("url(".concat(y,")"))),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(20),t=t.split(r[0]).join("url(".concat(p,")"));case 30:e.next=33;break;case 32:t=t.split(r[0]).join("url(".concat(p,")"));case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(7),console.warn("[Screenshot] Failed to convert CSS url:",o,e.t1.message);case 38:case"end":return e.stop()}},e,null,[[7,35],[20,27]])}),l=0,u=o;case 7:if(!(l<u.length)){e.next=14;break}return e.delegateYield(c(),"t0",9);case 9:if(!e.t0){e.next=11;break}return e.abrupt("continue",11);case 11:l++,e.next=7;break;case 14:return e.abrupt("return",t);case 15:case"end":return e.stop()}},e)})),function(e,t){return l.apply(this,arguments)})},{key:"fetchResourceAsDataURL",value:function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.onload=function(){if(200===r.status){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n(new Error("Failed to read resource"))},e.readAsDataURL(r.response)}else n(new Error("HTTP ".concat(r.status)))},r.onerror=function(){n(new Error("Failed to fetch resource"))},r.ontimeout=function(){n(new Error("Request timeout"))},r.open("GET",e),r.responseType="blob",r.timeout=1e4,r.send()})}},{key:"compressString",value:(c=L(S().mark(function e(t){var n,r,o,i,a,s,c,l,u,d,h,f,p,y,g,v;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=new TextEncoder,r=n.encode(t),"undefined"==typeof CompressionStream){e.next=28;break}o=new ReadableStream({start:function(e){e.enqueue(r),e.close()}}),i=o.pipeThrough(new CompressionStream("gzip")),a=i.getReader(),s=[];case 8:return e.next=11,a.read();case 11:if(c=e.sent,l=c.done,u=c.value,!l){e.next=16;break}return e.abrupt("break",19);case 16:s.push(u),e.next=8;break;case 19:for(d=s.reduce(function(e,t){return e+t.length},0),h=new Uint8Array(d),f=0,p=0,y=s;p<y.length;p++)g=y[p],h.set(g,f),f+=g.length;return v=this.arrayBufferToBase64(h),console.log("[Screenshot] Compression: ".concat(r.length," -> ").concat(h.length," bytes (").concat(Math.round(h.length/r.length*100),"%)")),e.abrupt("return",v);case 28:return console.warn("[Screenshot] CompressionStream not available, sending uncompressed"),e.abrupt("return",null);case 30:e.next=36;break;case 32:return e.prev=32,e.t0=e.catch(0),console.error("[Screenshot] Compression failed:",e.t0),e.abrupt("return",null);case 36:case"end":return e.stop()}},e,this,[[0,32]])})),function(e){return c.apply(this,arguments)})},{key:"arrayBufferToBase64",value:function(e){for(var t="",n=new Uint8Array(e),r=0;r<n.length;r+=1024)for(var o=n.subarray(r,Math.min(r+1024,n.length)),i=0;i<o.length;i++)t+=String.fromCharCode(o[i]);return btoa(t)}},{key:"renderScreenshotOnBackend",value:(s=L(S().mark(function e(t){var n,r;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.length,r=(n/1048576).toFixed(2),console.log("[Screenshot] Sending HTML to backend..."),console.log("[Screenshot] Original HTML size: ".concat(n," bytes (").concat(r," MB)")),!(n>819200)){e.next=9;break}return console.log("[Screenshot] HTML > 800KB, using S3 upload..."),e.abrupt("return",this.renderViaS3(t));case 9:return console.log("[Screenshot] HTML < 800KB, using direct upload..."),e.abrupt("return",this.renderDirect(t));case 11:case"end":return e.stop()}},e,this)})),function(e){return s.apply(this,arguments)})},{key:"renderViaS3",value:(a=L(S().mark(function e(t){var n=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=L(S().mark(function e(r,o){var i,a,s,c,l,u,d,h,f,p,y,g,v,m,b;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log("[Screenshot] Step 1: Requesting presigned URL..."),i=n.getRbirdWebsiteWidget().getInstance(),a=new AbortController,s=setTimeout(function(){return a.abort()},1e4),e.next=7,fetch("".concat("https://api.releasebird.com/papi","/images/screenshot/upload-url"),{method:"POST",headers:{"Content-Type":"application/json",apiKey:i.apiKey||""},signal:a.signal}).catch(function(e){if(clearTimeout(s),"AbortError"===e.name)throw new Error("Timeout getting upload URL");throw e});case 7:if(c=e.sent,clearTimeout(s),c.ok){e.next=11;break}throw new Error("Failed to get upload URL: ".concat(c.status));case 11:return e.next=13,c.json();case 13:return l=e.sent,u=l.uploadUrl,d=l.key,console.log("[Screenshot] Step 2: Uploading HTML to S3 (key: ".concat(d,")...")),h=new AbortController,f=setTimeout(function(){return h.abort()},15e3),e.next=21,fetch(u,{method:"PUT",body:t,headers:{"Content-Type":"text/html"},signal:h.signal}).catch(function(e){if(clearTimeout(f),"AbortError"===e.name)throw new Error("Timeout uploading to S3");throw e});case 21:if(p=e.sent,clearTimeout(f),p.ok){e.next=25;break}throw new Error("Failed to upload to S3: ".concat(p.status));case 25:return console.log("[Screenshot] Step 3: Requesting screenshot render from backend..."),y=new AbortController,g=setTimeout(function(){return y.abort()},2e4),e.next=30,fetch("".concat("https://api.releasebird.com/papi","/images/screenshot/render"),{method:"POST",headers:{"Content-Type":"application/json",apiKey:i.apiKey||""},body:JSON.stringify({s3Key:d,width:window.innerWidth,height:window.innerHeight,url:window.location.href}),signal:y.signal}).catch(function(e){if(clearTimeout(g),"AbortError"===e.name)throw new Error("Timeout rendering screenshot");throw e});case 30:if(v=e.sent,clearTimeout(g),v.ok){e.next=37;break}return e.next=35,v.text();case 35:throw m=e.sent,new Error("Failed to render screenshot: ".concat(v.status," - ").concat(m));case 37:return e.next=39,v.json();case 39:b=e.sent,console.log("[Screenshot] Screenshot received successfully via S3!"),r(b.screenshot),e.next=48;break;case 44:e.prev=44,e.t0=e.catch(0),console.error("[Screenshot] S3 upload failed:",e.t0),o(e.t0);case 48:case"end":return e.stop()}},e,null,[[0,44]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})},{key:"renderDirect",value:(i=L(S().mark(function e(n){var r=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=L(S().mark(function e(o,i){var a,s,c,l,u;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.compressString(n);case 2:a=e.sent,(s=new XMLHttpRequest).open("POST","".concat("https://api.releasebird.com/papi","/images/screenshot/render")),s.setRequestHeader("Content-Type","application/json;charset=UTF-8"),s.timeout=2e4,s.ontimeout=function(){console.error("[Screenshot] Request timeout"),i(new Error("Screenshot render timeout"))},(c=r.getRbirdWebsiteWidget().getInstance()).apiKey&&s.setRequestHeader("apiKey",c.apiKey),s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)try{var e=JSON.parse(s.responseText);e.screenshot?o(e.screenshot):i(new Error("No screenshot in response"))}catch(t){console.error("[Screenshot] Failed to parse response:",t),i(t)}else console.error("[Screenshot] Backend request failed:",s.status,s.responseText),i(new Error("Failed to render screenshot: ".concat(s.status," : ").concat(JSON.stringify(s.responseText))))},l={width:window.innerWidth,height:window.innerHeight,url:window.location.href},a?(l.htmlCompressed=a,l.compressed=!0):(l.html=n,l.compressed=!1),u=JSON.stringify(l),console.log("[Screenshot] Final payload size: ".concat(u.length," bytes")),s.send(u);case 16:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],r&&C(t.prototype,r),o&&C(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o,i,a,s,c,l,u,d,h}();function O(e){return O="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},O(e)}function B(){B=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",y="completed",g={};function v(){}function m(){}function b(){}var w={};l(w,a,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(j([])));k&&k!==n&&r.call(k,a)&&(w=k);var S=b.prototype=v.prototype=Object.create(w);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function L(e,t){function n(o,i,a,s){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==O(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=T(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?y:f,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function j(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(O(t)+" is not iterable")}return m.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(L.prototype),l(L.prototype,s,function(){return this}),t.AsyncIterator=L,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new L(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},E(S),l(S,c,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function P(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){P(i,r,o,a,s,"next",e)}function s(e){P(i,r,o,a,s,"throw",e)}a(void 0)})}}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function A(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==O(t)?t:t+""}T(M,"instance",void 0);var N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"mediaRecorder",null)}return t=e,n=[{key:"onTimer",value:function(e,t,n,r){e.innerHTML='<div style="font-size: 16px; font-weight: 600; color: #333;">'+t+"s</div>",--t<0&&(r.stop(),clearInterval(n))}},{key:"startTimer",value:function(e){var t=this,n=60,r=setInterval(function(){n--,t.onTimer(e,n,r,t.mediaRecorder)},1e3)}},{key:"isMobileDevice",value:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=768}},{key:"startRecording",value:(a=j(B().mark(function e(t){var n,r,o,i,a,s,c,l,u;return B().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.isMobileDevice())){e.next=4;break}return alert("Video recording is not supported on mobile devices. Please use the screenshot feature instead."),e.abrupt("return");case 4:return o=this,e.prev=5,e.next=8,navigator.mediaDevices.getDisplayMedia({audio:!0,video:{mediaSource:"screen"}});case 8:r=e.sent,e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(5),alert("Screensharing not allowed by user"),e.abrupt("return");case 15:i=document.createElement("div"),a=this.addCountDownElement(i,n),r&&r.active&&((c=null===(s=document)||void 0===s||null===(s=s.getElementById("test"))||void 0===s||null===(s=s.getElementsByTagName("rbird-box")[0])||void 0===s||null===(s=s.shadowRoot)||void 0===s?void 0:s.getElementById("markerBoundary"))&&(c.style.display="block",t||(c.style.pointerEvents="none"),null!==c.querySelector("#screenshotCloseButton")&&c.removeChild(c.querySelector("#screenshotCloseButton"))),q.getInstance().closeWebsiteWidget(),l=[],u={mimeType:"video/webm;codecs=vp9"},this.mediaRecorder=new MediaRecorder(r,u),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&l.push(e.data)},this.startTimer(a),this.mediaRecorder.onstop=function(){document.body.removeChild(i);var e=document.createElement("div");e.style.width="100%",e.style.height="100%",e.style.backgroundColor="rgba(0,0,0,0.8)",e.style.overflow="auto",e.style.position="fixed",e.style.zIndex="90000000000",e.style.top="0",e.style.left="0";var t=document.createElement("div");t.style.margin="15% auto",t.style.padding="20px",t.style.width="700px",t.style.height="525px",t.style.border="1px solid #888",t.style.backgroundColor="white",t.style.borderRadius="8px";var n=document.createElement("div");n.style.display="flex",n.style.display="block",n.style.height="30px",n.style.marginTop="20px";var s=document.createElement("div");s.style.backgroundColor="orange",s.style.color="white",s.style.fontWeight="500",s.innerHTML="Retry",s.style.float="left",s.style.padding="13px",s.style.paddingTop="8px",s.style.paddingBottom="8px",s.style.fontFamily="Arial",s.style.fontSize="16px",s.style.borderRadius="8px",s.style.marginLeft="10px",s.style.cursor="pointer",s.addEventListener("click",function(){URL.revokeObjectURL(h),l=[],document.body.removeChild(e),i=document.createElement("div"),a=o.addCountDownElement(i),o.startTimer(a),o.restartRecording()});var u=document.createElement("div");u.innerHTML="Cancel",u.style.backgroundColor="red",u.style.color="white",u.style.fontWeight="500",u.style.float="left",u.style.padding="13px",u.style.paddingTop="8px",u.style.paddingBottom="8px",u.style.fontFamily="Arial",u.style.fontSize="16px",u.style.borderRadius="8px",u.style.cursor="pointer",u.addEventListener("click",function(){r.getTracks().forEach(function(e){return e.stop()}),URL.revokeObjectURL(h),l=[],document.body.removeChild(e),c&&(c.style.display="none"),q.getInstance().openWebsiteWidget()}),n.appendChild(u),n.appendChild(s);var d=document.createElement("div");d.innerHTML="Continue",d.style.backgroundColor="green",d.style.color="white",d.style.fontWeight="500",d.innerHTML="Submit",d.style.float="right",d.style.padding="13px",d.style.paddingTop="8px",d.style.paddingBottom="8px",d.style.fontFamily="Arial",d.style.fontSize="16px",d.style.borderRadius="8px",d.style.marginLeft="10px",d.style.cursor="pointer",d.addEventListener("click",function(){var t;r.getTracks().forEach(function(e){return e.stop()}),q.getInstance().iframe&&(null===(t=q.getInstance().iframe.contentWindow)||void 0===t||t.postMessage({type:"video",video:h},"*")),URL.revokeObjectURL(h),l=[],document.body.removeChild(e),c&&(c.style.display="none"),q.getInstance().openWebsiteWidget()}),n.appendChild(d);var h=new Blob(l,{type:"video/webm;codecs=vp9"}),f=document.createElement("video");f.controls=!0,f.style.width="650px",f.style.height="400px";var p=document.createElement("source");p.type="video/webm;codecs=vp9",p.src=URL.createObjectURL(h),f.appendChild(p),t.appendChild(f),t.appendChild(n),e.appendChild(t),document.body.appendChild(e)},this.mediaRecorder.start(200));case 18:case"end":return e.stop()}},e,this,[[5,11]])})),function(e){return a.apply(this,arguments)})},{key:"addCountDownElement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.id="rbirdRecorderMenu",e.style.position="fixed",e.style.top=n?"20px":"10px",e.style.left="50%",e.style.zIndex="900000000",e.style.backgroundColor="rgba(255, 255, 255, 0.95)",e.style.border="1px solid lightgrey",e.style.padding=n?"12px 15px":"10px",e.style.borderRadius="8px",e.style.transform="translateX(-50%)",e.style.boxShadow="0 4px 6px rgba(0, 0, 0, 0.1)",e.style.display="flex",e.style.alignItems="center",e.style.gap="10px";var r=document.createElement("div");r.innerHTML='<svg viewBox="0 0 512 512" width=\'24pt\' height=\'24pt\' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="linear-gradient" gradientUnits="userSpaceOnUse" x1="67.69" x2="441.35" y1="67.69" y2="441.35"><stop offset="0" stop-color="#fd7f60"/><stop offset="1" stop-color="#fa262a"/></linearGradient><g id="Layer_2" data-name="Layer 2"><g id="Layer_2_copy_7" data-name="Layer 2 copy 7"><g id="_137" fill="url(#linear-gradient)" data-name="137"><path id="background" d="m256 20c130.34 0 236 105.66 236 236s-105.66 236-236 236-236-105.66-236-236 105.66-236 236-236m0-20a255.93 255.93 0 0 0 -181 437 256 256 0 1 0 280.65-416.87 254.3 254.3 0 0 0 -99.65-20.13z"/><rect height="247.06" rx="38.38" width="247.06" x="132.47" y="132.47"/></g></g></g></svg>',r.style.cursor="pointer",r.style.display="flex",r.style.alignItems="center",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.addEventListener("click",function(){return t.stopRecording()}),e.appendChild(r);var o=document.createElement("div");return o.innerHTML='<div style="font-size: 16px; font-weight: 600; color: #333;">60s</div>',o.id="rbirdCountdown",o.style.display="flex",o.style.alignItems="center",e.appendChild(o),document.body.appendChild(e),o}},{key:"stopRecording",value:(i=j(B().mark(function e(){return B().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.mediaRecorder.stop();case 1:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"restartRecording",value:(o=j(B().mark(function e(){return B().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.mediaRecorder.start();case 1:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&R(t.prototype,n),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r,o,i,a}();function W(e){return W="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},W(e)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F(r.key),r)}}function z(e,t,n){return(t=F(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e){var t=function(e,t){if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==W(t)?t:t+""}A(N,"instance",void 0);var q=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),z(this,"websiteWidget",void 0),z(this,"websiteWidgetVisible",!1),z(this,"widgetContent",void 0),z(this,"countBadge",void 0),z(this,"escListener",void 0),z(this,"iframe",void 0),z(this,"hideWidgetButton",void 0),z(this,"noButton",void 0),z(this,"backdrop",void 0),z(this,"countNotificationsTimer",null),z(this,"countNotificationsDelay",1e3),z(this,"isMobileDevice",function(){if("undefined"==typeof window)return!1;return window.innerWidth<=768})}return t=e,n=[{key:"renderWebsiteWidget",value:function(){var e=this;return new Promise(function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(e.websiteWidgetVisible)t();else{e.websiteWidgetVisible=!0;try{var r,o=document.createElement("div");o.onclick=function(){e.openWebsiteWidget()},document.body.appendChild(o),e.websiteWidget=o,null!==(r=h.A.getInstance().widgetSettings)&&void 0!==r&&r.allowClose&&!e.noButton&&(e.hideWidgetButton=document.createElement("div"),e.hideWidgetButton.className="hideWidgetButton",e.hideWidgetButton.innerHTML=d.kY,e.hideWidgetButton.onclick=function(){return e.handleHideWidgetButton()},e.hideWidgetButton.style.display="block",document.body.appendChild(e.hideWidgetButton)),e.countBadge=document.createElement("span"),e.countBadge.className="rbird_badge",e.countBadge.style.display="none",document.body.appendChild(e.countBadge),e.styleWidget(),t()}catch(i){n(new Error("Error rendering the website widget: "+i.message))}}else t()})}},{key:"isOpen",value:function(){return a.hasClass(this.widgetContent,"cta__modal--visible")}},{key:"openWebsiteWidget",value:function(){var e=this;if("undefined"!=typeof window&&"undefined"!=typeof document){a.addClass(this.widgetContent,"cta__modal--visible"),a.addClass(this.backdrop,"cta__modal-dimmer--visible"),document.body.style.overflow="hidden",this.registerListeners(),this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"),this.isMobileDevice()&&(this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"),this.websiteWidget.style.display="none"),5===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.K4)(h.A.getInstance().widgetSettings.launcherColor):this.websiteWidget.innerHTML=(0,d.vd)(h.A.getInstance().widgetSettings.launcherColor),this.websiteWidget.onclick=function(){return e.closeWebsiteWidget()};var t=new XMLHttpRequest;t.open("POST","".concat("https://api.releasebird.com/papi","/track/").concat(h.A.getInstance().widgetSettings.subdomain,"/trackView?type=WIDGET")),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),t.onerror=function(e){},t.onreadystatechange=function(e){4===t.readyState&&(200===t.status||t.status)},t.send(JSON.stringify({}))}}},{key:"handleHideWidgetButton",value:function(){this.hideWidgetButton&&(this.hideWidgetButton.style.display="none",this.websiteWidget.style.display="none")}},{key:"countNotifications",value:function(){var e=this;"undefined"!=typeof window&&(this.countNotificationsTimer&&clearTimeout(this.countNotificationsTimer),this.countNotificationsTimer=setTimeout(function(){var t;if(null!==(t=h.A.getInstance().identify)&&void 0!==t&&t.people||h.A.getInstance().anonymousIdentifier){var n=new XMLHttpRequest;n.open("GET","".concat("https://api.releasebird.com/papi","/ewidget/unread")),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.setRequestHeader("apiKey",h.A.getInstance().apiKey),n.setRequestHeader("peopleId",h.A.getInstance().identify.people),n.setRequestHeader("ai",h.A.getInstance().anonymousIdentifier);var r=window.localStorage.getItem("lastPageView");n.onerror=function(){};var o=e;n.onreadystatechange=function(e){if(n.readyState===XMLHttpRequest.DONE&&(200===n.status||201===n.status))try{var t=JSON.parse(n.responseText);t.messageCount>0?o.addBadgeCount(t.messageCount):t.lastReleaseNote&&r<t.lastReleaseNote?o.addBadgeCount("1"):o.addBadgeCount(0)}catch(e){console.error(e)}},n.send()}},this.countNotificationsDelay))}},{key:"addBadgeCount",value:function(e){0===e?this.countBadge&&(this.countBadge.innerText="0",this.countBadge.style.display="none",this.isOpen()||!this.hideWidgetButton||this.noButton||(this.hideWidgetButton.style.display="block")):(this.countBadge.innerText=e,this.countBadge.style.display="block",this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"))}},{key:"showButton",value:function(e){"undefined"!=typeof window&&(e&&!this.noButton?(this.websiteWidget.style.display="block",this.hideWidgetButton&&!this.noButton&&(this.hideWidgetButton.style.display="block")):(this.websiteWidget.style.display="none",this.hideWidgetButton&&(this.hideWidgetButton.style.display="none")))}},{key:"closeWebsiteWidget",value:function(){var e,t=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(this.iframe&&(null===(e=this.iframe.contentWindow)||void 0===e||e.postMessage({type:"close"},"*")),this.hideWidgetButton&&"none"===this.countBadge.style.display&&!this.noButton&&(this.hideWidgetButton.style.display="block"),a.removeClass(this.widgetContent,"cta__modal--visible"),a.removeClass(this.backdrop,"cta__modal-dimmer--visible"),document.body.style.overflow="",this.initButton(),this.noButton||(this.websiteWidget.style.display="block"),this.websiteWidget.onclick=function(){return t.openWebsiteWidget()},this.unregisterListeners())}},{key:"initButton",value:function(){0===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.tj)(h.A.getInstance().widgetSettings.launcherColor):1===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.AX)(h.A.getInstance().widgetSettings.launcherColor):2===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.t0)(h.A.getInstance().widgetSettings.launcherColor):3===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.AC)(h.A.getInstance().widgetSettings.launcherColor):4===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.fK)(h.A.getInstance().widgetSettings.launcherColor):5===h.A.getInstance().widgetSettings.launcher&&(this.websiteWidget.innerHTML=(0,d.mm)(h.A.getInstance().widgetSettings.launcherColor))}},{key:"handleEvent",value:function(e,t){var n,r,o;"close"===e.data&&t.closeWebsiteWidget(),"increaseSize"===e.data&&(a.removeClass(t.widgetContent,"cta__modal--standard"),a.addClass(t.widgetContent,"cta__modal--big")),"decreaseSize"===e.data&&(a.removeClass(t.widgetContent,"cta__modal--big"),a.addClass(t.widgetContent,"cta__modal--standard")),"showImage"===(null===(n=e.data)||void 0===n?void 0:n.key)&&u.showImage(null===(r=e.data)||void 0===r?void 0:r.url),"newMessageArrived"===e.data&&(this.countNotifications(),a.hasClass(this.widgetContent,"cta__modal--visible")||this.iframe&&(null===(o=this.iframe.contentWindow)||void 0===o||o.postMessage({type:"showMessageTab"},"*"))),"start_screenshot"===e.data&&M.getInstance().activateMarker(!0),"start_recording"===e.data&&N.getInstance().startRecording(!1)}},{key:"styleWidget",value:function(){var e=this;if("undefined"!=typeof window&&"undefined"!=typeof document){this.websiteWidget.className=5===h.A.getInstance().widgetSettings.launcher?"launcherButton5":"launcherButton",this.initButton(),this.backdrop=document.createElement("div"),this.backdrop.className="cta__modal-dimmer",document.body.appendChild(this.backdrop),this.widgetContent=document.createElement("div"),this.widgetContent.className="cta__modal";var t=window.localStorage.getItem("rbird_state");if(t){var n,r,o=JSON.parse(t);null!==(n=o.identify)&&void 0!==n&&n.people?this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&people=").concat(null===(r=o.identify)||void 0===r?void 0:r.people,"&ai=").concat(h.A.getInstance().anonymousIdentifier)):this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&ai=").concat(h.A.getInstance().anonymousIdentifier))}else this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&ai=").concat(h.A.getInstance().anonymousIdentifier));document.body.appendChild(this.widgetContent),window.onmessage=function(t){return e.handleEvent(t,e)},this.countNotifications()}}},{key:"updateIframe",value:function(e){this.widgetContent.innerHTML="<iframe src=".concat(e,' class="rbird-content-iframe" scrolling="yes" title="Releasebird" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>'),this.iframe=this.widgetContent.firstChild,this.iframe.scrolling="no"}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key),n&&e.closeWebsiteWidget()},document.addEventListener("keydown",this.escListener)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&H(t.prototype,n),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();z(q,"instance",void 0)},708:(e,t,n)=>{n.d(t,{default:()=>S});var r=n(195),o=n(499),i=n(537);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var l=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.originalConsoleLog=console.log,console.log=function(){t.printLog.apply(t,arguments),t.originalConsoleLog.apply(t,arguments)}},t=[{key:"printLog",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.map(function(e){return JSON.stringify(e)}).join(" ")}},{key:"resetConsoleLog",value:function(){console.log=this.originalConsoleLog}}],t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function u(e){return u="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},u(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function h(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var f,p,y,g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.banners=[],this.displayedBanners=new Set,this.apiKey=null}return t=e,n=[{key:"init",value:function(e){"undefined"!=typeof window&&(this.apiKey=e,this.fetchAndDisplayBanners())}},{key:"fetchAndDisplayBanners",value:function(){var e,t=o.A.getInstance(),n=t.getState(),r=new XMLHttpRequest;r.open("GET","".concat("https://api.releasebird.com/papi","/ewidget/banners/active")),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("apiKey",this.apiKey),null!=n&&null!==(e=n.identify)&&void 0!==e&&e.people&&r.setRequestHeader("peopleId",n.identify.people),t.anonymousIdentifier&&r.setRequestHeader("anonymousId",t.anonymousIdentifier);var i=this;r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)try{var e=JSON.parse(r.responseText);i.banners=e,i.renderBanners()}catch(t){console.error("[RbirdBannerManager] Error parsing banners response:",t)}else console.error("[RbirdBannerManager] Failed to fetch banners. Status:",r.status,"Response:",r.responseText)},r.send()}},{key:"renderBanners",value:function(){var e=this;this.banners&&0!==this.banners.length&&this.banners.forEach(function(t){"INLINE"===t.type?e.renderInlineBanner(t):"FLOATING"===t.type?e.renderFloatingBanner(t):console.warn("[RbirdBannerManager] Unknown banner type:",t.type)})}},{key:"renderInlineBanner",value:function(e){var t=this,n=e.placement||"default",r=document.querySelectorAll('[data-rbird-banner="'.concat(n,'"]'));0!==r.length?r.forEach(function(n){var r=t.createBannerElement(e,!1);n.appendChild(r),t.displayedBanners.add(e.id),t.trackImpression(e.id)}):console.warn("[RbirdBannerManager] No target elements found for inline banner with placement:",n,'Make sure you have an element with data-rbird-banner="'+n+'" in your HTML')}},{key:"renderFloatingBanner",value:function(e){var t=this.createBannerElement(e,!0);document.body.appendChild(t),this.displayedBanners.add(e.id),this.trackImpression(e.id)}},{key:"createBannerElement",value:function(e,t){var n=this,r=document.createElement("div");r.className=t?"rbird-banner-floating":"rbird-banner-inline",r.id="rbird-banner-".concat(e.id),r.setAttribute("data-banner-id",e.id);var o=e.title,i=e.message,a=e.buttonText;r.innerHTML='\n <div class="rbird-banner-content" style="'.concat(this.getBannerStyles(e,t),'">\n <button class="rbird-banner-close" data-banner-id="').concat(e.id,'" style="').concat(this.getCloseButtonStyles(),'">\n ×\n </button>\n <div class="rbird-banner-body">\n ').concat(o?'<h3 class="rbird-banner-title" style="'.concat(this.getTitleStyles(),'">').concat(this.escapeHtml(o),"</h3>"):"","\n ").concat(i?'<p class="rbird-banner-message" style="'.concat(this.getMessageStyles(),'">').concat(this.escapeHtml(i),"</p>"):"","\n ").concat(e.showButton&&a?'\n <button class="rbird-banner-cta" data-banner-id="'.concat(e.id,'" style="').concat(this.getCtaButtonStyles(e),'">\n ').concat(this.escapeHtml(a),"\n </button>\n "):"","\n </div>\n </div>\n "),t&&this.applyFloatingPosition(r,e.position);var s=r.querySelector(".rbird-banner-close");s&&s.addEventListener("click",function(t){t.preventDefault(),n.closeBanner(e.id)});var c=r.querySelector(".rbird-banner-cta");return c&&c.addEventListener("click",function(t){t.preventDefault(),n.handleCtaClick(e)}),r}},{key:"getBannerStyles",value:function(e,t){return"\n position: relative;\n background-color: ".concat(e.backgroundColor||"#ffffff",";\n color: ").concat(e.textColor||"#000000",";\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n max-width: ").concat(t?"400px":"100%",";\n box-sizing: border-box;\n z-index: 10000;\n ")}},{key:"getCloseButtonStyles",value:function(){return"\n position: absolute;\n top: 10px;\n right: 10px;\n background: transparent;\n border: none;\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n color: inherit;\n opacity: 0.6;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n "}},{key:"getTitleStyles",value:function(){return"\n margin: 0 0 10px 0;\n font-size: 18px;\n font-weight: 600;\n line-height: 1.4;\n "}},{key:"getMessageStyles",value:function(){return"\n margin: 0 0 15px 0;\n font-size: 14px;\n line-height: 1.6;\n "}},{key:"getCtaButtonStyles",value:function(e){return"\n background-color: ".concat(e.buttonColor||"#667eea",";\n color: ").concat(e.buttonTextColor||"#ffffff",";\n border: none;\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: opacity 0.2s;\n display: inline-block;\n ")}},{key:"applyFloatingPosition",value:function(e,t){switch(e.style.position="fixed",e.style.margin="20px",e.style.animation="rbirdBannerSlideIn 0.3s ease-out",t){case"TOP":e.style.top="0",e.style.left="50%",e.style.transform="translateX(-50%)";break;case"BOTTOM":e.style.bottom="0",e.style.left="50%",e.style.transform="translateX(-50%)";break;case"TOP_LEFT":e.style.top="0",e.style.left="0";break;case"TOP_RIGHT":e.style.top="0",e.style.right="0";break;case"BOTTOM_LEFT":e.style.bottom="0",e.style.left="0";break;default:e.style.bottom="0",e.style.right="0"}}},{key:"handleCtaClick",value:function(e){this.trackClick(e.id),"LINK"===e.buttonAction&&e.buttonLink?window.open(e.buttonLink,"_blank"):"OPEN_WIDGET"===e.buttonAction&&window.Rbird&&window.Rbird.showWidget&&window.Rbird.showWidget(),e.closeAfterAction&&this.closeBanner(e.id)}},{key:"closeBanner",value:function(e){var t=document.getElementById("rbird-banner-".concat(e));t&&(t.style.animation="rbirdBannerSlideOut 0.3s ease-in",setTimeout(function(){t.remove()},300)),this.trackDismiss(e),this.displayedBanners.delete(e)}},{key:"trackDismiss",value:function(e){this.trackInteraction(e,"DISMISS")}},{key:"trackImpression",value:function(e){this.trackInteraction(e,"IMPRESSION")}},{key:"trackClick",value:function(e){this.trackInteraction(e,"CLICK")}},{key:"trackInteraction",value:function(e,t){var n,r=o.A.getInstance(),i=r.getState(),a=new XMLHttpRequest;a.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/banners/interaction")),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("apiKey",this.apiKey),null!=i&&null!==(n=i.identify)&&void 0!==n&&n.people&&a.setRequestHeader("peopleId",i.identify.people),r.anonymousIdentifier&&a.setRequestHeader("anonymousId",r.anonymousIdentifier);var s={bannerId:e,type:t};a.send(JSON.stringify(s))}},{key:"getUserLanguage",value:function(e){var t,n,r=o.A.getInstance().getState();if(null!=r&&null!==(t=r.identify)&&void 0!==t&&t.language)return r.identify.language;var i=null===(n=navigator.language)||void 0===n?void 0:n.split("-")[0];return i||(e.defaultLanguage?e.defaultLanguage:"en")}},{key:"getLocalizedField",value:function(e,t,n){if(!e||"object"!==u(e))return"";if(e[t])return e[t];if(n&&e[n])return e[n];if(e.en)return e.en;if(e.de)return e.de;var r=Object.values(e);return r.length>0?r[0]:""}},{key:"escapeHtml",value:function(e){if(!e)return"";var t=document.createElement("div");return t.textContent=e,t.innerHTML}},{key:"injectStyles",value:function(){if("undefined"!=typeof window&&!document.getElementById("rbird-banner-styles")){var e=document.createElement("style");e.id="rbird-banner-styles",e.textContent="\n @keyframes rbirdBannerSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes rbirdBannerSlideOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-20px);\n }\n }\n\n .rbird-banner-close:hover {\n opacity: 1 !important;\n }\n\n .rbird-banner-cta:hover {\n opacity: 0.9 !important;\n transform: translateY(-1px);\n }\n\n .rbird-banner-inline {\n margin: 20px 0;\n }\n ",document.head.appendChild(e)}}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function v(e){return v="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},v(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function b(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v(t)?t:t+""}f=g,y=void 0,(p=h(p="instance"))in f?Object.defineProperty(f,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[p]=y;var x=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,null,[{key:"setStyles",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blue",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"red",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"orange",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30;"undefined"!=typeof window&&k(function(){(0,r._$)(t,n,o,i,a,s,e.isMobileDevice())})}},{key:"getInstance",value:function(){if(this.instance)return this.instance;this.instance=new e;new l;return this.instance}},{key:"showButton",value:function(e){"undefined"!=typeof window&&i.A.getInstance().showButton(e)}},{key:"initialize",value:function(e,t){if("undefined"!=typeof window)try{void 0===t&&(t=!0);var n=this.getInstance();if(n.initialized)return void console.warn("Rbird already initialized.");i.A.getInstance().noButton=!t,o.A.getInstance().init(e).then(function(){n.initialized=!0,t&&i.A.getInstance().showButton(t),k(function(){var t=g.getInstance();t.injectStyles(),t.init(e)})})}catch(f){console.error(f)}}},{key:"showWidget",value:function(){if("undefined"!=typeof window)try{i.A.getInstance().openWebsiteWidget()}catch(f){console.error(f)}}},{key:"identify",value:function(e,t){if("undefined"!=typeof window)try{o.A.getInstance().identifyUser(e,t)}catch(f){console.error(f)}}},{key:"logout",value:function(){if("undefined"!=typeof window)try{o.A.getInstance().logout()}catch(f){console.error(f)}}}])}();b(x,"isMobileDevice",function(){if("undefined"==typeof window)return!1;return window.innerWidth<=768}),b(x,"instance",void 0);var k=function(e){"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",function(){e()}))};const S=x}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(708);return r=r.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.Rbird=t():e.Rbird=t()}(this,()=>(()=>{"use strict";var e={195:(e,t,n)=>{n.d(t,{AC:()=>s,AX:()=>i,K4:()=>u,_$:()=>r,fK:()=>c,kY:()=>h,mm:()=>l,t0:()=>a,tj:()=>o,vd:()=>d});var r=function(e,t,n,r,o,i,a){var s=" \n cta_button {\n background-color: none;\n border: none;\n background-color: #294eab;\n border-radius: 5px;\n font-weight: bold;\n color: white;\n cursor: pointer;\n font-family: inherit;\n}\n\n.cta__modal--standard {\n width: 420px !important;\n}\n\n.cta__modal--big {\n width: 680px !important;\n}\n \n\n.cta__modal-dimmer {\n position: fixed;\n display: none;\n z-index: 9999998;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n}\n\n\n.circle {\n width: 200px;\n height: 200px;\n border-radius: 50%;\n background-color: #3498db;\n margin-right: 20px;\n}\n\n.vertical-text {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n transform: rotate(180deg);\n color: black;\n font-size: 18px;\n}\n\n.feedbackButtonText {\n margin-top: 20px;\n --webkit-transform: rotate(90deg); /* Safari and Chrome */\n --moz-transform: rotate(90deg); /* Firefox */\n --ms-transform: rotate(90deg); /* IE 9 */\n --o-transform: rotate(90deg); /* Opera */\n transform: rotate(90deg);\n --webkit-transform: translate(-50%, 50%);\n\n}\n\n.cta__modal-dimmer--visible {\n display: block;\n animation: show 0.2s;\n animation-fill-mode: forwards;\n}\n\n.cta__modal {\n position: fixed;\n outline: none;\n z-index: 9999999;\n background-color: transparent;\n display: none !important;\n width: ".concat(a?"100% !important":"450px",";\n border-radius: ").concat(a?0:"24","px;\n font-family: inherit;\n overflow-y: hidden;\n height: ").concat(a?"100%":"725px",";\n max-height: ").concat(a?"100%":"calc(100vh - 160px)",";\n text-align: center;\n bottom: ").concat(a?0:i+30,"px;\n right: ").concat("right"!==r||a?"unset":o+10+"px",";\n left: ").concat("left"!==r||a?"unset":o+10+"px",";\n top: ").concat(a?0:"unset","px;\n margin-top: ").concat(a?0:"80px","px;\n box-shadow: rgba(9, 14, 21, 0.16) 0px 5px 40px 0px;\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .cta__modal {\n width: 100% !important;\n height: 100vh !important;\n max-height: 100vh !important;\n bottom: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 0 !important;\n transform: none !important;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {\n .cta__modal {\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100vh !important;\n bottom: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 0 !important;\n transform: none !important;\n overflow: hidden !important;\n }\n\n .rbird-content-iframe {\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n }\n}\n\n/* iOS-spezifische Anpassung für dynamische Viewport-Höhe */\n@supports (-webkit-touch-callout: none) {\n .cta__modal {\n height: 100dvh !important;\n max-height: 100dvh !important;\n }\n\n .rbird-content-iframe {\n height: 100dvh !important;\n }\n}\n\n.cta__modal_loading {\n position: fixed;\n outline: none;\n z-index: 1000000;\n background-color: white;\n display: none !important;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n font-family: inherit;\n overflow-y: auto;\n height: 650px;\n text-align: center;\n}\n\n.cta__modal--visible {\n display: block !important;\n animation: show 0.3s;\n animation-fill-mode: forwards;\n margin-bottom: 25px;\n}\n\n.cta__modal img {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.launcherButton {\n backgroundColor:transparent;\n width:50px;\n height:50px;\n z-index: 10000000;\n position:fixed;\n bottom:").concat(i,"px;\n right:").concat("right"===r?o+"px":"unset",";\n left:").concat("left"===r?o+"px":"unset",";\n cursor:pointer;\n}\n\n.launcherButton5 {\n backgroundColor:transparent;\n width:70px;\n height:50px;\n z-index: 10000000;\n position:fixed;\n bottom:").concat(i,"px;\n right:").concat("right"===r?o+"px":"unset",";\n left:").concat("left"===r?o+"px":"unset",";\n cursor:pointer;\n}\n\n.rbird_badge {\n position: fixed;\n bottom: ").concat(i+35,"px;\n right: ").concat("right"===r?o-10+"px":"unset",";\n left: ").concat("left"===r?o+35+"px":"unset",";\n z-index: 10000000;\n padding: 5px 10px;\n border-radius: 50%;\n background-color: red;\n color: white;\n font-size: 12px;\n}\n\n/* Modal Content/Box */\n.modal-content {\n background-color: #fefefe;\n margin: 15% auto; /* 15% from the top and centered */\n padding: 20px;\n border: 1px solid #888;\n width: 80%; /* Could be more or less, depending on screen size */\n}\n\n.markerBoundary {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n width: calc(100%);\n height: calc(100% - 12px);\n border: 6px solid red;\n z-index: 100000;\n}\n\n.screenshotCloseButton {\n position: absolute;\n top: 0;\n cursor: pointer;\n right: 0;\n text-align: center;\n padding: 5px;\n width: 50px;\n background-color: red;\n color: white;\n font-weight: 500;\n font-family: Arial, serif;\n}\n\n.editorButtons {\n position: absolute;\n top: 10px;\n left: 50%;\n height: 25px;\n width: 200px;\n background-color: white;\n border: 1px solid lightgrey;\n border-radius: 5px;\n}\n\n\n#myImg {\n border-radius: 5px;\n cursor: pointer;\n transition: 0.3s;\n}\n\n#myImg:hover {opacity: 0.7;}\n\n/* The Modal (background) */\n.modalImageViewer {\n position: fixed; /* Stay in place */\n z-index: 10000000000; /* Sit on top */\n padding-top: 100px; /* Location of the box */\n left: 0;\n top: 0;\n width: 100%; /* Full width */\n height: 100%; /* Full height */\n overflow: auto; /* Enable scroll if needed */\n background-color: rgb(0,0,0); /* Fallback color */\n background-color: rgba(0,0,0,0.9); /* Black w/ opacity */\n}\n\n/* Modal Content (image) */\n.modal-content-imageViewer {\n margin: auto;\n display: block;\n width: 80%;\n max-width: 700px;\n}\n\n/* Caption of Modal Image */\n#caption {\n margin: auto;\n display: block;\n width: 80%;\n max-width: 700px;\n text-align: center;\n color: #ccc;\n padding: 10px 0;\n height: 150px;\n}\n\n/* Add Animation */\n.modal-content, #caption {\n animation-name: zoom;\n animation-duration: 0.6s;\n}\n\n@keyframes zoom {\n from {transform: scale(0.1)}\n to {transform: scale(1)}\n}\n\n/* The Close Button */\n.rbird_close {\n position: absolute;\n top: 15px;\n right: 35px;\n color: #f1f1f1;\n font-size: 40px;\n font-weight: bold;\n transition: 0.3s;\n}\n\n.hideWidgetButton {\nwidth: 15px;\nheight: 15px;\nposition: fixed;\ncursor: pointer;\nbottom: ").concat(i+45,"px;\nright: ").concat("right"===r?o-15+"px":"unset",";\nleft: ").concat("left"===r?o-15+"px":"unset",";\nz-index: 10000000;\n}\n\n.rbird_closeclose:hover,\n.rbird_closeclose:focus {\n color: #bbb;\n text-decoration: none;\n cursor: pointer;\n}\n\n.rbird-content-iframe {\nwidth: 100%; \nheight: 100%; \nbackground: transparent\n}\n\n/* 100% Image Width on Smaller Screens */\n@media only screen and (max-width: 700px){\n .modal-content {\n width: 100%;\n }\n}\n\n.rbird-screenshot-loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 900000010;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.95);\n padding: 30px 40px;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n}\n\n.rbird-screenshot-loader-spinner {\n border: 4px solid #f3f3f3;\n border-top: 4px solid #3498db;\n border-radius: 50%;\n width: 50px;\n height: 50px;\n animation: rbird-spin 1s linear infinite;\n margin: 0 auto 15px;\n}\n\n.rbird-screenshot-loader-text {\n color: #333;\n font-size: 16px;\n font-weight: 500;\n font-family: Arial, sans-serif;\n}\n\n@keyframes rbird-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n }"),c=document.querySelector(".rbird-styles");c&&c.remove();var l=document.createElement("style");return l.innerHTML=s,l.className="rbird-styles",document.body.appendChild(l),""};function o(e){return'<svg id="Ebene_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 149.04 149.04">\n <circle cx="74.52" cy="74.52" r="74.52"\n transform="translate(-10.8 136.39) rotate(-80.95)"\n fill="'.concat(e,'"/>\n <path fill="#ffffff"\n d="m74.48,27.59c-28.91,0-52.34,20.8-52.34,46.47,0,13.06,6.07,24.85,15.84,33.29v18.58l23.44-6.87c4.18.95,8.55,1.46,13.06,1.46,28.91,0,52.34-20.8,52.34-46.47s-23.44-46.47-52.34-46.47Z"/>\n</svg>')}function i(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <g>\n <path fill="#ffffff" className="st1" d="M100.3,97.3H33l17.9-17.9V48l5.5-5.5h43.8l5.5,5.5v43.8L100.3,97.3z M43.4,93h55.1l3-3V49.7l-3-3H58.3l-3,3\n v31.4L43.4,93z"/>\n </g>\n</svg>')}function a(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <path fill="#ffffff" className="st1" d="M108.8,37c-9-9.1-21-14.1-33.8-14.1c-12.8,0-24.8,5-33.8,14.1c-9,9.1-14,21.2-14,34c0,7.5,1.8,15,5.1,21.7\n c-1.6,6.4-6.1,11.7-12.1,14.4c-1.4,0.5-1.8,2.4-0.8,3.5c4,4.5,9.7,7.1,15.7,7.1c5.5,0,10.7-2.2,14.5-6c7.6,4.8,16.3,7.3,25.4,7.3\n c12.8,0,24.8-5,33.8-14.1c9-9.1,14-21.2,14-34S117.8,46,108.8,37L108.8,37z M75,114.6c-8.8,0-17.2-2.6-24.5-7.6l0,0\n c-0.9-0.6-2.2-0.5-3,0.4c-3.1,3.7-7.7,5.8-12.5,5.8c-3.7,0-7.3-1.3-10.2-3.6c6.1-3.6,10.5-9.7,12-16.8c0.1-0.6,0-1.1-0.2-1.6\n c-3.3-6.2-5-13.2-5-20.3c0-24.1,19.4-43.7,43.3-43.7s43.3,19.6,43.3,43.7S98.9,114.6,75,114.6L75,114.6z"/>\n</svg>')}function s(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <g id="text_chat">\n <g>\n <path fill="#ffffff" className="st1" d="M74.5,31.6c-23.7,0-42.9,19.2-42.9,42.9c0,6.5,1.5,12.9,4.3,18.7l-2.4,10.6c-0.7,3.3-0.1,6.4,1.7,8.6\n c2.2,2.8,5.9,3.9,10,3l10.6-2.3c5.8,2.8,12.3,4.3,18.7,4.3c23.7,0,42.9-19.2,42.9-42.9S98.2,31.6,74.5,31.6z"/>\n <g>\n <path fill="#ffffff" className="st1" d="M87.4,70.2H61.6c-2.4,0-4.3-1.9-4.3-4.3c0-2.4,1.9-4.3,4.3-4.3h25.7c2.4,0,4.3,1.9,4.3,4.3\n C91.7,68.3,89.8,70.2,87.4,70.2z"/>\n </g>\n <g>\n <path fill="#ffffff" className="st1"\n d="M74.5,87.4H61.6c-2.4,0-4.3-1.9-4.3-4.3s1.9-4.3,4.3-4.3h12.9c2.4,0,4.3,1.9,4.3,4.3S76.9,87.4,74.5,87.4z"\n />\n </g>\n </g>\n </g>\n</svg>')}function c(e){return'<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg"\n x="0px" y="0px"\n viewBox="0 0 149 149" style="enable-background:new 0 0 149 149;">\n <circle className="st0" cx="74.5" cy="74.5" r="74.5" fill="'.concat(e,'"/>\n <path fill="#ffffff" className="st1" d="M112.5,47.2c2.2,4.3,2.2,9.9,2.2,21.2v4.8c0,6.8,0,10.2-0.8,13c-1.9,6.6-7.1,11.7-13.6,13.6\n c-2.8,0.8-6.2,0.8-13,0.8h-2.2l-0.3,0c-4.1,0-8.1,1.3-11.5,3.7l-0.2,0.2l-10.5,7.5c-3.6,2.6-8.3-1.1-6.7-5.2c1.2-2.9-1-6.1-4.1-6.1\n h-2.4c-8.4,0-15.2-6.8-15.2-15.2v-17c0-11.3,0-16.9,2.2-21.2c1.9-3.8,5-6.9,8.8-8.8c4.3-2.2,9.9-2.2,21.2-2.2h16.1\n c11.3,0,16.9,0,21.2,2.2C107.5,40.4,110.6,43.5,112.5,47.2L112.5,47.2z M58.4,57.4c-1.7,0-3,1.4-3,3s1.4,3,3,3h32.2c1.7,0,3-1.4,3-3\n s-1.4-3-3-3H58.4z M66.5,73.5c-1.7,0-3,1.4-3,3c0,1.7,1.4,3,3,3h16.1c1.7,0,3-1.4,3-3c0-1.7-1.4-3-3-3H66.5z"/>\n</svg>')}function l(e){return'<svg version="1.1" id="Ebene_2" xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 3437.83 2395.28">\n <g id="Layer_1">\n <polygon fill="'.concat(e,'"\n points="404.34 1465.87 202.48 2395.28 949.73 1971.67 404.34 1465.87"/>\n <path fill="').concat(e,'"\n d="m3436.45,1275.75C3204.96,2696.73-100.03,2331.34,2.33,885.09,240.59-504.37,3514.92-169.98,3436.45,1275.75Z"/>\n <path fill="#ffffff"\n d="m759.32,1060.6c-17.38-7.23-39.16-13.43-64.74-18.44l-.34-.06c-.67-.11-1.33-.25-1.97-.43-1.22-.33-2.51-.62-3.83-.85-1-.23-2.01-.41-3.07-.55-.25-.03-.5-.08-.76-.14l-.59-.13c-16.86-3.33-30.03-6.51-39.15-9.44-7.87-2.52-14.24-6.33-19.48-11.64-4.35-4.41-6.46-10.6-6.46-18.93v-.27c0-9.45,4.18-16.37,13.16-21.77,10.61-6.38,26.42-9.62,46.99-9.62,13.82,0,28.57,2.7,43.82,8.04,15.5,5.42,30.6,13.17,44.88,23.03l10.87,7.51,41.85-83.7-8.25-5.65c-13.2-9.05-27.35-16.89-42.06-23.3-14.73-6.42-30-11.39-45.38-14.79-15.48-3.42-30.88-5.15-45.74-5.15-32.19,0-60.21,5.12-83.27,15.2-23.74,10.39-42.16,25.79-54.76,45.77-12.51,19.86-18.86,43.92-18.86,71.5v.27c0,31.23,6.92,56,20.58,73.63,13.41,17.32,30.04,29.64,49.41,36.6,17.97,6.46,40.76,11.89,67.75,16.14l5.41.74c.83.21,1.66.35,2.48.42l1.07.19c14.41,2.26,26.3,4.79,35.35,7.52,7.65,2.31,13.85,5.87,18.41,10.57,3.84,3.96,5.71,9.51,5.71,16.97v.27c0,10.99-4.64,18.96-14.61,25.08-11.48,7.06-28.45,10.64-50.41,10.64-19.62,0-39-3.22-57.61-9.56-18.49-6.3-34.99-15.35-49.05-26.9l-10.58-8.69-45.86,81.61,7.39,6.11c13.18,10.89,28.3,20.32,44.94,28.02,16.54,7.65,34.43,13.54,53.18,17.5,18.69,3.94,38.06,5.94,57.58,5.94,33.03,0,61.85-5.04,85.67-14.99,24.56-10.25,43.59-25.48,56.58-45.26,12.95-19.73,19.52-43.57,19.52-70.86v-.54c0-29.11-6.39-52.69-19.01-70.08-12.42-17.12-28.16-29.74-46.8-37.5Z"/>\n <path fill="#ffffff"\n d="m1067.48,1143.49c0,19.67-4.92,34.26-15.04,44.6-10.05,10.27-24.27,15.27-43.48,15.27s-33.09-4.98-43.04-15.24c-10.05-10.35-14.93-24.95-14.93-44.63v-265.13h-97.28v263.23c0,32.62,6.08,61.07,18.07,84.57,12.25,24,30.39,42.54,53.92,55.1,23.1,12.33,51.11,18.58,83.26,18.58s60.2-6.25,83.38-18.57c23.62-12.55,41.85-31.08,54.19-55.07,12.09-23.51,18.23-51.98,18.23-84.6v-263.23h-97.28v265.13Z"/>\n <path fill="#ffffff"\n d="m1457.81,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.06,16.96-69.01s-5.7-49.19-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.38,136.32c-2.82,5.52-6.61,9.64-11.56,12.62-5.01,3.01-10.76,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.44,20.27Z"/>\n <path fill="#ffffff"\n d="m1798.27,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.05,16.96-69.01s-5.7-49.2-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.37,136.32c-2.83,5.52-6.61,9.65-11.56,12.62-5.01,3.01-10.75,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.43,20.27Z"/>\n <path fill="#ffffff"\n d="m2127.18,893.76c-23.42-12.92-50.7-19.47-81.1-19.47s-57.69,6.55-81.1,19.47c-23.64,13.05-42.19,31.74-55.13,55.57-12.8,23.57-19.3,51.11-19.3,81.84v111.77c0,30.74,6.49,58.27,19.3,81.84,12.95,23.83,31.5,42.53,55.13,55.57,23.4,12.92,50.69,19.47,81.1,19.47s57.69-6.55,81.1-19.47c23.64-13.05,42.19-31.74,55.13-55.57,12.8-23.57,19.3-51.11,19.3-81.84v-111.77c0-30.74-6.49-58.27-19.3-81.84-12.94-23.82-31.49-42.52-55.13-55.57Zm-25.57,251.08c0,11.8-2.34,22.23-6.95,31.01-4.51,8.57-10.7,14.99-18.94,19.62-8.34,4.69-18.32,7.07-29.64,7.07s-21.3-2.38-29.64-7.07c-8.24-4.63-14.43-11.05-18.94-19.62-4.62-8.77-6.95-19.2-6.95-31.01v-115.57c0-11.81,2.34-22.24,6.96-31.01,4.51-8.57,10.7-14.99,18.93-19.62,8.34-4.69,18.31-7.07,29.64-7.07s21.3,2.38,29.64,7.07c8.23,4.63,14.42,11.05,18.93,19.62,4.62,8.78,6.96,19.22,6.96,31.01v115.57Z"/>\n <path fill="#ffffff"\n d="m2499.13,1120.82c18.38-10.85,32.78-26.34,42.79-46.06,9.83-19.36,14.81-41.96,14.81-67.18s-4.98-47.82-14.81-67.19c-10.01-19.71-24.35-35.2-42.63-46.04-18.18-10.79-39.41-16.26-63.1-16.26h-184.28v417.67h97.28v-158.7h26.89l88.92,158.7h116.71l-97.24-167.69c5.07-2.07,9.96-4.49,14.65-7.26Zm-45.87-93.53c-2.27,5.06-5.3,8.79-9.25,11.38-3.91,2.57-8.42,3.82-13.78,3.82h-81.03v-69.83h81.03c5.54,0,10.14,1.25,14.05,3.81,3.96,2.6,6.98,6.32,9.25,11.38,2.47,5.51,3.73,12.11,3.74,19.61-.16,7.58-1.51,14.25-4.01,19.83Z"/>\n <polygon fill="#ffffff"\n points="2559.82 878.36 2559.82 972.93 2667.24 972.93 2667.24 1295.76 2764.53 1295.76 2764.53 972.93 2871.96 972.93 2871.96 878.36 2559.82 878.36"/>\n </g>\n</svg>')}function u(e){return'<svg version="1.1" id="Ebene_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3437.83 2395.28">\n <g id="Layer_1">\n\n <path fill="'.concat(e,'"\n d="m3436.45,1275.75C3204.96,2696.73-100.03,2331.34,2.33,885.09,240.59-504.37,3514.92-169.98,3436.45,1275.75Z"/>\n <path fill="#ffffff"\n d="m759.32,1060.6c-17.38-7.23-39.16-13.43-64.74-18.44l-.34-.06c-.67-.11-1.33-.25-1.97-.43-1.22-.33-2.51-.62-3.83-.85-1-.23-2.01-.41-3.07-.55-.25-.03-.5-.08-.76-.14l-.59-.13c-16.86-3.33-30.03-6.51-39.15-9.44-7.87-2.52-14.24-6.33-19.48-11.64-4.35-4.41-6.46-10.6-6.46-18.93v-.27c0-9.45,4.18-16.37,13.16-21.77,10.61-6.38,26.42-9.62,46.99-9.62,13.82,0,28.57,2.7,43.82,8.04,15.5,5.42,30.6,13.17,44.88,23.03l10.87,7.51,41.85-83.7-8.25-5.65c-13.2-9.05-27.35-16.89-42.06-23.3-14.73-6.42-30-11.39-45.38-14.79-15.48-3.42-30.88-5.15-45.74-5.15-32.19,0-60.21,5.12-83.27,15.2-23.74,10.39-42.16,25.79-54.76,45.77-12.51,19.86-18.86,43.92-18.86,71.5v.27c0,31.23,6.92,56,20.58,73.63,13.41,17.32,30.04,29.64,49.41,36.6,17.97,6.46,40.76,11.89,67.75,16.14l5.41.74c.83.21,1.66.35,2.48.42l1.07.19c14.41,2.26,26.3,4.79,35.35,7.52,7.65,2.31,13.85,5.87,18.41,10.57,3.84,3.96,5.71,9.51,5.71,16.97v.27c0,10.99-4.64,18.96-14.61,25.08-11.48,7.06-28.45,10.64-50.41,10.64-19.62,0-39-3.22-57.61-9.56-18.49-6.3-34.99-15.35-49.05-26.9l-10.58-8.69-45.86,81.61,7.39,6.11c13.18,10.89,28.3,20.32,44.94,28.02,16.54,7.65,34.43,13.54,53.18,17.5,18.69,3.94,38.06,5.94,57.58,5.94,33.03,0,61.85-5.04,85.67-14.99,24.56-10.25,43.59-25.48,56.58-45.26,12.95-19.73,19.52-43.57,19.52-70.86v-.54c0-29.11-6.39-52.69-19.01-70.08-12.42-17.12-28.16-29.74-46.8-37.5Z"/>\n <path fill="#ffffff"\n d="m1067.48,1143.49c0,19.67-4.92,34.26-15.04,44.6-10.05,10.27-24.27,15.27-43.48,15.27s-33.09-4.98-43.04-15.24c-10.05-10.35-14.93-24.95-14.93-44.63v-265.13h-97.28v263.23c0,32.62,6.08,61.07,18.07,84.57,12.25,24,30.39,42.54,53.92,55.1,23.1,12.33,51.11,18.58,83.26,18.58s60.2-6.25,83.38-18.57c23.62-12.55,41.85-31.08,54.19-55.07,12.09-23.51,18.23-51.98,18.23-84.6v-263.23h-97.28v265.13Z"/>\n <path fill="#ffffff"\n d="m1457.81,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.06,16.96-69.01s-5.7-49.19-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.38,136.32c-2.82,5.52-6.61,9.64-11.56,12.62-5.01,3.01-10.76,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.44,20.27Z"/>\n <path fill="#ffffff"\n d="m1798.27,894.78c-20.32-10.89-44-16.42-70.4-16.42h-169.63v417.4h97.28v-153h72.35c26.38,0,50.05-5.47,70.36-16.26,20.59-10.94,36.78-26.64,48.14-46.66,11.25-19.84,16.96-43.05,16.96-69.01s-5.7-49.2-16.95-69.12c-11.35-20.11-27.53-35.89-48.11-46.93Zm-39.37,136.32c-2.83,5.52-6.61,9.65-11.56,12.62-5.01,3.01-10.75,4.47-17.56,4.47h-74.25v-75.25h74.25c6.99,0,12.82,1.46,17.83,4.47,4.9,2.94,8.61,7.06,11.35,12.6,2.9,5.88,4.38,12.89,4.38,20.83s-1.49,14.53-4.43,20.27Z"/>\n <path fill="#ffffff"\n d="m2127.18,893.76c-23.42-12.92-50.7-19.47-81.1-19.47s-57.69,6.55-81.1,19.47c-23.64,13.05-42.19,31.74-55.13,55.57-12.8,23.57-19.3,51.11-19.3,81.84v111.77c0,30.74,6.49,58.27,19.3,81.84,12.95,23.83,31.5,42.53,55.13,55.57,23.4,12.92,50.69,19.47,81.1,19.47s57.69-6.55,81.1-19.47c23.64-13.05,42.19-31.74,55.13-55.57,12.8-23.57,19.3-51.11,19.3-81.84v-111.77c0-30.74-6.49-58.27-19.3-81.84-12.94-23.82-31.49-42.52-55.13-55.57Zm-25.57,251.08c0,11.8-2.34,22.23-6.95,31.01-4.51,8.57-10.7,14.99-18.94,19.62-8.34,4.69-18.32,7.07-29.64,7.07s-21.3-2.38-29.64-7.07c-8.24-4.63-14.43-11.05-18.94-19.62-4.62-8.77-6.95-19.2-6.95-31.01v-115.57c0-11.81,2.34-22.24,6.96-31.01,4.51-8.57,10.7-14.99,18.93-19.62,8.34-4.69,18.31-7.07,29.64-7.07s21.3,2.38,29.64,7.07c8.23,4.63,14.42,11.05,18.93,19.62,4.62,8.78,6.96,19.22,6.96,31.01v115.57Z"/>\n <path fill="#ffffff"\n d="m2499.13,1120.82c18.38-10.85,32.78-26.34,42.79-46.06,9.83-19.36,14.81-41.96,14.81-67.18s-4.98-47.82-14.81-67.19c-10.01-19.71-24.35-35.2-42.63-46.04-18.18-10.79-39.41-16.26-63.1-16.26h-184.28v417.67h97.28v-158.7h26.89l88.92,158.7h116.71l-97.24-167.69c5.07-2.07,9.96-4.49,14.65-7.26Zm-45.87-93.53c-2.27,5.06-5.3,8.79-9.25,11.38-3.91,2.57-8.42,3.82-13.78,3.82h-81.03v-69.83h81.03c5.54,0,10.14,1.25,14.05,3.81,3.96,2.6,6.98,6.32,9.25,11.38,2.47,5.51,3.73,12.11,3.74,19.61-.16,7.58-1.51,14.25-4.01,19.83Z"/>\n <polygon fill="#ffffff"\n points="2559.82 878.36 2559.82 972.93 2667.24 972.93 2667.24 1295.76 2764.53 1295.76 2764.53 972.93 2871.96 972.93 2871.96 878.36 2559.82 878.36"/>\n </g>\n</svg>')}function d(e){return'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"\n x="0px"\n y="0px"\n viewBox="0 0 494.08 494.08" style="enable-background:new 0 0 494.08 494.08;">\n <g>\n <path fill="'.concat(e,'" d="M247.04,0C110.604,0,0,110.604,0,247.04s110.604,247.04,247.04,247.04s247.04-110.604,247.04-247.04\n C493.845,110.701,383.379,0.235,247.04,0z M247.04,298.667l-79.787-80.64l14.293-13.653l65.493,64l65.493-64l14.72,14.507\n L247.04,298.667z"/>\n </g>\n </svg>')}var h='<svg id="Layer_1" enable-background="new 0 0 64 64" viewBox="0 0 64 64"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="m34.8 32 19.8-19.8c.8-.8.8-2 0-2.8s-2-.8-2.8 0l-19.8 19.8-19.8-19.8c-.8-.8-2-.8-2.8 0s-.8 2 0 2.8l19.8 19.8-19.8 19.8c-.8.8-.8 2 0 2.8s2 .8 2.8 0l19.8-19.8 19.8 19.8c.8.8 2 .8 2.8 0s.8-2 0-2.8z"/>\n </svg>'},499:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(537),o=n(708);function i(e){return i="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},i(e)}function a(){a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new j(r||[]);return o(a,"_invoke",{value:I(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",y="suspendedYield",g="executing",v="completed",m={};function b(){}function w(){}function x(){}var k={};d(k,c,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(P([])));E&&E!==n&&r.call(E,c)&&(k=E);var L=x.prototype=b.prototype=Object.create(k);function C(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(o,a,s,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==i(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,s,c)},function(e){n("throw",e,s,c)}):t.resolve(d).then(function(e){u.value=e,s(u)},function(e){return n("throw",e,s,c)})}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return a=a?a.then(o,o):o()}})}function I(t,n,r){var o=p;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=M(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?v:y,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function B(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return w.prototype=x,o(L,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},C(T.prototype),d(T.prototype,l,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new T(h(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(L),d(L,u,"Generator"),d(L,c,function(){return this}),d(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function s(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"widgetSettings",void 0),l(this,"apiKey",void 0),l(this,"anonymousIdentifier",void 0),l(this,"identify",void 0)}return t=e,n=[{key:"generateRandomString",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;n<60;n++)t+=e.charAt(Math.floor(62*Math.random()));return t}},{key:"init",value:function(e){var t,n=this;return"undefined"==typeof window?Promise.resolve(null):(this.apiKey=e,this.identify=null===(t=this.getState())||void 0===t?void 0:t.identify,new Promise(function(t,i){var c=new XMLHttpRequest;c.open("GET","".concat("https://api.releasebird.com/papi","/ewidget")),c.setRequestHeader("Content-Type","application/json;charset=UTF-8"),c.setRequestHeader("apiKey",e),c.onerror=function(){i(new Error("Network error"))};var l=n;c.onreadystatechange=function(){var e,n=(e=a().mark(function e(n){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c.readyState!==XMLHttpRequest.DONE){e.next=16;break}if(200!==c.status&&201!==c.status){e.next=15;break}return e.prev=2,l.widgetSettings=JSON.parse(c.responseText),o.default.setStyles(l.widgetSettings.backgroundColor,l.widgetSettings.textColor,l.widgetSettings.launcherColor,l.widgetSettings.launcherPosition,l.widgetSettings.spaceLeftRight,l.widgetSettings.spaceBottom),e.next=7,r.A.getInstance().renderWebsiteWidget();case 7:t(l.widgetSettings),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),i(new Error("Error parsing widget settings"));case 13:e.next=16;break;case 15:i(new Error("Request failed with status ".concat(c.status)));case 16:case"end":return e.stop()}},e,null,[[2,10]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s(i,r,o,a,c,"next",e)}function c(e){s(i,r,o,a,c,"throw",e)}a(void 0)})});return function(e){return n.apply(this,arguments)}}(),c.send();var u=window.localStorage.getItem("Rbird_I");if(u)n.anonymousIdentifier=u;else{var d=n.generateRandomString();window.localStorage.setItem("Rbird_I",d),n.anonymousIdentifier=d}n.anonymousIdentifier=n.anonymousIdentifier.replace('"',""),setInterval(function(){var t,r=n.getState();if(null!=r&&r.identify&&null!=r&&null!==(t=r.identify)&&void 0!==t&&t.properties.external_user_id){var o=new XMLHttpRequest;o.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/ping")),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("apiKey",e),o.send(JSON.stringify(r.identify))}},3e4)}))}},{key:"getState",value:function(){if("undefined"==typeof window)return null;var e=window.localStorage.getItem("rbird_state");return e?JSON.parse(e):e?void 0:((e={}).identify={},e.identify.properties={},window.localStorage.setItem("rbird_state",JSON.stringify(e)),e)}},{key:"logout",value:function(){if("undefined"!=typeof window){window.localStorage.removeItem("rbird_state");var t=this.generateRandomString();window.localStorage.setItem("Rbird_I",t),r.A.getInstance().updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(e.getInstance().apiKey,"&tab=HOME&people=null&hash=null&ai=").concat(t))}}},{key:"trackEvent",value:function(e,t){if("undefined"!=typeof window&&window.localStorage.getItem("rbird_state")){var n,r=JSON.parse(window.localStorage.getItem("rbird_state")),o={};o.name=e,o.peopleId=null==r||null===(n=r.identify)||void 0===n?void 0:n.people,o.data=t||{};var i=new XMLHttpRequest;i.open("POST","".concat("https://api.releasebird.com/papi","/events")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),i.setRequestHeader("apiKey",this.apiKey),i.onerror=function(e){},i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||i.status)},i.send(JSON.stringify(o))}}},{key:"identifyUser",value:function(t,n){if("undefined"!=typeof window){var o=this.getState();o.identify.properties=t,o.identify.hash=n;var i=new XMLHttpRequest;i.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/identify")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),i.setRequestHeader("apiKey",this.apiKey),i.onerror=function(e){};var a=this;i.onreadystatechange=function(t){if(4===i.readyState&&(200===i.status||201===i.status))try{var s=JSON.parse(i.responseText);s.valid&&(o.identify.people=s.peopleId,o.identify.company=s.companyId,n&&(o.identify.hash=n),window.localStorage.setItem("rbird_state",JSON.stringify(o)),r.A.getInstance().updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(e.getInstance().apiKey,"&tab=HOME&people=").concat(s.peopleId,"&hash=").concat(n,"&ai=").concat(a.anonymousIdentifier)))}catch(c){}},i.send(JSON.stringify(o.identify))}}}],i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&c(t.prototype,n),i&&c(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i}();l(d,"instance",void 0)},537:(e,t,n)=>{function r(e){return r="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},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{A:()=>q});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"hasClass",value:function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},{key:"addClass",value:function(e,t){e.classList?e.classList.add(t):hasClass(e,t)||(e.className+=" "+t)}},{key:"removeClass",value:function(e,t){if(e.classList)e.classList.remove(t);else if(hasClass(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}}],(t=null)&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function s(e){return s="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},s(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"showImage",value:function(e){var t=document.createElement("div");t.id="myModal",t.className="modalImageViewer";var n=document.createElement("span");n.className="rbird_close",n.onclick=function(){return document.body.removeChild(t)},n.textContent="x";var r=document.createElement("img");r.className="modal-content-imageViewer",r.src=e,t.appendChild(n),t.appendChild(r),document.body.appendChild(t)}}],(t=null)&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),d=n(195),h=n(499);function f(e){return f="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},f(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function g(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var b="http://www.w3.org/2000/svg",w=function(){return g(function e(t,n){var r=this;p(this,e),v(this,"shapes",void 0),v(this,"colors",void 0),v(this,"fills",void 0),v(this,"sizes",void 0),v(this,"resets",void 0),v(this,"reset",void 0),v(this,"settings",void 0),v(this,"closeColorPicker",function(){var e=document.getElementById("rbirdColorPicker");e&&document.body.removeChild(e)}),v(this,"openColorPicker",function(){var e=document.createElement("div");e.id="rbirdColorPicker",e.style.display="flex",e.style.gap="10px",e.style.padding="15px",e.style.cursor="pointer",e.style.backgroundColor="white",e.style.position="absolute",e.style.top="80px",e.style.zIndex="900000000000",e.style.left="50%",e.style.transform="translateX(-50%)",e.style.border="1px solid #e5e7eb",e.style.borderRadius="8px",e.style.boxShadow="0 4px 6px rgba(0, 0, 0, 0.1)",document.body.appendChild(e);[{name:"black",hex:"#000000"},{name:"red",hex:"#ef4444"},{name:"blue",hex:"#3b82f6"},{name:"yellow",hex:"#fbbf24"},{name:"green",hex:"#10b981"}].forEach(function(t){var n=document.createElement("div");n.style.cursor="pointer",n.style.transition="transform 0.2s",n.addEventListener("mouseenter",function(){n.style.transform="scale(1.1)"}),n.addEventListener("mouseleave",function(){n.style.transform="scale(1)"}),n.addEventListener("click",function(e){r.onClick("color",t.name),r.colors[0]&&(r.colors[0].innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="24pt" width="24pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+t.hex+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n'),r.closeColorPicker()}),n.innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="28pt" width="28pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+t.hex+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n',e.appendChild(n)}),e.addEventListener("click",function(e){return r.closeColorPicker()})}),this.reset=n,this.settings=t},[{key:"setShapes",value:function(e){var t=this,n=[],r=document.createElement("button");r.addEventListener("click",function(e){return t.onClick("shape","path")}),r.style.background="none",r.style.boxShadow="none",r.style.border="none",r.style.cursor="pointer",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.style.padding="5px",r.innerHTML='<svg fill="none" height="20pt" viewBox="0 0 120 120" width="20px" xmlns="http://www.w3.org/2000/svg">\n <path clip-rule="evenodd"\n d="m76.25 82.5c-.6904 0-1.25.5596-1.25 1.25s.5596 1.25 1.25 1.25h21.25c6.904 0 12.5 5.5964 12.5 12.5 0 6.904-5.596 12.5-12.5 12.5h-71.5c-2.2091 0-4-1.791-4-4s1.7909-4 4-4h71.5c2.4853 0 4.5-2.0147 4.5-4.5s-2.0147-4.5-4.5-4.5h-21.25c-5.1086 0-9.25-4.1414-9.25-9.25s4.1414-9.25 9.25-9.25h24.75c2.209 0 4 1.7909 4 4s-1.791 4-4 4z"\n fill="#ffd482" fill-rule="evenodd"/>\n <path d="m37.626 72.6258c-1.0469-1.0469-2.4429-1.6793-3.9205-1.5873-3.232.2012-9.1224 1.1271-12.6358 5.0559-7.0697 7.9054-5.1282 17.0827-8.9811 19.7647-5.51917 3.8419-.6888 14.1409 13.9114 14.1409 11.321 0 20.5606-5.883 22.7243-23.246.2166-1.7381-.4371-3.4669-1.6756-4.7055z"\n fill="#ffba33"/>\n <path d="m34.0099 80.1329c-2.3432-2.3431-2.3432-6.1421 0-8.4853l58.1289-58.1289c3.9053-3.90529 10.2372-3.90528 14.1422 0l.7.7005c3.906 3.9052 3.906 10.2368 0 14.1421l-58.1285 58.1289c-2.3431 2.3432-6.1421 2.3432-8.4853 0z"\n fill="#944700"/>\n</svg>',r.value="path",n.push(r);var o=document.createElement("button");o.addEventListener("click",function(e){return t.onClick("shape","rect")}),o.style.background="none",o.style.cursor="pointer",o.style.boxShadow="none",o.style.border="none",o.style.touchAction="manipulation",o.style.webkitTapHighlightColor="transparent",o.style.padding="5px",o.innerHTML='<svg id="Layer_1" enable-background="new 0 0 48 48" height="20pt" viewBox="0 0 48 48" width="20pt"\n xmlns="http://www.w3.org/2000/svg">\n <path d="m44 12.5h-40c-.83 0-1.5.67-1.5 1.5v20c0 .83.67 1.5 1.5 1.5h40c.83 0 1.5-.67 1.5-1.5v-20c0-.83-.67-1.5-1.5-1.5zm-1.5 20h-37v-17h37z"/>\n</svg>',o.value="rect",n.push(o);var i=document.createElement("button");i.addEventListener("click",function(e){return t.onClick("shape","circle")}),i.style.background="none",i.style.cursor="pointer",i.style.boxShadow="none",i.style.border="none",i.style.touchAction="manipulation",i.style.webkitTapHighlightColor="transparent",i.style.padding="5px",i.innerHTML='<svg height="20pt" viewBox="0 0 512 512" width="20pt" xmlns="http://www.w3.org/2000/svg">\n <path d="m256 512c-68.378906 0-132.667969-26.628906-181.019531-74.980469-48.351563-48.351562-74.980469-112.640625-74.980469-181.019531s26.628906-132.667969 74.980469-181.019531c48.351562-48.351563 112.640625-74.980469 181.019531-74.980469s132.667969 26.628906 181.019531 74.980469c48.351563 48.351562 74.980469 112.640625 74.980469 181.019531s-26.628906 132.667969-74.980469 181.019531c-48.351562 48.351563-112.640625 74.980469-181.019531 74.980469zm0-482c-124.617188 0-226 101.382812-226 226s101.382812 226 226 226 226-101.382812 226-226-101.382812-226-226-226zm0 0"/>\n <path d="m256 512c-68.378906 0-132.667969-26.628906-181.019531-74.980469-48.351563-48.351562-74.980469-112.640625-74.980469-181.019531s26.628906-132.667969 74.980469-181.019531c48.351562-48.351563 112.640625-74.980469 181.019531-74.980469s132.667969 26.628906 181.019531 74.980469c48.351563 48.351562 74.980469 112.640625 74.980469 181.019531s-26.628906 132.667969-74.980469 181.019531c-48.351562 48.351563-112.640625 74.980469-181.019531 74.980469zm0-482c-124.617188 0-226 101.382812-226 226s101.382812 226 226 226 226-101.382812 226-226-101.382812-226-226-226zm0 0"/>\n</svg>',i.value="circle",n.push(i);var a=document.createElement("button");a.style.background="none",a.style.boxShadow="none",a.style.cursor="pointer",a.style.border="none",a.style.touchAction="manipulation",a.style.webkitTapHighlightColor="transparent",a.style.padding="5px",a.addEventListener("click",function(e){return t.onClick("shape","ellipse")}),a.innerHTML='<svg clip-rule="evenodd" fill-rule="evenodd" height="20pt" stroke-linejoin="round" stroke-miterlimit="2"\n viewBox="0 0 24 24" width="20pt" xmlns="http://www.w3.org/2000/svg">\n <g id="Icon">\n <path d="m12 5.25c-3.509 0-6.615 1.048-8.544 2.627-1.407 1.151-2.206 2.588-2.206 4.123s.799 2.972 2.206 4.123c1.929 1.579 5.035 2.627 8.544 2.627s6.615-1.048 8.544-2.627c1.407-1.151 2.206-2.588 2.206-4.123s-.799-2.972-2.206-4.123c-1.929-1.579-5.035-2.627-8.544-2.627zm0 1.5c3.114 0 5.883.887 7.595 2.288 1.02.835 1.655 1.848 1.655 2.962s-.635 2.127-1.655 2.962c-1.712 1.401-4.481 2.288-7.595 2.288s-5.883-.887-7.595-2.288c-1.02-.835-1.655-1.848-1.655-2.962s.635-2.127 1.655-2.962c1.712-1.401 4.481-2.288 7.595-2.288z"/>\n </g>\n</svg>',a.value="ellipse",n.push(a),this.shapes=n}},{key:"setResets",value:function(){var e=this,t=document.createElement("button");t.addEventListener("click",function(t){return e.reset()}),t.style.border="none",t.style.background="none",t.style.cursor="pointer",t.style.padding="5px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.touchAction="manipulation",t.style.webkitTapHighlightColor="transparent",t.title="Undo last drawing",t.innerHTML='<svg id="Capa_1" enable-background="new 0 0 511.697 511.697" height="20pt" viewBox="0 0 511.697 511.697" width="20pt"\n xmlns="http://www.w3.org/2000/svg">\n <g>\n <path clip-rule="evenodd"\n d="m450.09 150.319c82.253 82.41 82.126 215.896-.284 298.149-39.451 39.376-92.891 61.526-148.63 61.606h-301.176v-60.235h301.176c83.167-.214 150.414-67.809 150.199-150.976-.214-82.864-67.335-149.985-150.199-150.199h-98.676v86.806l-202.5-116.922 202.5-116.926v86.807h98.678c55.893.006 109.48 22.278 148.912 61.89z"\n fill="#6b7280" fill-rule="evenodd"/>\n </g>\n</svg>',this.resets=[t]}},{key:"setColors",value:function(e){var t=this,n=[],r=document.createElement("div");r.id="colorCircle",r.addEventListener("click",function(e){return t.openColorPicker()}),r.style.cursor="pointer",r.style.padding="5px",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.title="Select color",r.innerHTML='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" height="24pt" width="24pt" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"\n y="0px"\n viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\n<circle cx="256" cy="256" r="240" fill="'+this.settings.color+'" stroke="#d1d5db" stroke-width="32"/>\n</svg>\n',n.push(r),this.colors=n}},{key:"setFills",value:function(e){this.fills=[]}},{key:"setSizes",value:function(e){this.sizes=[]}},{key:"getElement",value:function(){this.updateButtons();var e=document.createElement("div");e.classList.add("menu"),e.style.display="flex",e.style.alignItems="center",e.style.gap="15px",e.style.flexWrap="wrap";var t=document.createElement("div");t.style.display="flex",t.style.gap="5px",t.style.alignItems="center",t.style.paddingRight="15px",t.style.borderRight="1px solid #ddd",this.shapes.forEach(function(e){return t.appendChild(e)}),e.appendChild(t);var n=document.createElement("div");n.style.display="flex",n.style.gap="5px",n.style.alignItems="center",n.style.paddingRight="15px",n.style.borderRight="1px solid #ddd",this.colors.forEach(function(e){return n.appendChild(e)}),e.appendChild(n);var r=document.createElement("div");r.style.display="flex",r.style.gap="5px",r.style.alignItems="center",this.resets.forEach(function(e){return r.appendChild(e)}),e.appendChild(r);var o=document.createElement("div");return o.style.backgroundColor="#10b981",o.style.color="white",o.style.fontWeight="600",o.innerHTML="Take Screenshot",o.style.padding="10px 20px",o.style.fontFamily="Arial, sans-serif",o.style.fontSize="15px",o.style.borderRadius="8px",o.style.cursor="pointer",o.style.touchAction="manipulation",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.webkitTapHighlightColor="transparent",o.style.transition="background-color 0.2s",o.style.whiteSpace="nowrap",o.addEventListener("mouseenter",function(){o.style.backgroundColor="#059669"}),o.addEventListener("mouseleave",function(){o.style.backgroundColor="#10b981"}),window.innerWidth<=768&&(o.style.fontSize="14px",o.style.padding="8px 16px",e.style.gap="8px",t.style.paddingRight="8px",n.style.paddingRight="8px"),o.addEventListener("click",function(e){M.getInstance().screenshot()}),o.addEventListener("touchstart",function(e){e.stopPropagation()}),e.appendChild(o),e}},{key:"onClick",value:function(e,t){this.settings[e]=t,this.updateButtons()}},{key:"updateButtons",value:function(){var e=this;Object.keys(this.settings).forEach(function(t){e[t+"s"].forEach(function(n){n.value==e.settings[t]?n.classList.add("selected"):n.classList.remove("selected")})})}}])}(),x=function(){return g(function e(t){var n,r;p(this,e),v(this,"svg",void 0),v(this,"objects",[]),v(this,"codeSection",void 0),v(this,"originalMousePosition",null),v(this,"lastMousePosition",null),v(this,"currentMousePosition",null),v(this,"createdObject",null),v(this,"focusedObject",null),v(this,"menuSettings",void 0),this.svg=e.createSVG(t.dimension),this.attachEvents(this.svg);var o=this.createMenu();this.codeSection=document.createElement("pre");var i,a=document.createElement("div");a.classList.add("svg-editor"),a.style.height="100%",a.appendChild(o),a.appendChild(this.svg),null==t||null===(n=t.element)||void 0===n||n.appendChild(a),0===(null==t||null===(r=t.element)||void 0===r?void 0:r.getElementsByClassName("svg-editor").length)&&(null==t||null===(i=t.element)||void 0===i||i.appendChild(a))},[{key:"reset",value:function(){var e=this.objects.pop();e&&this.svg.removeChild(e)}},{key:"attachEvents",value:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this)),e.addEventListener("mousemove",this.onMouseMove.bind(this)),e.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("touchstart",this.onTouchStart.bind(this),{passive:!1}),e.addEventListener("touchmove",this.onTouchMove.bind(this),{passive:!1}),e.addEventListener("touchend",this.onTouchEnd.bind(this)),e.addEventListener("touchcancel",this.onTouchEnd.bind(this))}},{key:"createMenu",value:function(){var e=this;this.menuSettings={shape:"path",color:"black",fill:"none",size:5,reset:"reset"};var t=new w(this.menuSettings,function(){return e.reset()});t.setColors(["black","red","blue","yellow"]),t.setFills(["none","black","red","blue","yellow"]),t.setSizes([1,2,3,4,5]),t.setShapes(["rect","line","circle","ellipse","path"]),t.setResets();var n=t.getElement();return n.style.position="absolute",n.style.top="10px",n.style.left="50%",n.style.backgroundColor="white",n.style.border="1px solid lightgrey",n.style.padding="10px",n.style.borderRadius="8px",n.style.transform="translateX(-50%)",n.style.touchAction="manipulation",n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.zIndex="900000001",window.innerWidth<=768&&(n.style.padding="8px",n.style.top="5px",n.style.maxWidth="95vw",n.style.overflowX="auto"),n}},{key:"updateCode",value:function(){this.codeSection.innerText=this.svg.innerHTML.replace(new RegExp("><","g"),">\n<")}},{key:"getEventPosition",value:function(e){if(e.touches&&e.touches.length>0){var t=e.touches[0],n=this.svg.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}return{x:e.offsetX,y:e.offsetY}}},{key:"onTouchStart",value:function(e){e.preventDefault(),this.onMouseDown(e)}},{key:"onTouchMove",value:function(e){e.preventDefault(),this.onMouseMove(e)}},{key:"onTouchEnd",value:function(e){this.onMouseUp()}},{key:"onMouseDown",value:function(e){this.createdObject=document.createElementNS(b,this.menuSettings.shape),this.createdObject.setAttributeNS(null,"fill",this.menuSettings.fill),this.createdObject.setAttributeNS(null,"stroke",this.menuSettings.color),this.createdObject.setAttributeNS(null,"stroke-width",String(this.menuSettings.size)),this.svg.appendChild(this.createdObject);var t=this.getEventPosition(e);if(this.originalMousePosition=this.lastMousePosition=this.currentMousePosition=t,"path"===this.menuSettings.shape){var n="M "+this.currentMousePosition.x+" "+this.currentMousePosition.y;this.createdObject.setAttributeNS(null,"d",n)}}},{key:"onMouseMove",value:function(e){null!==this.originalMousePosition&&(this.lastMousePosition=this.currentMousePosition,this.currentMousePosition=this.getEventPosition(e),this.updateCurrentObject())}},{key:"onMouseUp",value:function(){var e,t,n,r;(null===(e=this.originalMousePosition)||void 0===e?void 0:e.x)!=(null===(t=this.currentMousePosition)||void 0===t?void 0:t.x)||(null===(n=this.originalMousePosition)||void 0===n?void 0:n.y)!=(null===(r=this.currentMousePosition)||void 0===r?void 0:r.y)?(this.objects.push(this.createdObject),this.focus(this.createdObject)):"path"!==this.menuSettings.shape&&this.svg.removeChild(this.createdObject),this.originalMousePosition=this.lastMousePosition=this.currentMousePosition=null,this.createdObject=null}},{key:"focus",value:function(e){}},{key:"updateCurrentObject",value:function(){var e,t,n,r,o,i,a,s,c={x:Math.min(null===(e=this.currentMousePosition)||void 0===e?void 0:e.x,null===(t=this.originalMousePosition)||void 0===t?void 0:t.x),y:Math.min(null===(n=this.currentMousePosition)||void 0===n?void 0:n.y,null===(r=this.originalMousePosition)||void 0===r?void 0:r.y)},l=Math.max(null===(o=this.currentMousePosition)||void 0===o?void 0:o.x,null===(i=this.originalMousePosition)||void 0===i?void 0:i.x),u=Math.max(null===(a=this.currentMousePosition)||void 0===a?void 0:a.y,null===(s=this.originalMousePosition)||void 0===s?void 0:s.y);switch(this.menuSettings.shape){case"line":this.createdObject.setAttributeNS(null,"x1",String(this.originalMousePosition.x)),this.createdObject.setAttributeNS(null,"y1",String(this.originalMousePosition.y)),this.createdObject.setAttributeNS(null,"x2",String(this.currentMousePosition.x)),this.createdObject.setAttributeNS(null,"y2",String(this.currentMousePosition.y));break;case"rect":this.createdObject.setAttributeNS(null,"x",String(c.x)),this.createdObject.setAttributeNS(null,"y",String(c.y)),this.createdObject.setAttributeNS(null,"width",String(l-c.x)),this.createdObject.setAttributeNS(null,"height",String(u-c.y));break;case"circle":this.createdObject.setAttributeNS(null,"cx",String((c.x+l)/2)),this.createdObject.setAttributeNS(null,"cy",String((c.y+u)/2));var d=Math.max(l-c.x,u-c.y)/2;this.createdObject.setAttributeNS(null,"r",String(d));break;case"ellipse":this.createdObject.setAttributeNS(null,"cx",String((c.x+l)/2)),this.createdObject.setAttributeNS(null,"cy",String((c.y+u)/2)),this.createdObject.setAttributeNS(null,"rx",String((l-c.x)/2)),this.createdObject.setAttributeNS(null,"ry",String((u-c.y)/2));break;case"path":var h=this.createdObject.getAttribute("d")+" l ";h+=this.currentMousePosition.x-this.lastMousePosition.x,h+=" ",h+=this.currentMousePosition.y-this.lastMousePosition.y,this.createdObject.setAttributeNS(null,"d",h)}this.updateCode()}}],[{key:"createSVG",value:function(e){var t=document.createElementNS(b,"svg");return t.setAttribute("width",e.width),t.setAttribute("height",e.height),t}}])}();function k(e){return k="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},k(e)}function S(){S=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new j(r||[]);return o(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",y="completed",g={};function v(){}function m(){}function b(){}var w={};l(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==n&&r.call(E,a)&&(w=E);var L=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(o,i,a,s){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==k(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function I(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=M(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?y:f,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function B(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(k(t)+" is not iterable")}return m.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},C(T.prototype),l(T.prototype,s,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new T(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(L),l(L,c,"Generator"),l(L,a,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function E(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,s,"next",e)}function s(e){E(i,r,o,a,s,"throw",e)}a(void 0)})}}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function T(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==k(t)?t:t+""}var M=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),T(this,"boundary",void 0)}return t=e,r=[{key:"getRbirdWebsiteWidget",value:function(){return n(537).A}},{key:"activateMarker",value:function(e){var t=this;document.body.style.overflow="hidden",this.getRbirdWebsiteWidget().getInstance().closeWebsiteWidget(),this.boundary=document.createElement("div"),this.boundary.id="markerBoundary",this.boundary.className="markerBoundary",this.boundary.style.display="block",this.boundary.style.height="100%",e||(this.boundary.style.pointerEvents="none");var n=document.createElement("div");n.id="screenshotCloseButton",n.className="screenshotCloseButton",n.innerText="Close",n.onclick=function(){document.body.removeChild(t.boundary)},this.boundary.appendChild(n),document.body.appendChild(this.boundary),new x({element:this.boundary,dimension:{width:"100%",height:"100%"}})}},{key:"deactivateMarker",value:function(){document.body.style.overflow="auto",document.body.removeChild(this.boundary),this.getRbirdWebsiteWidget().getInstance().openWebsiteWidget()}},{key:"showLoader",value:function(){var e=document.createElement("div");e.id="rbirdScreenshotLoader",e.className="rbird-screenshot-loader";var t=document.createElement("div");t.className="rbird-screenshot-loader-spinner";var n=document.createElement("div");return n.className="rbird-screenshot-loader-text",n.textContent="Creating screenshot...",e.appendChild(t),e.appendChild(n),document.body.appendChild(e),e}},{key:"hideLoader",value:function(){var e=document.getElementById("rbirdScreenshotLoader");e&&document.body.removeChild(e)}},{key:"screenshot",value:function(){var e=this,t=this.showLoader(),n=!1,r=setTimeout(function(){n||(console.error("[Screenshot] Timeout - screenshot took too long"),e.hideLoader(),e.deactivateMarker(),alert("Screenshot took too long to generate. Please try again with a simpler page or contact support."))},45e3);setTimeout(function(){console.log("[Screenshot] Starting HTML export method...");var o=document.getElementById("screenshotCloseButton"),i=document.querySelector(".menu"),a=o?o.style.visibility:null,s=i?i.style.visibility:null;t.style.visibility="hidden",o&&(o.style.visibility="hidden"),i&&(i.style.visibility="hidden"),requestAnimationFrame(L(S().mark(function c(){var l;return S().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,e.exportHTML();case 3:l=c.sent,console.log("[Screenshot] HTML exported, sending to backend..."),t.style.visibility="visible",e.renderScreenshotOnBackend(l).then(function(t){console.log("[Screenshot] Screenshot received from backend!"),n=!0,clearTimeout(r),o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader();var c,l=e.getRbirdWebsiteWidget().getInstance();l.iframe&&(null===(c=l.iframe.contentWindow)||void 0===c||c.postMessage({type:"screenshot",screenshot:t},"*")),e.deactivateMarker()}).catch(function(t){console.error("[Screenshot] Backend rendering failed:",t),n=!0,clearTimeout(r),o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader(),e.deactivateMarker(),alert("Screenshot could not be created. Please try again or contact support.")}),c.next=20;break;case 9:c.prev=9,c.t0=c.catch(0),console.error("[Screenshot] HTML export failed:",c.t0),n=!0,clearTimeout(r),t.style.visibility="visible",o&&(o.style.visibility=a),i&&(i.style.visibility=s),e.hideLoader(),e.deactivateMarker(),alert("Screenshot could not be created. Please try again or contact support.");case 20:case"end":return c.stop()}},c,null,[[0,9]])})))},100)}},{key:"exportHTML",value:(h=L(S().mark(function e(){var t,n;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("[Screenshot] Exporting HTML with inline resources..."),this.captureScrollPositions(),t=document.documentElement.cloneNode(!0),["#rbirdScreenshotLoader","#screenshotCloseButton",".menu","script","noscript",'iframe[src*="cookiehub"]','iframe[src*="google"]','iframe[src*="facebook"]'].forEach(function(e){t.querySelectorAll(e).forEach(function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}),e.next=7,this.downloadAllImages(t);case 7:return e.next=9,this.downloadAllCSS(t);case 9:return n="<!DOCTYPE html>"+t.outerHTML,console.log("[Screenshot] Exported HTML: ".concat(n.length," bytes")),e.abrupt("return",n);case 13:case"end":return e.stop()}},e,this)})),function(){return h.apply(this,arguments)})},{key:"captureScrollPositions",value:function(){console.log("[Screenshot] Capturing scroll positions...");var e=0;document.querySelectorAll("*").forEach(function(t,n){if(!(t.closest("#rbirdScreenshotLoader")||t.closest("#screenshotCloseButton")||t.closest(".menu")||t.closest(".markerBoundary"))){var r=t.scrollLeft,o=t.scrollTop;(r>0||o>0)&&(t.id||t.setAttribute("data-rbird-scroll-id","rbird-scroll-".concat(n)),r>0&&t.setAttribute("data-rbird-scroll-left",r.toString()),o>0&&t.setAttribute("data-rbird-scroll-top",o.toString()),e++,console.log("[Screenshot] Captured scroll position for element: scrollLeft=".concat(r,", scrollTop=").concat(o)))}});var t=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop;t>0&&document.body.setAttribute("data-rbird-scroll-left",t.toString()),n>0&&document.body.setAttribute("data-rbird-scroll-top",n.toString()),console.log("[Screenshot] Captured scroll positions for ".concat(e," elements"))}},{key:"downloadAllImages",value:(d=L(S().mark(function e(t){var n,r,o,i,a,s,c,l=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.querySelectorAll("img"),r=[],o=0,i=0,a=S().mark(function e(){var t;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(t=n[s]).src&&!t.src.startsWith("data:")&&r.push(l.fetchImageAsDataURL(t.src).then(function(e){return e?(o+=e.length,l.resizeImage(e,500,500,.7)):null}).then(function(e){e&&(i+=e.length,t.src=e)}).catch(function(e){console.warn("[Screenshot] Failed to load/resize image:",t.src,e)}));case 2:case"end":return e.stop()}},e)}),s=0;case 6:if(!(s<n.length)){e.next=11;break}return e.delegateYield(a(),"t0",8);case 8:s++,e.next=6;break;case 11:return e.next=13,Promise.all(r);case 13:o>0&&(c=Math.round(100*(1-i/o)),console.log("[Screenshot] Image optimization: ".concat(o," -> ").concat(i," bytes (").concat(c,"% reduction)")));case 14:case"end":return e.stop()}},e)})),function(e){return d.apply(this,arguments)})},{key:"resizeImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.7;return new Promise(function(o,i){var a=new Image;a.onload=function(){var i=a.width,s=a.height;if(i>t||s>n){var c=i/s;i>s?s=(i=t)/c:i=(s=n)*c}var l=document.createElement("canvas");l.width=i,l.height=s;var u,d=l.getContext("2d"),h=e.includes("data:image/png"),f=e.includes("data:image/gif"),p=e.includes("data:image/webp"),y=e.includes("data:image/svg"),g=h||f||p||y;g?d.clearRect(0,0,i,s):(d.fillStyle="#FFFFFF",d.fillRect(0,0,i,s)),d.drawImage(a,0,0,i,s),u=g?l.toDataURL("image/png"):l.toDataURL("image/jpeg",r),o(u)},a.onerror=function(){i(new Error("Failed to load image for resizing"))},a.src=e})}},{key:"fetchImageAsDataURL",value:function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n(new Error("Failed to read image"))},e.readAsDataURL(r.response)},r.onerror=function(){n(new Error("Failed to fetch image"))},r.open("GET",e),r.responseType="blob",r.send()})}},{key:"downloadAllCSS",value:(u=L(S().mark(function e(t){var n,r,o,i,a,s,c,l,u,d,h,f;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[Screenshot] Processing ".concat(document.styleSheets.length," stylesheets...")),n=[],r=[],o=0;case 4:if(!(o<document.styleSheets.length)){e.next=56;break}if(i=document.styleSheets[o],e.prev=6,!i.href||!(i.href.includes("fonts.googleapis.com")||i.href.includes("fonts.gstatic.com")||i.href.includes("use.typekit.net")||i.href.includes("cloud.typography.com")||i.href.includes("fontawesome")||i.href.includes("font-awesome")||i.href.includes("fa-")||i.href.includes("bootstrap-icons")||i.href.includes("material-icons")||i.href.includes("material-symbols")||i.href.includes("ionicons")||i.href.includes("feather-icons")||i.href.includes("heroicons")||i.href.includes("/icons")||i.href.includes("icon.css")||i.href.includes("icons.css"))){e.next=11;break}return console.log("[Screenshot] Skipping font/icon service stylesheet: ".concat(i.href)),r.push(i.href),e.abrupt("continue",53);case 11:if(a="",e.prev=12,i.cssRules){for(s=0;s<i.cssRules.length;s++)a+=i.cssRules[s].cssText+"\n";console.log("[Screenshot] Extracted ".concat(i.cssRules.length," rules from stylesheet ").concat(o))}e.next=36;break;case 16:if(e.prev=16,e.t0=e.catch(12),!i.href){e.next=35;break}return console.log("[Screenshot] CORS blocked stylesheet ".concat(o,", fetching: ").concat(i.href)),e.prev=20,e.next=23,fetch(i.href);case 23:return c=e.sent,e.next=26,c.text();case 26:a=e.sent,console.log("[Screenshot] Fetched ".concat(a.length," bytes from ").concat(i.href)),e.next=33;break;case 30:e.prev=30,e.t1=e.catch(20),console.warn("[Screenshot] Failed to fetch CORS-blocked stylesheet:",i.href,e.t1);case 33:e.next=36;break;case 35:console.warn("[Screenshot] CORS blocked stylesheet with no href:",e.t0);case 36:if(!a){e.next=48;break}return l=i.href?i.href.substring(0,i.href.lastIndexOf("/")):window.location.href.substring(0,window.location.href.lastIndexOf("/")),e.next=40,this.loadCSSUrlResources(a,l);case 40:u=e.sent,d=t.querySelector("head"),(h=document.createElement("style")).type="text/css",h.setAttribute("data-original-href",i.href||"inline"),h.appendChild(document.createTextNode(u)),d.appendChild(h),n.push(i.href||"inline");case 48:e.next=53;break;case 50:e.prev=50,e.t2=e.catch(6),console.warn("[Screenshot] Failed to process stylesheet:",i.href,e.t2);case 53:o++,e.next=4;break;case 56:console.log("[Screenshot] Successfully processed ".concat(n.length," stylesheets")),f=t.querySelectorAll('link[rel="stylesheet"]'),console.log("[Screenshot] Removing ".concat(f.length," original link tags (keeping font/icon services)")),f.forEach(function(e){var t=e.getAttribute("href");t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")||t.includes("use.typekit.net")||t.includes("cloud.typography.com")||t.includes("fontawesome")||t.includes("font-awesome")||t.includes("fa-")||t.includes("bootstrap-icons")||t.includes("material-icons")||t.includes("material-symbols")||t.includes("ionicons")||t.includes("feather-icons")||t.includes("heroicons")||t.includes("/icons")||t.includes("icon.css")||t.includes("icons.css"))||e.remove()});case 60:case"end":return e.stop()}},e,this,[[6,50],[12,16],[20,30]])})),function(e){return u.apply(this,arguments)})},{key:"loadCSSUrlResources",value:(l=L(S().mark(function e(t,n){var r,o,i,a,s,c,l,u,d=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=/url\(['"]?([^'"()]+)['"]?\)/g,o=[];null!==(i=r.exec(t));)o.push(i);a=[".woff2",".woff",".ttf",".eot",".otf"],s=[".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp"],c=S().mark(function e(){var r,o,i,c,h,f,p,y;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u[l],!(o=r[1]).startsWith("data:")){e.next=4;break}return e.abrupt("return",1);case 4:return i=o.toLowerCase(),c=a.some(function(e){return i.includes(e)}),h=s.some(function(e){return i.includes(e)}),e.prev=7,f=o.startsWith("http://")||o.startsWith("https://")||o.startsWith("//")?o.startsWith("//")?"https:"+o:o:new URL(o,n+"/").href,console.log("[Screenshot] Processing CSS resource: ".concat(f," (font: ").concat(c,", image: ").concat(h,")")),e.next=12,d.fetchResourceAsDataURL(f);case 12:if(!(p=e.sent)){e.next=33;break}if(!c){e.next=19;break}t=t.split(r[0]).join("url(".concat(p,")")),console.log("[Screenshot] Embedded font: ".concat(o)),e.next=33;break;case 19:if(!h){e.next=32;break}return e.prev=20,e.next=23,d.resizeImage(p,500,500,.7);case 23:(y=e.sent)&&(t=t.split(r[0]).join("url(".concat(y,")"))),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(20),t=t.split(r[0]).join("url(".concat(p,")"));case 30:e.next=33;break;case 32:t=t.split(r[0]).join("url(".concat(p,")"));case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(7),console.warn("[Screenshot] Failed to convert CSS url:",o,e.t1.message);case 38:case"end":return e.stop()}},e,null,[[7,35],[20,27]])}),l=0,u=o;case 7:if(!(l<u.length)){e.next=14;break}return e.delegateYield(c(),"t0",9);case 9:if(!e.t0){e.next=11;break}return e.abrupt("continue",11);case 11:l++,e.next=7;break;case 14:return e.abrupt("return",t);case 15:case"end":return e.stop()}},e)})),function(e,t){return l.apply(this,arguments)})},{key:"fetchResourceAsDataURL",value:function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.onload=function(){if(200===r.status){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n(new Error("Failed to read resource"))},e.readAsDataURL(r.response)}else n(new Error("HTTP ".concat(r.status)))},r.onerror=function(){n(new Error("Failed to fetch resource"))},r.ontimeout=function(){n(new Error("Request timeout"))},r.open("GET",e),r.responseType="blob",r.timeout=1e4,r.send()})}},{key:"compressString",value:(c=L(S().mark(function e(t){var n,r,o,i,a,s,c,l,u,d,h,f,p,y,g,v;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=new TextEncoder,r=n.encode(t),"undefined"==typeof CompressionStream){e.next=28;break}o=new ReadableStream({start:function(e){e.enqueue(r),e.close()}}),i=o.pipeThrough(new CompressionStream("gzip")),a=i.getReader(),s=[];case 8:return e.next=11,a.read();case 11:if(c=e.sent,l=c.done,u=c.value,!l){e.next=16;break}return e.abrupt("break",19);case 16:s.push(u),e.next=8;break;case 19:for(d=s.reduce(function(e,t){return e+t.length},0),h=new Uint8Array(d),f=0,p=0,y=s;p<y.length;p++)g=y[p],h.set(g,f),f+=g.length;return v=this.arrayBufferToBase64(h),console.log("[Screenshot] Compression: ".concat(r.length," -> ").concat(h.length," bytes (").concat(Math.round(h.length/r.length*100),"%)")),e.abrupt("return",v);case 28:return console.warn("[Screenshot] CompressionStream not available, sending uncompressed"),e.abrupt("return",null);case 30:e.next=36;break;case 32:return e.prev=32,e.t0=e.catch(0),console.error("[Screenshot] Compression failed:",e.t0),e.abrupt("return",null);case 36:case"end":return e.stop()}},e,this,[[0,32]])})),function(e){return c.apply(this,arguments)})},{key:"arrayBufferToBase64",value:function(e){for(var t="",n=new Uint8Array(e),r=0;r<n.length;r+=1024)for(var o=n.subarray(r,Math.min(r+1024,n.length)),i=0;i<o.length;i++)t+=String.fromCharCode(o[i]);return btoa(t)}},{key:"renderScreenshotOnBackend",value:(s=L(S().mark(function e(t){var n,r;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.length,r=(n/1048576).toFixed(2),console.log("[Screenshot] Sending HTML to backend..."),console.log("[Screenshot] Original HTML size: ".concat(n," bytes (").concat(r," MB)")),!(n>819200)){e.next=9;break}return console.log("[Screenshot] HTML > 800KB, using S3 upload..."),e.abrupt("return",this.renderViaS3(t));case 9:return console.log("[Screenshot] HTML < 800KB, using direct upload..."),e.abrupt("return",this.renderDirect(t));case 11:case"end":return e.stop()}},e,this)})),function(e){return s.apply(this,arguments)})},{key:"renderViaS3",value:(a=L(S().mark(function e(t){var n=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=L(S().mark(function e(r,o){var i,a,s,c,l,u,d,h,f,p,y,g,v,m,b;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log("[Screenshot] Step 1: Requesting presigned URL..."),i=n.getRbirdWebsiteWidget().getInstance(),a=new AbortController,s=setTimeout(function(){return a.abort()},1e4),e.next=7,fetch("".concat("https://api.releasebird.com/papi","/images/screenshot/upload-url"),{method:"POST",headers:{"Content-Type":"application/json",apiKey:i.apiKey||""},signal:a.signal}).catch(function(e){if(clearTimeout(s),"AbortError"===e.name)throw new Error("Timeout getting upload URL");throw e});case 7:if(c=e.sent,clearTimeout(s),c.ok){e.next=11;break}throw new Error("Failed to get upload URL: ".concat(c.status));case 11:return e.next=13,c.json();case 13:return l=e.sent,u=l.uploadUrl,d=l.key,console.log("[Screenshot] Step 2: Uploading HTML to S3 (key: ".concat(d,")...")),h=new AbortController,f=setTimeout(function(){return h.abort()},15e3),e.next=21,fetch(u,{method:"PUT",body:t,headers:{"Content-Type":"text/html"},signal:h.signal}).catch(function(e){if(clearTimeout(f),"AbortError"===e.name)throw new Error("Timeout uploading to S3");throw e});case 21:if(p=e.sent,clearTimeout(f),p.ok){e.next=25;break}throw new Error("Failed to upload to S3: ".concat(p.status));case 25:return console.log("[Screenshot] Step 3: Requesting screenshot render from backend..."),y=new AbortController,g=setTimeout(function(){return y.abort()},2e4),e.next=30,fetch("".concat("https://api.releasebird.com/papi","/images/screenshot/render"),{method:"POST",headers:{"Content-Type":"application/json",apiKey:i.apiKey||""},body:JSON.stringify({s3Key:d,width:window.innerWidth,height:window.innerHeight,url:window.location.href}),signal:y.signal}).catch(function(e){if(clearTimeout(g),"AbortError"===e.name)throw new Error("Timeout rendering screenshot");throw e});case 30:if(v=e.sent,clearTimeout(g),v.ok){e.next=37;break}return e.next=35,v.text();case 35:throw m=e.sent,new Error("Failed to render screenshot: ".concat(v.status," - ").concat(m));case 37:return e.next=39,v.json();case 39:b=e.sent,console.log("[Screenshot] Screenshot received successfully via S3!"),r(b.screenshot),e.next=48;break;case 44:e.prev=44,e.t0=e.catch(0),console.error("[Screenshot] S3 upload failed:",e.t0),o(e.t0);case 48:case"end":return e.stop()}},e,null,[[0,44]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})},{key:"renderDirect",value:(i=L(S().mark(function e(n){var r=this;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=L(S().mark(function e(o,i){var a,s,c,l,u;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.compressString(n);case 2:a=e.sent,(s=new XMLHttpRequest).open("POST","".concat("https://api.releasebird.com/papi","/images/screenshot/render")),s.setRequestHeader("Content-Type","application/json;charset=UTF-8"),s.timeout=2e4,s.ontimeout=function(){console.error("[Screenshot] Request timeout"),i(new Error("Screenshot render timeout"))},(c=r.getRbirdWebsiteWidget().getInstance()).apiKey&&s.setRequestHeader("apiKey",c.apiKey),s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)try{var e=JSON.parse(s.responseText);e.screenshot?o(e.screenshot):i(new Error("No screenshot in response"))}catch(t){console.error("[Screenshot] Failed to parse response:",t),i(t)}else console.error("[Screenshot] Backend request failed:",s.status,s.responseText),i(new Error("Failed to render screenshot: ".concat(s.status," : ").concat(JSON.stringify(s.responseText))))},l={width:window.innerWidth,height:window.innerHeight,url:window.location.href},a?(l.htmlCompressed=a,l.compressed=!0):(l.html=n,l.compressed=!1),u=JSON.stringify(l),console.log("[Screenshot] Final payload size: ".concat(u.length," bytes")),s.send(u);case 16:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],r&&C(t.prototype,r),o&&C(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o,i,a,s,c,l,u,d,h}();function B(e){return B="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},B(e)}function O(){O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new j(r||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",y="completed",g={};function v(){}function m(){}function b(){}var w={};l(w,a,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==n&&r.call(k,a)&&(w=k);var S=b.prototype=v.prototype=Object.create(w);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function L(e,t){function n(o,i,a,s){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==B(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=T(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?y:f,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(B(t)+" is not iterable")}return m.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(L.prototype),l(L.prototype,s,function(){return this}),t.AsyncIterator=L,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new L(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},E(S),l(S,c,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function j(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,s,"next",e)}function s(e){j(i,r,o,a,s,"throw",e)}a(void 0)})}}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function A(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=function(e,t){if("object"!=B(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==B(t)?t:t+""}T(M,"instance",void 0);var N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"mediaRecorder",null)}return t=e,n=[{key:"onTimer",value:function(e,t,n,r){e.innerHTML='<div style="font-size: 16px; font-weight: 600; color: #333;">'+t+"s</div>",--t<0&&(r.stop(),clearInterval(n))}},{key:"startTimer",value:function(e){var t=this,n=60,r=setInterval(function(){n--,t.onTimer(e,n,r,t.mediaRecorder)},1e3)}},{key:"isMobileDevice",value:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=768}},{key:"startRecording",value:(a=P(O().mark(function e(t){var n,r,o,i,a,s,c,l,u;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.isMobileDevice())){e.next=4;break}return alert("Video recording is not supported on mobile devices. Please use the screenshot feature instead."),e.abrupt("return");case 4:return o=this,e.prev=5,e.next=8,navigator.mediaDevices.getDisplayMedia({audio:!0,video:{mediaSource:"screen"}});case 8:r=e.sent,e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(5),alert("Screensharing not allowed by user"),e.abrupt("return");case 15:i=document.createElement("div"),a=this.addCountDownElement(i,n),r&&r.active&&((c=null===(s=document)||void 0===s||null===(s=s.getElementById("test"))||void 0===s||null===(s=s.getElementsByTagName("rbird-box")[0])||void 0===s||null===(s=s.shadowRoot)||void 0===s?void 0:s.getElementById("markerBoundary"))&&(c.style.display="block",t||(c.style.pointerEvents="none"),null!==c.querySelector("#screenshotCloseButton")&&c.removeChild(c.querySelector("#screenshotCloseButton"))),q.getInstance().closeWebsiteWidget(),l=[],u={mimeType:"video/webm;codecs=vp9"},this.mediaRecorder=new MediaRecorder(r,u),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&l.push(e.data)},this.startTimer(a),this.mediaRecorder.onstop=function(){document.body.removeChild(i);var e=document.createElement("div");e.style.width="100%",e.style.height="100%",e.style.backgroundColor="rgba(0,0,0,0.8)",e.style.overflow="auto",e.style.position="fixed",e.style.zIndex="90000000000",e.style.top="0",e.style.left="0";var t=document.createElement("div");t.style.margin="15% auto",t.style.padding="20px",t.style.width="700px",t.style.height="525px",t.style.border="1px solid #888",t.style.backgroundColor="white",t.style.borderRadius="8px";var n=document.createElement("div");n.style.display="flex",n.style.display="block",n.style.height="30px",n.style.marginTop="20px";var s=document.createElement("div");s.style.backgroundColor="orange",s.style.color="white",s.style.fontWeight="500",s.innerHTML="Retry",s.style.float="left",s.style.padding="13px",s.style.paddingTop="8px",s.style.paddingBottom="8px",s.style.fontFamily="Arial",s.style.fontSize="16px",s.style.borderRadius="8px",s.style.marginLeft="10px",s.style.cursor="pointer",s.addEventListener("click",function(){URL.revokeObjectURL(h),l=[],document.body.removeChild(e),i=document.createElement("div"),a=o.addCountDownElement(i),o.startTimer(a),o.restartRecording()});var u=document.createElement("div");u.innerHTML="Cancel",u.style.backgroundColor="red",u.style.color="white",u.style.fontWeight="500",u.style.float="left",u.style.padding="13px",u.style.paddingTop="8px",u.style.paddingBottom="8px",u.style.fontFamily="Arial",u.style.fontSize="16px",u.style.borderRadius="8px",u.style.cursor="pointer",u.addEventListener("click",function(){r.getTracks().forEach(function(e){return e.stop()}),URL.revokeObjectURL(h),l=[],document.body.removeChild(e),c&&(c.style.display="none"),q.getInstance().openWebsiteWidget()}),n.appendChild(u),n.appendChild(s);var d=document.createElement("div");d.innerHTML="Continue",d.style.backgroundColor="green",d.style.color="white",d.style.fontWeight="500",d.innerHTML="Submit",d.style.float="right",d.style.padding="13px",d.style.paddingTop="8px",d.style.paddingBottom="8px",d.style.fontFamily="Arial",d.style.fontSize="16px",d.style.borderRadius="8px",d.style.marginLeft="10px",d.style.cursor="pointer",d.addEventListener("click",function(){var t;r.getTracks().forEach(function(e){return e.stop()}),q.getInstance().iframe&&(null===(t=q.getInstance().iframe.contentWindow)||void 0===t||t.postMessage({type:"video",video:h},"*")),URL.revokeObjectURL(h),l=[],document.body.removeChild(e),c&&(c.style.display="none"),q.getInstance().openWebsiteWidget()}),n.appendChild(d);var h=new Blob(l,{type:"video/webm;codecs=vp9"}),f=document.createElement("video");f.controls=!0,f.style.width="650px",f.style.height="400px";var p=document.createElement("source");p.type="video/webm;codecs=vp9",p.src=URL.createObjectURL(h),f.appendChild(p),t.appendChild(f),t.appendChild(n),e.appendChild(t),document.body.appendChild(e)},this.mediaRecorder.start(200));case 18:case"end":return e.stop()}},e,this,[[5,11]])})),function(e){return a.apply(this,arguments)})},{key:"addCountDownElement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.id="rbirdRecorderMenu",e.style.position="fixed",e.style.top=n?"20px":"10px",e.style.left="50%",e.style.zIndex="900000000",e.style.backgroundColor="rgba(255, 255, 255, 0.95)",e.style.border="1px solid lightgrey",e.style.padding=n?"12px 15px":"10px",e.style.borderRadius="8px",e.style.transform="translateX(-50%)",e.style.boxShadow="0 4px 6px rgba(0, 0, 0, 0.1)",e.style.display="flex",e.style.alignItems="center",e.style.gap="10px";var r=document.createElement("div");r.innerHTML='<svg viewBox="0 0 512 512" width=\'24pt\' height=\'24pt\' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="linear-gradient" gradientUnits="userSpaceOnUse" x1="67.69" x2="441.35" y1="67.69" y2="441.35"><stop offset="0" stop-color="#fd7f60"/><stop offset="1" stop-color="#fa262a"/></linearGradient><g id="Layer_2" data-name="Layer 2"><g id="Layer_2_copy_7" data-name="Layer 2 copy 7"><g id="_137" fill="url(#linear-gradient)" data-name="137"><path id="background" d="m256 20c130.34 0 236 105.66 236 236s-105.66 236-236 236-236-105.66-236-236 105.66-236 236-236m0-20a255.93 255.93 0 0 0 -181 437 256 256 0 1 0 280.65-416.87 254.3 254.3 0 0 0 -99.65-20.13z"/><rect height="247.06" rx="38.38" width="247.06" x="132.47" y="132.47"/></g></g></g></svg>',r.style.cursor="pointer",r.style.display="flex",r.style.alignItems="center",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent",r.addEventListener("click",function(){return t.stopRecording()}),e.appendChild(r);var o=document.createElement("div");return o.innerHTML='<div style="font-size: 16px; font-weight: 600; color: #333;">60s</div>',o.id="rbirdCountdown",o.style.display="flex",o.style.alignItems="center",e.appendChild(o),document.body.appendChild(e),o}},{key:"stopRecording",value:(i=P(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.mediaRecorder.stop();case 1:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"restartRecording",value:(o=P(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.mediaRecorder.start();case 1:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&R(t.prototype,n),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r,o,i,a}();function W(e){return W="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},W(e)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F(r.key),r)}}function z(e,t,n){return(t=F(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e){var t=function(e,t){if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==W(t)?t:t+""}A(N,"instance",void 0);var q=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),z(this,"websiteWidget",void 0),z(this,"websiteWidgetVisible",!1),z(this,"widgetContent",void 0),z(this,"countBadge",void 0),z(this,"escListener",void 0),z(this,"iframe",void 0),z(this,"hideWidgetButton",void 0),z(this,"noButton",void 0),z(this,"backdrop",void 0),z(this,"countNotificationsTimer",null),z(this,"countNotificationsDelay",1e3),z(this,"isMobileDevice",function(){if("undefined"==typeof window)return!1;return window.innerWidth<=768})}return t=e,n=[{key:"renderWebsiteWidget",value:function(){var e=this;return new Promise(function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(e.websiteWidgetVisible)t();else{e.websiteWidgetVisible=!0;try{var r,o=document.createElement("div");o.onclick=function(){e.openWebsiteWidget()},document.body.appendChild(o),e.websiteWidget=o,null!==(r=h.A.getInstance().widgetSettings)&&void 0!==r&&r.allowClose&&!e.noButton&&(e.hideWidgetButton=document.createElement("div"),e.hideWidgetButton.className="hideWidgetButton",e.hideWidgetButton.innerHTML=d.kY,e.hideWidgetButton.onclick=function(){return e.handleHideWidgetButton()},e.hideWidgetButton.style.display="block",document.body.appendChild(e.hideWidgetButton)),e.countBadge=document.createElement("span"),e.countBadge.className="rbird_badge",e.countBadge.style.display="none",document.body.appendChild(e.countBadge),e.styleWidget(),t()}catch(i){n(new Error("Error rendering the website widget: "+i.message))}}else t()})}},{key:"isOpen",value:function(){return a.hasClass(this.widgetContent,"cta__modal--visible")}},{key:"openWebsiteWidget",value:function(){var e=this;if("undefined"!=typeof window&&"undefined"!=typeof document){a.addClass(this.widgetContent,"cta__modal--visible"),a.addClass(this.backdrop,"cta__modal-dimmer--visible"),document.body.style.overflow="hidden",this.registerListeners(),this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"),this.isMobileDevice()&&(this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"),this.websiteWidget.style.display="none"),5===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.K4)(h.A.getInstance().widgetSettings.launcherColor):this.websiteWidget.innerHTML=(0,d.vd)(h.A.getInstance().widgetSettings.launcherColor),this.websiteWidget.onclick=function(){return e.closeWebsiteWidget()};var t=new XMLHttpRequest;t.open("POST","".concat("https://api.releasebird.com/papi","/track/").concat(h.A.getInstance().widgetSettings.subdomain,"/trackView?type=WIDGET")),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),t.onerror=function(e){},t.onreadystatechange=function(e){4===t.readyState&&(200===t.status||t.status)},t.send(JSON.stringify({}))}}},{key:"handleHideWidgetButton",value:function(){this.hideWidgetButton&&(this.hideWidgetButton.style.display="none",this.websiteWidget.style.display="none")}},{key:"countNotifications",value:function(){var e=this;"undefined"!=typeof window&&(this.countNotificationsTimer&&clearTimeout(this.countNotificationsTimer),this.countNotificationsTimer=setTimeout(function(){var t;if(null!==(t=h.A.getInstance().identify)&&void 0!==t&&t.people||h.A.getInstance().anonymousIdentifier){var n=new XMLHttpRequest;n.open("GET","".concat("https://api.releasebird.com/papi","/ewidget/unread")),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.setRequestHeader("apiKey",h.A.getInstance().apiKey),n.setRequestHeader("peopleId",h.A.getInstance().identify.people),n.setRequestHeader("ai",h.A.getInstance().anonymousIdentifier);var r=window.localStorage.getItem("lastPageView");n.onerror=function(){};var o=e;n.onreadystatechange=function(e){if(n.readyState===XMLHttpRequest.DONE&&(200===n.status||201===n.status))try{var t=JSON.parse(n.responseText);t.messageCount>0?o.addBadgeCount(t.messageCount):t.lastReleaseNote&&r<t.lastReleaseNote?o.addBadgeCount("1"):o.addBadgeCount(0)}catch(e){console.error(e)}},n.send()}},this.countNotificationsDelay))}},{key:"addBadgeCount",value:function(e){0===e?this.countBadge&&(this.countBadge.innerText="0",this.countBadge.style.display="none",this.isOpen()||!this.hideWidgetButton||this.noButton||(this.hideWidgetButton.style.display="block")):(this.countBadge.innerText=e,this.countBadge.style.display="block",this.hideWidgetButton&&(this.hideWidgetButton.style.display="none"))}},{key:"showButton",value:function(e){"undefined"!=typeof window&&(e&&!this.noButton?(this.websiteWidget.style.display="block",this.hideWidgetButton&&!this.noButton&&(this.hideWidgetButton.style.display="block")):(this.websiteWidget.style.display="none",this.hideWidgetButton&&(this.hideWidgetButton.style.display="none")))}},{key:"closeWebsiteWidget",value:function(){var e,t=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(this.iframe&&(null===(e=this.iframe.contentWindow)||void 0===e||e.postMessage({type:"close"},"*")),this.hideWidgetButton&&"none"===this.countBadge.style.display&&!this.noButton&&(this.hideWidgetButton.style.display="block"),a.removeClass(this.widgetContent,"cta__modal--visible"),a.removeClass(this.backdrop,"cta__modal-dimmer--visible"),document.body.style.overflow="",this.initButton(),this.noButton||(this.websiteWidget.style.display="block"),this.websiteWidget.onclick=function(){return t.openWebsiteWidget()},this.unregisterListeners())}},{key:"initButton",value:function(){0===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.tj)(h.A.getInstance().widgetSettings.launcherColor):1===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.AX)(h.A.getInstance().widgetSettings.launcherColor):2===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.t0)(h.A.getInstance().widgetSettings.launcherColor):3===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.AC)(h.A.getInstance().widgetSettings.launcherColor):4===h.A.getInstance().widgetSettings.launcher?this.websiteWidget.innerHTML=(0,d.fK)(h.A.getInstance().widgetSettings.launcherColor):5===h.A.getInstance().widgetSettings.launcher&&(this.websiteWidget.innerHTML=(0,d.mm)(h.A.getInstance().widgetSettings.launcherColor))}},{key:"handleEvent",value:function(e,t){var n,r,o;"close"===e.data&&t.closeWebsiteWidget(),"increaseSize"===e.data&&(a.removeClass(t.widgetContent,"cta__modal--standard"),a.addClass(t.widgetContent,"cta__modal--big")),"decreaseSize"===e.data&&(a.removeClass(t.widgetContent,"cta__modal--big"),a.addClass(t.widgetContent,"cta__modal--standard")),"showImage"===(null===(n=e.data)||void 0===n?void 0:n.key)&&u.showImage(null===(r=e.data)||void 0===r?void 0:r.url),"newMessageArrived"===e.data&&(this.countNotifications(),a.hasClass(this.widgetContent,"cta__modal--visible")||this.iframe&&(null===(o=this.iframe.contentWindow)||void 0===o||o.postMessage({type:"showMessageTab"},"*"))),"start_screenshot"===e.data&&M.getInstance().activateMarker(!0),"start_recording"===e.data&&N.getInstance().startRecording(!1)}},{key:"styleWidget",value:function(){var e=this;if("undefined"!=typeof window&&"undefined"!=typeof document){this.websiteWidget.className=5===h.A.getInstance().widgetSettings.launcher?"launcherButton5":"launcherButton",this.initButton(),this.backdrop=document.createElement("div"),this.backdrop.className="cta__modal-dimmer",document.body.appendChild(this.backdrop),this.widgetContent=document.createElement("div"),this.widgetContent.className="cta__modal";var t=window.localStorage.getItem("rbird_state");if(t){var n,r,o=JSON.parse(t);null!==(n=o.identify)&&void 0!==n&&n.people?this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&people=").concat(null===(r=o.identify)||void 0===r?void 0:r.people,"&ai=").concat(h.A.getInstance().anonymousIdentifier)):this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&ai=").concat(h.A.getInstance().anonymousIdentifier))}else this.updateIframe("".concat("https://wcontent.releasebird.net","/widget?apiKey=").concat(h.A.getInstance().apiKey,"&tab=HOME&ai=").concat(h.A.getInstance().anonymousIdentifier));document.body.appendChild(this.widgetContent),window.onmessage=function(t){return e.handleEvent(t,e)},this.countNotifications()}}},{key:"updateIframe",value:function(e){this.widgetContent.innerHTML="<iframe src=".concat(e,' class="rbird-content-iframe" scrolling="yes" title="Releasebird" allow="autoplay; encrypted-media; fullscreen; microphone;" frameborder="0"></iframe>'),this.iframe=this.widgetContent.firstChild,this.iframe.scrolling="no"}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key),n&&e.closeWebsiteWidget()},document.addEventListener("keydown",this.escListener)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&H(t.prototype,n),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();z(q,"instance",void 0)},708:(e,t,n)=>{n.d(t,{default:()=>S});var r=n(195),o=n(499),i=n(537);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var l=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.originalConsoleLog=console.log,console.log=function(){t.printLog.apply(t,arguments),t.originalConsoleLog.apply(t,arguments)}},t=[{key:"printLog",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.map(function(e){return JSON.stringify(e)}).join(" ")}},{key:"resetConsoleLog",value:function(){console.log=this.originalConsoleLog}}],t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function u(e){return u="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},u(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function h(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var f,p,y,g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.banners=[],this.displayedBanners=new Set,this.apiKey=null}return t=e,n=[{key:"init",value:function(e){"undefined"!=typeof window&&(this.apiKey=e,this.fetchAndDisplayBanners())}},{key:"showBanner",value:function(e){var t;if("undefined"!=typeof window)if(this.apiKey)if(e)if(this.displayedBanners.has(e))console.warn("[RbirdBannerManager] Banner is already displayed:",e);else{var n=o.A.getInstance(),r=n.getState(),i=new XMLHttpRequest;i.open("GET","".concat("https://api.releasebird.com/papi","/ewidget/banners/").concat(e)),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("apiKey",this.apiKey),null!=r&&null!==(t=r.identify)&&void 0!==t&&t.people&&i.setRequestHeader("peopleId",r.identify.people),n.anonymousIdentifier&&i.setRequestHeader("anonymousId",n.anonymousIdentifier);var a=this;i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)try{var e=JSON.parse(i.responseText);"INLINE"===e.type?a.renderInlineBanner(e):"FLOATING"===e.type&&a.renderFloatingBanner(e)}catch(t){console.error("[RbirdBannerManager] Error parsing banner response:",t)}else console.error("[RbirdBannerManager] Failed to fetch banner. Status:",i.status)},i.send()}else console.error("[RbirdBannerManager] Banner ID is required.");else console.error("[RbirdBannerManager] SDK not initialized. Call Rbird.initialize() first.")}},{key:"fetchAndDisplayBanners",value:function(){var e,t=o.A.getInstance(),n=t.getState(),r=new XMLHttpRequest;r.open("GET","".concat("https://api.releasebird.com/papi","/ewidget/banners/active")),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("apiKey",this.apiKey),null!=n&&null!==(e=n.identify)&&void 0!==e&&e.people&&r.setRequestHeader("peopleId",n.identify.people),t.anonymousIdentifier&&r.setRequestHeader("anonymousId",t.anonymousIdentifier);var i=this;r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)try{var e=JSON.parse(r.responseText);i.banners=e,i.renderBanners()}catch(t){console.error("[RbirdBannerManager] Error parsing banners response:",t)}else console.error("[RbirdBannerManager] Failed to fetch banners. Status:",r.status,"Response:",r.responseText)},r.send()}},{key:"renderBanners",value:function(){var e=this;this.banners&&0!==this.banners.length&&this.banners.forEach(function(t){"INLINE"===t.type?e.renderInlineBanner(t):"FLOATING"===t.type?e.renderFloatingBanner(t):console.warn("[RbirdBannerManager] Unknown banner type:",t.type)})}},{key:"renderInlineBanner",value:function(e){var t=this,n=e.placement||"default",r=document.querySelectorAll('[data-rbird-banner="'.concat(n,'"]'));0!==r.length?r.forEach(function(n){var r=t.createBannerElement(e,!1);n.appendChild(r),t.displayedBanners.add(e.id),t.trackImpression(e.id)}):console.warn("[RbirdBannerManager] No target elements found for inline banner with placement:",n,'Make sure you have an element with data-rbird-banner="'+n+'" in your HTML')}},{key:"renderFloatingBanner",value:function(e){var t=this.createBannerElement(e,!0);document.body.appendChild(t),this.displayedBanners.add(e.id),this.trackImpression(e.id)}},{key:"createBannerElement",value:function(e,t){var n=this,r=document.createElement("div");r.className=t?"rbird-banner-floating":"rbird-banner-inline",r.id="rbird-banner-".concat(e.id),r.setAttribute("data-banner-id",e.id);var o=e.title,i=e.message,a=e.buttonText;r.innerHTML='\n <div class="rbird-banner-content" style="'.concat(this.getBannerStyles(e,t),'">\n <button class="rbird-banner-close" data-banner-id="').concat(e.id,'" style="').concat(this.getCloseButtonStyles(),'">\n ×\n </button>\n <div class="rbird-banner-body">\n ').concat(o?'<h3 class="rbird-banner-title" style="'.concat(this.getTitleStyles(),'">').concat(this.escapeHtml(o),"</h3>"):"","\n ").concat(i?'<p class="rbird-banner-message" style="'.concat(this.getMessageStyles(),'">').concat(this.escapeHtml(i),"</p>"):"","\n ").concat(e.showButton&&a?'\n <button class="rbird-banner-cta" data-banner-id="'.concat(e.id,'" style="').concat(this.getCtaButtonStyles(e),'">\n ').concat(this.escapeHtml(a),"\n </button>\n "):"","\n </div>\n </div>\n "),t&&this.applyFloatingPosition(r,e.position);var s=r.querySelector(".rbird-banner-close");s&&s.addEventListener("click",function(t){t.preventDefault(),n.closeBanner(e.id)});var c=r.querySelector(".rbird-banner-cta");return c&&c.addEventListener("click",function(t){t.preventDefault(),n.handleCtaClick(e)}),r}},{key:"getBannerStyles",value:function(e,t){return"\n position: relative;\n background-color: ".concat(e.backgroundColor||"#ffffff",";\n color: ").concat(e.textColor||"#000000",";\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n max-width: ").concat(t?"400px":"100%",";\n ").concat(t?"min-width: min(400px, calc(100vw - 40px));":"","\n box-sizing: border-box;\n z-index: 10000;\n ")}},{key:"getCloseButtonStyles",value:function(){return"\n position: absolute;\n top: 10px;\n right: 10px;\n background: transparent;\n border: none;\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n color: inherit;\n opacity: 0.6;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n "}},{key:"getTitleStyles",value:function(){return"\n margin: 0 0 10px 0;\n font-size: 18px;\n font-weight: 600;\n line-height: 1.4;\n "}},{key:"getMessageStyles",value:function(){return"\n margin: 0 0 15px 0;\n font-size: 14px;\n line-height: 1.6;\n "}},{key:"getCtaButtonStyles",value:function(e){return"\n background-color: ".concat(e.buttonColor||"#667eea",";\n color: ").concat(e.buttonTextColor||"#ffffff",";\n border: none;\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: opacity 0.2s;\n display: inline-block;\n ")}},{key:"applyFloatingPosition",value:function(e,t){switch(e.style.position="fixed",e.style.margin="20px",e.style.animation="rbirdBannerSlideIn 0.3s ease-out",t){case"TOP":e.style.top="0",e.style.left="50%",e.style.transform="translateX(-50%)";break;case"BOTTOM":e.style.bottom="0",e.style.left="50%",e.style.transform="translateX(-50%)";break;case"TOP_LEFT":e.style.top="0",e.style.left="0";break;case"TOP_RIGHT":e.style.top="0",e.style.right="0";break;case"BOTTOM_LEFT":e.style.bottom="0",e.style.left="0";break;default:e.style.bottom="0",e.style.right="0"}}},{key:"handleCtaClick",value:function(e){this.trackClick(e.id),"LINK"===e.buttonAction&&e.buttonLink?window.open(e.buttonLink,"_blank"):"OPEN_WIDGET"===e.buttonAction&&window.Rbird&&window.Rbird.showWidget&&window.Rbird.showWidget(),e.closeAfterAction&&this.closeBanner(e.id)}},{key:"closeBanner",value:function(e){var t=document.getElementById("rbird-banner-".concat(e));t&&(t.style.animation="rbirdBannerSlideOut 0.3s ease-in",setTimeout(function(){t.remove()},300)),this.trackDismiss(e),this.displayedBanners.delete(e)}},{key:"trackDismiss",value:function(e){this.trackInteraction(e,"DISMISS")}},{key:"trackImpression",value:function(e){this.trackInteraction(e,"IMPRESSION")}},{key:"trackClick",value:function(e){this.trackInteraction(e,"CLICK")}},{key:"trackInteraction",value:function(e,t){var n,r=o.A.getInstance(),i=r.getState(),a=new XMLHttpRequest;a.open("POST","".concat("https://api.releasebird.com/papi","/ewidget/banners/interaction")),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("apiKey",this.apiKey),null!=i&&null!==(n=i.identify)&&void 0!==n&&n.people&&a.setRequestHeader("peopleId",i.identify.people),r.anonymousIdentifier&&a.setRequestHeader("anonymousId",r.anonymousIdentifier);var s={bannerId:e,type:t};a.send(JSON.stringify(s))}},{key:"getUserLanguage",value:function(e){var t,n,r=o.A.getInstance().getState();if(null!=r&&null!==(t=r.identify)&&void 0!==t&&t.language)return r.identify.language;var i=null===(n=navigator.language)||void 0===n?void 0:n.split("-")[0];return i||(e.defaultLanguage?e.defaultLanguage:"en")}},{key:"getLocalizedField",value:function(e,t,n){if(!e||"object"!==u(e))return"";if(e[t])return e[t];if(n&&e[n])return e[n];if(e.en)return e.en;if(e.de)return e.de;var r=Object.values(e);return r.length>0?r[0]:""}},{key:"escapeHtml",value:function(e){if(!e)return"";var t=document.createElement("div");return t.textContent=e,t.innerHTML}},{key:"injectStyles",value:function(){if("undefined"!=typeof window&&!document.getElementById("rbird-banner-styles")){var e=document.createElement("style");e.id="rbird-banner-styles",e.textContent="\n @keyframes rbirdBannerSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes rbirdBannerSlideOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-20px);\n }\n }\n\n .rbird-banner-close:hover {\n opacity: 1 !important;\n }\n\n .rbird-banner-cta:hover {\n opacity: 0.9 !important;\n transform: translateY(-1px);\n }\n\n .rbird-banner-inline {\n margin: 20px 0;\n }\n ",document.head.appendChild(e)}}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function v(e){return v="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},v(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function b(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v(t)?t:t+""}f=g,y=void 0,(p=h(p="instance"))in f?Object.defineProperty(f,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[p]=y;var x=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,null,[{key:"setStyles",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blue",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"red",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"orange",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30;"undefined"!=typeof window&&k(function(){(0,r._$)(t,n,o,i,a,s,e.isMobileDevice())})}},{key:"getInstance",value:function(){if(this.instance)return this.instance;this.instance=new e;new l;return this.instance}},{key:"showButton",value:function(e){"undefined"!=typeof window&&i.A.getInstance().showButton(e)}},{key:"initialize",value:function(e,t){if("undefined"!=typeof window)try{void 0===t&&(t=!0);var n=this.getInstance();if(n.initialized)return void console.warn("Rbird already initialized.");i.A.getInstance().noButton=!t,o.A.getInstance().init(e).then(function(){n.initialized=!0,t&&i.A.getInstance().showButton(t),k(function(){var t=g.getInstance();t.injectStyles(),t.init(e)})})}catch(f){console.error(f)}}},{key:"showWidget",value:function(){if("undefined"!=typeof window)try{i.A.getInstance().openWebsiteWidget()}catch(f){console.error(f)}}},{key:"identify",value:function(e,t){if("undefined"!=typeof window)try{o.A.getInstance().identifyUser(e,t)}catch(f){console.error(f)}}},{key:"logout",value:function(){if("undefined"!=typeof window)try{o.A.getInstance().logout()}catch(f){console.error(f)}}},{key:"showBanner",value:function(e){if("undefined"!=typeof window)try{g.getInstance().showBanner(e)}catch(f){console.error(f)}}}])}();b(x,"isMobileDevice",function(){if("undefined"==typeof window)return!1;return window.innerWidth<=768}),b(x,"instance",void 0);var k=function(e){"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",function(){e()}))};const S=x}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(708);return r=r.default})());