posthog-js 1.171.0 → 1.172.0
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/dist/all-external-dependencies.js +2 -3
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +2 -0
- package/dist/array.full.es5.js.map +1 -0
- package/dist/array.full.js +11 -3
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +11 -3
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +10 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +10 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/exception-autocapture.js +1 -1
- package/dist/exception-autocapture.js.map +1 -1
- package/dist/external-scripts-loader.js +1 -1
- package/dist/external-scripts-loader.js.map +1 -1
- package/dist/main.js +10 -1
- package/dist/main.js.map +1 -1
- package/dist/module.full.js +11 -3
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +11 -3
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +10 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.js +10 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder-v2.js +2 -3
- package/dist/recorder-v2.js.map +1 -1
- package/dist/recorder.js +2 -3
- package/dist/recorder.js.map +1 -1
- package/dist/src/entrypoints/array.full.es5.d.ts +4 -0
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/dist/tracing-headers.js +1 -1
- package/dist/tracing-headers.js.map +1 -1
- package/dist/web-vitals.js +1 -1
- package/dist/web-vitals.js.map +1 -1
- package/lib/package.json +4 -1
- package/lib/src/entrypoints/array.full.es5.d.ts +4 -0
- package/lib/src/entrypoints/array.full.es5.js +10 -0
- package/lib/src/entrypoints/array.full.es5.js.map +1 -0
- package/package.json +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function f(){}function h(){}var v={};c(v,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(k([])));m&&m!==t&&r.call(m,i)&&(v=m);var y=h.prototype=p.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,i,a,s){var c=l(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return f.prototype=h,c(y,"constructor",h),c(h,"constructor",f),f.displayName=c(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(C.prototype),c(C.prototype,a,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new C(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(y),c(y,s,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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,d):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),d},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),S(n),d}},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;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}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,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 i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,n){return t&&function(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)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var h,v="2.0.0-alpha.13";function g(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function m(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function y(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(b).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(e){return null}var n}function b(e){var t,n,r;if(function(e){return"styleSheet"in e}(e))try{t=y(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return n=e.cssText,r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,n.replace(r,"$1\\$2");return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(h||(h={}));var C=function(){function e(){a(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return s(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function _(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,o=e.type,i=e.value,a=e.maskInputFn,s=i||"",c=o&&I(o);return(n[r.toLowerCase()]||c&&n[c])&&(s=a?a(s,t):"*".repeat(s.length)),s}function I(e){return e.toLowerCase()}var S="__rrweb_original__";function w(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?I(t):null}function k(e,t){var n,r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==o?void 0:o[1])&&void 0!==n?n:null}var x,A,T=1,E=new RegExp("[^a-z0-9-_:]"),M=-2;function N(){return T++}var O=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,L=/^(?:[a-z+]+:)?\/\//i,R=/^www\..*/i,F=/^(data:)([^,]*),(.*)/i;function D(e,t){return(e||"").replace(O,(function(e,n,r,o,i,a){var s,c=r||i||a,u=n||o||"";if(!c)return e;if(L.test(c)||R.test(c))return"url(".concat(u).concat(c).concat(u,")");if(F.test(c))return"url(".concat(u).concat(c).concat(u,")");if("/"===c[0])return"url(".concat(u).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(u,")");var l=t.split("/"),d=c.split("/");l.pop();var p,h=f(d);try{for(h.s();!(p=h.n()).done;){var v=p.value;"."!==v&&(".."===v?l.pop():l.push(v))}}catch(e){h.e(e)}finally{h.f()}return"url(".concat(u).concat(l.join("/")).concat(u,")")}))}var q=/^[^ \t\n\r\u000c]+/,P=/^[, \t\n\r\u000c]+/;function H(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function B(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function W(){var e=document.createElement("a");return e.href="",e.href}function Z(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?H(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(P),!(n>=t.length);){var i=r(q);if(","===i.slice(-1))i=H(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=H(e,i);for(var s=!1;;){var c=t.charAt(n);if(""===c){o.push((i+a).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,o.push((i+a).trim());break}"("===c&&(s=!0)}a+=c,n+=1}}}return o.join(", ")}(e,r):"style"===n?D(r,W()):"object"===t&&"data"===n?H(e,r):r:H(e,r):r}function V(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t||"video"===e&&"src"===t&&n&&n.startsWith("blob:http")}function U(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&U(e.parentNode,t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&U(e.parentNode,t,n)}function j(e,t,n,r){try{var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(r){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if(U(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(e){}return!1}function G(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.needsMask,s=t.inlineStylesheet,c=t.maskInputOptions,u=void 0===c?{}:c,l=t.maskTextFn,d=t.maskInputFn,p=t.dataURLOptions,f=void 0===p?{}:p,v=t.inlineImages,g=t.recordCanvas,m=t.keepIframeSrcFn,b=t.newlyAddedElement,C=void 0!==b&&b,k=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:h.Document,childNodes:[],compatMode:e.compatMode}:{type:h.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:h.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,o=t.blockClass,i=t.blockSelector,a=t.inlineStylesheet,s=t.maskInputOptions,c=void 0===s?{}:s,u=t.maskInputFn,l=t.dataURLOptions,d=void 0===l?{}:l,p=t.inlineImages,f=t.recordCanvas,v=t.keepIframeSrcFn,g=t.newlyAddedElement,m=void 0!==g&&g,b=t.rootId,C=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,i),k=function(e){if(e instanceof HTMLFormElement)return"form";var t=I(e.tagName);return E.test(t)?"div":t}(e),T={},M=e.attributes.length,N=0;N<M;N++){var O=e.attributes[N];V(k,O.name,O.value)||(T[O.name]=Z(r,k,I(O.name),O.value))}if("link"===k&&a){var L=e.href,R=Array.from(r.styleSheets).find((function(e){return e.href===L}));if(!R&&L.includes(".css")){var F=window.location.origin+"/"+L.replace(window.location.href,"");R=Array.from(r.styleSheets).find((function(e){return e.href===F}))}var q=null;R&&(q=y(R)),q&&(delete T.rel,delete T.href,T._cssText=D(q,R.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var P=y(e.sheet);P&&(T._cssText=D(P,W()))}if("input"===k||"textarea"===k||"select"===k){var H=e.value,U=e.checked;"radio"!==T.type&&"checkbox"!==T.type&&"submit"!==T.type&&"button"!==T.type&&H?T.value=_({element:e,type:w(e),tagName:k,value:H,maskInputOptions:c,maskInputFn:u}):U&&(T.checked=U)}"option"===k&&(e.selected&&!c.select?T.selected=!0:delete T.selected);if("canvas"===k&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,i=S in o?o[S]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(T.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var j=e.toDataURL(d.type,d.quality),G=document.createElement("canvas");G.width=e.width,G.height=e.height,j!==G.toDataURL(d.type,d.quality)&&(T.rr_dataURL=j)}if("img"===k&&p){x||(x=r.createElement("canvas"),A=x.getContext("2d"));var K=e,Q=K.crossOrigin;K.crossOrigin="anonymous";var z=function e(){K.removeEventListener("load",e);try{x.width=K.naturalWidth,x.height=K.naturalHeight,A.drawImage(K,0,0),T.rr_dataURL=x.toDataURL(d.type,d.quality)}catch(e){console.warn("Cannot inline img src=".concat(K.currentSrc,"! Error: ").concat(e))}Q?T.crossOrigin=Q:K.removeAttribute("crossorigin")};K.complete&&0!==K.naturalWidth?z():K.addEventListener("load",z)}if("audio"===k||"video"===k){var Y=T;Y.rr_mediaState=e.paused?"paused":"played",Y.rr_mediaCurrentTime=e.currentTime,Y.rr_mediaPlaybackRate=e.playbackRate,Y.rr_mediaMuted=e.muted,Y.rr_mediaLoop=e.loop,Y.rr_mediaVolume=e.volume}m||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop));if(C){var J=e.getBoundingClientRect(),X=J.width,$=J.height;T={class:T.class,rr_width:"".concat(X,"px"),rr_height:"".concat($,"px")}}"iframe"!==k||v(T.src)||(e.contentDocument||(T.rr_src=T.src),delete T.src);try{customElements.get(k)&&(n=!0)}catch(e){}return{type:h.Element,tagName:k,attributes:T,childNodes:[],isSVG:B(e)||void 0,needBlock:C,rootId:b,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:f,inlineImages:v,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:C,rootId:k});case e.TEXT_NODE:return function(e,t){var n,r=t.needsMask,o=t.maskTextFn,i=t.rootId,a=e.parentNode&&e.parentNode.tagName,s=e.textContent,c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;if(c&&s){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(s=y(e.parentNode.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}s=D(s,W())}u&&(s="SCRIPT_PLACEHOLDER");!c&&!u&&s&&r&&(s=o?o(s,e.parentElement):s.replace(/[\S]/g,"*"));return{type:h.Text,textContent:s||"",isStyle:c,rootId:i}}(e,{needsMask:a,maskTextFn:l,rootId:k});case e.CDATA_SECTION_NODE:return{type:h.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:h.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function K(e){return null==e?"":e.toLowerCase()}function Q(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,c=t.skipChild,u=void 0!==c&&c,l=t.inlineStylesheet,d=void 0===l||l,p=t.maskInputOptions,f=void 0===p?{}:p,v=t.maskTextFn,y=t.maskInputFn,b=t.slimDOMOptions,C=t.dataURLOptions,_=void 0===C?{}:C,I=t.inlineImages,S=void 0!==I&&I,w=t.recordCanvas,x=void 0!==w&&w,A=t.onSerialize,T=t.onIframeLoad,E=t.iframeLoadTimeout,O=void 0===E?5e3:E,L=t.onStylesheetLoad,R=t.stylesheetLoadTimeout,F=void 0===R?5e3:R,D=t.keepIframeSrcFn,q=void 0===D?function(){return!1}:D,P=t.newlyAddedElement,H=void 0!==P&&P,B=t.needsMask,W=t.preserveWhiteSpace,Z=void 0===W||W;!B&&e.childNodes&&(B=j(e,a,s,void 0===B));var V,U=G(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:B,inlineStylesheet:d,maskInputOptions:f,maskTextFn:v,maskInputFn:y,dataURLOptions:_,inlineImages:S,recordCanvas:x,keepIframeSrcFn:q,newlyAddedElement:H});if(!U)return console.warn(e,"not serialized"),null;V=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===h.Comment)return!0;if(e.type===h.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===k(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}(U,b)&&(Z||U.type!==h.Text||U.isStyle||U.textContent.replace(/^\s+|\s+$/gm,"").length)?N():M;var z=Object.assign(U,{id:V});if(r.add(e,z),V===M)return null;A&&A(e);var Y=!u;if(z.type===h.Element){Y=Y&&!z.needBlock,delete z.needBlock;var J=e.shadowRoot;J&&m(J)&&(z.isShadowHost=!0)}if((z.type===h.Document||z.type===h.Element)&&Y){b.headWhitespace&&z.type===h.Element&&"head"===z.tagName&&(Z=!1);var X={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:B,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:d,maskInputOptions:f,maskTextFn:v,maskInputFn:y,slimDOMOptions:b,dataURLOptions:_,inlineImages:S,recordCanvas:x,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:L,stylesheetLoadTimeout:F,keepIframeSrcFn:q};if(z.type===h.Element&&"textarea"===z.tagName&&void 0!==z.attributes.value);else for(var $=0,ee=Array.from(e.childNodes);$<ee.length;$++){var te=Q(ee[$],X);te&&z.childNodes.push(te)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var ne=0,re=Array.from(e.shadowRoot.childNodes);ne<re.length;ne++){var oe=Q(re[ne],X);oe&&(m(e.shadowRoot)&&(oe.isShadow=!0),z.childNodes.push(oe))}}return e.parentNode&&g(e.parentNode)&&m(e.parentNode)&&(z.isShadow=!0),z.type===h.Element&&"iframe"===z.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&T){var n=Q(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:B,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:v,maskInputFn:y,slimDOMOptions:b,dataURLOptions:_,inlineImages:S,recordCanvas:x,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:L,stylesheetLoadTimeout:F,keepIframeSrcFn:q});n&&T(e,n)}}),O),z.type===h.Element&&"link"===z.tagName&&"string"==typeof z.attributes.rel&&("stylesheet"===z.attributes.rel||"preload"===z.attributes.rel&&"string"==typeof z.attributes.href&&"css"===k(z.attributes.href))&&function(e,t,n){var r,o=!1;try{r=e.sheet}catch(e){return}if(!r){var i=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),o=!0,t()}))}}(e,(function(){if(L){var t=Q(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:B,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:v,maskInputFn:y,slimDOMOptions:b,dataURLOptions:_,inlineImages:S,recordCanvas:x,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:L,stylesheetLoadTimeout:F,keepIframeSrcFn:q});t&&L(e,t)}}),F),z}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var Y="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",J={map:{},getId:function(){return console.error(Y),-1},getNode:function(){return console.error(Y),null},removeNodeFromMap:function(){console.error(Y)},has:function(){return console.error(Y),!1},reset:function(){console.error(Y)}};function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=Date.now();o||!1!==n.leading||(o=c);var u=t-(c-o),l=this;u<=0||u>t?(r&&(clearTimeout(r),r=null),o=c,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),u))}}function $(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return $(e,t,i||{},!0)}}function ee(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(J=new Proxy(J,{get:function(e,t,n){return"map"===t&&console.error(Y),Reflect.get(e,t,n)}}));var te=Date.now;function ne(e){var t,n,r,o,i,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null==s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null==s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null===(i=null===(o=null==s?void 0:s.body)||void 0===o?void 0:o.parentElement)||void 0===i?void 0:i.scrollTop)||(null===(a=null==s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function re(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function oe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ie(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ae(e,t,n,r){if(!e)return!1;var o=ie(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(U(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function se(e,t){return t.getId(e)===M}function ce(e,t){if(g(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||ce(e.parentNode,t))}function ue(e){return Boolean(e.changedTouches)}function le(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function de(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function pe(e){return Boolean(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(te=function(){return(new Date).getTime()});var fe=function(){function e(){a(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return s(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function he(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function ve(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=he(n);)n=t;return n}(e);return t.contains(n)}function ge(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||ve(e))}var me=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(me||{}),ye=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(ye||{}),be=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(be||{}),Ce=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Ce||{}),_e=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(_e||{});function Ie(e){return"__ln"in e}var Se,we=function(){function e(){a(this,e),this.length=0,this.head=null,this.tail=null}return s(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ie(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Ie(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),ke=function(e,t){return"".concat(e,"@").concat(t)},xe=function(){function e(){var t=this;a(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,r=new we,o=function(e){for(var n=e,r=M;r===M;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},i=function(i){if(i.parentNode&&ge(i)&&"TEXTAREA"!==i.parentNode.tagName){var a=g(i.parentNode)?t.mirror.getId(he(i)):t.mirror.getId(i.parentNode),s=o(i);if(-1===a||-1===s)return r.addNode(i);var c=Q(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){le(e,t.mirror)&&t.iframeManager.addIframe(e),de(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),pe(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});c&&(e.push({parentId:a,nextId:s,node:c}),n.add(c.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var a,s=f(t.movedSet);try{for(s.s();!(a=s.n()).done;){var c=a.value;Te(t.removes,c,t.mirror)&&!t.movedSet.has(c.parentNode)||i(c)}}catch(e){s.e(e)}finally{s.f()}var u,l=f(t.addedSet);try{for(l.s();!(u=l.n()).done;){var d=u.value;Me(t.droppedSet,d)||Te(t.removes,d,t.mirror)?Me(t.movedSet,d)?i(d):t.droppedSet.add(d):i(d)}}catch(e){l.e(e)}finally{l.f()}for(var p=null;r.length;){var h=null;if(p){var v=t.mirror.getId(p.value.parentNode),m=o(p.value);-1!==v&&-1!==m&&(h=p)}if(!h)for(var y=r.tail;y;){var b=y;if(y=y.previous,b){var C=t.mirror.getId(b.value.parentNode);if(-1===o(b.value))continue;if(-1!==C){h=b;break}var _=b.value;if(_.parentNode&&_.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var I=_.parentNode.host;if(-1!==t.mirror.getId(I)){h=b;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}p=h.previous,r.removeNode(h.value),i(h.value)}var S={texts:t.texts.map((function(e){var n=e.node;return n.parentNode&&"TEXTAREA"===n.parentNode.tagName&&t.genTextAreaValueMutation(n.parentNode),{id:t.mirror.getId(n),value:e.value}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){var n=e.attributes;if("string"==typeof n.style){var r=JSON.stringify(e.styleDiff),o=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+o).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(S.texts.length||S.attributes.length||S.removes.length||S.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(S))}},this.genTextAreaValueMutation=function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n)),n.attributes.value=Array.from(e.childNodes,(function(e){return e.textContent||""})).join("")},this.processMutation=function(e){if(!se(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;ae(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:j(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,ie(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,o=e.attributeName,i=e.target.getAttribute(o);if("value"===o){var a=w(r);i=_({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:a,value:i,maskInputFn:t.maskInputFn})}if(ae(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var s=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===o&&!t.keepIframeSrcFn(i)){if(r.contentDocument)return;o="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(s),t.attributeMap.set(e.target,s)),"type"===o&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!V(r.tagName,o,i)&&(s.attributes[o]=Z(t.doc,I(r.tagName),I(o),i),"style"===o)){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){t.unattachedDoc=t.doc}var c=t.unattachedDoc.createElement("span");e.oldValue&&c.setAttribute("style",e.oldValue);for(var u=0,l=Array.from(r.style);u<l.length;u++){var d=l[u],p=r.style.getPropertyValue(d),f=r.style.getPropertyPriority(d);p!==c.style.getPropertyValue(d)||f!==c.style.getPropertyPriority(d)?s.styleDiff[d]=""===f?p:[p,f]:s._unchangedStyles[d]=[p,f]}for(var h=0,v=Array.from(c.style);h<v.length;h++){var y=v[h];""===r.style.getPropertyValue(y)&&(s.styleDiff[y]=!1)}}break;case"childList":if(ae(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),o=g(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);ae(e.target,t.blockClass,t.blockSelector,!1)||se(n,t.mirror)||!function(e,t){return-1!==t.getId(e)}(n,t.mirror)||(t.addedSet.has(n)?(Ae(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||ce(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[ke(r,o)]?Ae(t.movedSet,n):t.removes.push({parentId:o,id:r,isShadow:!(!g(e.target)||!m(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if(se(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[ke(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);ae(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),pe(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return s(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function Ae(e,t){e.delete(t),t.childNodes.forEach((function(t){return Ae(e,t)}))}function Te(e,t,n){return 0!==e.length&&Ee(e,t,n)}function Ee(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||Ee(e,r,n)}function Me(e,t){return 0!==e.size&&Ne(e,t)}function Ne(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||Ne(e,n))}function Oe(e){Se=e}function Le(){Se=void 0}var Re=function(e){if(!Se)return e;return function(){try{return e.apply(void 0,arguments)}catch(e){if(Se&&!0===Se(e))return;throw e}}},Fe=[];function De(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function qe(e,t){var n,r,o=new xe;Fe.push(o),o.init(e);var i=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);var s=new i(Re(o.processMutations.bind(o)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Pe(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[],u=null;return Object.keys(be).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=I(e),s=function(e){return function(n){var a=De(n);if(!ae(a,o,i,!0)){var s=null,c=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=Ce.Mouse;break;case"touch":s=Ce.Touch;break;case"pen":s=Ce.Pen}s===Ce.Touch?be[e]===be.MouseDown?c="TouchStart":be[e]===be.MouseUp&&(c="TouchEnd"):Ce.Pen}else ue(n)&&(s=Ce.Touch);null!==s?(u=s,(c.startsWith("Touch")&&s===Ce.Touch||c.startsWith("Mouse")&&s===Ce.Mouse)&&(s=null)):be[e]===be.Click&&(s=u,u=null);var l=ue(n)?n.changedTouches[0]:n;if(l){var d=r.getId(a),p=l.clientX,f=l.clientY;Re(t)(Object.assign({type:be[c],id:d,x:p,y:f},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(be[e]){case be.MouseDown:case be.MouseUp:a=a.replace("mouse","pointer");break;case be.TouchStart:case be.TouchEnd:return}c.push(z(a,s,n))})),Re((function(){c.forEach((function(e){return e()}))}))}function He(e){var t=e.scrollCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.sampling;return z("scroll",Re(X(Re((function(e){var a=De(e);if(a&&!ae(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var c=ne(n.defaultView);t({id:s,x:c.left,y:c.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var Be=["INPUT","TEXTAREA","SELECT"],We=new WeakMap;function Ze(e){return function(e,t){if(Ge("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ge("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ge("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ge("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Ve(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ue(e,t){var n,r,o,i=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(t.host);var c="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(o=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===o?void 0:o.ShadowRoot,u=(null==c?void 0:c.prototype)?Object.getOwnPropertyDescriptor(null==c?void 0:c.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&c&&u?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:function(){var e;return null===(e=u.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=u.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return n}}),Re((function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):function(){}}function je(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,f=e.selectionCb,h=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),o.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),i.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),c.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),u.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),p.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),f.apply(void 0,arguments)},e.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),h.apply(void 0,arguments)}}(e,n),e.recordDOM&&(t=qe(e,e.doc));var o=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,o=e.mirror;if(!1===n.mousemove)return function(){};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=X(Re((function(e){var n=Date.now()-i;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],i=null})),s),l=Re(X(Re((function(e){var t=De(e),n=ue(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;i||(i=te()),c.push({x:r,y:a,id:o.getId(t),timeOffset:te()-i}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?ye.Drag:e instanceof MouseEvent?ye.MouseMove:ye.TouchMove)})),a,{trailing:!1})),d=[z("mousemove",l,r),z("touchmove",l,r),z("drag",l,r)];return Re((function(){d.forEach((function(e){return e()}))}))}(e),i=Pe(e),a=He(e),s=function(e,t){var n=e.viewportResizeCb,r=t.win,o=-1,i=-1;return z("resize",Re(X(Re((function(){var e=re(),t=oe();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}(e,{win:r}),c=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.ignoreClass,s=e.ignoreSelector,c=e.maskInputOptions,u=e.maskInputFn,d=e.sampling,p=e.userTriggeredOnInput;function f(e){var t=De(e),r=e.isTrusted,l=t&&t.tagName;if(t&&"OPTION"===l&&(t=t.parentElement),t&&l&&!(Be.indexOf(l)<0)&&!ae(t,o,i,!0)&&!(t.classList.contains(a)||s&&t.matches(s))){var d=t.value,f=!1,v=w(t)||"";"radio"===v||"checkbox"===v?f=t.checked:(c[l.toLowerCase()]||c[v])&&(d=_({element:t,maskInputOptions:c,tagName:l,type:v,value:d,maskInputFn:u})),h(t,p?{text:d,isChecked:f,userTriggered:r}:{text:d,isChecked:f});var g=t.name;"radio"===v&&g&&f&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){if(e!==t){var n=e.value;h(e,p?{text:n,isChecked:!f,userTriggered:!1}:{text:n,isChecked:!f})}}))}}function h(e,n){var o=We.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){We.set(e,n);var i=r.getId(e);Re(t)(Object.assign(Object.assign({},n),{id:i}))}}var v=("last"===d.input?["change"]:["input","change"]).map((function(e){return z(e,Re(f),n)})),g=n.defaultView;if(!g)return function(){v.forEach((function(e){return e()}))};var m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&v.push.apply(v,l(y.map((function(e){return $(e[0],e[1],{set:function(){Re(f)({target:this,isTrusted:!1})}},!1,g)})))),Re((function(){v.forEach((function(e){return e()}))}))}(e),d=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,o=e.mirror,i=e.sampling,a=e.doc,s=Re((function(e){return X(Re((function(i){var a=De(i);if(a&&!ae(a,n,r,!0)){var s=a.currentTime,c=a.volume,u=a.muted,l=a.playbackRate,d=a.loop;t({type:e,id:o.getId(a),currentTime:s,volume:c,muted:u,playbackRate:l,loop:d})}})),i.media||500)})),c=[z("play",s(0),a),z("pause",s(1),a),z("seeked",s(2),a),z("volumechange",s(3),a),z("ratechange",s(4),a)];return Re((function(){c.forEach((function(e){return e()}))}))}(e),p=function(){},h=function(){},v=function(){},g=function(){};e.recordDOM&&(p=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,o=e.stylesheetManager,i=t.win;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return function(){};var a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Re((function(e,t,i){var a=u(i,2),s=a[0],c=a[1],l=Ve(t,r,o.styleMirror),d=l.id,p=l.styleId;return(d&&-1!==d||p&&-1!==p)&&n({id:d,styleId:p,adds:[{rule:s,index:c}]}),e.apply(t,i)}))});var s,c,d=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:Re((function(e,t,i){var a=u(i,1)[0],s=Ve(t,r,o.styleMirror),c=s.id,l=s.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,removes:[{index:a}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Re((function(e,t,i){var a=u(i,1)[0],s=Ve(t,r,o.styleMirror),c=s.id,l=s.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replace:a}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(c=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:Re((function(e,t,i){var a=u(i,1)[0],s=Ve(t,r,o.styleMirror),c=s.id,l=s.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var p={};Ke("CSSGroupingRule")?p.CSSGroupingRule=i.CSSGroupingRule:(Ke("CSSMediaRule")&&(p.CSSMediaRule=i.CSSMediaRule),Ke("CSSConditionRule")&&(p.CSSConditionRule=i.CSSConditionRule),Ke("CSSSupportsRule")&&(p.CSSSupportsRule=i.CSSSupportsRule));var f={};return Object.entries(p).forEach((function(e){var t=u(e,2),i=t[0],a=t[1];f[i]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(f[i].insertRule,{apply:Re((function(e,t,i){var a=u(i,2),s=a[0],c=a[1],d=Ve(t.parentStyleSheet,r,o.styleMirror),p=d.id,f=d.styleId;return(p&&-1!==p||f&&-1!==f)&&n({id:p,styleId:f,adds:[{rule:s,index:[].concat(l(Ze(t)),[c||0])}]}),e.apply(t,i)}))}),a.prototype.deleteRule=new Proxy(f[i].deleteRule,{apply:Re((function(e,t,i){var a=u(i,1)[0],s=Ve(t.parentStyleSheet,r,o.styleMirror),c=s.id,d=s.styleId;return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,removes:[{index:[].concat(l(Ze(t)),[a])}]}),e.apply(t,i)}))})})),Re((function(){i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=d,s&&(i.CSSStyleSheet.prototype.replace=s),c&&(i.CSSStyleSheet.prototype.replaceSync=c),Object.entries(p).forEach((function(e){var t=u(e,2),n=t[0],r=t[1];r.prototype.insertRule=f[n].insertRule,r.prototype.deleteRule=f[n].deleteRule}))}))}(e,{win:r}),h=Ue(e,e.doc),v=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=e.ignoreCSSAttributes,i=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Re((function(e,t,a){var c,l=u(a,3),d=l[0],p=l[1],f=l[2];if(o.has(d))return s.apply(t,[d,p,f]);var h=Ve(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,i.styleMirror),v=h.id,g=h.styleId;return(v&&-1!==v||g&&-1!==g)&&n({id:v,styleId:g,set:{property:d,value:p,priority:f},index:Ze(t.parentRule)}),e.apply(t,a)}))});var c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:Re((function(e,t,a){var s,l=u(a,1)[0];if(o.has(l))return c.apply(t,[l]);var d=Ve(null===(s=t.parentRule)||void 0===s?void 0:s.parentStyleSheet,r,i.styleMirror),p=d.id,f=d.styleId;return(p&&-1!==p||f&&-1!==f)&&n({id:p,styleId:f,remove:{property:l},index:Ze(t.parentRule)}),e.apply(t,a)}))}),Re((function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=c}))}(e,{win:r}),e.collectFonts&&(g=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=ee(n.fonts,"add",(function(e){return function(n){return setTimeout(Re((function(){var e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=a})),o.push(s),Re((function(){o.forEach((function(e){return e()}))}))}(e)));var m,y=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,o=e.blockSelector,i=e.selectionCb,a=!0,s=Re((function(){var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],c=e.rangeCount||0,u=0;u<c;u++){var l=e.getRangeAt(u),d=l.startContainer,p=l.startOffset,f=l.endContainer,h=l.endOffset;ae(d,r,o,!0)||ae(f,r,o,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(f),endOffset:h})}i({ranges:s})}}));return s(),z("selectionchange",s)}(e),b=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?ee(r.customElements,"define",(function(e){return function(t,r,o){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,o])}})):function(){}}(e),C=[],I=f(e.plugins);try{for(I.s();!(m=I.n()).done;){var S=m.value;C.push(S.observer(S.callback,r,S.options))}}catch(e){I.e(e)}finally{I.f()}return Re((function(){Fe.forEach((function(e){return e.reset()})),null==t||t.disconnect(),o(),i(),a(),s(),c(),d(),p(),h(),v(),g(),y(),b(),C.forEach((function(e){return e()}))}))}function Ge(e){return void 0!==window[e]}function Ke(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Qe=function(){function e(t){a(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return s(e,[{key:"getId",value:function(e,t,n,r){var o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e),a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,o)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var o=r.get(t);return o||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),ze=function(){function e(t){a(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Qe(N),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Qe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return s(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case me.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var o=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,o),this.patchRootIdOnNode(t.data.node,o),{timestamp:t.timestamp,type:me.IncrementalSnapshot,data:{source:ye.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case me.Meta:case me.Load:case me.DomContentLoaded:return!1;case me.Plugin:return t;case me.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case me.IncrementalSnapshot:switch(t.data.source){case ye.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case ye.Drag:case ye.TouchMove:case ye.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case ye.ViewportResize:return!1;case ye.MediaInteraction:case ye.MouseInteraction:case ye.Scroll:case ye.CanvasMutation:case ye.Input:return this.replaceIds(t.data,e,["id"]),t;case ye.StyleSheetRule:case ye.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ye.Font:return t;case ye.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case ye.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}return!1}},{key:"replace",value:function(e,t,n,r){var o,i=f(r);try{for(i.s();!(o=i.n()).done;){var a=o.value;(Array.isArray(t[a])||"number"==typeof t[a])&&(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===h.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),Ye=function(){function e(t){a(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return s(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if(m(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=qe(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(He(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(Ue({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push(ee(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r);return this.shadowRoot&&ge(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}();function Je(e,t,n,r){return new(n||(n=Promise))((function(t,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}s((r=r.apply(e,[])).next())}))}for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$e="undefined"==typeof Uint8Array?[]:new Uint8Array(256),et=0;et<64;et++)$e[Xe.charCodeAt(et)]=et;var tt=new Map;var nt=function(e,t,n){if(e&&(it(e,t)||"object"===r(e))){var o=function(e,t){var n=tt.get(e);return n||(n=new Map,tt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=o.indexOf(e);return-1===i&&(i=o.length,o.push(e)),i}};function rt(e,t,n){if(e instanceof Array)return e.map((function(e){return rt(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var o=e.constructor.name,i=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=Xe[n[t]>>2],o+=Xe[(3&n[t])<<4|n[t+1]>>4],o+=Xe[(15&n[t+1])<<2|n[t+2]>>6],o+=Xe[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:o,base64:i}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[rt(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[rt(e.data,t,n),e.width,e.height]}:it(e,t)||"object"===r(e)?{rr_type:e.constructor.name,index:nt(e,t,n)}:e}var ot=function(e,t,n){return e.map((function(e){return rt(e,t,n)}))},it=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function at(e,t,n,o){var i=[];try{var a=ee(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!ae(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),o&&["webgl","webgl2"].includes(u))if(s[0]&&"object"===r(s[0])){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(s))}}));i.push(a)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach((function(e){return e()}))}}function st(e,t,n,r,o,i,a){var s,c=[],u=f(Object.getOwnPropertyNames(e));try{var l=function(){var i=s.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))return"continue";try{if("function"!=typeof e[i])return"continue";var u=ee(e,i,(function(e){return function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var l=e.apply(this,c);if(nt(l,a,this),"tagName"in this.canvas&&!ae(this.canvas,r,o,!0)){var d=ot(c,a,this),p={type:t,property:i,args:d};n(this.canvas,p)}return l}}));c.push(u)}catch(r){var l=$(e,i,{set:function(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});c.push(l)}};for(u.s();!(s=u.n()).done;)l()}catch(e){u.e(e)}finally{u.f()}return c}function ct(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,a=o.substring(i)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var ut,lt,dt,pt,ft,ht,vt,gt=(ut="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",lt=null,dt=!1,function(e){return pt=pt||ct(ut,lt,dt),new Worker(pt,e)}),mt=function(){function e(t){var n=this;a(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,o=void 0===r?"all":r,i=t.win,s=t.blockClass,c=t.blockSelector,u=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,u&&"all"===o&&this.initCanvasMutationObserver(i,s,c),u&&"number"==typeof o&&this.initCanvasFPSObserver(o,i,s,c,{dataURLOptions:l})}return s(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,r,o,i){var a=this,s=at(t,r,o,!0),c=new Map,u=new gt;u.onmessage=function(e){var t=e.data.id;if(c.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,o=n.type,i=n.width,s=n.height;a.mutationCb({id:t,type:_e["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0]}]})}};var l,d=1e3/e,p=0;l=requestAnimationFrame((function e(s){var f;p&&s-p<d?l=requestAnimationFrame(e):(p=s,(f=[],function e(t){t.querySelectorAll("canvas").forEach((function(e){ae(e,r,o,!0)||f.push(e)})),t.querySelectorAll("*").forEach((function(t){t.shadowRoot&&e(t.shadowRoot)}))}(t.document),f).forEach((function(e){return Je(a,0,void 0,n().mark((function t(){var r,o,a,s,l,d;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.mirror.getId(e),!c.get(o)){t.next=3;break}return t.abrupt("return");case 3:if(0!==e.width&&0!==e.height){t.next=5;break}return t.abrupt("return");case 5:return c.set(o,!0),["webgl","webgl2"].includes(e.__context)&&(a=e.getContext(e.__context),!1===(null===(r=null==a?void 0:a.getContextAttributes())||void 0===r?void 0:r.preserveDrawingBuffer)&&a.clear(a.COLOR_BUFFER_BIT)),s=e.clientWidth||e.width,l=e.clientHeight||e.height,t.next=11,createImageBitmap(e,{resizeWidth:s,resizeHeight:l});case 11:d=t.sent,u.postMessage({id:o,bitmap:d,width:s,height:l,dataURLOptions:i.dataURLOptions},[d]);case 13:case"end":return t.stop()}}),t,this)})))})),l=requestAnimationFrame(e))})),this.resetObservers=function(){s(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=at(e,t,n,!1),o=function(e,t,n,r){var o,i=[],a=f(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));try{var s=function(){var a=o.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return"continue";var s=ee(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var i=this,s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return ae(this.canvas,n,r,!0)||setTimeout((function(){var n=ot(c,t,i);e(i.canvas,{type:_e["2D"],property:a,args:n})}),0),o.apply(this,c)}}));i.push(s)}catch(n){var c=$(t.CanvasRenderingContext2D.prototype,a,{set:function(t){e(this.canvas,{type:_e["2D"],property:a,args:[t],setter:!0})}});i.push(c)}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r,o){var i=[];return i.push.apply(i,l(st(t.WebGLRenderingContext.prototype,_e.WebGL,e,n,r,0,t))),void 0!==t.WebGL2RenderingContext&&i.push.apply(i,l(st(t.WebGL2RenderingContext.prototype,_e.WebGL2,e,n,r,0,t))),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){r(),o(),i()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){var t=
|
|
1
|
+
!function(){"use strict";var e,t="2.0.0-alpha.13";function n(e){const t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function r(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n).map(i).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function i(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=o(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));class s{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return-1;const n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function a(e){let{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:s}=e,a=i||"";const c=o&&l(o);return(n[r.toLowerCase()]||c&&n[c])&&(a=s?s(a,t):"*".repeat(a.length)),a}function l(e){return e.toLowerCase()}const c="__rrweb_original__";function u(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?l(t):null}function d(e,t){var n;let r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}const o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==o?void 0:o[1])&&void 0!==n?n:null}let p=1;const h=new RegExp("[^a-z0-9-_:]"),f=-2;function g(){return p++}let m,y;const v=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,C=/^(?:[a-z+]+:)?\/\//i,b=/^www\..*/i,_=/^(data:)([^,]*),(.*)/i;function I(e,t){return(e||"").replace(v,((e,n,r,o,i,s)=>{const a=r||i||s,l=n||o||"";if(!a)return e;if(C.test(a)||b.test(a))return`url(${l}${a}${l})`;if(_.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}const S=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function k(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function A(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function T(){const e=document.createElement("a");return e.href="",e.href}function x(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?k(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(w),!(n>=t.length);){let i=r(S);if(","===i.slice(-1))i=k(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=k(e,i);let s=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(s=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?I(r,T()):"object"===t&&"data"===n?k(e,r):r:k(e,r):r}function M(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t||"video"===e&&"src"===t&&n&&n.startsWith("blob:http")}function E(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&E(e.parentNode,t,n);for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!!n&&E(e.parentNode,t,n)}function N(e,t,n,r){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(E(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(e){}return!1}function O(t,n){const{doc:r,mirror:i,blockClass:s,blockSelector:d,needsMask:p,inlineStylesheet:f,maskInputOptions:g={},maskTextFn:v,maskInputFn:C,dataURLOptions:b={},inlineImages:_,recordCanvas:S,keepIframeSrcFn:w,newlyAddedElement:k=!1}=n,E=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return function(t,n){const{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:d,maskInputOptions:p={},maskInputFn:f,dataURLOptions:g={},inlineImages:v,recordCanvas:C,keepIframeSrcFn:b,newlyAddedElement:_=!1,rootId:S}=n,w=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(t,i,s),k=function(e){if(e instanceof HTMLFormElement)return"form";const t=l(e.tagName);return h.test(t)?"div":t}(t);let E={};const N=t.attributes.length;for(let e=0;e<N;e++){const n=t.attributes[e];M(k,n.name,n.value)||(E[n.name]=x(r,k,l(n.name),n.value))}if("link"===k&&d){const e=t.href;let n=Array.from(r.styleSheets).find((t=>t.href===e));if(!n&&e.includes(".css")){const t=window.location.origin+"/"+e.replace(window.location.href,"");n=Array.from(r.styleSheets).find((e=>e.href===t))}let i=null;n&&(i=o(n)),i&&(delete E.rel,delete E.href,E._cssText=I(i,n.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=o(t.sheet);e&&(E._cssText=I(e,T()))}if("input"===k||"textarea"===k||"select"===k){const e=t.value,n=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&e?E.value=a({element:t,type:u(t),tagName:k,value:e,maskInputOptions:p,maskInputFn:f}):n&&(E.checked=n)}"option"===k&&(t.selected&&!p.select?E.selected=!0:delete E.selected);if("canvas"===k&&C)if("2d"===t.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,i=c in o?o[c]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(g.type,g.quality)&&(E.rr_dataURL=e)}if("img"===k&&v){m||(m=r.createElement("canvas"),y=m.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const o=()=>{e.removeEventListener("load",o);try{m.width=e.naturalWidth,m.height=e.naturalHeight,y.drawImage(e,0,0),E.rr_dataURL=m.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?E.crossOrigin=n:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===k||"video"===k){const e=E;e.rr_mediaState=t.paused?"paused":"played",e.rr_mediaCurrentTime=t.currentTime,e.rr_mediaPlaybackRate=t.playbackRate,e.rr_mediaMuted=t.muted,e.rr_mediaLoop=t.loop,e.rr_mediaVolume=t.volume}_||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop));if(w){const{width:e,height:n}=t.getBoundingClientRect();E={class:E.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==k||b(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src);let O;try{customElements.get(k)&&(O=!0)}catch(e){}return{type:e.Element,tagName:k,attributes:E,childNodes:[],isSVG:A(t)||void 0,needBlock:w,rootId:S,isCustom:O}}(t,{doc:r,blockClass:s,blockSelector:d,inlineStylesheet:f,maskInputOptions:g,maskInputFn:C,dataURLOptions:b,inlineImages:_,recordCanvas:S,keepIframeSrcFn:w,newlyAddedElement:k,rootId:E});case t.TEXT_NODE:return function(t,n){var r;const{needsMask:i,maskTextFn:s,rootId:a}=n,l=t.parentNode&&t.parentNode.tagName;let c=t.textContent;const u="STYLE"===l||void 0,d="SCRIPT"===l||void 0;if(u&&c){try{t.nextSibling||t.previousSibling||(null===(r=t.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(c=o(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}c=I(c,T())}d&&(c="SCRIPT_PLACEHOLDER");!u&&!d&&c&&i&&(c=s?s(c,t.parentElement):c.replace(/[\S]/g,"*"));return{type:e.Text,textContent:c||"",isStyle:u,rootId:a}}(t,{needsMask:p,maskTextFn:v,rootId:E});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:E};default:return!1}}function L(e){return null==e?"":e.toLowerCase()}function R(t,o){const{doc:i,mirror:s,blockClass:a,blockSelector:l,maskTextClass:c,maskTextSelector:u,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskTextFn:y,maskInputFn:v,slimDOMOptions:C,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:I=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:M=!1}=o;let{needsMask:E}=o,{preserveWhiteSpace:D=!0}=o;if(!E&&t.childNodes){E=N(t,c,u,void 0===E)}const F=O(t,{doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:E,inlineStylesheet:h,maskInputOptions:m,maskTextFn:y,maskInputFn:v,dataURLOptions:b,inlineImages:_,recordCanvas:I,keepIframeSrcFn:x,newlyAddedElement:M});if(!F)return console.warn(t,"not serialized"),null;let q;q=s.hasNode(t)?s.getId(t):!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===d(t.attributes.href)))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(L(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(t.attributes.name)||"icon"===L(t.attributes.rel)||"apple-touch-icon"===L(t.attributes.rel)||"shortcut icon"===L(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&L(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(L(t.attributes.property).match(/^(og|twitter|fb):/)||L(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===L(t.attributes.name)||"googlebot"===L(t.attributes.name)||"bingbot"===L(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===L(t.attributes.name)||"generator"===L(t.attributes.name)||"framework"===L(t.attributes.name)||"publisher"===L(t.attributes.name)||"progid"===L(t.attributes.name)||L(t.attributes.property).match(/^article:/)||L(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===L(t.attributes.name)||"yandex-verification"===L(t.attributes.name)||"csrf-token"===L(t.attributes.name)||"p:domain_verify"===L(t.attributes.name)||"verify-v1"===L(t.attributes.name)||"verification"===L(t.attributes.name)||"shopify-checkout-api-token"===L(t.attributes.name)))return!0}}return!1}(F,C)&&(D||F.type!==e.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?g():f;const H=Object.assign(F,{id:q});if(s.add(t,H),q===f)return null;S&&S(t);let B=!p;if(H.type===e.Element){B=B&&!H.needBlock,delete H.needBlock;const e=t.shadowRoot;e&&r(e)&&(H.isShadowHost=!0)}if((H.type===e.Document||H.type===e.Element)&&B){C.headWhitespace&&H.type===e.Element&&"head"===H.tagName&&(D=!1);const n={doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:E,maskTextClass:c,maskTextSelector:u,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskTextFn:y,maskInputFn:v,slimDOMOptions:C,dataURLOptions:b,inlineImages:_,recordCanvas:I,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:x};if(H.type===e.Element&&"textarea"===H.tagName&&void 0!==H.attributes.value);else for(const e of Array.from(t.childNodes)){const t=R(e,n);t&&H.childNodes.push(t)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(const e of Array.from(t.shadowRoot.childNodes)){const o=R(e,n);o&&(r(t.shadowRoot)&&(o.isShadow=!0),H.childNodes.push(o))}}return t.parentNode&&n(t.parentNode)&&r(t.parentNode)&&(H.isShadow=!0),H.type===e.Element&&"iframe"===H.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(t,(()=>{const e=t.contentDocument;if(e&&w){const n=R(e,{doc:e,mirror:s,blockClass:a,blockSelector:l,needsMask:E,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:y,maskInputFn:v,slimDOMOptions:C,dataURLOptions:b,inlineImages:_,recordCanvas:I,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&w(t,n)}}),k),H.type===e.Element&&"link"===H.tagName&&"string"==typeof H.attributes.rel&&("stylesheet"===H.attributes.rel||"preload"===H.attributes.rel&&"string"==typeof H.attributes.href&&"css"===d(H.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(t,(()=>{if(A){const e=R(t,{doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:E,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:y,maskInputFn:v,slimDOMOptions:C,dataURLOptions:b,inlineImages:_,recordCanvas:I,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:x});e&&A(t,e)}}),T),H}function D(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const F="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let q={map:{},getId:()=>(console.error(F),-1),getNode:()=>(console.error(F),null),removeNodeFromMap(){console.error(F)},has:()=>(console.error(F),!1),reset(){console.error(F)}};function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const l=Date.now();o||!1!==n.leading||(o=l);const c=t-(l-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(u,s)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,s)}),c))}}function B(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>B(e,t,i||{},!0)}function P(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(q=new Proxy(q,{get:(e,t,n)=>("map"===t&&console.error(F),Reflect.get(e,t,n))}));let W=Date.now;function Z(e){var t,n,r,o,i,s;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null===(n=null===(t=null==a?void 0:a.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null==a?void 0:a.body)||void 0===r?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null===(i=null===(o=null==a?void 0:a.body)||void 0===o?void 0:o.parentElement)||void 0===i?void 0:i.scrollTop)||(null===(s=null==a?void 0:a.body)||void 0===s?void 0:s.scrollTop)||0}}function V(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function U(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function j(e,t,n,r){if(!e)return!1;const o=G(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(E(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function $(e,t){return t.getId(e)===f}function K(e,t){if(n(e))return!1;const r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||K(e.parentNode,t))}function Q(e){return Boolean(e.changedTouches)}function z(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Y(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function J(e){return Boolean(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(W=()=>(new Date).getTime());class X{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ee(e){var t,n;let r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function te(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=ee(n);)n=t;return n}(e);return t.contains(n)}function ne(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||te(e))}var re=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(re||{}),oe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(oe||{}),ie=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ie||{}),se=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(se||{}),ae=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ae||{});function le(e){return"__ln"in e}class ce{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&le(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&le(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const ue=(e,t)=>`${e}@${t}`;class de{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new ce,o=e=>{let t=e,n=f;for(;n===f;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!ne(i)||"TEXTAREA"===i.parentNode.tagName)return;const s=n(i.parentNode)?this.mirror.getId(ee(i)):this.mirror.getId(i.parentNode),a=o(i);if(-1===s||-1===a)return r.addNode(i);const l=R(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{z(e,this.mirror)&&this.iframeManager.addIframe(e),Y(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),J(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:s,nextId:a,node:l}),t.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)he(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of this.addedSet)ge(this.droppedSet,e)||he(this.removes,e,this.mirror)?ge(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let s=null;for(;r.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=o(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=r.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===o(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}s=e.previous,r.removeNode(e.value),i(e.value)}const a={texts:this.texts.map((e=>{const t=e.node;return t.parentNode&&"TEXTAREA"===t.parentNode.tagName&&this.genTextAreaValueMutation(t.parentNode),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(e.childNodes,(e=>e.textContent||"")).join("")},this.processMutation=e=>{if(!$(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;j(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:N(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,G(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const e=u(t);r=a({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:r,maskInputFn:this.maskInputFn})}if(j(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!M(t.tagName,n,r)&&(o.attributes[n]=x(this.doc,l(t.tagName),l(n),r),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===i?r:[r,i]:o._unchangedStyles[e]=[r,i]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(j(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const o=this.mirror.getId(t),i=n(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);j(e.target,this.blockClass,this.blockSelector,!1)||$(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(pe(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===o||K(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ue(o,i)]?pe(this.movedSet,t):this.removes.push({parentId:i,id:o,isShadow:!(!n(e.target)||!r(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if($(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[ue(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);j(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),J(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function pe(e,t){e.delete(t),t.childNodes.forEach((t=>pe(e,t)))}function he(e,t,n){return 0!==e.length&&fe(e,t,n)}function fe(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||fe(e,r,n)}function ge(e,t){return 0!==e.size&&me(e,t)}function me(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||me(e,n))}let ye;function ve(e){ye=e}function Ce(){ye=void 0}const be=e=>{if(!ye)return e;return function(){try{return e(...arguments)}catch(e){if(ye&&!0===ye(e))return;throw e}}},_e=[];function Ie(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function Se(e,t){var n,r;const o=new de;_e.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);const a=new i(be(o.processMutations.bind(o)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function we(e){let{mouseInteractionCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[];let u=null;return Object.keys(ie).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((e=>{let s=l(e);const a=(e=>n=>{const s=Ie(n);if(j(s,o,i,!0))return;let a=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=se.Mouse;break;case"touch":a=se.Touch;break;case"pen":a=se.Pen}a===se.Touch?ie[e]===ie.MouseDown?l="TouchStart":ie[e]===ie.MouseUp&&(l="TouchEnd"):se.Pen}else Q(n)&&(a=se.Touch);null!==a?(u=a,(l.startsWith("Touch")&&a===se.Touch||l.startsWith("Mouse")&&a===se.Mouse)&&(a=null)):ie[e]===ie.Click&&(a=u,u=null);const c=Q(n)?n.changedTouches[0]:n;if(!c)return;const d=r.getId(s),{clientX:p,clientY:h}=c;be(t)(Object.assign({type:ie[l],id:d,x:p,y:h},null!==a&&{pointerType:a}))})(e);if(window.PointerEvent)switch(ie[e]){case ie.MouseDown:case ie.MouseUp:s=s.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}c.push(D(s,a,n))})),be((()=>{c.forEach((e=>e()))}))}function ke(e){let{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:s}=e;return D("scroll",be(H(be((e=>{const s=Ie(e);if(!s||j(s,o,i,!0))return;const a=r.getId(s);if(s===n&&n.defaultView){const e=Z(n.defaultView);t({id:a,x:e.left,y:e.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})})),s.scroll||100)),n)}const Ae=["INPUT","TEXTAREA","SELECT"],Te=new WeakMap;function xe(e){return function(e,t){if(Oe("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Oe("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Oe("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Oe("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Me(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ee(e,t){let{mirror:n,stylesheetManager:r}=e;var o,i,s;let a=null;a="#document"===t.nodeName?n.getId(t):n.getId(t.host);const l="#document"===t.nodeName?null===(o=t.defaultView)||void 0===o?void 0:o.Document:null===(s=null===(i=t.ownerDocument)||void 0===i?void 0:i.defaultView)||void 0===s?void 0:s.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set(e){var t;const n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==a&&-1!==a)try{r.adoptStyleSheets(e,a)}catch(e){}return n}}),be((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function Ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.doc.defaultView;if(!n)return()=>{};let r;!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:h,customElementCb:f}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),n(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),r(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),i(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),s(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),a(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),u(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),p(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),h(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t),e.recordDOM&&(r=Se(e,e.doc));const o=function(e){let{mousemoveCb:t,sampling:n,doc:r,mirror:o}=e;if(!1===n.mousemove)return()=>{};const i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500;let a,l=[];const c=H(be((e=>{const n=Date.now()-a;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],a=null})),s),u=be(H(be((e=>{const t=Ie(e),{clientX:n,clientY:r}=Q(e)?e.changedTouches[0]:e;a||(a=W()),l.push({x:n,y:r,id:o.getId(t),timeOffset:W()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?oe.Drag:e instanceof MouseEvent?oe.MouseMove:oe.TouchMove)})),i,{trailing:!1})),d=[D("mousemove",u,r),D("touchmove",u,r),D("drag",u,r)];return be((()=>{d.forEach((e=>e()))}))}(e),i=we(e),s=ke(e),l=function(e,t){let{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return D("resize",be(H(be((()=>{const e=V(),t=U();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}(e,{win:n}),c=function(e){let{inputCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:p,userTriggeredOnInput:h}=e;function f(e){let t=Ie(e);const r=e.isTrusted,p=t&&t.tagName;if(t&&"OPTION"===p&&(t=t.parentElement),!t||!p||Ae.indexOf(p)<0||j(t,o,i,!0))return;if(t.classList.contains(s)||l&&t.matches(l))return;let f=t.value,m=!1;const y=u(t)||"";"radio"===y||"checkbox"===y?m=t.checked:(c[p.toLowerCase()]||c[y])&&(f=a({element:t,maskInputOptions:c,tagName:p,type:y,value:f,maskInputFn:d})),g(t,h?{text:f,isChecked:m,userTriggered:r}:{text:f,isChecked:m});const v=t.name;"radio"===y&&v&&m&&n.querySelectorAll(`input[type="radio"][name="${v}"]`).forEach((e=>{if(e!==t){const t=e.value;g(e,h?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}}))}function g(e,n){const o=Te.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Te.set(e,n);const o=r.getId(e);be(t)(Object.assign(Object.assign({},n),{id:o}))}}const m=("last"===p.input?["change"]:["input","change"]).map((e=>D(e,be(f),n))),y=n.defaultView;if(!y)return()=>{m.forEach((e=>e()))};const v=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),C=[[y.HTMLInputElement.prototype,"value"],[y.HTMLInputElement.prototype,"checked"],[y.HTMLSelectElement.prototype,"value"],[y.HTMLTextAreaElement.prototype,"value"],[y.HTMLSelectElement.prototype,"selectedIndex"],[y.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&m.push(...C.map((e=>B(e[0],e[1],{set(){be(f)({target:this,isTrusted:!1})}},!1,y)))),be((()=>{m.forEach((e=>e()))}))}(e),d=function(e){let{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:s}=e;const a=be((e=>H(be((i=>{const s=Ie(i);if(!s||j(s,n,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:d}=s;t({type:e,id:o.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u,loop:d})})),i.media||500))),l=[D("play",a(0),s),D("pause",a(1),s),D("seeked",a(2),s),D("volumechange",a(3),s),D("ratechange",a(4),s)];return be((()=>{l.forEach((e=>e()))}))}(e);let p=()=>{},h=()=>{},f=()=>{},g=()=>{};e.recordDOM&&(p=function(e,t){let{styleSheetRuleCb:n,mirror:r,stylesheetManager:o}=e,{win:i}=t;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:be(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=Me(t,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:a}]}),e.apply(t,i)}))});const a=i.CSSStyleSheet.prototype.deleteRule;let l,c;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:be(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Me(t,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.replace&&(l=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:be(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Me(t,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replace:s}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(c=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:be(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Me(t,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replaceSync:s}),e.apply(t,i)}))}));const u={};Le("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(Le("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),Le("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),Le("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));const d={};return Object.entries(u).forEach((e=>{let[t,i]=e;d[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[t].insertRule,{apply:be(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=Me(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:[...xe(t),a||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:be(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Me(t.parentStyleSheet,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:[...xe(t),s]}]}),e.apply(t,i)}))})})),be((()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,l&&(i.CSSStyleSheet.prototype.replace=l),c&&(i.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach((e=>{let[t,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:n}),h=Ee(e,e.doc),f=function(e,t){let{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:o,stylesheetManager:i}=e,{win:s}=t;const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:be(((e,t,s)=>{var l;const[c,u,d]=s;if(o.has(c))return a.apply(t,[c,u,d]);const{id:p,styleId:h}=Me(null===(l=t.parentRule)||void 0===l?void 0:l.parentStyleSheet,r,i.styleMirror);return(p&&-1!==p||h&&-1!==h)&&n({id:p,styleId:h,set:{property:c,value:u,priority:d},index:xe(t.parentRule)}),e.apply(t,s)}))});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:be(((e,t,s)=>{var a;const[c]=s;if(o.has(c))return l.apply(t,[c]);const{id:u,styleId:d}=Me(null===(a=t.parentRule)||void 0===a?void 0:a.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:xe(t.parentRule)}),e.apply(t,s)}))}),be((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n}),e.collectFonts&&(g=function(e){let{fontCb:t,doc:n}=e;const r=n.defaultView;if(!r)return()=>{};const o=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,n){const r=new s(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=P(n.fonts,"add",(function(e){return function(n){return setTimeout(be((()=>{const e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return o.push((()=>{r.FontFace=s})),o.push(a),be((()=>{o.forEach((e=>e()))}))}(e)));const m=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let s=!0;const a=be((()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:c,endOffset:u}=i;j(s,r,o,!0)||j(c,r,o,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:a})}));return a(),D("selectionchange",a)}(e),y=function(e){let{doc:t,customElementCb:n}=e;const r=t.defaultView;return r&&r.customElements?P(r.customElements,"define",(function(e){return function(t,r,o){try{n({define:{name:t}})}catch(e){console.warn(`Custom element callback failed for ${t}`)}return e.apply(this,[t,r,o])}})):()=>{}}(e),v=[];for(const t of e.plugins)v.push(t.observer(t.callback,n,t.options));return be((()=>{_e.forEach((e=>e.reset())),null==r||r.disconnect(),o(),i(),s(),l(),c(),d(),p(),h(),f(),g(),m(),y(),v.forEach((e=>e()))}))}function Oe(e){return void 0!==window[e]}function Le(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Re{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class De{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Re(g),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Re(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case re.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:re.IncrementalSnapshot,data:{source:oe.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case re.Meta:case re.Load:case re.DomContentLoaded:return!1;case re.Plugin:return t;case re.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case re.IncrementalSnapshot:switch(t.data.source){case oe.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case oe.Drag:case oe.TouchMove:case oe.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case oe.ViewportResize:return!1;case oe.MediaInteraction:case oe.MouseInteraction:case oe.Scroll:case oe.CanvasMutation:case oe.Input:return this.replaceIds(t.data,e,["id"]),t;case oe.StyleSheetRule:case oe.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case oe.Font:return t;case oe.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case oe.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(t,n){t.type===e.Document||t.rootId||(t.rootId=n),"childNodes"in t&&t.childNodes.forEach((e=>{this.patchRootIdOnNode(e,n)}))}}class Fe{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!r(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=Se(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(ke(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Ee({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(P(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&ne(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"]);return t})),o=n[0].type;this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),yt=function(){function e(t){a(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new fe,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return s(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,r={id:t,styleIds:[]},o=[],i=f(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=void 0;this.styleMirror.has(a)?s=this.styleMirror.getId(a):(s=this.styleMirror.add(a),o.push({styleId:s,rules:Array.from(a.rules||CSSRule,(function(e,t){return{rule:b(e),index:t}}))})),r.styleIds.push(s)}}catch(e){i.e(e)}finally{i.f()}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),bt=function(){function e(){a(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return s(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}();function Ct(e){return Object.assign(Object.assign({},e),{timestamp:te()})}var _t=!1,It=new C;function St(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,o=e.blockClass,i=void 0===o?"rr-block":o,a=e.blockSelector,s=void 0===a?null:a,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,l=e.ignoreSelector,d=void 0===l?null:l,p=e.maskTextClass,h=void 0===p?"rr-mask":p,v=e.maskTextSelector,g=void 0===v?null:v,m=e.inlineStylesheet,y=void 0===m||m,b=e.maskAllInputs,_=e.maskInputOptions,I=e.slimDOMOptions,S=e.maskInputFn,w=e.maskTextFn,k=e.hooks,x=e.packFn,A=e.sampling,T=void 0===A?{}:A,E=e.dataURLOptions,M=void 0===E?{}:E,N=e.mousemoveWait,O=e.recordDOM,L=void 0===O||O,R=e.recordCanvas,F=void 0!==R&&R,D=e.recordCrossOriginIframes,q=void 0!==D&&D,P=e.recordAfter,H=void 0===P?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":P,B=e.userTriggeredOnInput,W=void 0!==B&&B,Z=e.collectFonts,V=void 0!==Z&&Z,U=e.inlineImages,j=void 0!==U&&U,G=e.plugins,K=e.keepIframeSrcFn,Y=void 0===K?function(){return!1}:K,J=e.ignoreCSSAttributes,X=void 0===J?new Set([]):J;Oe(e.errorHandler);var $=!q||window.parent===window,ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch(e){ee=!0}if($&&!t)throw new Error("emit function is required");void 0!==N&&void 0===T.mousemove&&(T.mousemove=N),It.reset();var te,ie=!0===b?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==_?_:{password:!0},ae=!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===I,headMetaDescKeywords:"all"===I}:I||{};!function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===o)return!0}while(o=o&&o.parentNode);return!1})}();var se=0,ce=function(e){var t,n=f(G||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(e){n.e(e)}finally{n.f()}return x&&!ee&&(e=x(e)),e};ft=function(e,o){var i;if(!(null===(i=Fe[0])||void 0===i?void 0:i.isFrozen())||e.type===me.FullSnapshot||e.type===me.IncrementalSnapshot&&e.data.source===ye.Mutation||Fe.forEach((function(e){return e.unfreeze()})),$)null==t||t(ce(e),o);else if(ee){var a={type:"rrweb",event:ce(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(a,"*")}if(e.type===me.FullSnapshot)te=e,se=0;else if(e.type===me.IncrementalSnapshot){if(e.data.source===ye.Mutation&&e.data.isAttachIframe)return;se++;var s=r&&se>=r,c=n&&e.timestamp-te.timestamp>n;(s||c)&&ht(!0)}};var ue,fe=function(e){ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.Mutation},e)}))},he=function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.Scroll},e)}))},ve=function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.CanvasMutation},e)}))},ge=new yt({mutationCb:fe,adoptedStyleSheetCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.AdoptedStyleSheet},e)}))}}),be=new ze({mirror:It,mutationCb:fe,stylesheetManager:ge,recordCrossOriginIframes:q,wrappedEmit:ft}),Ce=f(G||[]);try{for(Ce.s();!(ue=Ce.n()).done;){var _e=ue.value;_e.getMirror&&_e.getMirror({nodeMirror:It,crossOriginIframeMirror:be.crossOriginIframeMirror,crossOriginIframeStyleMirror:be.crossOriginIframeStyleMirror})}}catch(e){Ce.e(e)}finally{Ce.f()}var Ie=new bt;vt=new mt({recordCanvas:F,mutationCb:ve,win:window,blockClass:i,blockSelector:s,mirror:It,sampling:T.canvas,dataURLOptions:M});var Se=new Ye({mutationCb:fe,scrollCb:he,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:h,maskTextSelector:g,inlineStylesheet:y,maskInputOptions:ie,dataURLOptions:M,maskTextFn:w,maskInputFn:S,recordCanvas:F,inlineImages:j,sampling:T,slimDOMOptions:ae,iframeManager:be,stylesheetManager:ge,canvasManager:vt,keepIframeSrcFn:Y,processedNodeManager:Ie},mirror:It});ht=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(L){ft(Ct({type:me.Meta,data:{href:window.location.href,width:oe(),height:re()}}),e),ge.reset(),Se.init(),Fe.forEach((function(e){return e.lock()}));var t=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new C:r,i=n.blockClass,a=void 0===i?"rr-block":i,s=n.blockSelector,c=void 0===s?null:s,u=n.maskTextClass,l=void 0===u?"rr-mask":u,d=n.maskTextSelector,p=void 0===d?null:d,f=n.inlineStylesheet,h=void 0===f||f,v=n.inlineImages,g=void 0!==v&&v,m=n.recordCanvas,y=void 0!==m&&m,b=n.maskAllInputs,_=void 0!==b&&b,I=n.maskTextFn,S=n.maskInputFn,w=n.slimDOM,k=void 0!==w&&w,x=n.dataURLOptions,A=n.preserveWhiteSpace,T=n.onSerialize,E=n.onIframeLoad,M=n.iframeLoadTimeout,N=n.onStylesheetLoad,O=n.stylesheetLoadTimeout,L=n.keepIframeSrcFn;return Q(e,{doc:e,mirror:o,blockClass:a,blockSelector:c,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===_?{password:!0}:_,maskTextFn:I,maskInputFn:S,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,dataURLOptions:x,inlineImages:g,recordCanvas:y,preserveWhiteSpace:A,onSerialize:T,onIframeLoad:E,iframeLoadTimeout:M,onStylesheetLoad:N,stylesheetLoadTimeout:O,keepIframeSrcFn:void 0===L?function(){return!1}:L,newlyAddedElement:!1})}(document,{mirror:It,blockClass:i,blockSelector:s,maskTextClass:h,maskTextSelector:g,inlineStylesheet:y,maskAllInputs:ie,maskTextFn:w,slimDOM:ae,dataURLOptions:M,recordCanvas:F,inlineImages:j,onSerialize:function(e){le(e,It)&&be.addIframe(e),de(e,It)&&ge.trackLinkElement(e),pe(e)&&Se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){be.attachIframe(e,t),Se.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ge.attachLinkElement(e,t)},keepIframeSrcFn:Y});if(!t)return console.warn("Failed to snapshot the document");ft(Ct({type:me.FullSnapshot,data:{node:t,initialOffset:ne(window)}}),e),Fe.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ge.adoptStyleSheets(document.adoptedStyleSheets,It.getId(document))}};try{var we=[],ke=function(e){var t;return Re(je)({mutationCb:fe,mousemoveCb:function(e,t){return ft(Ct({type:me.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.MouseInteraction},e)}))},scrollCb:he,viewportResizeCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.ViewportResize},e)}))},inputCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.Input},e)}))},mediaInteractionCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.StyleDeclaration},e)}))},canvasMutationCb:ve,fontCb:function(e){return ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.Font},e)}))},selectionCb:function(e){ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.Selection},e)}))},customElementCb:function(e){ft(Ct({type:me.IncrementalSnapshot,data:Object.assign({source:ye.CustomElement},e)}))},blockClass:i,ignoreClass:u,ignoreSelector:d,maskTextClass:h,maskTextSelector:g,maskInputOptions:ie,inlineStylesheet:y,sampling:T,recordDOM:L,recordCanvas:F,inlineImages:j,userTriggeredOnInput:W,collectFonts:V,doc:e,maskInputFn:S,maskTextFn:w,keepIframeSrcFn:Y,blockSelector:s,slimDOMOptions:ae,dataURLOptions:M,mirror:It,iframeManager:be,stylesheetManager:ge,shadowDomManager:Se,processedNodeManager:Ie,canvasManager:vt,ignoreCSSAttributes:X,plugins:(null===(t=null==G?void 0:G.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ft(Ct({type:me.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},k)};be.addLoadListener((function(e){try{we.push(ke(e.contentDocument))}catch(e){console.warn(e)}}));var xe=function(){ht(),we.push(ke(document)),_t=!0};return"interactive"===document.readyState||"complete"===document.readyState?xe():(we.push(z("DOMContentLoaded",(function(){ft(Ct({type:me.DomContentLoaded,data:{}})),"DOMContentLoaded"===H&&xe()}))),we.push(z("load",(function(){ft(Ct({type:me.Load,data:{}})),"load"===H&&xe()}),window))),function(){we.forEach((function(e){return e()})),Ie.destroy(),_t=!1,Le()}}catch(e){console.warn(e)}}St.addCustomEvent=function(e,t){if(!_t)throw new Error("please add custom event after start recording");ft(Ct({type:me.Custom,data:{tag:e,payload:t}}))},St.freezePage=function(){Fe.forEach((function(e){return e.freeze()}))},St.takeFullSnapshot=function(e){if(!_t)throw new Error("please take full snapshot after start recording");ht(e)},St.mirror=It;var wt=function(){function e(t){a(this,e),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}return s(e,[{key:"toString",value:function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}]),e}(),kt=/(^|@)\S+:\d+/,xt=/^\s*at .*(\S+:\d+|\(native\))/m,At=/^(eval@)?(\[native code])?$/,Tt={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(xt)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(xt)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:r.pop()),i=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new wt({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(At)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new wt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new wt({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],o=2,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new wt({fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],o=0,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new wt({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(kt)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new wt({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function Et(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,o=[];if(r.children&&r.children.length>0)for(var i=0;i<r.children.length;i++){var a=r.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&o.push(a)}o.length>1&&(n+=":eq(".concat(o.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t}function Mt(e){return"[object Object]"===Object.prototype.toString.call(e)}function Nt(e,t){if(0===t)return!0;for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if(Mt(e[o])&&Nt(e[o],t-1))return!0}return!1}function Ot(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],o=[];return JSON.stringify(e,(function(e,t){if(r.length>0){var i=r.indexOf(this);~i?r.splice(i+1):r.push(this),~i?o.splice(i,1/0,e):o.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Mt(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Mt(e)&&Nt(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(t.slice(0,n.stringLengthLimit),"..."));return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var a={};for(var s in t){var c=t[s];Array.isArray(c)?a[s]=Et(c.length?c[0]:null):a[s]=c}return a}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Lt={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Rt(e,t,n){var r,o=n?Object.assign({},Lt,n):Lt,i=o.logger;if(!i)return function(){};r="string"==typeof i?t[i]:i;var a=0,s=!1,c=[];if(o.level.includes("error")){var u=function(t){var n=t.message,r=t.error,i=Tt.parse(r).map((function(e){return e.toString()})),a=[Ot(n,o.stringifyOptions)];e({level:"error",trace:i,payload:a})};t.addEventListener("error",u),c.push((function(){t.removeEventListener("error",u)}));var l=function(t){var n,r;t.reason instanceof Error?(n=t.reason,r=[Ot("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[Ot("Uncaught (in promise)",o.stringifyOptions),Ot(t.reason,o.stringifyOptions)]);var i=Tt.parse(n).map((function(e){return e.toString()}));e({level:"error",trace:i,payload:r})};t.addEventListener("unhandledrejection",l),c.push((function(){t.removeEventListener("unhandledrejection",l)}))}var d,p=f(o.level);try{for(p.s();!(d=p.n()).done;){var h=d.value;c.push(v(r,h))}}catch(e){p.e(e)}finally{p.f()}return function(){c.forEach((function(e){return e()}))};function v(t,n){var r=this;return t[n]?ee(t,n,(function(t){return function(){for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];if(t.apply(r,c),!s){s=!0;try{var l=Tt.parse(new Error).map((function(e){return e.toString()})).splice(1),d=c.map((function(e){return Ot(e,o.stringifyOptions)}));++a<o.lengthThreshold?e({level:n,trace:l,payload:d}):a===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Ot("The number of log records reached the threshold.")]})}catch(e){t.apply(void 0,["rrweb logger error:",e].concat(c))}finally{s=!1}}}})):function(){}}}var Ft=function(e){return{name:"rrweb/console@1",observer:Rt,options:e}},Dt=Array.isArray,qt=Object.prototype,Pt=qt.hasOwnProperty,Ht=qt.toString,Bt=Dt||function(e){return"[object Array]"===Ht.call(e)},Wt=function(e){return"function"==typeof e},Zt=function(e){return e===Object(e)&&!Bt(e)},Vt=function(e){return void 0===e},Ut=function(e){return"[object String]"==Ht.call(e)},jt=function(e){return Ut(e)&&0===e.trim().length},Gt=function(e){return null===e},Kt=function(e){return Vt(e)||Gt(e)},Qt=function(e){return"[object Number]"==Ht.call(e)},zt=function(e){return"[object Boolean]"===Ht.call(e)},Yt=function(e){return e instanceof Document},Jt=function(e){return e instanceof FormData},Xt="undefined"!=typeof window?window:void 0,$t="undefined"!=typeof globalThis?globalThis:Xt,en=Array.prototype.forEach,tn=null==$t?void 0:$t.navigator,nn=null==$t?void 0:$t.document;null==$t||$t.location,null==$t||$t.fetch,null!=$t&&$t.XMLHttpRequest&&"withCredentials"in new $t.XMLHttpRequest&&$t.XMLHttpRequest,null==$t||$t.AbortController,null==tn||tn.userAgent;var rn=null!=Xt?Xt:{},on="[PostHog.js]",an={_log:function(e){if(Xt&&rn.POSTHOG_DEBUG&&!Vt(Xt.console)&&Xt.console){for(var t=("__rrweb_original__"in Xt.console[e]?Xt.console[e].__rrweb_original__:Xt.console[e]),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.apply(void 0,[on].concat(r))}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];an._log.apply(an,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];an._log.apply(an,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];an._log.apply(an,["error"].concat(t))},critical:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[on].concat(n))},uninitializedWarning:function(e){an.error("You must initialize PostHog before calling ".concat(e))}},sn={};function cn(e,t,n){if(!Kt(e)){if(Bt(e))return function(e,t,n){if(Bt(e))if(en&&e.forEach===en)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r)===sn)return}(e,t,n);if(Jt(e)){var r,o=f(e.entries());try{for(o.s();!(r=o.n()).done;){var i=r.value;if(t.call(n,i[1],i[0])===sn)return}}catch(e){o.e(e)}finally{o.f()}}else for(var a in e)if(Pt.call(e,a)&&t.call(n,e[a],a)===sn)return}}var un=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return cn(e,(function(e,r){Vt(e)||Vt(r)||"undefined"===r||(t=encodeURIComponent(function(e){return e instanceof File}(e)?e.name:e.toString()),n=encodeURIComponent(r),o[o.length]=n+"="+t)})),o.join(r)},ln={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(e){return e},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io"]};function dn(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return Wt(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function pn(e,t){var n,r=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),o={hostname:r,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==r||!r.trim().length)return o;var i,a=f(t.payloadHostDenyList);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(r.endsWith(s))return{hostname:r,isHostDenied:!0}}}catch(e){a.e(e)}finally{a.f()}return o}var fn=function(e){return"navigation"===e.entryType},hn=function(e){return"resource"===e.entryType};function vn(e,t){for(var n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}function gn(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((function(e){return fn(e)||hn(e)&&n.initiatorTypes.includes(e.initiatorType)}));e({requests:r.flatMap((function(e){return Sn({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0})})),isInitial:!0})}var o=new t.PerformanceObserver((function(t){var r=t.getEntries().filter((function(e){return fn(e)||hn(e)&&n.initiatorTypes.includes(e.initiatorType)&&function(e){return!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType}(e)}));e({requests:r.flatMap((function(e){return Sn({entry:e,method:void 0,status:void 0,networkRequest:{}})}))})})),i=PerformanceObserver.supportedEntryTypes.filter((function(e){return n.performanceEntryTypeToObserve.includes(e)}));return o.observe({entryTypes:i}),function(){o.disconnect()}}function mn(e,t){return!!t&&(zt(t)||t[e])}function yn(e){var t=e.type,n=e.recordBody,r=e.headers;function o(e){var t=Object.keys(r).find((function(e){return"content-type"===e.toLowerCase()})),n=t&&r[t];return e.some((function(e){return null==n?void 0:n.includes(e)}))}if(!n)return!1;if(zt(n))return!0;if(Bt(n))return o(n);var i=n[t];return zt(i)?i:o(i)}function bn(e,t,n,r,o){return Cn.apply(this,arguments)}function Cn(){return Cn=i(n().mark((function e(t,r,o,i,a){var s,c,u,l=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((s=l.length>5&&void 0!==l[5]?l[5]:0)>10)){e.next=4;break}return an.warn("Failed to get performance entry for request",{url:o,initiatorType:r}),e.abrupt("return",null);case 4:if(c=t.performance.getEntriesByName(o),u=vn(c,(function(e){return hn(e)&&e.initiatorType===r&&(Vt(i)||e.startTime>=i)&&(Vt(a)||e.startTime<=a)}))){e.next=10;break}return e.next=9,new Promise((function(e){return setTimeout(e,50*s)}));case 9:return e.abrupt("return",bn(t,r,o,i,a,s+1));case 10:return e.abrupt("return",u);case 11:case"end":return e.stop()}}),e)}))),Cn.apply(this,arguments)}function _n(e){var t=e.body,n=e.options,r=e.url;if(Kt(t))return null;var o=pn(r,n),i=o.hostname;if(o.isHostDenied)return i+" is in deny list";if(Ut(t))return t;if(Yt(t))return t.textContent;if(Jt(t))return un(t);if(Zt(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var In=function(e){return!Gt(e)&&("navigation"===e.entryType||"resource"===e.entryType)};function Sn(e){var n=e.entry,r=e.method,o=e.status,i=e.networkRequest,a=e.isInitial,s=e.start,c=e.end,u=e.url,l=e.initiatorType;s=n?n.startTime:s,c=n?n.responseEnd:c;var d=Math.floor(Date.now()-performance.now()),p=Math.floor(d+(s||0)),h=[t(t({},n?n.toJSON():{name:u}),{},{startTime:Vt(s)?void 0:Math.round(s),endTime:Vt(c)?void 0:Math.round(c),timeOrigin:d,timestamp:p,method:r,initiatorType:n?n.initiatorType:l,status:o,requestHeaders:i.requestHeaders,requestBody:i.requestBody,responseHeaders:i.responseHeaders,responseBody:i.responseBody,isInitial:a})];if(In(n)){var v,g=f(n.serverTiming||[]);try{for(g.s();!(v=g.n()).done;){var m=v.value;h.push({timeOrigin:d,timestamp:p,startTime:Math.round(n.startTime),name:m.name,duration:m.duration,entryType:"serverTiming"})}}catch(e){g.e(e)}finally{g.f()}}return h}var wn=["video/","audio/"];function kn(e){var t,n=e.r,r=e.options,o=e.url;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var i=null===(t=n.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),a=wn.some((function(e){return null==i?void 0:i.startsWith(e)}));if(i&&a)return"Content-Type ".concat(i," is not supported");var s=pn(o,r),c=s.hostname;return s.isHostDenied?c+" is in deny list":null}function xn(e){return new Promise((function(t,n){var r=setTimeout((function(){return t("[SessionReplay] Timeout while trying to read body")}),500);try{e.clone().text().then((function(e){return t(e)}),(function(e){return n(e)})).finally((function(){return clearTimeout(r)}))}catch(e){clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}function An(e){return Tn.apply(this,arguments)}function Tn(){return Tn=i(n().mark((function e(t){var r,o,i,a,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.r,o=t.options,i=t.url,a=pn(i,o),s=a.hostname,!a.isHostDenied){e.next=4;break}return e.abrupt("return",Promise.resolve(s+" is in deny list"));case 4:return e.abrupt("return",xn(r));case 5:case"end":return e.stop()}}),e)}))),Tn.apply(this,arguments)}function En(e){return Mn.apply(this,arguments)}function Mn(){return Mn=i(n().mark((function e(t){var r,o,i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.r,o=t.options,i=t.url,a=kn({r:r,options:o,url:i}),Gt(a)){e.next=4;break}return e.abrupt("return",Promise.resolve(a));case 4:return e.abrupt("return",xn(r));case 5:case"end":return e.stop()}}),e)}))),Mn.apply(this,arguments)}var Nn=null;function On(e,r,o){if(!("performance"in r))return function(){};if(Nn)return an.warn("Network observer already initialised, doing nothing"),function(){};var a=o?Object.assign({},ln,o):ln,s=function(n){var r=[];n.requests.forEach((function(e){var t=a.maskRequestFn(e);t&&r.push(t)})),r.length>0&&e(t(t({},n),{},{requests:r}))},c=gn(s,r,a),u=function(){},l=function(){};return(a.recordHeaders||a.recordBody)&&(u=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return function(){};var r=mn("request",n.recordHeaders),o=mn("response",n.recordHeaders),i=dn(t.XMLHttpRequest.prototype,"open",(function(i){return function(a,s){var c,u,l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],d=arguments.length>3?arguments[3]:void 0,p=arguments.length>4?arguments[4]:void 0,f=this,h=new Request(s),v={},g={},m=f.setRequestHeader.bind(f);f.setRequestHeader=function(e,t){return g[e]=t,m(e,t)},r&&(v.requestHeaders=g);var y=f.send.bind(f);f.send=function(e){return yn({type:"request",headers:g,url:s,recordBody:n.recordBody})&&(v.requestBody=_n({body:e,options:n,url:s})),c=t.performance.now(),y(e)},f.addEventListener("readystatechange",(function(){if(f.readyState===f.DONE){u=t.performance.now();var r={};f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((function(e){var t=e.split(": "),n=t.shift(),o=t.join(": ");n&&(r[n]=o)})),o&&(v.responseHeaders=r),yn({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(v.responseBody=_n({body:f.response,options:n,url:s})),bn(t,"xmlhttprequest",h.url,c,u).then((function(t){var n=Sn({entry:t,method:h.method,status:null==f?void 0:f.status,networkRequest:v,start:c,end:u,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((function(){}))}})),i.call(f,a,s,l,d,p)}}));return function(){i()}}(s,r,a),l=function(e,t,r){if(!r.initiatorTypes.includes("fetch"))return function(){};var o=mn("request",r.recordHeaders),a=mn("response",r.recordHeaders),s=dn(t,"fetch",(function(s){return function(){var c=i(n().mark((function i(c,u){var l,d,p,f,h,v,g;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(l=new Request(c,u),p={},n.prev=2,v={},l.headers.forEach((function(e,t){v[t]=e})),o&&(p.requestHeaders=v),!yn({type:"request",headers:v,url:c,recordBody:r.recordBody})){n.next=10;break}return n.next=9,An({r:l,options:r,url:c});case 9:p.requestBody=n.sent;case 10:return f=t.performance.now(),n.next=13,s(l);case 13:if(d=n.sent,h=t.performance.now(),g={},d.headers.forEach((function(e,t){g[t]=e})),a&&(p.responseHeaders=g),!yn({type:"response",headers:g,url:c,recordBody:r.recordBody})){n.next=22;break}return n.next=21,En({r:d,options:r,url:c});case 21:p.responseBody=n.sent;case 22:return n.abrupt("return",d);case 23:return n.prev=23,bn(t,"fetch",l.url,f,h).then((function(t){var n,r=Sn({entry:t,method:l.method,status:null===(n=d)||void 0===n?void 0:n.status,networkRequest:p,start:f,end:h,url:l.url,initiatorType:"fetch"});e({requests:r})})).catch((function(){})),n.finish(23);case 26:case"end":return n.stop()}}),i,null,[[2,,23,26]])})));return function(e,t){return c.apply(this,arguments)}}()}));return function(){s()}}(s,r,a)),Nn=function(){c(),u(),l()}}var Ln,Rn,Fn,Dn=function(e){return{name:"rrweb/network@1",observer:On,options:e}};rn.__PosthogExtensions__=rn.__PosthogExtensions__||{},rn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Ft,getRecordNetworkPlugin:Dn},rn.__PosthogExtensions__.rrweb={record:St,version:"v2",rrwebVersion:v},rn.rrweb={record:St,version:"v2",rrwebVersion:v},rn.rrwebConsoleRecord={getRecordConsolePlugin:Ft},rn.getRecordNetworkPlugin=Dn,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(Ln||(Ln={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(Rn||(Rn={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(Fn||(Fn={}));var qn,Pn,Hn,Bn,Wn,Zn,Vn,Un,jn={},Gn=[],Kn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qn=Array.isArray;function zn(e,t){for(var n in t)e[n]=t[n];return e}function Yn(e){var t=e.parentNode;t&&t.removeChild(e)}function Jn(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?qn.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Xn(e,a,r,o,null)}function Xn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++Hn:o,__i:-1,__u:0};return null==o&&null!=Pn.vnode&&Pn.vnode(i),i}function $n(e){return e.children}function er(e,t){this.props=e,this.context=t}function tr(e,t){if(null==t)return e.__?tr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?tr(e):null}function nr(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return nr(e)}}function rr(e){(!e.__d&&(e.__d=!0)&&Bn.push(e)&&!or.__r++||Wn!==Pn.debounceRendering)&&((Wn=Pn.debounceRendering)||Zn)(or)}function or(){var e,t,n,r,o,i,a,s,c;for(Bn.sort(Vn);e=Bn.shift();)e.__d&&(t=Bn.length,r=void 0,i=(o=(n=e).__v).__e,s=[],c=[],(a=n.__P)&&((r=zn({},o)).__v=o.__v+1,Pn.vnode&&Pn.vnode(r),pr(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?tr(o):i,!!(32&o.__u),c),r.__.__k[r.__i]=r,fr(s,r,c),r.__e!=i&&nr(r)),Bn.length>t&&Bn.sort(Vn));or.__r=0}function ir(e,t,n,r,o,i,a,s,c,u,l){var d,p,f,h,v,g=r&&r.__k||Gn,m=t.length;for(n.__d=c,function(e,t,n){var r,o,i,a,s,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r<c;r++)null!=(o=e.__k[r]=null==(o=t[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Xn(null,o,null,null,o):Qn(o)?Xn($n,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Xn(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,s=sr(o,n,a=r+d,l),o.__i=s,i=null,-1!==s&&(l--,(i=n[s])&&(i.__u|=131072)),null==i||null===i.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__u|=65536)):s!==a&&(s===a+1?d++:s>a?l>c-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=tr(i)),vr(i,i,!1),n[r]=null,l--);if(l)for(r=0;r<u;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=tr(i)),vr(i,i))}(n,t,g),c=n.__d,d=0;d<m;d++)null!=(f=n.__k[d])&&"boolean"!=typeof f&&"function"!=typeof f&&(p=-1===f.__i?jn:g[f.__i]||jn,f.__i=d,pr(e,f,p,o,i,a,s,c,u,l),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&hr(p.ref,null,f),l.push(f.ref,f.__c||h,f)),null==v&&null!=h&&(v=h),65536&f.__u||p.__k===f.__k?c=ar(f,c,e):"function"==typeof f.type&&void 0!==f.__d?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=v}function ar(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=ar(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function sr(e,t,n,r){var o=e.key,i=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&o==c.key&&i===c.type)return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return a;a--}if(s<t.length){if((c=t[s])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return s;s++}}return-1}function cr(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Kn.test(t)?n:n+"px"}function ur(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||cr(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||cr(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?dr:lr,i)):e.removeEventListener(t,i?dr:lr,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function lr(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Pn.event?Pn.event(e):e)}function dr(e){return this.l[e.type+!0](Pn.event?Pn.event(e):e)}function pr(e,t,n,r,o,i,a,s,c,u){var l,d,p,f,h,v,g,m,y,b,C,_,I,S,w,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),i=[s=t.__e=n.__e]),(l=Pn.__b)&&l(t);e:if("function"==typeof k)try{if(m=t.props,y=(l=k.contextType)&&r[l.__c],b=l?y?y.props.value:l.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(m,b):(t.__c=d=new er(m,b),d.constructor=k,d.render=gr),y&&y.sub(d),d.props=m,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=zn({},d.__s)),zn(d.__s,k.getDerivedStateFromProps(m,d.__s))),f=d.props,h=d.state,d.__v=t,p)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&m!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(m,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(m,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=m,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(m,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,v)}))}if(d.context=b,d.props=m,d.__P=e,d.__e=!1,_=Pn.__r,I=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,_&&_(t),l=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,_&&_(t),l=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++I<25);d.state=d.__s,null!=d.getChildContext&&(r=zn(zn({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(v=d.getSnapshotBeforeUpdate(f,h)),ir(e,Qn(w=null!=l&&l.type===$n&&null==l.key?l.props.children:l)?w:[w],t,n,r,o,i,a,s,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||null!=i?(t.__e=s,t.__u|=c?160:32,i[i.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),Pn.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,a,s,c){var u,l,d,p,f,h,v,g=n.props,m=t.props,y=t.type;if("svg"===y&&(o=!0),null!=i)for(u=0;u<i.length;u++)if((f=i[u])&&"setAttribute"in f==!!y&&(y?f.localName===y:3===f.nodeType)){e=f,i[u]=null;break}if(null==e){if(null===y)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,m.is&&m),i=null,s=!1}if(null===y)g===m||s&&e.data===m||(e.data=m);else{if(i=i&&qn.call(e.childNodes),g=n.props||jn,!s&&null!=i)for(g={},u=0;u<e.attributes.length;u++)g[(f=e.attributes[u]).name]=f.value;for(u in g)f=g[u],"children"==u||("dangerouslySetInnerHTML"==u?d=f:"key"===u||u in m||ur(e,u,null,f,o));for(u in m)f=m[u],"children"==u?p=f:"dangerouslySetInnerHTML"==u?l=f:"value"==u?h=f:"checked"==u?v=f:"key"===u||s&&"function"!=typeof f||g[u]===f||ur(e,u,f,g[u],o);if(l)s||d&&(l.__html===d.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(d&&(e.innerHTML=""),ir(e,Qn(p)?p:[p],t,n,r,o&&"foreignObject"!==y,i,a,i?i[0]:n.__k&&tr(n,0),s,c),null!=i)for(u=i.length;u--;)null!=i[u]&&Yn(i[u]);s||(u="value",void 0!==h&&(h!==e[u]||"progress"===y&&!h||"option"===y&&h!==g[u])&&ur(e,u,h,g[u],!1),u="checked",void 0!==v&&v!==e[u]&&ur(e,u,v,g[u],!1))}return e}(n.__e,t,n,r,o,i,a,c,u);(l=Pn.diffed)&&l(t)}function fr(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)hr(n[r],n[++r],n[++r]);Pn.__c&&Pn.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Pn.__e(e,t.__v)}}))}function hr(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Pn.__e(e,n)}}function vr(e,t,n){var r,o;if(Pn.unmount&&Pn.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||hr(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Pn.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&vr(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Yn(e.__e),e.__=e.__e=e.__d=void 0}function gr(e,t,n){return this.constructor(e,n)}function mr(e,t,n){var r,o,i,a;Pn.__&&Pn.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],pr(t,e=(!r&&n||t).__k=Jn($n,null,[e]),o||jn,jn,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?qn.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),fr(i,e,a)}function yr(e,t,n){var r,o,i,a,s=zn({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&void 0!==a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?qn.call(arguments,2):n),Xn(e.type,s,r||e.key,o||e.ref,null)}qn=Gn.slice,Pn={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},Hn=0,er.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=zn({},this.state),"function"==typeof e&&(e=e(zn({},n),this.props)),e&&zn(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),rr(this))},er.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rr(this))},er.prototype.render=$n,Bn=[],Zn="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vn=function(e,t){return e.__v.__b-t.__v.__b},or.__r=0,Un=0;var br=Xt,Cr=nn,_r=function(e){return'\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: '.concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",';\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==e?void 0:e.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(Sr((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ")};function Ir(e){if("#"===e[0]){var t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function Sr(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kr;"#"===t[0]&&(e=Ir(t)),t.startsWith("rgb")&&(e=t);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[t.toLowerCase()];if(n&&(e=Ir(n)),!e)return"black";var r=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var o=parseInt(r[1]),i=parseInt(r[2]),a=parseInt(r[3]);return Math.sqrt(o*o*.299+i*i*.587+a*a*.114)>127.5?"black":"white"}return"black"}var wr={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},kr="#eeeded",xr=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o&&(localStorage.setItem(Or(r),"true"),o.capture("survey sent",t(t({$survey_name:r.name,$survey_id:r.id,$survey_iteration:r.current_iteration,$survey_iteration_start_date:r.current_iteration_start_date,$survey_questions:r.questions.map((function(e){return e.question})),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o)},n),{},{$set:c({},Lr(r,"responded"),!0)})),br.dispatchEvent(new Event("PHSurveySent")))},Ar=function(e,t,n){var r;!n&&t&&(t.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(r=t.get_session_replay_url)||void 0===r?void 0:r.call(t),$set:c({},Lr(e,"dismissed"),!0)}),localStorage.setItem(Or(e),"true"),br.dispatchEvent(new Event("PHSurveyClosed")))},Tr=function(e){return e.map((function(e){return{sort:Math.floor(10*Math.random()),value:e}})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.value}))},Er=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))?t.reverse():t},Mr=function(e){return e.questions.forEach((function(e,t){e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?Er(e.questions,Tr(e.questions)):e.questions},Nr=function(e){var t,n;return!(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||!n.repeatedActivation||!function(e){var t,n,r,o,i,a;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r?void 0:r.length)&&(null===(o=e.conditions)||void 0===o||null===(i=o.events)||void 0===i||null===(a=i.values)||void 0===a?void 0:a.length)>0}(e))},Or=function(e){var t="seenSurvey_".concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="seenSurvey_".concat(e.id,"_").concat(e.current_iteration)),t},Lr=function(e,t){var n="$survey_".concat(t,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="$survey_".concat(t,"/").concat(e.id,"/").concat(e.current_iteration)),n},Rr=function(e,t){var n={__c:t="__cC"+Un++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,rr(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:function(){},isPopup:!0}),Fr=function(e){var t=e.component,n=e.children,r=e.renderAsHtml,o=e.style;return yr(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},Dr=nn;var qr,Pr,Hr,Br,Wr=0,Zr=[],Vr=[],Ur=Pn.__b,jr=Pn.__r,Gr=Pn.diffed,Kr=Pn.__c,Qr=Pn.unmount;function zr(e,t){Pn.__h&&Pn.__h(Pr,e,Wr||t),Wr=0;var n=Pr.__H||(Pr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Vr}),n.__[e]}function Yr(e){return Wr=1,function(e,t,n){var r=zr(qr++,2);if(r.t=e,!r.__c&&(r.__=[so(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Pr,!Pr.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};Pr.u=!0;var i=Pr.shouldComponentUpdate,a=Pr.componentWillUpdate;Pr.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},Pr.shouldComponentUpdate=o}return r.__N||r.__}(so,e)}function Jr(e,t){var n=zr(qr++,3);!Pn.__s&&ao(n.__H,t)&&(n.__=e,n.i=t,Pr.__H.__h.push(n))}function Xr(e){return Wr=5,$r((function(){return{current:e}}),[])}function $r(e,t){var n=zr(qr++,7);return ao(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function eo(e){var t=Pr.context[e.__c],n=zr(qr++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Pr)),t.props.value):e.__}function to(){for(var e;e=Zr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(oo),e.__H.__h.forEach(io),e.__H.__h=[]}catch(t){e.__H.__h=[],Pn.__e(t,e.__v)}}Pn.__b=function(e){Pr=null,Ur&&Ur(e)},Pn.__r=function(e){jr&&jr(e),qr=0;var t=(Pr=e.__c).__H;t&&(Hr===Pr?(t.__h=[],Pr.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Vr,e.__N=e.i=void 0}))):(t.__h.forEach(oo),t.__h.forEach(io),t.__h=[],qr=0)),Hr=Pr},Pn.diffed=function(e){Gr&&Gr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Zr.push(t)&&Br===Pn.requestAnimationFrame||((Br=Pn.requestAnimationFrame)||ro)(to)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Vr&&(e.__=e.__V),e.i=void 0,e.__V=Vr}))),Hr=Pr=null},Pn.__c=function(e,t){t.some((function(e){try{e.__h.forEach(oo),e.__h=e.__h.filter((function(e){return!e.__||io(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Pn.__e(n,e.__v)}})),Kr&&Kr(e,t)},Pn.unmount=function(e){Qr&&Qr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{oo(e)}catch(e){t=e}})),n.__H=void 0,t&&Pn.__e(t,n.__v))};var no="function"==typeof requestAnimationFrame;function ro(e){var t,n=function(){clearTimeout(r),no&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);no&&(t=requestAnimationFrame(n))}function oo(e){var t=Pr,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Pr=t}function io(e){var t=Pr;e.__c=e.__(),Pr=t}function ao(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function so(e,t){return"function"==typeof t?t(e):t}var co=0;function uo(e,t,n,r,o,i){var a,s,c={};for(s in t)"ref"==s?a=t[s]:c[s]=t[s];var u={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--co,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===c[s]&&(c[s]=a[s]);return Pn.vnode&&Pn.vnode(u),u}var lo=uo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:uo("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),po=uo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:uo("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),fo=uo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:uo("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),ho=uo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:uo("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),vo=uo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:uo("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),go=uo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:uo("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),mo=uo("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[uo("g",{"clip-path":"url(#clip0_2415_6911)",children:[uo("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:uo("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),uo("g",{mask:"url(#mask0_2415_6911)",children:[uo("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),uo("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),uo("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),uo("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),uo("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),uo("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),uo("defs",{children:uo("clipPath",{id:"clip0_2415_6911",children:uo("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),yo=uo("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:uo("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function bo(){return uo("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",mo]})}function Co(e){var t=e.text,n=e.submitDisabled,r=e.appearance,o=e.onSubmit,i=e.link,a=eo(Rr),s=a.isPreviewMode,c=a.isPopup,u=r.submitButtonTextColor||Sr(r.submitButtonColor||wr.submitButtonColor);return uo("div",{className:"bottom-section",children:[uo("div",{className:"buttons",children:uo("button",{className:"form-submit",disabled:n&&!s,type:"button",style:c?{color:u}:{},onClick:function(){s||(i&&(null==Xt||Xt.open(i)),o())},children:t})}),!r.whiteLabel&&uo(bo,{})]})}function _o(e){var t=e.question,n=e.description,r=e.descriptionContentType,o=e.backgroundColor,i=e.forceDisableHtml;return uo("div",{style:eo(Rr).isPopup?{backgroundColor:o||wr.backgroundColor}:{},children:[uo("div",{className:"survey-question",children:t}),n&&Fr({component:Jn("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function Io(e){return uo("div",{className:"cancel-btn-wrapper",children:uo("button",{className:"form-cancel",onClick:e.onClick,disabled:eo(Rr).isPreviewMode,children:go})})}function So(e){var n=e.header,r=e.description,o=e.contentType,i=e.forceDisableHtml,a=e.appearance,s=e.onClose,c=e.styleOverrides,u=Sr(a.backgroundColor||wr.backgroundColor),l=eo(Rr).isPopup;return uo($n,{children:uo("div",{className:"thank-you-message",style:t({},c),children:uo("div",{className:"thank-you-message-container",children:[l&&uo(Io,{onClick:function(){return s()}}),uo("h3",{className:"thank-you-message-header",style:{color:u},children:n}),r&&Fr({component:Jn("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==o,style:{color:u}}),l&&uo(Co,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:function(){return s()}})]})})})}function wo(e){var t,n=Xr(null),r=u(Yr(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black"),2),o=r[0],i=r[1];return Jr((function(){if(n.current){var e=function(e){var t=br.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===t)return"black";var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!n)return"black";var r=parseInt(n[1]),o=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(r*r*.299+o*o*.587+i*i*.114)>127.5?"black":"white"}(n.current);i(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:o}}function ko(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,o=e.onSubmit,i=Xr(null),a=u(Yr(""),2),s=a[0],c=a[1];return uo("div",{ref:i,children:[uo(_o,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),uo("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:function(e){return c(e.currentTarget.value)}}),uo(Co,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:function(){return o(s)}})]})}function xo(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,o=e.onSubmit;return uo($n,{children:[uo(_o,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),uo(Co,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:function(){return o("link clicked")}})]})}function Ao(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,o=e.appearance,i=e.onSubmit,a=t.scale,s=10===t.scale?0:1,c=u(Yr(null),2),l=c[0],d=c[1];return uo($n,{children:[uo(_o,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),uo("div",{className:"rating-section",children:[uo("div",{className:"rating-options",children:["emoji"===t.display&&uo("div",{className:"rating-options-emoji",children:(3===t.scale?Mo:No).map((function(e,t){var n=t+1===l;return uo("button",{className:"ratings-emoji question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),value:t+1,type:"button",onClick:function(){d(t+1)},style:{fill:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:e},t)}))}),"number"===t.display&&uo("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-s+1,", minmax(0, 1fr))")},children:Fo(t.scale).map((function(e,t){return uo(To,{displayQuestionIndex:r,active:l===e,appearance:o,num:e,setActiveNumber:function(e){d(e)}},t)}))})]}),uo("div",{className:"rating-text",children:[uo("div",{children:t.lowerBoundLabel}),uo("div",{children:t.upperBoundLabel})]})]}),uo(Co,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:Gt(l)&&!t.optional,appearance:o,onSubmit:function(){return i(l)}})]})}function To(e){var t=e.num,n=e.active,r=e.displayQuestionIndex,o=e.appearance,i=e.setActiveNumber,a=wo({appearance:o,defaultTextColor:"black",forceUpdate:n}),s=a.textColor;return uo("button",{ref:a.ref,className:"ratings-number question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),type:"button",onClick:function(){i(t)},style:{color:s,backgroundColor:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:t})}function Eo(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,o=e.appearance,i=e.onSubmit,a=Xr(null),s=$r((function(){return function(e){if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=Er(t,Tr(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r}(t)}),[t]),c=u(Yr(t.type===Rn.MultipleChoice?[]:null),2),d=c[0],p=c[1],f=u(Yr(!1),2),h=f[0],v=f[1],g=u(Yr(""),2),m=g[0],y=g[1],b=t.type===Rn.SingleChoice?"radio":"checkbox";return uo("div",{ref:a,children:[uo(_o,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),uo("div",{className:"multiple-choice-options",children:s.map((function(e,n){var o="choice-option",i=e,a=e;return t.hasOpenChoice&&n===t.choices.length-1&&(o+=" choice-option-open"),uo("div",{className:o,children:[uo("input",{type:b,id:"surveyQuestion".concat(r,"Choice").concat(n),name:"question".concat(r),value:i,disabled:!i,onInput:function(){return t.hasOpenChoice&&n===t.choices.length-1?v(!h):t.type===Rn.SingleChoice?p(i):t.type===Rn.MultipleChoice&&Bt(d)?d.includes(i)?p(d.filter((function(e){return e!==i}))):p([].concat(l(d),[i])):void 0}}),uo("label",{htmlFor:"surveyQuestion".concat(r,"Choice").concat(n),style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?uo($n,{children:[uo("span",{children:[a,":"]}),uo("input",{type:"text",id:"surveyQuestion".concat(r,"Choice").concat(n,"Open"),name:"question".concat(r),onInput:function(e){var n=e.currentTarget.value;return t.type===Rn.SingleChoice?p(n):t.type===Rn.MultipleChoice&&Bt(d)?y(n):void 0}})]}):a}),uo("span",{className:"choice-check",style:{color:"black"},children:yo})]})}))}),uo(Co,{text:t.buttonText||"Submit",submitDisabled:(Gt(d)||Bt(d)&&!h&&0===d.length||Bt(d)&&h&&!m&&0===d.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:function(){h&&t.type===Rn.MultipleChoice?Bt(d)&&i([].concat(l(d),[m])):i(d)}})]})}var Mo=[fo,po,lo],No=[ho,fo,po,lo,vo],Oo=[1,2,3,4,5],Lo=[1,2,3,4,5,6,7],Ro=[0,1,2,3,4,5,6,7,8,9,10];function Fo(e){switch(e){case 5:default:return Oo;case 7:return Lo;case 10:return Ro}}var Do=Xt,qo=nn,Po=function(){function e(t){var n=this;a(this,e),c(this,"canShowNextEventBasedSurvey",(function(){var e,t=qo.querySelectorAll("div[class^=PostHogSurvey]");return!(t.length>0)||1===(null===(e=t[t.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),c(this,"handlePopoverSurvey",(function(e){var t,r=null===(t=e.conditions)||void 0===t?void 0:t.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(r&&o){var i=new Date,a=Math.abs(i.getTime()-new Date(o).getTime());if(Math.ceil(a/864e5)<r)return}var s=function(e){return!!localStorage.getItem(Or(e))&&!Nr(e)}(e);if(!s){n.addSurveyToFocus(e.id);var c=function(e,t,n){var r=Cr.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign(Cr.createElement("style"),{innerText:e});o.appendChild(i)}return Cr.body.appendChild(r),o}(_r(null==e?void 0:e.appearance),e.id);mr(uo(Bo,{posthog:n.posthog,survey:e,removeSurveyFromFocus:n.removeSurveyFromFocus,isPopup:!0},"popover-survey"),c)}})),c(this,"handleWidget",(function(e){var t=function(e){var t,n=Dr.createElement("div");n.className="PostHogWidget".concat(e.id);var r,o=n.attachShadow({mode:"open"}),i=(r=null===(t=e.appearance)||void 0===t?void 0:t.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(r||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return o.append(Object.assign(Dr.createElement("style"),{innerText:i})),Dr.body.appendChild(n),o}(e),r=_r(e.appearance);t.appendChild(Object.assign(qo.createElement("style"),{innerText:r})),mr(uo(Zo,{posthog:n.posthog,survey:e,removeSurveyFromFocus:n.removeSurveyFromFocus},"feedback-survey"),t)})),c(this,"handleWidgetSelector",(function(e){var t,r=(null===(t=e.appearance)||void 0===t?void 0:t.widgetSelector)&&qo.querySelector(e.appearance.widgetSelector);if(r)if(0===qo.querySelectorAll(".PostHogWidget".concat(e.id)).length)n.handleWidget(e);else if(1===qo.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!r.getAttribute("PHWidgetSurveyClickListener")){var o,i,a=null===(o=qo.querySelector(".PostHogWidget".concat(e.id)))||void 0===o||null===(i=o.shadowRoot)||void 0===i?void 0:i.querySelector(".survey-form");r.addEventListener("click",(function(){a&&(a.style.display="none"===a.style.display?"block":"none",a.addEventListener("PHSurveyClosed",(function(){n.removeSurveyFromFocus(e.id),a.style.display="none"})))})),r.setAttribute("PHWidgetSurveyClickListener","true")}})),c(this,"canRenderSurvey",(function(e){var t={visible:!1};return e.end_date?(t.disabledReason="survey was completed on ".concat(e.end_date),t):e.type!=Ln.Popover?(t.disabledReason="Only Popover survey types can be rendered",t):!e.linked_flag_key||n.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||n.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||n.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),t):(t.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),t):(t.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),t)})),c(this,"renderSurvey",(function(e,t){mr(uo(Bo,{posthog:n.posthog,survey:e,removeSurveyFromFocus:n.removeSurveyFromFocus,isPopup:!1},"popover-survey"),t)})),c(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=n.posthog)||void 0===e||e.getActiveMatchingSurveys((function(e){var t=e.filter((function(e){return"api"!==e.type}));n.sortSurveysByAppearanceDelay(t).forEach((function(e){if(Gt(n.surveyInFocus)){var t,r,o;if(e.type===Ln.Widget)"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&0===qo.querySelectorAll(".PostHogWidget".concat(e.id)).length&&n.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(o=e.appearance)&&void 0!==o&&o.widgetSelector&&n.handleWidgetSelector(e);e.type===Ln.Popover&&n.canShowNextEventBasedSurvey()&&n.handlePopoverSurvey(e)}}))}),t)})),c(this,"addSurveyToFocus",(function(e){Gt(n.surveyInFocus)||an.error("Survey ".concat(l(n.surveyInFocus)," already in focus. Cannot add survey ").concat(e,".")),n.surveyInFocus=e})),c(this,"removeSurveyFromFocus",(function(e){n.surveyInFocus!==e&&an.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),n.surveyInFocus=null})),this.posthog=t,this.surveyInFocus=null}return s(e,[{key:"sortSurveysByAppearanceDelay",value:function(e){return e.sort((function(e,t){var n,r;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(r=t.appearance)||void 0===r?void 0:r.surveyPopupDelaySeconds)||0)}))}},{key:"getTestAPI",value:function(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}]),e}();function Ho(e){if(qo&&Do){var t=new Po(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((function(){t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function Bo(e){var n,r,o,i,a,s,c=e.survey,l=e.forceDisableHtml,d=e.posthog,p=e.style,f=e.previewPageIndex,h=e.removeSurveyFromFocus,v=e.isPopup,g=Number.isInteger(f),m=null!==(n=c.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*c.appearance.surveyPopupDelaySeconds:0,y=function(e,t,n,r,o){var i=u(Yr(r||0===n),2),a=i[0],s=i[1],c=u(Yr(!1),2),l=c[0],d=c[1];return Jr((function(){if(!r&&t){var i,a=function(){o(e.id),s(!1)},c=function(){var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(d(!0),o(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((function(){s(!1)}),5e3)):(o(e.id),s(!1))},u=function(){var n;s(!0),Do.dispatchEvent(new Event("PHSurveyShown")),t.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(n=t.get_session_replay_url)||void 0===n?void 0:n.call(t)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return Do.addEventListener("PHSurveyClosed",a),Do.addEventListener("PHSurveySent",c),n>0?(i=setTimeout((function(){u()}),n),function(){clearTimeout(i),Do.removeEventListener("PHSurveyClosed",a),Do.removeEventListener("PHSurveySent",c)}):(u(),function(){Do.removeEventListener("PHSurveyClosed",a),Do.removeEventListener("PHSurveySent",c)})}}),[]),{isPopupVisible:a,isSurveySent:l,setIsPopupVisible:s}}(c,d,m,g,h),b=y.isPopupVisible,C=y.isSurveySent,_=y.setIsPopupVisible,I=C||f===c.questions.length,S=null!==(r=p)&&void 0!==r&&r.left&&Qt(null===(o=p)||void 0===o?void 0:o.left)?{left:p.left-40}:{};return g&&((p=p||{}).left="unset",p.right="unset",p.transform="unset"),b?uo(Rr.Provider,{value:{isPreviewMode:g,previewPageIndex:f,handleCloseSurveyPopup:function(){return Ar(c,d,g)},isPopup:v||!1},children:I?uo(So,{header:(null===(i=c.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(a=c.appearance)||void 0===a?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null===(s=c.appearance)||void 0===s?void 0:s.thankYouMessageDescriptionContentType,appearance:c.appearance||wr,styleOverrides:t(t({},p),S),onClose:function(){return _(!1)}}):uo(Wo,{survey:c,forceDisableHtml:!!l,posthog:d,styleOverrides:p})}):uo($n,{})}function Wo(e){var n,r,o=e.survey,i=e.forceDisableHtml,a=e.posthog,s=e.styleOverrides,l=Sr((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||wr.backgroundColor),d=u(Yr({}),2),p=d[0],f=d[1],h=eo(Rr),v=h.isPreviewMode,g=h.previewPageIndex,m=h.handleCloseSurveyPopup,y=h.isPopup,b=u(Yr(g||0),2),C=b[0],_=b[1],I=$r((function(){return Mr(o)}),[o]);Jr((function(){_(null!=g?g:0)}),[g]);return uo("form",{className:"survey-form",style:y?t({color:l,borderColor:null===(r=o.appearance)||void 0===r?void 0:r.borderColor},s):{},children:I.map((function(e,n){var r,s=e.originalQuestionIndex;return(v?C===s:C===n)&&uo("div",{className:"survey-box",style:y?{backgroundColor:(null===(r=o.appearance)||void 0===r?void 0:r.backgroundColor)||wr.backgroundColor}:{},children:[y&&uo(Io,{onClick:function(){return m()}}),Vo({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||wr,onSubmit:function(e){return function(e){var n=e.res,r=e.originalQuestionIndex,i=e.displayQuestionIndex;if(a){var s=0===r?"$survey_response":"$survey_response_".concat(r);if(f(t(t({},p),{},c({},s,n))),a.getNextSurveyStep){var u=a.getNextSurveyStep(o,i,n);u===Fn.End?xr(t(t({},p),{},c({},s,n)),o,a):_(u)}else i===o.questions.length-1?xr(t(t({},p),{},c({},s,n)),o,a):_(i+1)}}({res:e,originalQuestionIndex:s,displayQuestionIndex:n})}})]})}))})}function Zo(e){var t,n,r=e.survey,o=e.forceDisableHtml,i=e.posthog,a=e.readOnly,s=e.removeSurveyFromFocus,c=u(Yr(!1),2),l=c[0],d=c[1],p=u(Yr({}),2),f=p[0],h=p[1],v=Xr(null);return Jr((function(){var e,t;if(!a&&i){if("tab"===(null===(e=r.appearance)||void 0===e?void 0:e.widgetType)&&v.current){var n,o=v.current.getBoundingClientRect(),s={top:"50%",left:parseInt("".concat(o.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(n=r.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6")};h(s)}if("selector"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)){var c=qo.querySelector(r.appearance.widgetSelector||"");null==c||c.addEventListener("click",(function(){d(!l)})),null==c||c.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),uo($n,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&uo("div",{className:"ph-survey-widget-tab",ref:v,onClick:function(){return!a&&d(!l)},style:{color:Sr(r.appearance.widgetColor)},children:[uo("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&uo(Bo,{posthog:i,survey:r,forceDisableHtml:o,style:f,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Vo=function(e){var n,r,o=e.question,i=e.forceDisableHtml,a=e.displayQuestionIndex,s=e.appearance,u=e.onSubmit,l=(c(n={},Rn.Open,ko),c(n,Rn.Link,xo),c(n,Rn.Rating,Ao),c(n,Rn.SingleChoice,Eo),c(n,Rn.MultipleChoice,Eo),n),d={question:o,forceDisableHtml:i,appearance:s,onSubmit:u},p=(c(r={},Rn.Open,{}),c(r,Rn.Link,{}),c(r,Rn.Rating,{displayQuestionIndex:a}),c(r,Rn.SingleChoice,{displayQuestionIndex:a}),c(r,Rn.MultipleChoice,{displayQuestionIndex:a}),r),f=l[o.type],h=t(t({},d),p[o.type]);return uo(f,t({},h))};function Uo(e){return!Vt(Event)&&jo(e,Event)}function jo(e,t){try{return e instanceof t}catch(e){return!1}}function Go(e){return Gt(e)||!Zt(e)&&!Wt(e)}function Ko(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function Qo(e){return Ko(e,"DOMError")}rn.__PosthogExtensions__=rn.__PosthogExtensions__||{},rn.__PosthogExtensions__.canActivateRepeatedly=Nr,rn.__PosthogExtensions__.generateSurveys=Ho,rn.extendPostHogWithSurveys=Ho;var zo=/\(error: (.*)\)/,Yo=50,Jo="?";function Xo(e,t,n,r){var o={filename:e,function:"<anonymous>"===t?Jo:t,in_app:!0};return Vt(n)||(o.lineno=n),Vt(r)||(o.colno=r),o}var $o=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ei=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ti=/\((\S*)(?::(\d+))(?::(\d+))\)/,ni=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ri=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oi=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.sort((function(e,t){return e[0]-t[0]})).map((function(e){return e[1]}));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],i=e.split("\n"),a=n;a<i.length;a++){var s=i[a];if(!(s.length>1024)){var c=zo.test(s)?s.replace(zo,"$1"):s;if(!c.match(/\S*Error: /)){var u,l=f(o);try{for(l.s();!(u=l.n()).done;){var d=(0,u.value)(c);if(d){r.push(d);break}}}catch(e){l.e(e)}finally{l.f()}if(r.length>=Yo)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Yo).map((function(e){return t(t({},e),{},{filename:e.filename||ii(n).filename,function:e.function||Jo})}))}(r)}}.apply(void 0,[[30,function(e){var t=$o.exec(e);if(t){var n=u(t,4),r=n[1],o=n[2],i=n[3];return Xo(r,Jo,+o,+i)}var a=ei.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var s=ti.exec(a[2]);s&&(a[2]=s[1],a[3]=s[2],a[4]=s[3])}var c=u(si(a[1]||Jo,a[2]),2),l=c[0];return Xo(c[1],l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}}],[50,function(e){var t=ni.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=ri.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Jo,i=u(si(o,r),2);return o=i[0],Xo(r=i[1],o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function ii(e){return e[e.length-1]||{}}var ai,si=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Jo,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(ai||(ai={}));var ci=["fatal","error","warning","log","info","debug"],ui=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function li(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",r=function(e){if(e&&di.test(e.message))return 1;return 0}(e);try{var o=oi(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var di=/Minified React error #\d+;/i;function pi(e,t){var n,r,o=li(e),i=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null!==(r=null==t?void 0:t.synthetic)&&void 0!==r&&r;return{$exception_list:[{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:function(e){var t=e.message;if(t.error&&"string"==typeof t.error.message)return t.error.message;return t}(e),stacktrace:{frames:o},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function fi(e,t){var n,r,o,i=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,s={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(o=null==t?void 0:t.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=t&&t.syntheticException){var c=li(t.syntheticException,1);c.length&&(s.stacktrace={frames:c})}return{$exception_list:[s],$exception_level:"error"}}function hi(e){return Ut(e)&&!jt(e)&&ci.indexOf(e)>=0}function vi(e,t){var n,r,o=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a=null!=t&&t.overrideExceptionType?t.overrideExceptionType:Uo(e)?e.constructor.name:"Error",s=null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length||o.length<=t?o:"".concat(o.slice(0,t),"...")}return""}(e)),c={type:a,value:s,mechanism:{handled:o,synthetic:i}};if(null!=t&&t.syntheticException){var u=li(null==t?void 0:t.syntheticException,1);u.length&&(c.stacktrace={frames:u})}return{$exception_list:[c],$exception_level:hi(e.level)?e.level:"error"}}function gi(e,n){var r=u(e,5),o=r[0];r[1],r[2],r[3];var i=r[4],a={$exception_list:[]},s=i||o;if(Qo(s)||function(e){return Ko(e,"DOMException")}(s)){var c=s;if(function(e){return"stack"in e}(s))a=pi(s,n);else{var l=c.name||(Qo(c)?"DOMError":"DOMException"),d=c.message?"".concat(l,": ").concat(c.message):l,p=Qo(c)?"DOMError":"DOMException";a=fi(d,t(t({},n),{},{overrideExceptionType:p,defaultExceptionMessage:d}))}return"code"in c&&(a.$exception_DOMException_code="".concat(c.code)),a}if(function(e){return Ko(e,"ErrorEvent")}(s)&&s.error)return pi(s.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return jo(e,Error)}}(s))return pi(s,n);if(function(e){return Ko(e,"Object")}(s)||Uo(s))return vi(s,n);if(Vt(i)&&Ut(o)){var f="Error",h=o,v=o.match(ui);return v&&(f=v[1],h=v[2]),fi(h,t(t({},n),{},{overrideExceptionType:f,defaultExceptionMessage:h}))}return fi(s,n)}function mi(e){var t=function(e){if(Go(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(u(e,1)[0]);return Go(t)?fi("Non-Error promise rejection captured with value: ".concat(String(t)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):gi([t],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(t)})}var yi={wrapOnError:function(e){var t=Xt;t||an.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=gi(o);return e(a),null!==(t=null==n?void 0:n.apply(void 0,o))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:function(e){var t=Xt;t||an.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=mi(i);return e(s),null!==(r=null==n?void 0:n.apply(t,i))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};rn.__PosthogExtensions__=rn.__PosthogExtensions__||{},rn.__PosthogExtensions__.errorWrappingFunctions=yi,rn.__PosthogExtensions__.parseErrorAsProperties=gi,rn.posthogErrorWrappingFunctions=yi,rn.parseErrorAsProperties=gi;var bi=function(e,t){var n=e.checkAndGetSessionAndWindowId(!0),r=n.sessionId,o=n.windowId;t.headers.set("X-POSTHOG-SESSION-ID",r),t.headers.set("X-POSTHOG-WINDOW-ID",o)};rn.__PosthogExtensions__=rn.__PosthogExtensions__||{};var Ci={_patchFetch:function(e){return dn(Xt,"fetch",(function(t){return function(){var r=i(n().mark((function r(o,i){var a;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=new Request(o,i),bi(e,a),n.abrupt("return",t(a));case 3:case"end":return n.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()}))},_patchXHR:function(e){return dn(Xt.XMLHttpRequest.prototype,"open",(function(t){return function(n,r){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=new Request(r);return bi(e,s),t.call(this,n,s.url,o,i,a)}}))}};rn.__PosthogExtensions__.tracingHeadersPatchFns=Ci,rn.postHogTracingHeadersPatchFns=Ci;var _i,Ii,Si,wi=-1,ki=function(e){addEventListener("pageshow",(function(t){t.persisted&&(wi=t.timeStamp,e(t))}),!0)},xi=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ai=function(){var e=xi();return e&&e.activationStart||0},Ti=function(e,t){var n=xi(),r="navigate";return wi>=0?r="back-forward-cache":n&&(document.prerendering||Ai()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ei=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Mi=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Ni=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Oi=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Li=function(e){var t=!1;return function(){t||(e(),t=!0)}},Ri=-1,Fi=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Di=function(e){"hidden"===document.visibilityState&&Ri>-1&&(Ri="visibilitychange"===e.type?e.timeStamp:0,Pi())},qi=function(){addEventListener("visibilitychange",Di,!0),addEventListener("prerenderingchange",Di,!0)},Pi=function(){removeEventListener("visibilitychange",Di,!0),removeEventListener("prerenderingchange",Di,!0)},Hi=function(){return Ri<0&&(Ri=Fi(),qi(),ki((function(){setTimeout((function(){Ri=Fi(),qi()}),0)}))),{get firstHiddenTime(){return Ri}}},Bi=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Wi=[1800,3e3],Zi=function(e,t){t=t||{},Bi((function(){var n,r=Hi(),o=Ti("FCP"),i=Ei("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-Ai(),0),o.entries.push(e),n(!0)))}))}));i&&(n=Mi(e,o,Wi,t.reportAllChanges),ki((function(r){o=Ti("FCP"),n=Mi(e,o,Wi,t.reportAllChanges),Ni((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Vi=[.1,.25],Ui=[2500,4e3],ji={},Gi=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ki=function(e){if("loading"===document.readyState)return"loading";var t=Gi();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},Qi=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},zi=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:Qi(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(e){}return n},Yi=-1,Ji=function(e,t){var n=Gi(),r="navigate";return Yi>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=Gi();return e&&e.activationStart||0}()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Xi=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},$i=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},ea=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ta=0,na=1/0,ra=0,oa=function(e){e.forEach((function(e){e.interactionId&&(na=Math.min(na,e.interactionId),ra=Math.max(ra,e.interactionId),ta=ra?(ra-na)/7+1:0)}))},ia=function(){"interactionCount"in performance||_i||(_i=Xi("event",oa,{type:"event",buffered:!0,durationThreshold:0}))},aa=[],sa=new Map,ca=0,ua=function(){return(_i?ta:performance.interactionCount||0)-ca},la=[],da=function(e){if(la.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=aa[aa.length-1],n=sa.get(e.interactionId);if(n||aa.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};sa.set(r.id,r),aa.push(r)}aa.sort((function(e,t){return t.latency-e.latency})),aa.length>10&&aa.splice(10).forEach((function(e){return sa.delete(e.id)}))}}},pa=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),ea(e)),n},fa=[200,500],ha=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;ia();var r,o=Ji("INP"),i=function(e){pa((function(){e.forEach(da);var t,n=(t=Math.min(aa.length-1,Math.floor(ua()/50)),aa[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=Xi("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=$i(e,o,fa,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ea((function(){i(a.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(Yi=t.timeStamp,e(t))}),!0)}((function(){ca=0,aa.length=0,sa.clear(),o=Ji("INP"),r=$i(e,o,fa,t.reportAllChanges)})))})))},va=[],ga=[],ma=new WeakMap,ya=new Map,ba=-1,Ca=function(e){va=va.concat(e),_a()},_a=function(){ba<0&&(ba=pa(Ia))},Ia=function(){ya.size>10&&ya.forEach((function(e,t){sa.has(t)||ya.delete(t)}));var e=aa.map((function(e){return ma.get(e.entries[0])})),t=ga.length-50;ga=ga.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<ga.length;r++){var o=ga[r];Sa(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=va[va.length-1-i];if(!a||a.startTime<Si)break;n.add(a)}va=Array.from(n),ba=-1};la.push((function(e){e.interactionId&&e.target&&!ya.has(e.interactionId)&&ya.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Si=Math.max(Si,e.processingEnd);for(var r=ga.length-1;r>=0;r--){var o=ga[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},ga.push(t)),(e.interactionId||"first-input"===e.entryType)&&ma.set(e,t),_a()}));var Sa=function(e,t){for(var n,r=[],o=0;n=va[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},wa={onLCP:function(e,t){t=t||{},Bi((function(){var n,r=Hi(),o=Ti("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-Ai(),0),o.entries=[e],n())}))},a=Ei("largest-contentful-paint",i);if(a){n=Mi(e,o,Ui,t.reportAllChanges);var s=Li((function(){ji[o.id]||(i(a.takeRecords()),a.disconnect(),ji[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Li(e),"hidden"===document.visibilityState?e():(n=t(e),Oi(e)),n}(s)}),!0)})),Oi(s),ki((function(r){o=Ti("LCP"),n=Mi(e,o,Ui,t.reportAllChanges),Ni((function(){o.value=performance.now()-r.timeStamp,ji[o.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},Zi(Li((function(){var n,r=Ti("CLS",0),o=0,i=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>r.value&&(r.value=o,r.entries=i,n())},s=Ei("layout-shift",a);s&&(n=Mi(e,r,Vi,t.reportAllChanges),Oi((function(){a(s.takeRecords()),n(!0)})),ki((function(){o=0,r=Ti("CLS",0),n=Mi(e,r,Vi,t.reportAllChanges),Ni((function(){return n()}))})),setTimeout(n,0))})))},onFCP:Zi,onINP:function(e,t){Ii||(Ii=Xi("long-animation-frame",Ca)),ha((function(t){var n=function(e){var t=e.entries[0],n=ma.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=Sa(t.startTime,o),s=e.entries.find((function(e){return e.target})),c=s&&s.target||ya.get(t.interactionId),u=[t.startTime+t.duration,o].concat(a.map((function(e){return e.startTime+e.duration}))),l=Math.max.apply(Math,u),d={interactionTarget:zi(c),interactionTargetElement:c,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:l,processedEventEntries:i,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:o-r,presentationDelay:Math.max(l-o,0),loadState:Ki(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};rn.__PosthogExtensions__=rn.__PosthogExtensions__||{},rn.__PosthogExtensions__.postHogWebVitalsCallbacks=wa,rn.postHogWebVitalsCallbacks=wa}();
|
|
15
|
+
***************************************************************************** */function qe(e,t,n,r){return new(n||(n=Promise))((function(t,o){function i(e){try{a(r.next(e))}catch(e){o(e)}}function s(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,s)}a((r=r.apply(e,[])).next())}))}for(var He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Be="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Pe=0;Pe<64;Pe++)Be[He.charCodeAt(Pe)]=Pe;const We=new Map;const Ze=(e,t,n)=>{if(!e||!Ge(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=We.get(e);return n||(n=new Map,We.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Ve(e,t,n){if(e instanceof Array)return e.map((e=>Ve(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=He[n[t]>>2],o+=He[(3&n[t])<<4|n[t+1]>>4],o+=He[(15&n[t+1])<<2|n[t+2]>>6],o+=He[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ve(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ve(e.data,t,n),e.width,e.height]}}if(Ge(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ze(e,t,n)}}return e}const Ue=(e,t,n)=>e.map((e=>Ve(e,t,n))),Ge=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function je(e,t,n,r){const o=[];try{const i=P(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(!j(this,t,n,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(s[0]&&"object"==typeof s[0]){const e=s[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...s])}}));o.push(i)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function $e(e,t,n,r,o,i,s){const a=[],l=Object.getOwnPropertyNames(e);for(const i of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const l=P(e,i,(function(e){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];const u=e.apply(this,l);if(Ze(u,s,this),"tagName"in this.canvas&&!j(this.canvas,r,o,!0)){const e=Ue(l,s,this),r={type:t,property:i,args:e};n(this.canvas,r)}return u}}));a.push(l)}catch(r){const o=B(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});a.push(o)}return a}function Ke(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,s=o.substring(i)+(r?"//# sourceMappingURL="+r:""),a=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(a)}var Qe,ze,Ye,Je,Xe=(Qe="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",ze=null,Ye=!1,function(e){return Je=Je||Ke(Qe,ze,Ye),new Worker(Je,e)});class et{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:s})}initCanvasFPSObserver(e,t,n,r,o){const i=je(t,n,r,!0),s=new Map,a=new Xe;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:ae["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[],o=t=>{t.querySelectorAll("canvas").forEach((t=>{j(t,n,r,!0)||e.push(t)})),t.querySelectorAll("*").forEach((e=>{e.shadowRoot&&o(e.shadowRoot)}))};return o(t.document),e})().forEach((e=>qe(this,0,void 0,(function*(){var t;const n=this.mirror.getId(e);if(s.get(n))return;if(0===e.width||0===e.height)return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const r=e.clientWidth||e.width,i=e.clientHeight||e.height,l=yield createImageBitmap(e,{resizeWidth:r,resizeHeight:i});a.postMessage({id:n,bitmap:l,width:r,height:i,dataURLOptions:o.dataURLOptions},[l])}))))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=je(e,t,n,!1),o=function(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const i=P(t.CanvasRenderingContext2D.prototype,s,(function(o){return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return j(this.canvas,n,r,!0)||setTimeout((()=>{const n=Ue(a,t,this);e(this.canvas,{type:ae["2D"],property:s,args:n})}),0),o.apply(this,a)}}));o.push(i)}catch(n){const r=B(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:ae["2D"],property:s,args:[t],setter:!0})}});o.push(r)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r,o){const i=[];return i.push(...$e(t.WebGLRenderingContext.prototype,ae.WebGL,e,n,r,0,t)),void 0!==t.WebGL2RenderingContext&&i.push(...$e(t.WebGL2RenderingContext.prototype,ae.WebGL2,e,n,r,0,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"]);return t})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class tt{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new X,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:i(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class nt{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function rt(e){return Object.assign(Object.assign({},e),{timestamp:W()})}let ot,it,st,at=!1;const lt=new s;function ct(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:d=!0,maskAllInputs:p,maskInputOptions:h,slimDOMOptions:f,maskInputFn:g,maskTextFn:m,hooks:y,packFn:v,sampling:C={},dataURLOptions:b={},mousemoveWait:_,recordDOM:I=!0,recordCanvas:S=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:A=!1,collectFonts:T=!1,inlineImages:x=!1,plugins:M,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:N=new Set([]),errorHandler:O}=e;ve(O);const L=!w||window.parent===window;let F=!1;if(!L)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(L&&!t)throw new Error("emit function is required");void 0!==_&&void 0===C.mousemove&&(C.mousemove=_),lt.reset();const q=!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==h?h:{password:!0},H=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f}:f||{};let B;!function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===o)return!0}while(o=o&&o.parentNode);return!1})}();let P=0;const W=e=>{for(const t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return v&&!F&&(e=v(e)),e};ot=(e,o)=>{var i;if(!(null===(i=_e[0])||void 0===i?void 0:i.isFrozen())||e.type===re.FullSnapshot||e.type===re.IncrementalSnapshot&&e.data.source===oe.Mutation||_e.forEach((e=>e.unfreeze())),L)null==t||t(W(e),o);else if(F){const t={type:"rrweb",event:W(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===re.FullSnapshot)B=e,P=0;else if(e.type===re.IncrementalSnapshot){if(e.data.source===oe.Mutation&&e.data.isAttachIframe)return;P++;const t=r&&P>=r,o=n&&e.timestamp-B.timestamp>n;(t||o)&&it(!0)}};const G=e=>{ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.Mutation},e)}))},j=e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.Scroll},e)})),$=e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.CanvasMutation},e)})),K=new tt({mutationCb:G,adoptedStyleSheetCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.AdoptedStyleSheet},e)}))}),Q=new De({mirror:lt,mutationCb:G,stylesheetManager:K,recordCrossOriginIframes:w,wrappedEmit:ot});for(const e of M||[])e.getMirror&&e.getMirror({nodeMirror:lt,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});const X=new nt;st=new et({recordCanvas:S,mutationCb:$,win:window,blockClass:o,blockSelector:i,mirror:lt,sampling:C.canvas,dataURLOptions:b});const ee=new Fe({mutationCb:G,scrollCb:j,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskInputOptions:q,dataURLOptions:b,maskTextFn:m,maskInputFn:g,recordCanvas:S,inlineImages:x,sampling:C,slimDOMOptions:H,iframeManager:Q,stylesheetManager:K,canvasManager:st,keepIframeSrcFn:E,processedNodeManager:X},mirror:lt});it=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!I)return;ot(rt({type:re.Meta,data:{href:window.location.href,width:U(),height:V()}}),e),K.reset(),ee.init(),_e.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new s,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:d=!1,maskTextFn:p,maskInputFn:h,slimDOM:f=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:I=(()=>!1)}=t||{};return R(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===d?{password:!0}:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:g,inlineImages:c,recordCanvas:u,preserveWhiteSpace:m,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:lt,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:q,maskTextFn:m,slimDOM:H,dataURLOptions:b,recordCanvas:S,inlineImages:x,onSerialize:e=>{z(e,lt)&&Q.addIframe(e),Y(e,lt)&&K.trackLinkElement(e),J(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Q.attachIframe(e,t),ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!t)return console.warn("Failed to snapshot the document");ot(rt({type:re.FullSnapshot,data:{node:t,initialOffset:Z(window)}}),e),_e.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,lt.getId(document))};try{const e=[],t=e=>{var t;return be(Ne)({mutationCb:G,mousemoveCb:(e,t)=>ot(rt({type:re.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.MouseInteraction},e)})),scrollCb:j,viewportResizeCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.ViewportResize},e)})),inputCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.Input},e)})),mediaInteractionCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.MediaInteraction},e)})),styleSheetRuleCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.StyleSheetRule},e)})),styleDeclarationCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.StyleDeclaration},e)})),canvasMutationCb:$,fontCb:e=>ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.Font},e)})),selectionCb:e=>{ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.Selection},e)}))},customElementCb:e=>{ot(rt({type:re.IncrementalSnapshot,data:Object.assign({source:oe.CustomElement},e)}))},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:q,inlineStylesheet:d,sampling:C,recordDOM:I,recordCanvas:S,inlineImages:x,userTriggeredOnInput:A,collectFonts:T,doc:e,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:H,dataURLOptions:b,mirror:lt,iframeManager:Q,stylesheetManager:K,shadowDomManager:ee,processedNodeManager:X,canvasManager:st,ignoreCSSAttributes:N,plugins:(null===(t=null==M?void 0:M.filter((e=>e.observer)))||void 0===t?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>ot(rt({type:re.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},y)};Q.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{it(),e.push(t(document)),at=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(D("DOMContentLoaded",(()=>{ot(rt({type:re.DomContentLoaded,data:{}})),"DOMContentLoaded"===k&&n()}))),e.push(D("load",(()=>{ot(rt({type:re.Load,data:{}})),"load"===k&&n()}),window))),()=>{e.forEach((e=>e())),X.destroy(),at=!1,Ce()}}catch(e){console.warn(e)}}ct.addCustomEvent=(e,t)=>{if(!at)throw new Error("please add custom event after start recording");ot(rt({type:re.Custom,data:{tag:e,payload:t}}))},ct.freezePage=()=>{_e.forEach((e=>e.freeze()))},ct.takeFullSnapshot=e=>{if(!at)throw new Error("please take full snapshot after start recording");it(e)},ct.mirror=lt;class ut{constructor(e){this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const dt=/(^|@)\S+:\d+/,pt=/^\s*at .*(\S+:\d+|\(native\))/m,ht=/^(eval@)?(\[native code])?$/,ft={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(pt)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(pt)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const n=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=n?t.replace(n[0],""):t;const r=t.split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:r.pop()),i=r.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new ut({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(ht)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new ut({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new ut({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[];for(let e=2,o=n.length;e<o;e+=2){const o=t.exec(n[e]);o&&r.push(new ut({fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[];for(let e=0,o=n.length;e<o;e+=2){const o=t.exec(n[e]);o&&r.push(new ut({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(dt)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new ut({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function gt(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();const r=e.parentElement,o=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===n&&o.push(t)}o.length>1&&(n+=`:eq(${o.indexOf(e)})`),t=n+(t?">"+t:""),e=r}return t}function mt(e){return"[object Object]"===Object.prototype.toString.call(e)}function yt(e,t){if(0===t)return!0;const n=Object.keys(e);for(const r of n)if(mt(e[r])&&yt(e[r],t-1))return!0;return!1}function vt(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],o=[];return JSON.stringify(e,(function(e,t){if(r.length>0){const n=r.indexOf(this);~n?r.splice(n+1):r.push(this),~n?o.splice(n,1/0,e):o.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(mt(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(mt(e)&&yt(e,n.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=`${t.slice(0,n.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const n in t){const r=t[n];Array.isArray(r)?e[n]=gt(r.length?r[0]:null):e[n]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}const Ct={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function bt(e,t,n){const r=n?Object.assign({},Ct,n):Ct,o=r.logger;if(!o)return()=>{};let i;i="string"==typeof o?t[o]:o;let s=0,a=!1;const l=[];if(r.level.includes("error")){const n=t=>{const n=t.message,o=t.error,i=ft.parse(o).map((e=>e.toString())),s=[vt(n,r.stringifyOptions)];e({level:"error",trace:i,payload:s})};t.addEventListener("error",n),l.push((()=>{t.removeEventListener("error",n)}));const o=t=>{let n,o;t.reason instanceof Error?(n=t.reason,o=[vt(`Uncaught (in promise) ${n.name}: ${n.message}`,r.stringifyOptions)]):(n=new Error,o=[vt("Uncaught (in promise)",r.stringifyOptions),vt(t.reason,r.stringifyOptions)]);const i=ft.parse(n).map((e=>e.toString()));e({level:"error",trace:i,payload:o})};t.addEventListener("unhandledrejection",o),l.push((()=>{t.removeEventListener("unhandledrejection",o)}))}for(const e of r.level)l.push(c(i,e));return()=>{l.forEach((e=>e()))};function c(t,n){var o=this;return t[n]?P(t,n,(t=>function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];if(t.apply(o,l),!a){a=!0;try{const t=ft.parse(new Error).map((e=>e.toString())).splice(1),o=l.map((e=>vt(e,r.stringifyOptions)));s++,s<r.lengthThreshold?e({level:n,trace:t,payload:o}):s===r.lengthThreshold&&e({level:"warn",trace:[],payload:[vt("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{a=!1}}})):()=>{}}}const _t=e=>({name:"rrweb/console@1",observer:bt,options:e}),It=Array.isArray,St=Object.prototype,wt=St.hasOwnProperty,kt=St.toString,At=It||function(e){return"[object Array]"===kt.call(e)},Tt=function(e){return"function"==typeof e},xt=function(e){return e===Object(e)&&!At(e)},Mt=function(e){return void 0===e},Et=function(e){return"[object String]"==kt.call(e)},Nt=function(e){return Et(e)&&0===e.trim().length},Ot=function(e){return null===e},Lt=function(e){return Mt(e)||Ot(e)},Rt=function(e){return"[object Number]"==kt.call(e)},Dt=function(e){return"[object Boolean]"===kt.call(e)},Ft=e=>e instanceof Document,qt=e=>e instanceof FormData,Ht="undefined"!=typeof window?window:void 0,Bt="undefined"!=typeof globalThis?globalThis:Ht,Pt=Array.prototype.forEach,Wt=null==Bt?void 0:Bt.navigator,Zt=null==Bt?void 0:Bt.document;null==Bt||Bt.location,null==Bt||Bt.fetch,null!=Bt&&Bt.XMLHttpRequest&&"withCredentials"in new Bt.XMLHttpRequest&&Bt.XMLHttpRequest,null==Bt||Bt.AbortController,null==Wt||Wt.userAgent;const Vt=null!=Ht?Ht:{},Ut="[PostHog.js]",Gt={_log:function(e){if(Ht&&Vt.POSTHOG_DEBUG&&!Mt(Ht.console)&&Ht.console){const o="__rrweb_original__"in Ht.console[e]?Ht.console[e].__rrweb_original__:Ht.console[e];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o(Ut,...n)}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Gt._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Gt._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Gt._log("error",...t)},critical:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error(Ut,...t)},uninitializedWarning:e=>{Gt.error(`You must initialize PostHog before calling ${e}`)}},jt={};function $t(e,t,n){if(!Lt(e)){if(At(e))return function(e,t,n){if(At(e))if(Pt&&e.forEach===Pt)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(let r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r)===jt)return}(e,t,n);if(qt(e)){for(const r of e.entries())if(t.call(n,r[1],r[0])===jt)return}else for(const r in e)if(wt.call(e,r)&&t.call(n,e[r],r)===jt)return}}const Kt=function(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";const o=[];return $t(e,(function(e,r){Mt(e)||Mt(r)||"undefined"===r||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(r),o[o.length]=n+"="+t)})),o.join(r)},Qt={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io"]};function zt(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return Tt(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Yt(e,t){var n;const r=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch{return null}}(e),o={hostname:r,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==r||!r.trim().length)return o;for(const e of t.payloadHostDenyList)if(r.endsWith(e))return{hostname:r,isHostDenied:!0};return o}const Jt=e=>"navigation"===e.entryType,Xt=e=>"resource"===e.entryType;function en(e,t,n){if(n.recordInitialRequests){const r=t.performance.getEntries().filter((e=>Jt(e)||Xt(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>an({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}const r=new t.PerformanceObserver((t=>{const r=t.getEntries().filter((e=>Jt(e)||Xt(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>an({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return r.observe({entryTypes:o}),()=>{r.disconnect()}}function tn(e,t){return!!t&&(Dt(t)||t[e])}function nn(e){let{type:t,recordBody:n,headers:r}=e;function o(e){const t=Object.keys(r).find((e=>"content-type"===e.toLowerCase())),n=t&&r[t];return e.some((e=>null==n?void 0:n.includes(e)))}if(!n)return!1;if(Dt(n))return!0;if(At(n))return o(n);const i=n[t];return Dt(i)?i:o(i)}async function rn(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return Gt.warn("Failed to get performance entry for request",{url:n,initiatorType:t}),null;const s=function(e,t){for(let n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}(e.performance.getEntriesByName(n),(e=>Xt(e)&&e.initiatorType===t&&(Mt(r)||e.startTime>=r)&&(Mt(o)||e.startTime<=o)));return s||(await new Promise((e=>setTimeout(e,50*i))),rn(e,t,n,r,o,i+1))}function on(e){let{body:t,options:n,url:r}=e;if(Lt(t))return null;const{hostname:o,isHostDenied:i}=Yt(r,n);if(i)return o+" is in deny list";if(Et(t))return t;if(Ft(t))return t.textContent;if(qt(t))return Kt(t);if(xt(t))try{return JSON.stringify(t)}catch{return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}const sn=e=>!Ot(e)&&("navigation"===e.entryType||"resource"===e.entryType);function an(e){let{entry:t,method:n,status:r,networkRequest:o,isInitial:i,start:s,end:a,url:l,initiatorType:c}=e;s=t?t.startTime:s,a=t?t.responseEnd:a;const u=Math.floor(Date.now()-performance.now()),d=Math.floor(u+(s||0)),p=[{...t?t.toJSON():{name:l},startTime:Mt(s)?void 0:Math.round(s),endTime:Mt(a)?void 0:Math.round(a),timeOrigin:u,timestamp:d,method:n,initiatorType:t?t.initiatorType:c,status:r,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:i}];if(sn(t))for(const e of t.serverTiming||[])p.push({timeOrigin:u,timestamp:d,startTime:Math.round(t.startTime),name:e.name,duration:e.duration,entryType:"serverTiming"});return p}const ln=["video/","audio/"];function cn(e){return new Promise(((t,n)=>{const r=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}catch{clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}async function un(e){let{r:t,options:n,url:r}=e;const o=function(e){var t;let{r:n,options:r,url:o}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";const i=null===(t=n.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),s=ln.some((e=>null==i?void 0:i.startsWith(e)));if(i&&s)return`Content-Type ${i} is not supported`;const{hostname:a,isHostDenied:l}=Yt(o,r);return l?a+" is in deny list":null}({r:t,options:n,url:r});return Ot(o)?cn(t):Promise.resolve(o)}function dn(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};const r=tn("request",n.recordHeaders),o=tn("response",n.recordHeaders),i=zt(t,"fetch",(i=>async function(s,a){const l=new Request(s,a);let c;const u={};let d,p;try{const e={};l.headers.forEach(((t,n)=>{e[n]=t})),r&&(u.requestHeaders=e),nn({type:"request",headers:e,url:s,recordBody:n.recordBody})&&(u.requestBody=await async function(e){let{r:t,options:n,url:r}=e;const{hostname:o,isHostDenied:i}=Yt(r,n);return i?Promise.resolve(o+" is in deny list"):cn(t)}({r:l,options:n,url:s})),d=t.performance.now(),c=await i(l),p=t.performance.now();const a={};return c.headers.forEach(((e,t)=>{a[t]=e})),o&&(u.responseHeaders=a),nn({type:"response",headers:a,url:s,recordBody:n.recordBody})&&(u.responseBody=await un({r:c,options:n,url:s})),c}finally{rn(t,"fetch",l.url,d,p).then((t=>{var n;const r=an({entry:t,method:l.method,status:null===(n=c)||void 0===n?void 0:n.status,networkRequest:u,start:d,end:p,url:l.url,initiatorType:"fetch"});e({requests:r})})).catch((()=>{}))}}));return()=>{i()}}let pn=null;function hn(e,t,n){if(!("performance"in t))return()=>{};if(pn)return Gt.warn("Network observer already initialised, doing nothing"),()=>{};const r=n?Object.assign({},Qt,n):Qt,o=t=>{const n=[];t.requests.forEach((e=>{const t=r.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e({...t,requests:n})},i=en(o,t,r);let s=()=>{},a=()=>{};return(r.recordHeaders||r.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};const r=tn("request",n.recordHeaders),o=tn("response",n.recordHeaders),i=zt(t.XMLHttpRequest.prototype,"open",(i=>function(s,a){let l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0;const d=this,p=new Request(a),h={};let f,g;const m={},y=d.setRequestHeader.bind(d);d.setRequestHeader=(e,t)=>(m[e]=t,y(e,t)),r&&(h.requestHeaders=m);const v=d.send.bind(d);d.send=e=>(nn({type:"request",headers:m,url:a,recordBody:n.recordBody})&&(h.requestBody=on({body:e,options:n,url:a})),f=t.performance.now(),v(e)),d.addEventListener("readystatechange",(()=>{if(d.readyState!==d.DONE)return;g=t.performance.now();const r={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{const t=e.split(": "),n=t.shift(),o=t.join(": ");n&&(r[n]=o)})),o&&(h.responseHeaders=r),nn({type:"response",headers:r,url:a,recordBody:n.recordBody})&&(h.responseBody=on({body:d.response,options:n,url:a})),rn(t,"xmlhttprequest",p.url,f,g).then((t=>{const n=an({entry:t,method:p.method,status:null==d?void 0:d.status,networkRequest:h,start:f,end:g,url:a.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))})),i.call(d,s,a,l,c,u)}));return()=>{i()}}(o,t,r),a=dn(o,t,r)),pn=()=>{i(),s(),a()},pn}const fn=e=>({name:"rrweb/network@1",observer:hn,options:e});let gn,mn,yn;Vt.__PosthogExtensions__=Vt.__PosthogExtensions__||{},Vt.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:_t,getRecordNetworkPlugin:fn},Vt.__PosthogExtensions__.rrweb={record:ct,version:"v2",rrwebVersion:t},Vt.rrweb={record:ct,version:"v2",rrwebVersion:t},Vt.rrwebConsoleRecord={getRecordConsolePlugin:_t},Vt.getRecordNetworkPlugin=fn,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(gn||(gn={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(mn||(mn={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(yn||(yn={}));var vn,Cn,bn,_n,In,Sn,wn,kn,An={},Tn=[],xn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mn=Array.isArray;function En(e,t){for(var n in t)e[n]=t[n];return e}function Nn(e){var t=e.parentNode;t&&t.removeChild(e)}function On(e,t,n){var r,o,i,s={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?vn.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return Ln(e,s,r,o,null)}function Ln(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++bn:o,__i:-1,__u:0};return null==o&&null!=Cn.vnode&&Cn.vnode(i),i}function Rn(e){return e.children}function Dn(e,t){this.props=e,this.context=t}function Fn(e,t){if(null==t)return e.__?Fn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Fn(e):null}function qn(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return qn(e)}}function Hn(e){(!e.__d&&(e.__d=!0)&&_n.push(e)&&!Bn.__r++||In!==Cn.debounceRendering)&&((In=Cn.debounceRendering)||Sn)(Bn)}function Bn(){var e,t,n,r,o,i,s,a,l;for(_n.sort(wn);e=_n.shift();)e.__d&&(t=_n.length,r=void 0,i=(o=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((r=En({},o)).__v=o.__v+1,Cn.vnode&&Cn.vnode(r),$n(s,r,o,n.__n,void 0!==s.ownerSVGElement,32&o.__u?[i]:null,a,null==i?Fn(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,Kn(a,r,l),r.__e!=i&&qn(r)),_n.length>t&&_n.sort(wn));Bn.__r=0}function Pn(e,t,n,r,o,i,s,a,l,c,u){var d,p,h,f,g,m=r&&r.__k||Tn,y=t.length;for(n.__d=l,function(e,t,n){var r,o,i,s,a,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=e.__k[r]=null==(o=t[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Ln(null,o,null,null,o):Mn(o)?Ln(Rn,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Ln(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=Zn(o,n,s=r+d,u),o.__i=a,i=null,-1!==a&&(u--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?d++:a>s?u>l-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=Fn(i)),zn(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=Fn(i)),zn(i,i))}(n,t,m),l=n.__d,d=0;d<y;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?An:m[h.__i]||An,h.__i=d,$n(e,h,p,o,i,s,a,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Qn(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==g&&null!=f&&(g=f),65536&h.__u||p.__k===h.__k?l=Wn(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=g}function Wn(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Wn(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Zn(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type)return n;if(r>(null!=l&&0==(131072&l.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function Vn(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||xn.test(t)?n:n+"px"}function Un(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Vn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Vn(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?jn:Gn,i)):e.removeEventListener(t,i?jn:Gn,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Gn(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Cn.event?Cn.event(e):e)}function jn(e){return this.l[e.type+!0](Cn.event?Cn.event(e):e)}function $n(e,t,n,r,o,i,s,a,l,c){var u,d,p,h,f,g,m,y,v,C,b,_,I,S,w,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(u=Cn.__b)&&u(t);e:if("function"==typeof k)try{if(y=t.props,v=(u=k.contextType)&&r[u.__c],C=u?v?v.props.value:u.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,C):(t.__c=d=new Dn(y,C),d.constructor=k,d.render=Yn),v&&v.sub(d),d.props=y,d.state||(d.state={}),d.context=C,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=En({},d.__s)),En(d.__s,k.getDerivedStateFromProps(y,d.__s))),h=d.props,f=d.state,d.__v=t,p)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,C),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,C)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,C),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,f,g)}))}if(d.context=C,d.props=y,d.__P=e,d.__e=!1,_=Cn.__r,I=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,_&&_(t),u=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,_&&_(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++I<25);d.state=d.__s,null!=d.getChildContext&&(r=En(En({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(h,f)),Pn(e,Mn(w=null!=u&&u.type===Rn&&null==u.key?u.props.children:u)?w:[w],t,n,r,o,i,s,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),m&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=i?(t.__e=a,t.__u|=l?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Cn.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,s,a,l){var c,u,d,p,h,f,g,m=n.props,y=t.props,v=t.type;if("svg"===v&&(o=!0),null!=i)for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!v&&(v?h.localName===v:3===h.nodeType)){e=h,i[c]=null;break}if(null==e){if(null===v)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),i=null,a=!1}if(null===v)m===y||a&&e.data===y||(e.data=y);else{if(i=i&&vn.call(e.childNodes),m=n.props||An,!a&&null!=i)for(m={},c=0;c<e.attributes.length;c++)m[(h=e.attributes[c]).name]=h.value;for(c in m)h=m[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in y||Un(e,c,null,h,o));for(c in y)h=y[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?g=h:"key"===c||a&&"function"!=typeof h||m[c]===h||Un(e,c,h,m[c],o);if(u)a||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),Pn(e,Mn(p)?p:[p],t,n,r,o&&"foreignObject"!==v,i,s,i?i[0]:n.__k&&Fn(n,0),a,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Nn(i[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==m[c])&&Un(e,c,f,m[c],!1),c="checked",void 0!==g&&g!==e[c]&&Un(e,c,g,m[c],!1))}return e}(n.__e,t,n,r,o,i,s,l,c);(u=Cn.diffed)&&u(t)}function Kn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Qn(n[r],n[++r],n[++r]);Cn.__c&&Cn.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Cn.__e(e,t.__v)}}))}function Qn(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Cn.__e(e,n)}}function zn(e,t,n){var r,o;if(Cn.unmount&&Cn.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Qn(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Cn.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&zn(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Nn(e.__e),e.__=e.__e=e.__d=void 0}function Yn(e,t,n){return this.constructor(e,n)}function Jn(e,t,n){var r,o,i,s;Cn.__&&Cn.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],s=[],$n(t,e=(!r&&n||t).__k=On(Rn,null,[e]),o||An,An,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?vn.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Kn(i,e,s)}function Xn(e,t,n){var r,o,i,s,a=En({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=void 0===t[i]&&void 0!==s?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?vn.call(arguments,2):n),Ln(e.type,a,r||e.key,o||e.ref,null)}vn=Tn.slice,Cn={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},bn=0,Dn.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=En({},this.state),"function"==typeof e&&(e=e(En({},n),this.props)),e&&En(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Hn(this))},Dn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Hn(this))},Dn.prototype.render=Rn,_n=[],Sn="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wn=function(e,t){return e.__v.__b-t.__v.__b},Bn.__r=0,kn=0;const er=Ht,tr=Zt,nr=e=>{const t={left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "};return`\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ${parseInt((null==e?void 0:e.maxWidth)||"300")}px;\n width: 100%;\n z-index: ${parseInt((null==e?void 0:e.zIndex)||"99999")};\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n border-bottom: 0px;\n ${t[(null==e?void 0:e.position)||"right"]||"right: 30px;"}\n flex-direction: column;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ${(null==e?void 0:e.submitButtonColor)||"black"} !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n text-decoration: none;\n backgroundColor: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n color: ${or((null==e?void 0:e.backgroundColor)||"#eeeded")};\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n `};function rr(e){if("#"===e[0]){const t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function or(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sr;"#"===t[0]&&(e=rr(t)),t.startsWith("rgb")&&(e=t);const n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[t.toLowerCase()];if(n&&(e=rr(n)),!e)return"black";const r=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){const e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[3]);return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)>127.5?"black":"white"}return"black"}const ir={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},sr="#eeeded",ar=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(hr(n),"true"),r.capture("survey sent",{$survey_name:n.name,$survey_id:n.id,$survey_iteration:n.current_iteration,$survey_iteration_start_date:n.current_iteration_start_date,$survey_questions:n.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r),...t,$set:{[fr(n,"responded")]:!0}}),er.dispatchEvent(new Event("PHSurveySent")))},lr=(e,t,n)=>{var r;!n&&t&&(t.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(r=t.get_session_replay_url)||void 0===r?void 0:r.call(t),$set:{[fr(e,"dismissed")]:!0}}),localStorage.setItem(hr(e),"true"),er.dispatchEvent(new Event("PHSurveyClosed")))},cr=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),ur=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,dr=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?ur(e.questions,cr(e.questions)):e.questions),pr=e=>{var t,n;return!(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||!n.repeatedActivation||!(e=>{var t,n,r,o,i,s;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r?void 0:r.length)&&(null===(o=e.conditions)||void 0===o||null===(i=o.events)||void 0===i||null===(s=i.values)||void 0===s?void 0:s.length)>0})(e))},hr=e=>{let t=`seenSurvey_${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`seenSurvey_${e.id}_${e.current_iteration}`),t},fr=(e,t)=>{let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n},gr=function(e,t){var n={__c:t="__cC"+kn++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Hn(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0}),mr=e=>{let{component:t,children:n,renderAsHtml:r,style:o}=e;return Xn(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},yr=Zt;var vr,Cr,br,_r,Ir=0,Sr=[],wr=[],kr=Cn.__b,Ar=Cn.__r,Tr=Cn.diffed,xr=Cn.__c,Mr=Cn.unmount;function Er(e,t){Cn.__h&&Cn.__h(Cr,e,Ir||t),Ir=0;var n=Cr.__H||(Cr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:wr}),n.__[e]}function Nr(e){return Ir=1,function(e,t,n){var r=Er(vr++,2);if(r.t=e,!r.__c&&(r.__=[Zr(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Cr,!Cr.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};Cr.u=!0;var i=Cr.shouldComponentUpdate,s=Cr.componentWillUpdate;Cr.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}s&&s.call(this,e,t,n)},Cr.shouldComponentUpdate=o}return r.__N||r.__}(Zr,e)}function Or(e,t){var n=Er(vr++,3);!Cn.__s&&Wr(n.__H,t)&&(n.__=e,n.i=t,Cr.__H.__h.push(n))}function Lr(e){return Ir=5,Rr((function(){return{current:e}}),[])}function Rr(e,t){var n=Er(vr++,7);return Wr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Dr(e){var t=Cr.context[e.__c],n=Er(vr++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Cr)),t.props.value):e.__}function Fr(){for(var e;e=Sr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Br),e.__H.__h.forEach(Pr),e.__H.__h=[]}catch(t){e.__H.__h=[],Cn.__e(t,e.__v)}}Cn.__b=function(e){Cr=null,kr&&kr(e)},Cn.__r=function(e){Ar&&Ar(e),vr=0;var t=(Cr=e.__c).__H;t&&(br===Cr?(t.__h=[],Cr.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=wr,e.__N=e.i=void 0}))):(t.__h.forEach(Br),t.__h.forEach(Pr),t.__h=[],vr=0)),br=Cr},Cn.diffed=function(e){Tr&&Tr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Sr.push(t)&&_r===Cn.requestAnimationFrame||((_r=Cn.requestAnimationFrame)||Hr)(Fr)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==wr&&(e.__=e.__V),e.i=void 0,e.__V=wr}))),br=Cr=null},Cn.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Br),e.__h=e.__h.filter((function(e){return!e.__||Pr(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Cn.__e(n,e.__v)}})),xr&&xr(e,t)},Cn.unmount=function(e){Mr&&Mr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Br(e)}catch(e){t=e}})),n.__H=void 0,t&&Cn.__e(t,n.__v))};var qr="function"==typeof requestAnimationFrame;function Hr(e){var t,n=function(){clearTimeout(r),qr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);qr&&(t=requestAnimationFrame(n))}function Br(e){var t=Cr,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Cr=t}function Pr(e){var t=Cr;e.__c=e.__(),Cr=t}function Wr(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Zr(e,t){return"function"==typeof t?t(e):t}var Vr=0;function Ur(e,t,n,r,o,i){var s,a,l={};for(a in t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Vr,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return Cn.vnode&&Cn.vnode(c),c}const Gr=Ur("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ur("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),jr=Ur("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ur("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),$r=Ur("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ur("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Kr=Ur("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ur("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Qr=Ur("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ur("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),zr=Ur("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ur("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Yr=Ur("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ur("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ur("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ur("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ur("g",{mask:"url(#mask0_2415_6911)",children:[Ur("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Ur("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Ur("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Ur("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Ur("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Ur("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Ur("defs",{children:Ur("clipPath",{id:"clip0_2415_6911",children:Ur("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Jr=Ur("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ur("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function Xr(){return Ur("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Yr]})}function eo(e){let{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i}=e;const{isPreviewMode:s,isPopup:a}=Dr(gr),l=r.submitButtonTextColor||or(r.submitButtonColor||ir.submitButtonColor);return Ur("div",{className:"bottom-section",children:[Ur("div",{className:"buttons",children:Ur("button",{className:"form-submit",disabled:n&&!s,type:"button",style:a?{color:l}:{},onClick:()=>{s||(i&&(null==Ht||Ht.open(i)),o())},children:t})}),!r.whiteLabel&&Ur(Xr,{})]})}function to(e){let{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e;const{isPopup:s}=Dr(gr);return Ur("div",{style:s?{backgroundColor:o||ir.backgroundColor}:{},children:[Ur("div",{className:"survey-question",children:t}),n&&mr({component:On("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function no(e){let{onClick:t}=e;const{isPreviewMode:n}=Dr(gr);return Ur("div",{className:"cancel-btn-wrapper",children:Ur("button",{className:"form-cancel",onClick:t,disabled:n,children:zr})})}function ro(e){let{header:t,description:n,contentType:r,forceDisableHtml:o,appearance:i,onClose:s,styleOverrides:a}=e;const l=or(i.backgroundColor||ir.backgroundColor),{isPopup:c}=Dr(gr);return Ur(Rn,{children:Ur("div",{className:"thank-you-message",style:{...a},children:Ur("div",{className:"thank-you-message-container",children:[c&&Ur(no,{onClick:()=>s()}),Ur("h3",{className:"thank-you-message-header",style:{color:l},children:t}),n&&mr({component:On("div",{className:"thank-you-message-body"}),children:n,renderAsHtml:!o&&"text"!==r,style:{color:l}}),c&&Ur(eo,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>s()})]})})})}function oo(e){var t;const n=Lr(null),[r,o]=Nr(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return Or((()=>{if(n.current){const e=function(e){const t=er.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===t)return"black";const n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!n)return"black";const r=parseInt(n[1]),o=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(r*r*.299+o*o*.587+i*i*.114)>127.5?"black":"white"}(n.current);o(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:r}}function io(e){let{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e;const i=Lr(null),[s,a]=Nr("");return Ur("div",{ref:i,children:[Ur(to,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),Ur("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>a(e.currentTarget.value)}),Ur(eo,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:()=>o(s)})]})}function so(e){let{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e;return Ur(Rn,{children:[Ur(to,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Ur(eo,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked")})]})}function ao(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e;const s=t.scale,a=10===t.scale?0:1,[l,c]=Nr(null);return Ur(Rn,{children:[Ur(to,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ur("div",{className:"rating-section",children:[Ur("div",{className:"rating-options",children:["emoji"===t.display&&Ur("div",{className:"rating-options-emoji",children:(3===t.scale?uo:po).map(((e,t)=>{const n=t+1===l;return Ur("button",{className:`ratings-emoji question-${r}-rating-${t} ${n?"rating-active":null}`,value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:e},t)}))}),"number"===t.display&&Ur("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${s-a+1}, minmax(0, 1fr))`},children:mo(t.scale).map(((e,t)=>Ur(lo,{displayQuestionIndex:r,active:l===e,appearance:o,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),Ur("div",{className:"rating-text",children:[Ur("div",{children:t.lowerBoundLabel}),Ur("div",{children:t.upperBoundLabel})]})]}),Ur(eo,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:Ot(l)&&!t.optional,appearance:o,onSubmit:()=>i(l)})]})}function lo(e){let{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e;const{textColor:s,ref:a}=oo({appearance:o,defaultTextColor:"black",forceUpdate:n});return Ur("button",{ref:a,className:`ratings-number question-${r}-rating-${t} ${n?"rating-active":null}`,type:"button",onClick:()=>{i(t)},style:{color:s,backgroundColor:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:t})}function co(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e;const s=Lr(null),a=Rr((()=>(e=>{if(!e.shuffleOptions)return e.choices;const t=e.choices;let n="";e.hasOpenChoice&&(n=t.pop());const r=ur(t,cr(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[l,c]=Nr(t.type===mn.MultipleChoice?[]:null),[u,d]=Nr(!1),[p,h]=Nr(""),f=t.type===mn.SingleChoice?"radio":"checkbox";return Ur("div",{ref:s,children:[Ur(to,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ur("div",{className:"multiple-choice-options",children:a.map(((e,n)=>{let o="choice-option";const i=e,s=e;return t.hasOpenChoice&&n===t.choices.length-1&&(o+=" choice-option-open"),Ur("div",{className:o,children:[Ur("input",{type:f,id:`surveyQuestion${r}Choice${n}`,name:`question${r}`,value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?d(!u):t.type===mn.SingleChoice?c(i):t.type===mn.MultipleChoice&&At(l)?l.includes(i)?c(l.filter((e=>e!==i))):c([...l,i]):void 0}),Ur("label",{htmlFor:`surveyQuestion${r}Choice${n}`,style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Ur(Rn,{children:[Ur("span",{children:[s,":"]}),Ur("input",{type:"text",id:`surveyQuestion${r}Choice${n}Open`,name:`question${r}`,onInput:e=>{const n=e.currentTarget.value;return t.type===mn.SingleChoice?c(n):t.type===mn.MultipleChoice&&At(l)?h(n):void 0}})]}):s}),Ur("span",{className:"choice-check",style:{color:"black"},children:Jr})]})}))}),Ur(eo,{text:t.buttonText||"Submit",submitDisabled:(Ot(l)||At(l)&&!u&&0===l.length||At(l)&&u&&!p&&0===l.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{u&&t.type===mn.MultipleChoice?At(l)&&i([...l,p]):i(l)}})]})}const uo=[$r,jr,Gr],po=[Kr,$r,jr,Gr,Qr],ho=[1,2,3,4,5],fo=[1,2,3,4,5,6,7],go=[0,1,2,3,4,5,6,7,8,9,10];function mo(e){switch(e){case 5:default:return ho;case 7:return fo;case 10:return go}}const yo=Ht,vo=Zt;class Co{constructor(e){this.posthog=e,this.surveyInFocus=null}canShowNextEventBasedSurvey=()=>{const e=vo.querySelectorAll("div[class^=PostHogSurvey]");var t;return!(e.length>0)||1===(null===(t=e[e.length-1].shadowRoot)||void 0===t?void 0:t.childElementCount)};handlePopoverSurvey=e=>{var t;const n=null===(t=e.conditions)||void 0===t?void 0:t.seenSurveyWaitPeriodInDays,r=localStorage.getItem("lastSeenSurveyDate");if(n&&r){const e=new Date,t=Math.abs(e.getTime()-new Date(r).getTime());if(Math.ceil(t/864e5)<n)return}const o=(e=>!!localStorage.getItem(hr(e))&&!pr(e))(e);if(!o){this.addSurveyToFocus(e.id);const t=((e,t,n)=>{const r=tr.createElement("div");r.className=`PostHogSurvey${t}`;const o=r.attachShadow({mode:"open"});if(e){const t=Object.assign(tr.createElement("style"),{innerText:e});o.appendChild(t)}return tr.body.appendChild(r),o})(nr(null==e?void 0:e.appearance),e.id);Jn(Ur(Io,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),t)}};handleWidget=e=>{const t=function(e){var t;const n=yr.createElement("div");n.className=`PostHogWidget${e.id}`;const r=n.attachShadow({mode:"open"}),o=`\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ${(null===(t=e.appearance)||void 0===t?void 0:t.widgetColor)||"#e0a045"};\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n `;return r.append(Object.assign(yr.createElement("style"),{innerText:o})),yr.body.appendChild(n),r}(e),n=nr(e.appearance);t.appendChild(Object.assign(vo.createElement("style"),{innerText:n})),Jn(Ur(wo,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),t)};handleWidgetSelector=e=>{var t;const n=(null===(t=e.appearance)||void 0===t?void 0:t.widgetSelector)&&vo.querySelector(e.appearance.widgetSelector);if(n)if(0===vo.querySelectorAll(`.PostHogWidget${e.id}`).length)this.handleWidget(e);else if(1===vo.querySelectorAll(`.PostHogWidget${e.id}`).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o;const t=null===(r=vo.querySelector(`.PostHogWidget${e.id}`))||void 0===r||null===(o=r.shadowRoot)||void 0===o?void 0:o.querySelector(".survey-form");n.addEventListener("click",(()=>{t&&(t.style.display="none"===t.style.display?"block":"none",t.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),t.style.display="none"})))})),n.setAttribute("PHWidgetSurveyClickListener","true")}};sortSurveysByAppearanceDelay(e){return e.sort(((e,t)=>{var n,r;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(r=t.appearance)||void 0===r?void 0:r.surveyPopupDelaySeconds)||0)}))}canRenderSurvey=e=>{const t={visible:!1};if(e.end_date)return t.disabledReason=`survey was completed on ${e.end_date}`,t;if(e.type!=gn.Popover)return t.disabledReason="Only Popover survey types can be rendered",t;if(!(!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)))return t.disabledReason=`linked feature flag ${e.linked_flag_key} is false`,t;if(!(!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)))return t.disabledReason=`targeting feature flag ${e.targeting_flag_key} is false`,t;return!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason=`internal targeting feature flag ${e.internal_targeting_flag_key} is false`,t)};renderSurvey=(e,t)=>{Jn(Ur(Io,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),t)};callSurveysAndEvaluateDisplayLogic=(()=>{var e=this;return function(){var t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=e.posthog)||void 0===t||t.getActiveMatchingSurveys((t=>{const n=t.filter((e=>"api"!==e.type));e.sortSurveysByAppearanceDelay(n).forEach((t=>{if(Ot(e.surveyInFocus)){var n,r,o;if(t.type===gn.Widget)"tab"===(null===(n=t.appearance)||void 0===n?void 0:n.widgetType)&&0===vo.querySelectorAll(`.PostHogWidget${t.id}`).length&&e.handleWidget(t),"selector"===(null===(r=t.appearance)||void 0===r?void 0:r.widgetType)&&null!==(o=t.appearance)&&void 0!==o&&o.widgetSelector&&e.handleWidgetSelector(t);t.type===gn.Popover&&e.canShowNextEventBasedSurvey()&&e.handlePopoverSurvey(t)}}))}),n)}})();addSurveyToFocus=e=>{Ot(this.surveyInFocus)||Gt.error(`Survey ${[...this.surveyInFocus]} already in focus. Cannot add survey ${e}.`),this.surveyInFocus=e};removeSurveyFromFocus=e=>{this.surveyInFocus!==e&&Gt.error(`Survey ${e} is not in focus. Cannot remove survey ${e}.`),this.surveyInFocus=null};getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function bo(e){if(!vo||!yo)return;const t=new Co(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}function _o(e,t,n,r,o){const[i,s]=Nr(r||0===n),[a,l]=Nr(!1);return Or((()=>{if(r||!t)return;const i=()=>{o(e.id),s(!1)},a=()=>{var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(l(!0),o(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((()=>{s(!1)}),5e3)):(o(e.id),s(!1))},c=()=>{var n;s(!0),yo.dispatchEvent(new Event("PHSurveyShown")),t.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(n=t.get_session_replay_url)||void 0===n?void 0:n.call(t)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return yo.addEventListener("PHSurveyClosed",i),yo.addEventListener("PHSurveySent",a),n>0?(()=>{const e=setTimeout((()=>{c()}),n);return()=>{clearTimeout(e),yo.removeEventListener("PHSurveyClosed",i),yo.removeEventListener("PHSurveySent",a)}})():(c(),()=>{yo.removeEventListener("PHSurveyClosed",i),yo.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:s}}function Io(e){var t,n,r,o,i,s;let{survey:a,forceDisableHtml:l,posthog:c,style:u,previewPageIndex:d,removeSurveyFromFocus:p,isPopup:h}=e;const f=Number.isInteger(d),g=null!==(t=a.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:m,isSurveySent:y,setIsPopupVisible:v}=_o(a,c,g,f,p),C=y||d===a.questions.length,b=null!==(n=u)&&void 0!==n&&n.left&&Rt(null===(r=u)||void 0===r?void 0:r.left)?{left:u.left-40}:{};return f&&(u=u||{},u.left="unset",u.right="unset",u.transform="unset"),m?Ur(gr.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>lr(a,c,f),isPopup:h||!1},children:C?Ur(ro,{header:(null===(o=a.appearance)||void 0===o?void 0:o.thankYouMessageHeader)||"Thank you!",description:(null===(i=a.appearance)||void 0===i?void 0:i.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null===(s=a.appearance)||void 0===s?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||ir,styleOverrides:{...u,...b},onClose:()=>v(!1)}):Ur(So,{survey:a,forceDisableHtml:!!l,posthog:c,styleOverrides:u})}):Ur(Rn,{})}function So(e){var t,n;let{survey:r,forceDisableHtml:o,posthog:i,styleOverrides:s}=e;const a=or((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||ir.backgroundColor),[l,c]=Nr({}),{isPreviewMode:u,previewPageIndex:d,handleCloseSurveyPopup:p,isPopup:h}=Dr(gr),[f,g]=Nr(d||0),m=Rr((()=>dr(r)),[r]);Or((()=>{g(null!=d?d:0)}),[d]);return Ur("form",{className:"survey-form",style:h?{color:a,borderColor:null===(n=r.appearance)||void 0===n?void 0:n.borderColor,...s}:{},children:m.map(((e,t)=>{var n;const{originalQuestionIndex:s}=e;return(u?f===s:f===t)&&Ur("div",{className:"survey-box",style:h?{backgroundColor:(null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||ir.backgroundColor}:{},children:[h&&Ur(no,{onClick:()=>p()}),ko({question:e,forceDisableHtml:o,displayQuestionIndex:t,appearance:r.appearance||ir,onSubmit:e=>(e=>{let{res:t,originalQuestionIndex:n,displayQuestionIndex:o}=e;if(!i)return;const s=0===n?"$survey_response":`$survey_response_${n}`;if(c({...l,[s]:t}),!i.getNextSurveyStep)return void(o===r.questions.length-1?ar({...l,[s]:t},r,i):g(o+1));const a=i.getNextSurveyStep(r,o,t);a===yn.End?ar({...l,[s]:t},r,i):g(a)})({res:e,originalQuestionIndex:s,displayQuestionIndex:t})})]})}))})}function wo(e){var t,n;let{survey:r,forceDisableHtml:o,posthog:i,readOnly:s,removeSurveyFromFocus:a}=e;const[l,c]=Nr(!1),[u,d]=Nr({}),p=Lr(null);return Or((()=>{var e,t;if(!s&&i){if("tab"===(null===(e=r.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var n;const e=p.current.getBoundingClientRect(),t={top:"50%",left:parseInt(""+(e.right-360)),bottom:"auto",borderRadius:10,borderBottom:`1.5px solid ${(null===(n=r.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6"}`};d(t)}if("selector"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)){const e=vo.querySelector(r.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{c(!l)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Ur(Rn,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&Ur("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!s&&c(!l),style:{color:or(r.appearance.widgetColor)},children:[Ur("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Ur(Io,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const ko=e=>{let{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e;const s={[mn.Open]:io,[mn.Link]:so,[mn.Rating]:ao,[mn.SingleChoice]:co,[mn.MultipleChoice]:co},a={question:t,forceDisableHtml:n,appearance:o,onSubmit:i},l={[mn.Open]:{},[mn.Link]:{},[mn.Rating]:{displayQuestionIndex:r},[mn.SingleChoice]:{displayQuestionIndex:r},[mn.MultipleChoice]:{displayQuestionIndex:r}};return Ur(s[t.type],{...{...a,...l[t.type]}})};function Ao(e){return!Mt(Event)&&To(e,Event)}function To(e,t){try{return e instanceof t}catch{return!1}}function xo(e){return Ot(e)||!xt(e)&&!Tt(e)}function Mo(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function Eo(e){return Mo(e,"DOMError")}Vt.__PosthogExtensions__=Vt.__PosthogExtensions__||{},Vt.__PosthogExtensions__.canActivateRepeatedly=pr,Vt.__PosthogExtensions__.generateSurveys=bo,Vt.extendPostHogWithSurveys=bo;const No=/\(error: (.*)\)/,Oo=50,Lo="?";function Ro(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?Lo:t,in_app:!0};return Mt(n)||(o.lineno=n),Mt(r)||(o.colno=r),o}const Do=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Fo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qo=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ho=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Bo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Po=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[],o=e.split("\n");for(let e=t;e<o.length;e++){const t=o[e];if(t.length>1024)continue;const i=No.test(t)?t.replace(No,"$1"):t;if(!i.match(/\S*Error: /)){for(const e of r){const t=e(i);if(t){n.push(t);break}}if(n.length>=Oo)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return t.reverse(),t.slice(0,Oo).map((e=>({...e,filename:e.filename||Wo(t).filename,function:e.function||Lo})))}(n)}}(...[[30,e=>{const t=Do.exec(e);if(t){const[,e,n,r]=t;return Ro(e,Lo,+n,+r)}const n=Fo.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=qo.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Zo(n[1]||Lo,n[2]);return Ro(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Ho.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Bo.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Lo;return[n,e]=Zo(n,e),Ro(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Wo(e){return e[e.length-1]||{}}const Zo=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Lo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let Vo;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Vo||(Vo={}));const Uo=["fatal","error","warning","log","info","debug"],Go=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function jo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.stacktrace||e.stack||"",r=function(e){if(e&&$o.test(e.message))return 1;return 0}(e);try{const e=Po(n,r);return e.slice(0,e.length-t)}catch{}return[]}const $o=/Minified React error #\d+;/i;function Ko(e,t){var n,r;const o=jo(e),i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null!==(r=null==t?void 0:t.synthetic)&&void 0!==r&&r;return{$exception_list:[{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:function(e){const t=e.message;if(t.error&&"string"==typeof t.error.message)return t.error.message;return t}(e),stacktrace:{frames:o},mechanism:{handled:i,synthetic:s}}],$exception_level:"error"}}function Qo(e,t){var n,r,o;const i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(o=null==t?void 0:t.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:s}};if(null!=t&&t.syntheticException){const e=jo(t.syntheticException,1);e.length&&(a.stacktrace={frames:e})}return{$exception_list:[a],$exception_level:"error"}}function zo(e){return Et(e)&&!Nt(e)&&Uo.indexOf(e)>=0}function Yo(e,t){var n,r;const o=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,s=null!=t&&t.overrideExceptionType?t.overrideExceptionType:Ao(e)?e.constructor.name:"Error",a=null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:`Non-Error exception captured with keys: ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length||r.length<=t?r:`${r.slice(0,t)}...`}return""}(e)}`,l={type:s,value:a,mechanism:{handled:o,synthetic:i}};if(null!=t&&t.syntheticException){const e=jo(null==t?void 0:t.syntheticException,1);e.length&&(l.stacktrace={frames:e})}return{$exception_list:[l],$exception_level:zo(e.level)?e.level:"error"}}function Jo(e,t){let[n,r,o,i,s]=e,a={$exception_list:[]};const l=s||n;if(Eo(l)||function(e){return Mo(e,"DOMException")}(l)){const e=l;if(function(e){return"stack"in e}(l))a=Ko(l,t);else{const n=e.name||(Eo(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n,o=Eo(e)?"DOMError":"DOMException";a=Qo(r,{...t,overrideExceptionType:o,defaultExceptionMessage:r})}return"code"in e&&(a.$exception_DOMException_code=`${e.code}`),a}if(function(e){return Mo(e,"ErrorEvent")}(l)&&l.error)return Ko(l.error,t);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return To(e,Error)}}(l))return Ko(l,t);if(function(e){return Mo(e,"Object")}(l)||Ao(l)){return Yo(l,t)}if(Mt(s)&&Et(n)){let e="Error",r=n;const o=n.match(Go);return o&&(e=o[1],r=o[2]),Qo(r,{...t,overrideExceptionType:e,defaultExceptionMessage:r})}return Qo(l,t)}function Xo(e){let[t]=e;const n=function(e){if(xo(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t);return xo(n)?Qo(`Non-Error promise rejection captured with value: ${String(n)}`,{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Jo([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}const ei={wrapOnError:e=>{const t=Ht;t||Gt.info("window not available, cannot wrap onerror");const n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const s=Jo(o);return e(s),null!==(t=null==n?void 0:n(...o))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{const t=Ht;t||Gt.info("window not available, cannot wrap onUnhandledRejection");const n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];const a=Xo(i);return e(a),null!==(r=null==n?void 0:n.apply(t,i))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};Vt.__PosthogExtensions__=Vt.__PosthogExtensions__||{},Vt.__PosthogExtensions__.errorWrappingFunctions=ei,Vt.__PosthogExtensions__.parseErrorAsProperties=Jo,Vt.posthogErrorWrappingFunctions=ei,Vt.parseErrorAsProperties=Jo;const ti=(e,t)=>{const{sessionId:n,windowId:r}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",r)};Vt.__PosthogExtensions__=Vt.__PosthogExtensions__||{};const ni={_patchFetch:e=>zt(Ht,"fetch",(t=>async function(n,r){const o=new Request(n,r);return ti(e,o),t(o)})),_patchXHR:e=>zt(Ht.XMLHttpRequest.prototype,"open",(t=>function(n,r){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;const a=new Request(r);return ti(e,a),t.call(this,n,a.url,o,i,s)}))};Vt.__PosthogExtensions__.tracingHeadersPatchFns=ni,Vt.postHogTracingHeadersPatchFns=ni;var ri,oi,ii,si=-1,ai=function(e){addEventListener("pageshow",(function(t){t.persisted&&(si=t.timeStamp,e(t))}),!0)},li=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ci=function(){var e=li();return e&&e.activationStart||0},ui=function(e,t){var n=li(),r="navigate";return si>=0?r="back-forward-cache":n&&(document.prerendering||ci()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},di=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},pi=function(e,t,n,r){var o,i;return function(s){t.value>=0&&(s||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},hi=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},fi=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},gi=function(e){var t=!1;return function(){t||(e(),t=!0)}},mi=-1,yi=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},vi=function(e){"hidden"===document.visibilityState&&mi>-1&&(mi="visibilitychange"===e.type?e.timeStamp:0,bi())},Ci=function(){addEventListener("visibilitychange",vi,!0),addEventListener("prerenderingchange",vi,!0)},bi=function(){removeEventListener("visibilitychange",vi,!0),removeEventListener("prerenderingchange",vi,!0)},_i=function(){return mi<0&&(mi=yi(),Ci(),ai((function(){setTimeout((function(){mi=yi(),Ci()}),0)}))),{get firstHiddenTime(){return mi}}},Ii=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Si=[1800,3e3],wi=function(e,t){t=t||{},Ii((function(){var n,r=_i(),o=ui("FCP"),i=di("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ci(),0),o.entries.push(e),n(!0)))}))}));i&&(n=pi(e,o,Si,t.reportAllChanges),ai((function(r){o=ui("FCP"),n=pi(e,o,Si,t.reportAllChanges),hi((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},ki=[.1,.25],Ai=[2500,4e3],Ti={},xi=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Mi=function(e){if("loading"===document.readyState)return"loading";var t=xi();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},Ei=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Ni=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:Ei(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(e){}return n},Oi=-1,Li=function(e,t){var n=xi(),r="navigate";return Oi>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=xi();return e&&e.activationStart||0}()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ri=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Di=function(e,t,n,r){var o,i;return function(s){t.value>=0&&(s||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Fi=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},qi=0,Hi=1/0,Bi=0,Pi=function(e){e.forEach((function(e){e.interactionId&&(Hi=Math.min(Hi,e.interactionId),Bi=Math.max(Bi,e.interactionId),qi=Bi?(Bi-Hi)/7+1:0)}))},Wi=function(){"interactionCount"in performance||ri||(ri=Ri("event",Pi,{type:"event",buffered:!0,durationThreshold:0}))},Zi=[],Vi=new Map,Ui=0,Gi=function(){return(ri?qi:performance.interactionCount||0)-Ui},ji=[],$i=function(e){if(ji.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Zi[Zi.length-1],n=Vi.get(e.interactionId);if(n||Zi.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Vi.set(r.id,r),Zi.push(r)}Zi.sort((function(e,t){return t.latency-e.latency})),Zi.length>10&&Zi.splice(10).forEach((function(e){return Vi.delete(e.id)}))}}},Ki=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),Fi(e)),n},Qi=[200,500],zi=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;Wi();var r,o=Li("INP"),i=function(e){Ki((function(){e.forEach($i);var t,n=(t=Math.min(Zi.length-1,Math.floor(Gi()/50)),Zi[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},s=Ri("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Di(e,o,Qi,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Fi((function(){i(s.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(Oi=t.timeStamp,e(t))}),!0)}((function(){Ui=0,Zi.length=0,Vi.clear(),o=Li("INP"),r=Di(e,o,Qi,t.reportAllChanges)})))})))},Yi=[],Ji=[],Xi=new WeakMap,es=new Map,ts=-1,ns=function(e){Yi=Yi.concat(e),rs()},rs=function(){ts<0&&(ts=Ki(os))},os=function(){es.size>10&&es.forEach((function(e,t){Vi.has(t)||es.delete(t)}));var e=Zi.map((function(e){return Xi.get(e.entries[0])})),t=Ji.length-50;Ji=Ji.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Ji.length;r++){var o=Ji[r];is(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var s=Yi[Yi.length-1-i];if(!s||s.startTime<ii)break;n.add(s)}Yi=Array.from(n),ts=-1};ji.push((function(e){e.interactionId&&e.target&&!es.has(e.interactionId)&&es.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;ii=Math.max(ii,e.processingEnd);for(var r=Ji.length-1;r>=0;r--){var o=Ji[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Ji.push(t)),(e.interactionId||"first-input"===e.entryType)&&Xi.set(e,t),rs()}));var is=function(e,t){for(var n,r=[],o=0;n=Yi[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r};const ss={onLCP:function(e,t){t=t||{},Ii((function(){var n,r=_i(),o=ui("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ci(),0),o.entries=[e],n())}))},s=di("largest-contentful-paint",i);if(s){n=pi(e,o,Ai,t.reportAllChanges);var a=gi((function(){Ti[o.id]||(i(s.takeRecords()),s.disconnect(),Ti[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=gi(e),"hidden"===document.visibilityState?e():(n=t(e),fi(e)),n}(a)}),!0)})),fi(a),ai((function(r){o=ui("LCP"),n=pi(e,o,Ai,t.reportAllChanges),hi((function(){o.value=performance.now()-r.timeStamp,Ti[o.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},wi(gi((function(){var n,r=ui("CLS",0),o=0,i=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>r.value&&(r.value=o,r.entries=i,n())},a=di("layout-shift",s);a&&(n=pi(e,r,ki,t.reportAllChanges),fi((function(){s(a.takeRecords()),n(!0)})),ai((function(){o=0,r=ui("CLS",0),n=pi(e,r,ki,t.reportAllChanges),hi((function(){return n()}))})),setTimeout(n,0))})))},onFCP:wi,onINP:function(e,t){oi||(oi=Ri("long-animation-frame",ns)),zi((function(t){var n=function(e){var t=e.entries[0],n=Xi.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),s=is(t.startTime,o),a=e.entries.find((function(e){return e.target})),l=a&&a.target||es.get(t.interactionId),c=[t.startTime+t.duration,o].concat(s.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,c),d={interactionTarget:Ni(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:i,longAnimationFrameEntries:s,inputDelay:r-t.startTime,processingDuration:o-r,presentationDelay:Math.max(u-o,0),loadState:Mi(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};Vt.__PosthogExtensions__=Vt.__PosthogExtensions__||{},Vt.__PosthogExtensions__.postHogWebVitalsCallbacks=ss,Vt.postHogWebVitalsCallbacks=ss}();
|
|
17
16
|
//# sourceMappingURL=all-external-dependencies.js.map
|