posthog-js 1.181.0 → 1.183.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.
Files changed (56) hide show
  1. package/dist/all-external-dependencies.js +1 -1
  2. package/dist/all-external-dependencies.js.map +1 -1
  3. package/dist/array.full.es5.js +1 -1
  4. package/dist/array.full.es5.js.map +1 -1
  5. package/dist/array.full.js +2 -2
  6. package/dist/array.full.js.map +1 -1
  7. package/dist/array.full.no-external.js +2 -2
  8. package/dist/array.full.no-external.js.map +1 -1
  9. package/dist/array.js +2 -2
  10. package/dist/array.js.map +1 -1
  11. package/dist/array.no-external.js +2 -2
  12. package/dist/array.no-external.js.map +1 -1
  13. package/dist/dead-clicks-autocapture.js.map +1 -1
  14. package/dist/exception-autocapture.js.map +1 -1
  15. package/dist/external-scripts-loader.js.map +1 -1
  16. package/dist/main.js +2 -2
  17. package/dist/main.js.map +1 -1
  18. package/dist/module.d.ts +109 -101
  19. package/dist/module.full.d.ts +12 -4
  20. package/dist/module.full.js +2 -2
  21. package/dist/module.full.js.map +1 -1
  22. package/dist/module.full.no-external.d.ts +12 -4
  23. package/dist/module.full.no-external.js +2 -2
  24. package/dist/module.full.no-external.js.map +1 -1
  25. package/dist/module.js +2 -2
  26. package/dist/module.js.map +1 -1
  27. package/dist/module.no-external.d.ts +109 -101
  28. package/dist/module.no-external.js +2 -2
  29. package/dist/module.no-external.js.map +1 -1
  30. package/dist/recorder-v2.js +1 -1
  31. package/dist/recorder-v2.js.map +1 -1
  32. package/dist/recorder.js +1 -1
  33. package/dist/recorder.js.map +1 -1
  34. package/dist/src/entrypoints/recorder.d.ts +1 -1
  35. package/dist/src/extensions/replay/sessionrecording-utils.d.ts +8 -33
  36. package/dist/src/extensions/replay/sessionrecording.d.ts +5 -1
  37. package/dist/src/types.d.ts +5 -3
  38. package/dist/src/utils/globals.d.ts +0 -1
  39. package/dist/surveys-preview.js.map +1 -1
  40. package/dist/surveys.js.map +1 -1
  41. package/dist/tracing-headers.js.map +1 -1
  42. package/dist/web-vitals.js.map +1 -1
  43. package/lib/package.json +6 -6
  44. package/lib/src/entrypoints/recorder.d.ts +1 -1
  45. package/lib/src/entrypoints/recorder.js +3 -4
  46. package/lib/src/entrypoints/recorder.js.map +1 -1
  47. package/lib/src/extensions/replay/sessionrecording-utils.d.ts +8 -33
  48. package/lib/src/extensions/replay/sessionrecording-utils.js.map +1 -1
  49. package/lib/src/extensions/replay/sessionrecording.d.ts +5 -1
  50. package/lib/src/extensions/replay/sessionrecording.js +72 -19
  51. package/lib/src/extensions/replay/sessionrecording.js.map +1 -1
  52. package/lib/src/types.d.ts +5 -3
  53. package/lib/src/types.js.map +1 -1
  54. package/lib/src/utils/globals.d.ts +0 -1
  55. package/lib/src/utils/globals.js.map +1 -1
  56. package/package.json +6 -6
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var e,t=Object.defineProperty,n=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,"symbol"!=typeof n?n+"":n,r),r=Object.defineProperty,o=(e,t,n)=>((e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i=(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))(i||{});function s(e){return e.nodeType===e.ELEMENT_NODE}function a(e){const t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function l(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function c(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,u).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function u(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=c(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 d(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let p=class{constructor(){o(this,"idNodeMap",new Map),o(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const n=null==(t=this.getMeta(e))?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 h(e){let{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:s}=e,a=i||"";const l=o&&f(o);return(n[r.toLowerCase()]||l&&n[l])&&(a=s?s(a,t):"*".repeat(a.length)),a}function f(e){return e.toLowerCase()}const m="__rrweb_original__";function g(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?f(t):null}function y(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 v=1;const b=new RegExp("[^a-z0-9-_:]"),_=-2;function C(){return v++}let I,S;const w=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,k=/^(?:[a-z+]+:)?\/\//i,M=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function x(e,t){return(e||"").replace(w,((e,n,r,o,i,s)=>{const a=r||i||s,l=n||o||"";if(!a)return e;if(k.test(a)||M.test(a))return`url(${l}${a}${l})`;if(T.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 A=/^[^ \t\n\r\u000c]+/,E=/^[, \t\n\r\u000c]+/;const N=new WeakMap;function O(e,t){return t&&""!==t.trim()?R(e,t):t}function L(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function R(e,t){let n=N.get(e);if(n||(n=e.createElement("a"),N.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function D(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?O(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(E),!(n>=t.length);){let i=r(A);if(","===i.slice(-1))i=O(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=O(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?x(r,R(e)):"object"===t&&"data"===n?O(e,r):r:O(e,r):r}function F(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function H(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&H(e.parentNode,t,n);for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!!n&&H(e.parentNode,t,n)}function P(e,t,n,r){let o;if(s(e)){if(o=e,!o.childNodes.length)return!1}else{if(null===e.parentElement)return!1;o=e.parentElement}try{if("string"==typeof t){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(H(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 Z(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:p,maskInputFn:y,dataURLOptions:v={},inlineImages:_,recordCanvas:C,keepIframeSrcFn:w,newlyAddedElement:k=!1}=t,M=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:i.Document,childNodes:[],compatMode:e.compatMode}:{type:i.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:i.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:p,recordCanvas:y,keepIframeSrcFn:v,newlyAddedElement:_=!1,rootId:C}=t,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}(e,r,o),k=function(e){if(e instanceof HTMLFormElement)return"form";const t=f(e.tagName);return b.test(t)?"div":t}(e);let M={};const T=e.attributes.length;for(let t=0;t<T;t++){const r=e.attributes[t];F(k,r.name,r.value)||(M[r.name]=D(n,k,f(r.name),r.value))}if("link"===k&&s){const t=e.href;let r=d(n,t);if(!r&&t.includes(".css")){r=d(n,window.location.origin+"/"+t.replace(window.location.href,""))}let o=null;r&&(o=c(r)),o&&(delete M.rel,delete M.href,M._cssText=x(o,r.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=c(e.sheet);t&&(M._cssText=x(t,R(n)))}if("input"===k||"textarea"===k||"select"===k){const t=e.value,n=e.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&t?M.value=h({element:e,type:g(e),tagName:k,value:t,maskInputOptions:a,maskInputFn:l}):n&&(M.checked=n)}"option"===k&&(e.selected&&!a.select?M.selected=!0:delete M.selected);if("canvas"===k&&y)if("2d"===e.__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=m in o?o[m]: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})(e)||(M.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(M.rr_dataURL=t)}if("img"===k&&p){I||(I=n.createElement("canvas"),S=I.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{I.width=t.naturalWidth,I.height=t.naturalHeight,S.drawImage(t,0,0),M.rr_dataURL=I.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?M.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===k||"video"===k){const t=M;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}_||(e.scrollLeft&&(M.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(M.rr_scrollTop=e.scrollTop));if(w){const{width:t,height:n}=e.getBoundingClientRect();M={class:M.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==k||v(M.src)||(e.contentDocument||(M.rr_src=M.src),delete M.src);let A;try{customElements.get(k)&&(A=!0)}catch(e){}return{type:i.Element,tagName:k,attributes:M,childNodes:[],isSVG:L(e)||void 0,needBlock:w,rootId:C,isCustom:A}}(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:l,maskInputOptions:u,maskInputFn:y,dataURLOptions:v,inlineImages:_,recordCanvas:C,keepIframeSrcFn:w,newlyAddedElement:k,rootId:M});case e.TEXT_NODE:return function(e,t){var n;const{needsMask:r,maskTextFn:o,rootId:s}=t,a=e.parentNode&&e.parentNode.tagName;let l=e.textContent;const u="STYLE"===a||void 0,d="SCRIPT"===a||void 0;if(u&&l){try{e.nextSibling||e.previousSibling||(null==(n=e.parentNode.sheet)?void 0:n.cssRules)&&(l=c(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}l=x(l,R(t.doc))}d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&r&&(l=o?o(l,e.parentElement):l.replace(/[\S]/g,"*"));return{type:i.Text,textContent:l||"",isStyle:u,rootId:s}}(e,{doc:n,needsMask:a,maskTextFn:p,rootId:M});case e.CDATA_SECTION_NODE:return{type:i.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:i.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function B(e){return null==e?"":e.toLowerCase()}function W(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:I=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:M=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=(()=>!1),newlyAddedElement:E=!1}=t;let{needsMask:N}=t,{preserveWhiteSpace:O=!0}=t;if(!N){N=P(e,u,d,void 0===N)}const L=Z(e,{doc:n,mirror:r,blockClass:o,blockSelector:c,needsMask:N,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:g,dataURLOptions:b,inlineImages:I,recordCanvas:S,keepIframeSrcFn:A,newlyAddedElement:E});if(!L)return console.warn(e,"not serialized"),null;let R;R=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===i.Comment)return!0;if(e.type===i.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"===y(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(B(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===B(e.attributes.name)||"icon"===B(e.attributes.rel)||"apple-touch-icon"===B(e.attributes.rel)||"shortcut icon"===B(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&B(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(B(e.attributes.property).match(/^(og|twitter|fb):/)||B(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===B(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===B(e.attributes.name)||"googlebot"===B(e.attributes.name)||"bingbot"===B(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===B(e.attributes.name)||"generator"===B(e.attributes.name)||"framework"===B(e.attributes.name)||"publisher"===B(e.attributes.name)||"progid"===B(e.attributes.name)||B(e.attributes.property).match(/^article:/)||B(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===B(e.attributes.name)||"yandex-verification"===B(e.attributes.name)||"csrf-token"===B(e.attributes.name)||"p:domain_verify"===B(e.attributes.name)||"verify-v1"===B(e.attributes.name)||"verification"===B(e.attributes.name)||"shopify-checkout-api-token"===B(e.attributes.name)))return!0}}return!1}(L,v)&&(O||L.type!==i.Text||L.isStyle||L.textContent.replace(/^\s+|\s+$/gm,"").length)?C():_;const D=Object.assign(L,{id:R});if(r.add(e,D),R===_)return null;w&&w(e);let F=!p;if(D.type===i.Element){F=F&&!D.needBlock,delete D.needBlock;const t=e.shadowRoot;t&&l(t)&&(D.isShadowHost=!0)}if((D.type===i.Document||D.type===i.Element)&&F){v.headWhitespace&&D.type===i.Element&&"head"===D.tagName&&(O=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:c,needsMask:N,maskTextClass:u,maskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:I,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:M,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A};if(D.type===i.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(const n of Array.from(e.childNodes)){const e=W(n,t);e&&D.childNodes.push(e)}if(s(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=W(n,t);r&&(l(e.shadowRoot)&&(r.isShadow=!0),D.childNodes.push(r))}}return e.parentNode&&a(e.parentNode)&&l(e.parentNode)&&(D.isShadow=!0),D.type===i.Element&&"iframe"===D.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)}(e,(()=>{const t=e.contentDocument;if(t&&k){const n=W(t,{doc:t,mirror:r,blockClass:o,blockSelector:c,needsMask:N,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:I,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:M,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A});n&&k(e,n)}}),M),D.type===i.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===y(D.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()}))}(e,(()=>{if(T){const t=W(e,{doc:n,mirror:r,blockClass:o,blockSelector:c,needsMask:N,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:I,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:M,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A});t&&T(e,t)}}),x),D}function G(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 q="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 V={map:{},getId:()=>(console.error(q),-1),getNode:()=>(console.error(q),null),removeNodeFromMap(){console.error(q)},has:()=>(console.error(q),!1),reset(){console.error(q)}};function Y(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 $(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)}}),()=>$(e,t,i||{},!0)}function j(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{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(V=new Proxy(V,{get:(e,t,n)=>("map"===t&&console.error(q),Reflect.get(e,t,n))}));let U=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.parentElement)?void 0:n.scrollLeft)||(null==(r=null==a?void 0:a.body)?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.parentElement)?void 0:i.scrollTop)||(null==(s=null==a?void 0:a.body)?void 0:s.scrollTop)||0}}function X(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function J(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function K(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function Q(e,t,n,r){if(!e)return!1;const o=K(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(H(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 ee(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===_}function te(e,t){if(a(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||te(e.parentNode,t))}function ne(e){return Boolean(e.changedTouches)}function re(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function oe(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ie(e){return Boolean(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(U=()=>(new Date).getTime());let se=class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(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 ae(e){var t,n;let r=null;return(null==(n=null==(t=e.getRootNode)?void 0:t.call(e))?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function le(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=ae(n);)n=t;return n}(e);return t.contains(n)}function ce(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||le(e))}var ue=(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))(ue||{}),de=(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))(de||{}),pe=(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))(pe||{}),he=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(he||{}),fe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(fe||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(me||{});function ge(e){return"__ln"in e}class ye{constructor(){n(this,"length",0),n(this,"head",null),n(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&&ge(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&&ge(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 ve=(e,t)=>`${e}@${t}`;class be{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),n(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new ye,r=e=>{let t=e,n=_;for(;n===_;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!ce(o)||"TEXTAREA"===o.parentNode.tagName)return;const i=a(o.parentNode)?this.mirror.getId(ae(o)):this.mirror.getId(o.parentNode),s=r(o);if(-1===i||-1===s)return n.addNode(o);const l=W(o,{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=>{re(e,this.mirror)&&this.iframeManager.addIframe(e),oe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ie(o)&&this.shadowDomManager.addShadowRoot(o.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:i,nextId:s,node:l}),t.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Ce(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)Ie(this.droppedSet,e)||Ce(this.removes,e,this.mirror)?Ie(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(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(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const s={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};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))})),n(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("")})),n(this,"processMutation",(e=>{if(!ee(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=e.target.textContent;Q(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:P(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,K(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=g(t);r=h({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:r,maskInputFn:this.maskInputFn})}if(Q(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"),!F(t.tagName,n)&&(o.attributes[n]=D(this.doc,f(t.tagName),f(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(Q(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 n=this.mirror.getId(t),r=a(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,!1)||ee(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(_e(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||te(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ve(n,r)]?_e(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!a(e.target)||!l(e.target))||void 0})),this.mapRemoves.push(t))}))}})),n(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ee(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[ve(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),ie(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 _e(e,t){e.delete(t),t.childNodes.forEach((t=>_e(e,t)))}function Ce(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}(e,t,n)}function Ie(e,t){return 0!==e.size&&Se(e,t)}function Se(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Se(e,n))}let we;const ke=e=>{if(!we)return e;return function(){try{return e(...arguments)}catch(e){if(we&&!0===we(e))return;throw e}}},Me=[];function Te(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{}return e&&e.target}function xe(e,t){var n,r;const o=new be;Me.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=null==(r=null==(n=null==window?void 0:window.Zone)?void 0:n.__symbol__)?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);const a=new i(ke(o.processMutations.bind(o)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Ae(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,l=[];let c=null;return Object.keys(pe).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((e=>{let s=f(e);const a=(e=>n=>{const s=Te(n);if(Q(s,o,i,!0))return;let a=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=he.Mouse;break;case"touch":a=he.Touch;break;case"pen":a=he.Pen}a===he.Touch?pe[e]===pe.MouseDown?l="TouchStart":pe[e]===pe.MouseUp&&(l="TouchEnd"):he.Pen}else ne(n)&&(a=he.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===he.Touch||l.startsWith("Mouse")&&a===he.Mouse)&&(a=null)):pe[e]===pe.Click&&(a=c,c=null);const u=ne(n)?n.changedTouches[0]:n;if(!u)return;const d=r.getId(s),{clientX:p,clientY:h}=u;ke(t)({type:pe[l],id:d,x:p,y:h,...null!==a&&{pointerType:a}})})(e);if(window.PointerEvent)switch(pe[e]){case pe.MouseDown:case pe.MouseUp:s=s.replace("mouse","pointer");break;case pe.TouchStart:case pe.TouchEnd:return}l.push(G(s,a,n))})),ke((()=>{l.forEach((e=>e()))}))}function Ee(e){let{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:s}=e;return G("scroll",ke(Y(ke((e=>{const s=Te(e);if(!s||Q(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 Ne=["INPUT","TEXTAREA","SELECT"],Oe=new WeakMap;function Le(e){return function(e,t){if(He("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||He("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||He("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||He("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 Re(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function De(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.Document:null==(s=null==(i=t.ownerDocument)?void 0:i.defaultView)?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.call(this)},set(e){var t;const n=null==(t=c.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{r.adoptStyleSheets(e,a)}catch(e){}return n}}),ke((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function Fe(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=xe(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=Y(ke((e=>{const n=Date.now()-a;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],a=null})),s),u=ke(Y(ke((e=>{const t=Te(e),{clientX:n,clientY:r}=ne(e)?e.changedTouches[0]:e;a||(a=U()),l.push({x:n,y:r,id:o.getId(t),timeOffset:U()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?de.Drag:e instanceof MouseEvent?de.MouseMove:de.TouchMove)})),i,{trailing:!1})),d=[G("mousemove",u,r),G("touchmove",u,r),G("drag",u,r)];return ke((()=>{d.forEach((e=>e()))}))}(e),i=Ae(e),s=Ee(e),a=function(e,t){let{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return G("resize",ke(Y(ke((()=>{const e=X(),t=J();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}(e,{win:n}),l=function(e){let{inputCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d}=e;function p(e){let t=Te(e);const r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=t.parentElement),!t||!u||Ne.indexOf(u)<0||Q(t,o,i,!0))return;if(t.classList.contains(s)||a&&t.matches(a))return;let p=t.value,m=!1;const y=g(t)||"";"radio"===y||"checkbox"===y?m=t.checked:(l[u.toLowerCase()]||l[y])&&(p=h({element:t,maskInputOptions:l,tagName:u,type:y,value:p,maskInputFn:c})),f(t,d?{text:p,isChecked:m,userTriggered:r}:{text:p,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;f(e,d?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}}))}function f(e,n){const o=Oe.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Oe.set(e,n);const o=r.getId(e);ke(t)({...n,id:o})}}const m=("last"===u.input?["change"]:["input","change"]).map((e=>G(e,ke(p),n))),y=n.defaultView;if(!y)return()=>{m.forEach((e=>e()))};const v=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),b=[[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(...b.map((e=>$(e[0],e[1],{set(){ke(p)({target:this,isTrusted:!1})}},!1,y)))),ke((()=>{m.forEach((e=>e()))}))}(e),c=function(e){let{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:s}=e;const a=ke((e=>Y(ke((i=>{const s=Te(i);if(!s||Q(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=[G("play",a(me.Play),s),G("pause",a(me.Pause),s),G("seeked",a(me.Seeked),s),G("volumechange",a(me.VolumeChange),s),G("ratechange",a(me.RateChange),s)];return ke((()=>{l.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(u=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:ke(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=Re(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:ke(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Re(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:ke(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Re(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:ke(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Re(t,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replaceSync:s}),e.apply(t,i)}))}));const u={};Pe("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(Pe("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),Pe("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),Pe("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:ke(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=Re(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:[...Le(t),a||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:ke(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=Re(t.parentStyleSheet,r,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:[...Le(t),s]}]}),e.apply(t,i)}))})})),ke((()=>{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}),d=De(e,e.doc),p=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:ke(((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}=Re(null==(l=t.parentRule)?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:Le(t.parentRule)}),e.apply(t,s)}))});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ke(((e,t,s)=>{var a;const[c]=s;if(o.has(c))return l.apply(t,[c]);const{id:u,styleId:d}=Re(null==(a=t.parentRule)?void 0:a.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:Le(t.parentRule)}),e.apply(t,s)}))}),ke((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n}),e.collectFonts&&(f=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=j(n.fonts,"add",(function(e){return function(n){return setTimeout(ke((()=>{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),ke((()=>{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=ke((()=>{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;Q(s,r,o,!0)||Q(c,r,o,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:a})}));return a(),G("selectionchange",a)}(e),y=function(e){let{doc:t,customElementCb:n}=e;const r=t.defaultView;return r&&r.customElements?j(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 ke((()=>{Me.forEach((e=>e.reset())),null==r||r.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),p(),f(),m(),y(),v.forEach((e=>e()))}))}function He(e){return void 0!==window[e]}function Pe(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ze{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}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 Be{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new Ze(C)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ze(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,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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 ue.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:ue.IncrementalSnapshot,data:{source:de.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ue.Meta:case ue.Load:case ue.DomContentLoaded:return!1;case ue.Plugin:return t;case ue.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ue.IncrementalSnapshot:switch(t.data.source){case de.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 de.Drag:case de.TouchMove:case de.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case de.ViewportResize:return!1;case de.MediaInteraction:case de.MouseInteraction:case de.Scroll:case de.CanvasMutation:case de.Input:return this.replaceIds(t.data,e,["id"]),t;case de.StyleSheetRule:case de.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case de.Font:return t;case de.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case de.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||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(e,t){e.type===i.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class We{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(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(!l(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=xe({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Ee({...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(De({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(j(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&ce(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qe="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ve=0;Ve<64;Ve++)qe[Ge.charCodeAt(Ve)]=Ve;const Ye=new Map;const $e=(e,t,n)=>{if(!e||!ze(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Ye.get(e);return n||(n=new Map,Ye.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 je(e,t,n){if(e instanceof Array)return e.map((e=>je(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=Ge[n[t]>>2],o+=Ge[(3&n[t])<<4|n[t+1]>>4],o+=Ge[(15&n[t+1])<<2|n[t+2]>>6],o+=Ge[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)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[je(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:[je(e.data,t,n),e.width,e.height]}}if(ze(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:$e(e,t,n)}}return e}const Ue=(e,t,n)=>e.map((e=>je(e,t,n))),ze=(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 Xe(e,t,n,r){const o=[];try{const i=j(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(!Q(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{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Je(e,t,n,r,o,i){const s=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=j(e,l,(function(e){return function(){for(var s=arguments.length,a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];const u=e.apply(this,a);if($e(u,i,this),"tagName"in this.canvas&&!Q(this.canvas,r,o,!0)){const e=Ue(a,i,this),r={type:t,property:l,args:e};n(this.canvas,r)}return u}}));s.push(a)}catch{const r=$(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});s.push(r)}return s}const Ke="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Qe="undefined"!=typeof window&&window.Blob&&new Blob([(et=Ke,Uint8Array.from(atob(et),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var et;function tt(e){let t;try{if(t=Qe&&(window.URL||window.webkitURL).createObjectURL(Qe),!t)throw"";const n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(t){return new Worker("data:text/javascript;base64,"+Ke,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class nt{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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:r,blockClass:o,blockSelector:i,recordCanvas:s,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(r,o,i),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,o,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Xe(t,n,r,!0),s=new Map,a=new tt;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:fe["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=>{Q(t,n,r,!0)||e.push(t)})),t.querySelectorAll("*").forEach((e=>{e.shadowRoot&&o(e.shadowRoot)}))};return o(t.document),e})().forEach((async e=>{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.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const r=e.clientWidth||e.width,i=e.clientHeight||e.height,l=await 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=Xe(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=j(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 Q(this.canvas,n,r,!0)||setTimeout((()=>{const n=Ue(a,t,this);e(this.canvas,{type:fe["2D"],property:s,args:n})}),0),o.apply(this,a)}}));o.push(i)}catch{const n=$(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:fe["2D"],property:s,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){const o=[];return o.push(...Je(t.WebGLRenderingContext.prototype,fe.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Je(t.WebGL2RenderingContext.prototype,fe.WebGL2,e,n,r,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);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{type:t,...n}=e;return n})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class rt{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new se),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:u(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 ot{constructor(){n(this,"nodeMap",new WeakMap),n(this,"active",!1)}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let it,st,at,lt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){console.debug("Unable to override Array.from",e)}const ct=new p;function ut(){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:s="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:h,slimDOMOptions:f,maskInputFn:m,maskTextFn:g,hooks:y,packFn:v,sampling:b={},dataURLOptions:_={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:S=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:T=!1,inlineImages:x=!1,plugins:A,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:N=new Set([]),errorHandler:O}=e;we=O;const L=!w||window.parent===window;let R=!1;if(!L)try{window.parent.document&&(R=!1)}catch(e){R=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!R)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),ct.reset();const D=!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}:void 0!==h?h:{password:!0},F=!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,headTitleMutations:"all"===f}:f||{};let H;!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 Z=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return v&&!R&&(e=v(e)),e};it=(e,o)=>{var i;const s=e;if(s.timestamp=U(),!(null==(i=Me[0])?void 0:i.isFrozen())||s.type===ue.FullSnapshot||s.type===ue.IncrementalSnapshot&&s.data.source===de.Mutation||Me.forEach((e=>e.unfreeze())),L)null==t||t(Z(s),o);else if(R){const e={type:"rrweb",event:Z(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===ue.FullSnapshot)H=s,P=0;else if(s.type===ue.IncrementalSnapshot){if(s.data.source===de.Mutation&&s.data.isAttachIframe)return;P++;const e=r&&P>=r,t=n&&s.timestamp-H.timestamp>n;(e||t)&&st(!0)}};const B=e=>{it({type:ue.IncrementalSnapshot,data:{source:de.Mutation,...e}})},q=e=>it({type:ue.IncrementalSnapshot,data:{source:de.Scroll,...e}}),V=e=>it({type:ue.IncrementalSnapshot,data:{source:de.CanvasMutation,...e}}),Y=new rt({mutationCb:B,adoptedStyleSheetCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.AdoptedStyleSheet,...e}})}),$=new Be({mirror:ct,mutationCb:B,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:it});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:ct,crossOriginIframeMirror:$.crossOriginIframeMirror,crossOriginIframeStyleMirror:$.crossOriginIframeStyleMirror});const j=new ot;at=new nt({recordCanvas:S,mutationCb:V,win:window,blockClass:o,blockSelector:i,mirror:ct,sampling:b.canvas,dataURLOptions:_});const K=new We({mutationCb:B,scrollCb:q,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:D,dataURLOptions:_,maskTextFn:g,maskInputFn:m,recordCanvas:S,inlineImages:x,sampling:b,slimDOMOptions:F,iframeManager:$,stylesheetManager:Y,canvasManager:at,keepIframeSrcFn:E,processedNodeManager:j},mirror:ct});st=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!I)return;it({type:ue.Meta,data:{href:window.location.href,width:J(),height:X()}},e),Y.reset(),K.init(),Me.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new p,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:_,stylesheetLoadTimeout:C,keepIframeSrcFn:I=(()=>!1)}=t||{};return W(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,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:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:g,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:_,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:ct,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:D,maskTextFn:g,maskInputFn:m,slimDOM:F,dataURLOptions:_,recordCanvas:S,inlineImages:x,onSerialize:e=>{re(e,ct)&&$.addIframe(e),oe(e,ct)&&Y.trackLinkElement(e),ie(e)&&K.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{$.attachIframe(e,t),K.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!t)return console.warn("Failed to snapshot the document");it({type:ue.FullSnapshot,data:{node:t,initialOffset:z(window)}},e),Me.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,ct.getId(document))};try{const e=[],t=e=>{var t;return ke(Fe)({mutationCb:B,mousemoveCb:(e,t)=>it({type:ue.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.MouseInteraction,...e}}),scrollCb:q,viewportResizeCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.ViewportResize,...e}}),inputCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.Input,...e}}),mediaInteractionCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.MediaInteraction,...e}}),styleSheetRuleCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.StyleSheetRule,...e}}),styleDeclarationCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.StyleDeclaration,...e}}),canvasMutationCb:V,fontCb:e=>it({type:ue.IncrementalSnapshot,data:{source:de.Font,...e}}),selectionCb:e=>{it({type:ue.IncrementalSnapshot,data:{source:de.Selection,...e}})},customElementCb:e=>{it({type:ue.IncrementalSnapshot,data:{source:de.CustomElement,...e}})},blockClass:o,ignoreClass:s,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:u,sampling:b,recordDOM:I,recordCanvas:S,inlineImages:x,userTriggeredOnInput:M,collectFonts:T,doc:e,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:F,dataURLOptions:_,mirror:ct,iframeManager:$,stylesheetManager:Y,shadowDomManager:K,processedNodeManager:j,canvasManager:at,ignoreCSSAttributes:N,plugins:(null==(t=null==A?void 0:A.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>it({type:ue.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},y)};$.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{st(),e.push(t(document)),lt=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(G("DOMContentLoaded",(()=>{it({type:ue.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&n()}))),e.push(G("load",(()=>{it({type:ue.Load,data:{}}),"load"===k&&n()}),window))),()=>{e.forEach((e=>e())),j.destroy(),lt=!1,we=void 0}}catch(e){console.warn(e)}}var dt,pt;ut.addCustomEvent=(e,t)=>{if(!lt)throw new Error("please add custom event after start recording");it({type:ue.Custom,data:{tag:e,payload:t}})},ut.freezePage=()=>{Me.forEach((e=>e.freeze()))},ut.takeFullSnapshot=e=>{if(!lt)throw new Error("please take full snapshot after start recording");st(e)},ut.mirror=ct,(pt=dt||(dt={}))[pt.NotStarted=0]="NotStarted",pt[pt.Running=1]="Running",pt[pt.Stopped=2]="Stopped";const ht="2.0.0-alpha.16";var ft,mt=Object.defineProperty,gt=(e,t,n)=>(((e,t,n)=>{t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),yt=Object.defineProperty,vt=(e,t,n)=>(((e,t,n)=>{t in e?yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),bt=Object.defineProperty,_t=(e,t,n)=>(((e,t,n)=>{t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Ct{constructor(){_t(this,"idNodeMap",new Map),_t(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const n=null==(t=this.getMeta(e))?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 It(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&It(e.parentNode,t,n);for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!!n&&It(e.parentNode,t,n)}const St="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 wt={map:{},getId:()=>(console.error(St),-1),getNode:()=>(console.error(St),null),removeNodeFromMap(){console.error(St)},has:()=>(console.error(St),!1),reset(){console.error(St)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(wt=new Proxy(wt,{get:(e,t,n)=>("map"===t&&console.error(St),Reflect.get(e,t,n))}));let kt=Date.now;function Mt(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}/[1-9][0-9]{12}/.test(Date.now().toString())||(kt=()=>(new Date).getTime());function Tt(e){var t,n;let r=null;return(null==(n=null==(t=e.getRootNode)?void 0:t.call(e))?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function xt(e){let t,n=e;for(;t=Tt(n);)n=t;return n}function At(e){const t=e.ownerDocument;if(!t)return!1;const n=xt(e);return t.contains(n)}const Et=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){vt(this,"id",1),vt(this,"styleIDMap",new WeakMap),vt(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++}},get _mirror(){return wt},closestElementOfNode:Mt,getBaseDimension:function e(t,n){var r,o;const i=null==(o=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=i.getBoundingClientRect(),a=e(i,n),l=s.height/i.clientHeight;return{x:s.x*a.relativeScale+a.x,y:s.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,n){const r=t[n[0]];return 1===n.length?r:e(r.cssRules[n[1]].cssRules,n.slice(2))},getPositionsAndIndex:function(e){const t=[...e],n=t.pop();return{positions:t,index:n}},getRootShadowHost:xt,getShadowHost:Tt,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(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.parentElement)?void 0:n.scrollLeft)||(null==(r=null==a?void 0:a.body)?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.parentElement)?void 0:i.scrollTop)||(null==(s=null==a?void 0:a.body)?void 0:s.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return Boolean(null==e?void 0:e.shadowRoot)},hookSetter:function e(t,n,r,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const s=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>e(t,n,s||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||At(e))},isAncestorRemoved:function e(t,n){if(function(e){const t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}(t))return!1;const r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))},isBlocked:function(e,t,n,r){if(!e)return!1;const o=Mt(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(It(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},isIgnored:function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,n){n(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],n)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return kt},on:function(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)},patch:function(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{return()=>{}}},polyfill: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})},queueToResolveTrees:function(e){const t={},n=(e,n)=>{const r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];for(const o of e){const{nextId:e,parentId:i}=o;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,n(o,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,n(o,null))}}else if(i in t){const e=t[i];e.children.push(n(o,e))}else r.push(n(o,null))}return r},shadowHostInDom:At,throttle:function(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))}},uniqueTextMutations:function(e){const t=new Set,n=[];for(let r=e.length;r--;){const o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}},Symbol.toStringTag,{value:"Module"}));for(var Nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Lt=0;Lt<64;Lt++)Ot[Nt.charCodeAt(Lt)]=Lt;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpCiAgICAgICAgcmV0dXJuIHRyYW5zcGFyZW50QmxvYk1hcC5nZXQoaWQpOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIHRyYW5zcGFyZW50QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgIHJldHVybiBiYXNlNjQ7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gIiI7CiAgICB9CiAgfQogIGNvbnN0IHdvcmtlciA9IHNlbGY7CiAgd29ya2VyLm9ubWVzc2FnZSA9IGFzeW5jIGZ1bmN0aW9uKGUpIHsKICAgIGlmICgiT2Zmc2NyZWVuQ2FudmFzIiBpbiBnbG9iYWxUaGlzKSB7CiAgICAgIGNvbnN0IHsgaWQsIGJpdG1hcCwgd2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMgfSA9IGUuZGF0YTsKICAgICAgY29uc3QgdHJhbnNwYXJlbnRCYXNlNjQgPSBnZXRUcmFuc3BhcmVudEJsb2JGb3IoCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGRhdGFVUkxPcHRpb25zCiAgICAgICk7CiAgICAgIGNvbnN0IG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7CiAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCIyZCIpOwogICAgICBjdHguZHJhd0ltYWdlKGJpdG1hcCwgMCwgMCk7CiAgICAgIGJpdG1hcC5jbG9zZSgpOwogICAgICBjb25zdCBibG9iID0gYXdhaXQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOwogICAgICBjb25zdCB0eXBlID0gYmxvYi50eXBlOwogICAgICBjb25zdCBhcnJheUJ1ZmZlciA9IGF3YWl0IGJsb2IuYXJyYXlCdWZmZXIoKTsKICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsKICAgICAgaWYgKCFsYXN0QmxvYk1hcC5oYXMoaWQpICYmIGF3YWl0IHRyYW5zcGFyZW50QmFzZTY0ID09PSBiYXNlNjQpIHsKICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpCiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UoewogICAgICAgIGlkLAogICAgICAgIHR5cGUsCiAgICAgICAgYmFzZTY0LAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodAogICAgICB9KTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkOiBlLmRhdGEuaWQgfSk7CiAgICB9CiAgfTsKfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1CWjFyN1JKRC5qcy5tYXAK")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(ft=e.contentWindow)?void 0:ft.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Rt;new Ct,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Rt||(Rt={}));class Dt{constructor(e){gt(this,"fileName"),gt(this,"functionName"),gt(this,"lineNumber"),gt(this,"columnNumber"),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 Ft=/(^|@)\S+:\d+/,Ht=/^\s*at .*(\S+:\d+|\(native\))/m,Pt=/^(eval@)?(\[native code])?$/,Zt={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ht)?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(Ht)}),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 Dt({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(Pt)}),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 Dt({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Dt({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 Dt({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 Dt({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(Ft)&&!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 Dt({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function Bt(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 Wt(e){return"[object Object]"===Object.prototype.toString.call(e)}function Gt(e,t){if(0===t)return!0;const n=Object.keys(e);for(const r of n)if(Wt(e[r])&&Gt(e[r],t-1))return!0;return!1}function qt(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(Wt(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wt(e)&&Gt(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]=Bt(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 Vt={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 Yt(e,t,n){const r=n?Object.assign({},Vt,n):Vt,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=Zt.parse(o).map((e=>e.toString())),s=[qt(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=[qt(`Uncaught (in promise) ${n.name}: ${n.message}`,r.stringifyOptions)]):(n=new Error,o=[qt("Uncaught (in promise)",r.stringifyOptions),qt(t.reason,r.stringifyOptions)]);const i=Zt.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]?Et.patch(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=Zt.parse(new Error).map((e=>e.toString())).splice(1),o=l.map((e=>qt(e,r.stringifyOptions)));s++,s<r.lengthThreshold?e({level:n,trace:t,payload:o}):s===r.lengthThreshold&&e({level:"warn",trace:[],payload:[qt("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:Yt,options:e}),jt=Array.isArray,Ut=Object.prototype,zt=Ut.hasOwnProperty,Xt=Ut.toString,Jt=jt||function(e){return"[object Array]"===Xt.call(e)},Kt=function(e){return"function"==typeof e},Qt=function(e){return e===Object(e)&&!Jt(e)},en=function(e){return void 0===e},tn=function(e){return"[object String]"==Xt.call(e)},nn=function(e){return tn(e)&&0===e.trim().length},rn=function(e){return null===e},on=function(e){return en(e)||rn(e)},sn=function(e){return"[object Number]"==Xt.call(e)},an=function(e){return"[object Boolean]"===Xt.call(e)},ln=e=>e instanceof Document,cn=e=>e instanceof FormData,un="undefined"!=typeof window?window:void 0,dn="undefined"!=typeof globalThis?globalThis:un,pn=Array.prototype.forEach,hn=null==dn?void 0:dn.navigator,fn=null==dn?void 0:dn.document;null==dn||dn.location,null==dn||dn.fetch,null!=dn&&dn.XMLHttpRequest&&"withCredentials"in new dn.XMLHttpRequest&&dn.XMLHttpRequest,null==dn||dn.AbortController,null==hn||hn.userAgent;const mn=null!=un?un:{},gn="[PostHog.js]",yn={_log:function(e){if(un&&mn.POSTHOG_DEBUG&&!en(un.console)&&un.console){const o="__rrweb_original__"in un.console[e]?un.console[e].__rrweb_original__:un.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(gn,...n)}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];yn._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];yn._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];yn._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(gn,...t)},uninitializedWarning:e=>{yn.error(`You must initialize PostHog before calling ${e}`)}},vn={},bn=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function _n(e,t,n){if(Jt(e))if(pn&&e.forEach===pn)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)===vn)return}function Cn(e,t,n){if(!on(e)){if(Jt(e))return _n(e,t,n);if(cn(e)){for(const r of e.entries())if(t.call(n,r[1],r[0])===vn)return}else for(const r in e)if(zt.call(e,r)&&t.call(n,e[r],r)===vn)return}}const In=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return _n(n,(function(t){for(const n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Sn(e,t){return-1!==e.indexOf(t)}function wn(e){const t=Object.keys(e);let n=t.length;const r=new Array(n);for(;n--;)r[n]=[t[n],e[t[n]]];return r}const kn=function(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";const o=[];return Cn(e,(function(e,r){en(e)||en(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)},Mn="__POSTHOG_TOOLBAR__";function Tn(e){return!!e&&1===e.nodeType}function xn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function An(e){return e?bn(e).split(/\s+/):[]}function En(e){let t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return An(t)}function Nn(e){let t="";return Ln(e)&&!Rn(e)&&e.childNodes&&e.childNodes.length&&Cn(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return on(e)?null:bn(e).split(/(\s+)/).filter((e=>Wn(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),bn(t)}const On=["a","button","form","input","select","textarea","label"];function Ln(e){for(let t=e;t.parentNode&&!xn(t,"body");t=t.parentNode){const e=En(t);if(Sn(e,"ph-sensitive")||Sn(e,"ph-no-capture"))return!1}if(Sn(En(e),"ph-include"))return!0;const t=e.type||"";if(tn(t))switch(t.toLowerCase()){case"hidden":case"password":return!1}const n=e.name||e.id||"";if(tn(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Rn(e){return!!(xn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||xn(e,"select")||xn(e,"textarea")||"true"===e.getAttribute("contenteditable"))}const Dn="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Fn=new RegExp(`^(?:${Dn})$`),Hn=new RegExp(Dn),Pn="\\d{3}-?\\d{2}-?\\d{4}",Zn=new RegExp(`^(${Pn})$`),Bn=new RegExp(`(${Pn})`);function Wn(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(on(e))return!1;if(tn(e)){e=bn(e);if((t?Fn:Hn).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Zn:Bn).test(e))return!1}return!0}function Gn(e){let t=Nn(e);return t=`${t} ${qn(e)}`.trim(),Wn(t)?t:""}function qn(e){let t="";return e&&e.childNodes&&e.childNodes.length&&Cn(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{const n=Nn(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${qn(e)}`.trim())}catch(e){yn.error(e)}})),t}function Vn(e){return function(e){const t=e.map((e=>{var t,n;let r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();for(const t of e.attr_class)r+=`.${t.replace(/"/g,"")}`}const o={...e.text?{text:e.text}:{},"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0,...e.href?{href:e.href}:{},...e.attr_id?{attr_id:e.attr_id}:{},...e.attributes},i={};return wn(o).sort(((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{let[t,n]=e;return i[Yn(t.toString())]=Yn(n.toString())})),r+=":",r+=wn(o).map((e=>{let[t,n]=e;return`${t}="${n}"`})).join(""),r}));return t.join(";")}(function(e){return e.map((e=>{var t,n;const r={text:null===(t=e.$el_text)||void 0===t?void 0:t.slice(0,400),tag_name:e.tag_name,href:null===(n=e.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:$n(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return wn(e).filter((e=>{let[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{let[t,n]=e;return r.attributes[t]=n})),r}))}(e))}function Yn(e){return e.replace(/"|\\"/g,'\\"')}function $n(e){const t=e.attr__class;return t?Jt(t)?t:An(t):void 0}const jn={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 Un(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return Kt(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function zn(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 Xn=e=>"navigation"===e.entryType,Jn=e=>"resource"===e.entryType;function Kn(e,t,n){if(n.recordInitialRequests){const r=t.performance.getEntries().filter((e=>Xn(e)||Jn(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>or({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=>Xn(e)||Jn(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>or({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 Qn(e,t){return!!t&&(an(t)||t[e])}function er(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(an(n))return!0;if(Jt(n))return o(n);const i=n[t];return an(i)?i:o(i)}async function tr(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return yn.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=>Jn(e)&&e.initiatorType===t&&(en(r)||e.startTime>=r)&&(en(o)||e.startTime<=o)));return s||(await new Promise((e=>setTimeout(e,50*i))),tr(e,t,n,r,o,i+1))}function nr(e){let{body:t,options:n,url:r}=e;if(on(t))return null;const{hostname:o,isHostDenied:i}=zn(r,n);if(i)return o+" is in deny list";if(tn(t))return t;if(ln(t))return t.textContent;if(cn(t))return kn(t);if(Qt(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 rr=e=>!rn(e)&&("navigation"===e.entryType||"resource"===e.entryType);function or(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:en(s)?void 0:Math.round(s),endTime:en(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(rr(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 ir=["video/","audio/"];function sr(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 ar(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=ir.some((e=>null==i?void 0:i.startsWith(e)));if(i&&s)return`Content-Type ${i} is not supported`;const{hostname:a,isHostDenied:l}=zn(o,r);return l?a+" is in deny list":null}({r:t,options:n,url:r});return rn(o)?sr(t):Promise.resolve(o)}function lr(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};const r=Qn("request",n.recordHeaders),o=Qn("response",n.recordHeaders),i=Un(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),er({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}=zn(r,n);return i?Promise.resolve(o+" is in deny list"):sr(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),er({type:"response",headers:a,url:s,recordBody:n.recordBody})&&(u.responseBody=await ar({r:c,options:n,url:s})),c}finally{tr(t,"fetch",l.url,d,p).then((t=>{var n;const r=or({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 cr=null;function ur(e,t,n){if(!("performance"in t))return()=>{};if(cr)return yn.warn("Network observer already initialised, doing nothing"),()=>{};const r=n?Object.assign({},jn,n):jn,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=Kn(o,t,r);let s=()=>{},a=()=>{};return(r.recordHeaders||r.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};const r=Qn("request",n.recordHeaders),o=Qn("response",n.recordHeaders),i=Un(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,m;const g={},y=d.setRequestHeader.bind(d);d.setRequestHeader=(e,t)=>(g[e]=t,y(e,t)),r&&(h.requestHeaders=g);const v=d.send.bind(d);d.send=e=>(er({type:"request",headers:g,url:a,recordBody:n.recordBody})&&(h.requestBody=nr({body:e,options:n,url:a})),f=t.performance.now(),v(e)),d.addEventListener("readystatechange",(()=>{if(d.readyState!==d.DONE)return;m=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),er({type:"response",headers:r,url:a,recordBody:n.recordBody})&&(h.responseBody=nr({body:d.response,options:n,url:a})),tr(t,"xmlhttprequest",p.url,f,m).then((t=>{const n=or({entry:t,method:p.method,status:null==d?void 0:d.status,networkRequest:h,start:f,end:m,url:a.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))})),i.call(d,s,a,l,c,u)}));return()=>{i()}}(o,t,r),a=lr(o,t,r)),cr=()=>{i(),s(),a()},cr}const dr=e=>({name:"rrweb/network@1",observer:ur,options:e});let pr,hr,fr;mn.__PosthogExtensions__=mn.__PosthogExtensions__||{},mn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:$t,getRecordNetworkPlugin:dr},mn.__PosthogExtensions__.rrweb={record:ut,version:"v2",rrwebVersion:ht},mn.rrweb={record:ut,version:"v2",rrwebVersion:ht},mn.rrwebConsoleRecord={getRecordConsolePlugin:$t},mn.getRecordNetworkPlugin=dr,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(pr||(pr={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(hr||(hr={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(fr||(fr={}));var mr,gr,yr,vr,br,_r,Cr,Ir,Sr={},wr=[],kr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mr=Array.isArray;function Tr(e,t){for(var n in t)e[n]=t[n];return e}function xr(e){var t=e.parentNode;t&&t.removeChild(e)}function Ar(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?mr.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 Er(e,s,r,o,null)}function Er(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?++yr:o,__i:-1,__u:0};return null==o&&null!=gr.vnode&&gr.vnode(i),i}function Nr(e){return e.children}function Or(e,t){this.props=e,this.context=t}function Lr(e,t){if(null==t)return e.__?Lr(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?Lr(e):null}function Rr(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 Rr(e)}}function Dr(e){(!e.__d&&(e.__d=!0)&&vr.push(e)&&!Fr.__r++||br!==gr.debounceRendering)&&((br=gr.debounceRendering)||_r)(Fr)}function Fr(){var e,t,n,r,o,i,s,a,l;for(vr.sort(Cr);e=vr.shift();)e.__d&&(t=vr.length,r=void 0,i=(o=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((r=Tr({},o)).__v=o.__v+1,gr.vnode&&gr.vnode(r),Vr(s,r,o,n.__n,void 0!==s.ownerSVGElement,32&o.__u?[i]:null,a,null==i?Lr(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,Yr(a,r,l),r.__e!=i&&Rr(r)),vr.length>t&&vr.sort(Cr));Fr.__r=0}function Hr(e,t,n,r,o,i,s,a,l,c,u){var d,p,h,f,m,g=r&&r.__k||wr,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?Er(null,o,null,null,o):Mr(o)?Er(Nr,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Er(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=Zr(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=Lr(i)),jr(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=Lr(i)),jr(i,i))}(n,t,g),l=n.__d,d=0;d<y;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?Sr:g[h.__i]||Sr,h.__i=d,Vr(e,h,p,o,i,s,a,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&$r(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?l=Pr(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=m}function Pr(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=Pr(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Zr(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 Br(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||kr.test(t)?n:n+"px"}function Wr(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||Br(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Br(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?qr:Gr,i)):e.removeEventListener(t,i?qr:Gr,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 Gr(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(gr.event?gr.event(e):e)}function qr(e){return this.l[e.type+!0](gr.event?gr.event(e):e)}function Vr(e,t,n,r,o,i,s,a,l,c){var u,d,p,h,f,m,g,y,v,b,_,C,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=gr.__b)&&u(t);e:if("function"==typeof k)try{if(y=t.props,v=(u=k.contextType)&&r[u.__c],b=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,b):(t.__c=d=new Or(y,b),d.constructor=k,d.render=Ur),v&&v.sub(d),d.props=y,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=Tr({},d.__s)),Tr(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,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||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)})),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,f,m)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,C=gr.__r,I=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(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,C&&C(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=Tr(Tr({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),Hr(e,Mr(w=null!=u&&u.type===Nr&&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),g&&(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),gr.__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,m,g=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)g===y||a&&e.data===y||(e.data=y);else{if(i=i&&mr.call(e.childNodes),g=n.props||Sr,!a&&null!=i)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)h=g[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in y||Wr(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?m=h:"key"===c||a&&"function"!=typeof h||g[c]===h||Wr(e,c,h,g[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=""),Hr(e,Mr(p)?p:[p],t,n,r,o&&"foreignObject"!==v,i,s,i?i[0]:n.__k&&Lr(n,0),a,l),null!=i)for(c=i.length;c--;)null!=i[c]&&xr(i[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==g[c])&&Wr(e,c,f,g[c],!1),c="checked",void 0!==m&&m!==e[c]&&Wr(e,c,m,g[c],!1))}return e}(n.__e,t,n,r,o,i,s,l,c);(u=gr.diffed)&&u(t)}function Yr(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)$r(n[r],n[++r],n[++r]);gr.__c&&gr.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){gr.__e(e,t.__v)}}))}function $r(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){gr.__e(e,n)}}function jr(e,t,n){var r,o;if(gr.unmount&&gr.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$r(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){gr.__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]&&jr(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||xr(e.__e),e.__=e.__e=e.__d=void 0}function Ur(e,t,n){return this.constructor(e,n)}function zr(e,t,n){var r,o,i,s;gr.__&&gr.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],s=[],Vr(t,e=(!r&&n||t).__k=Ar(Nr,null,[e]),o||Sr,Sr,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?mr.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Yr(i,e,s)}function Xr(e,t,n){var r,o,i,s,a=Tr({},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?mr.call(arguments,2):n),Er(e.type,a,r||e.key,o||e.ref,null)}mr=wr.slice,gr={__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}},yr=0,Or.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Tr({},this.state),"function"==typeof e&&(e=e(Tr({},n),this.props)),e&&Tr(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Dr(this))},Or.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Dr(this))},Or.prototype.render=Nr,vr=[],_r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Cr=function(e,t){return e.__v.__b-t.__v.__b},Fr.__r=0,Ir=0;const Jr=un,Kr=fn,Qr="seenSurvey_",eo=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: ${no((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 to(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 no(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oo;"#"===t[0]&&(e=to(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=to(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 ro={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"},oo="#eeeded",io=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(po(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:{[ho(n,"responded")]:!0}}),Jr.dispatchEvent(new Event("PHSurveySent")))},so=(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:{[ho(e,"dismissed")]:!0}}),localStorage.setItem(po(e),"true"),Jr.dispatchEvent(new Event("PHSurveyClosed")))},ao=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),lo=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,co=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?lo(e.questions,ao(e.questions)):e.questions),uo=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))},po=e=>{let t=`${Qr}${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`${Qr}${e.id}_${e.current_iteration}`),t},ho=(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},fo=function(e,t){var n={__c:t="__cC"+Ir++,__: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,Dr(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}),mo=e=>{let{component:t,children:n,renderAsHtml:r,style:o}=e;return Xr(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},go=fn;var yo,vo,bo,_o,Co=0,Io=[],So=[],wo=gr.__b,ko=gr.__r,Mo=gr.diffed,To=gr.__c,xo=gr.unmount;function Ao(e,t){gr.__h&&gr.__h(vo,e,Co||t),Co=0;var n=vo.__H||(vo.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:So}),n.__[e]}function Eo(e){return Co=1,function(e,t,n){var r=Ao(yo++,2);if(r.t=e,!r.__c&&(r.__=[Wo(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=vo,!vo.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))};vo.u=!0;var i=vo.shouldComponentUpdate,s=vo.componentWillUpdate;vo.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)},vo.shouldComponentUpdate=o}return r.__N||r.__}(Wo,e)}function No(e,t){var n=Ao(yo++,3);!gr.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,vo.__H.__h.push(n))}function Oo(e){return Co=5,Lo((function(){return{current:e}}),[])}function Lo(e,t){var n=Ao(yo++,7);return Bo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ro(e){var t=vo.context[e.__c],n=Ao(yo++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vo)),t.props.value):e.__}function Do(){for(var e;e=Io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Po),e.__H.__h.forEach(Zo),e.__H.__h=[]}catch(t){e.__H.__h=[],gr.__e(t,e.__v)}}gr.__b=function(e){vo=null,wo&&wo(e)},gr.__r=function(e){ko&&ko(e),yo=0;var t=(vo=e.__c).__H;t&&(bo===vo?(t.__h=[],vo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=So,e.__N=e.i=void 0}))):(t.__h.forEach(Po),t.__h.forEach(Zo),t.__h=[],yo=0)),bo=vo},gr.diffed=function(e){Mo&&Mo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Io.push(t)&&_o===gr.requestAnimationFrame||((_o=gr.requestAnimationFrame)||Ho)(Do)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==So&&(e.__=e.__V),e.i=void 0,e.__V=So}))),bo=vo=null},gr.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Po),e.__h=e.__h.filter((function(e){return!e.__||Zo(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],gr.__e(n,e.__v)}})),To&&To(e,t)},gr.unmount=function(e){xo&&xo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Po(e)}catch(e){t=e}})),n.__H=void 0,t&&gr.__e(t,n.__v))};var Fo="function"==typeof requestAnimationFrame;function Ho(e){var t,n=function(){clearTimeout(r),Fo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Fo&&(t=requestAnimationFrame(n))}function Po(e){var t=vo,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vo=t}function Zo(e){var t=vo;e.__c=e.__(),vo=t}function Bo(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Wo(e,t){return"function"==typeof t?t(e):t}var Go=0;function qo(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:--Go,__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 gr.vnode&&gr.vnode(c),c}const Vo=qo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:qo("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"})}),Yo=qo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:qo("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"})}),$o=qo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:qo("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"})}),jo=qo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:qo("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"})}),Uo=qo("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:qo("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"})}),zo=qo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("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"})}),Xo=qo("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[qo("g",{"clip-path":"url(#clip0_2415_6911)",children:[qo("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:qo("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),qo("g",{mask:"url(#mask0_2415_6911)",children:[qo("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"}),qo("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"}),qo("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"}),qo("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"}),qo("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"}),qo("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"})]})]}),qo("defs",{children:qo("clipPath",{id:"clip0_2415_6911",children:qo("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Jo=qo("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("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 Ko(){return qo("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Xo]})}function Qo(e){let{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i}=e;const{isPreviewMode:s,isPopup:a}=Ro(fo),l=r.submitButtonTextColor||no(r.submitButtonColor||ro.submitButtonColor);return qo("div",{className:"bottom-section",children:[qo("div",{className:"buttons",children:qo("button",{className:"form-submit",disabled:n&&!s,type:"button",style:a?{color:l}:{},onClick:()=>{s||(i&&(null==un||un.open(i)),o())},children:t})}),!r.whiteLabel&&qo(Ko,{})]})}function ei(e){let{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e;const{isPopup:s}=Ro(fo);return qo("div",{style:s?{backgroundColor:o||ro.backgroundColor}:{},children:[qo("div",{className:"survey-question",children:t}),n&&mo({component:Ar("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ti(e){let{onClick:t}=e;const{isPreviewMode:n}=Ro(fo);return qo("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:qo("button",{className:"form-cancel",onClick:t,disabled:n,children:zo})})}function ni(e){let{header:t,description:n,contentType:r,forceDisableHtml:o,appearance:i,onClose:s,styleOverrides:a}=e;const l=no(i.backgroundColor||ro.backgroundColor),{isPopup:c}=Ro(fo);return qo(Nr,{children:qo("div",{className:"thank-you-message",style:{...a},children:qo("div",{className:"thank-you-message-container",children:[c&&qo(ti,{onClick:()=>s()}),qo("h3",{className:"thank-you-message-header",style:{color:l},children:t}),n&&mo({component:Ar("div",{className:"thank-you-message-body"}),children:n,renderAsHtml:!o&&"text"!==r,style:{color:l}}),c&&qo(Qo,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>s()})]})})})}function ri(e){var t;const n=Oo(null),[r,o]=Eo(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return No((()=>{if(n.current){const e=function(e){const t=Jr.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 oi(e){let{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e;const i=Oo(null),[s,a]=Eo("");return qo("div",{ref:i,children:[qo(ei,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),qo("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>a(e.currentTarget.value)}),qo(Qo,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:()=>o(s)})]})}function ii(e){let{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e;return qo(Nr,{children:[qo(ei,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),qo(Qo,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked")})]})}function si(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]=Eo(null);return qo(Nr,{children:[qo(ei,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),qo("div",{className:"rating-section",children:[qo("div",{className:"rating-options",children:["emoji"===t.display&&qo("div",{className:"rating-options-emoji",children:(3===t.scale?ci:ui).map(((e,t)=>{const n=t+1===l;return qo("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&&qo("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${s-a+1}, minmax(0, 1fr))`},children:fi(t.scale).map(((e,t)=>qo(ai,{displayQuestionIndex:r,active:l===e,appearance:o,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),qo("div",{className:"rating-text",children:[qo("div",{children:t.lowerBoundLabel}),qo("div",{children:t.upperBoundLabel})]})]}),qo(Qo,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:rn(l)&&!t.optional,appearance:o,onSubmit:()=>i(l)})]})}function ai(e){let{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e;const{textColor:s,ref:a}=ri({appearance:o,defaultTextColor:"black",forceUpdate:n});return qo("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 li(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e;const s=Oo(null),a=Lo((()=>(e=>{if(!e.shuffleOptions)return e.choices;const t=e.choices;let n="";e.hasOpenChoice&&(n=t.pop());const r=lo(t,ao(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[l,c]=Eo(t.type===hr.MultipleChoice?[]:null),[u,d]=Eo(!1),[p,h]=Eo(""),f=t.type===hr.SingleChoice?"radio":"checkbox";return qo("div",{ref:s,children:[qo(ei,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),qo("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"),qo("div",{className:o,children:[qo("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===hr.SingleChoice?c(i):t.type===hr.MultipleChoice&&Jt(l)?l.includes(i)?c(l.filter((e=>e!==i))):c([...l,i]):void 0}),qo("label",{htmlFor:`surveyQuestion${r}Choice${n}`,style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?qo(Nr,{children:[qo("span",{children:[s,":"]}),qo("input",{type:"text",id:`surveyQuestion${r}Choice${n}Open`,name:`question${r}`,onInput:e=>{const n=e.currentTarget.value;return t.type===hr.SingleChoice?c(n):t.type===hr.MultipleChoice&&Jt(l)?h(n):void 0}})]}):s}),qo("span",{className:"choice-check",style:{color:"black"},children:Jo})]})}))}),qo(Qo,{text:t.buttonText||"Submit",submitDisabled:(rn(l)||Jt(l)&&!u&&0===l.length||Jt(l)&&u&&!p&&0===l.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{u&&t.type===hr.MultipleChoice?Jt(l)&&i([...l,p]):i(l)}})]})}const ci=[$o,Yo,Vo],ui=[jo,$o,Yo,Vo,Uo],di=[1,2,3,4,5],pi=[1,2,3,4,5,6,7],hi=[0,1,2,3,4,5,6,7,8,9,10];function fi(e){switch(e){case 5:default:return di;case 7:return pi;case 10:return hi}}const mi=un,gi=fn;class yi{constructor(e){this.posthog=e,this.surveyInFocus=null}canShowNextEventBasedSurvey=()=>{const e=gi.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(po(e))&&!uo(e))(e);if(!o){this.addSurveyToFocus(e.id);const t=((e,t,n)=>{const r=Kr.createElement("div");r.className=`PostHogSurvey${t}`;const o=r.attachShadow({mode:"open"});if(e){const t=Object.assign(Kr.createElement("style"),{innerText:e});o.appendChild(t)}return Kr.body.appendChild(r),o})(eo(null==e?void 0:e.appearance),e.id);zr(qo(_i,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),t)}};handleWidget=e=>{const t=function(e){var t;const n=go.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(go.createElement("style"),{innerText:o})),go.body.appendChild(n),r}(e),n=eo(e.appearance);t.appendChild(Object.assign(gi.createElement("style"),{innerText:n})),zr(qo(Ii,{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)&&gi.querySelector(e.appearance.widgetSelector);if(n)if(0===gi.querySelectorAll(`.PostHogWidget${e.id}`).length)this.handleWidget(e);else if(1===gi.querySelectorAll(`.PostHogWidget${e.id}`).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o;const t=null===(r=gi.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!=pr.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)=>{zr(qo(_i,{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(rn(e.surveyInFocus)){var n,r,o;if(t.type===pr.Widget)"tab"===(null===(n=t.appearance)||void 0===n?void 0:n.widgetType)&&0===gi.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===pr.Popover&&e.canShowNextEventBasedSurvey()&&e.handlePopoverSurvey(t)}}))}),n)}})();addSurveyToFocus=e=>{rn(this.surveyInFocus)||yn.error(`Survey ${[...this.surveyInFocus]} already in focus. Cannot add survey ${e}.`),this.surveyInFocus=e};removeSurveyFromFocus=e=>{this.surveyInFocus!==e&&yn.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 vi(e){if(!gi||!mi)return;const t=new yi(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}function bi(e,t,n,r,o){const[i,s]=Eo(r||0===n),[a,l]=Eo(!1);return No((()=>{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),mi.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 mi.addEventListener("PHSurveyClosed",i),mi.addEventListener("PHSurveySent",a),n>0?(()=>{const e=setTimeout((()=>{c()}),n);return()=>{clearTimeout(e),mi.removeEventListener("PHSurveyClosed",i),mi.removeEventListener("PHSurveySent",a)}})():(c(),()=>{mi.removeEventListener("PHSurveyClosed",i),mi.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:s}}function _i(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),m=null!==(t=a.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:y,setIsPopupVisible:v}=bi(a,c,m,f,p),b=y||d===a.questions.length,_=null!==(n=u)&&void 0!==n&&n.left&&sn(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"),g?qo(fo.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>so(a,c,f),isPopup:h||!1},children:b?qo(ni,{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||ro,styleOverrides:{...u,..._},onClose:()=>v(!1)}):qo(Ci,{survey:a,forceDisableHtml:!!l,posthog:c,styleOverrides:u})}):qo(Nr,{})}function Ci(e){var t,n;let{survey:r,forceDisableHtml:o,posthog:i,styleOverrides:s}=e;const a=no((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||ro.backgroundColor),[l,c]=Eo({}),{isPreviewMode:u,previewPageIndex:d,handleCloseSurveyPopup:p,isPopup:h}=Ro(fo),[f,m]=Eo(d||0),g=Lo((()=>co(r)),[r]);No((()=>{m(null!=d?d:0)}),[d]);return qo("form",{className:"survey-form",style:h?{color:a,borderColor:null===(n=r.appearance)||void 0===n?void 0:n.borderColor,...s}:{},children:g.map(((e,t)=>{var n;const{originalQuestionIndex:s}=e;return(u?f===s:f===t)&&qo("div",{className:"survey-box",style:h?{backgroundColor:(null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||ro.backgroundColor}:{},children:[h&&qo(ti,{onClick:()=>p()}),Si({question:e,forceDisableHtml:o,displayQuestionIndex:t,appearance:r.appearance||ro,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?io({...l,[s]:t},r,i):m(o+1));const a=i.getNextSurveyStep(r,o,t);a===fr.End?io({...l,[s]:t},r,i):m(a)})({res:e,originalQuestionIndex:s,displayQuestionIndex:t})})]})}))})}function Ii(e){var t,n;let{survey:r,forceDisableHtml:o,posthog:i,readOnly:s,removeSurveyFromFocus:a}=e;const[l,c]=Eo(!1),[u,d]=Eo({}),p=Oo(null);return No((()=>{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=gi.querySelector(r.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{c(!l)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),qo(Nr,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&qo("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!s&&c(!l),style:{color:no(r.appearance.widgetColor)},children:[qo("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&qo(_i,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const Si=e=>{let{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e;const s={[hr.Open]:oi,[hr.Link]:ii,[hr.Rating]:si,[hr.SingleChoice]:li,[hr.MultipleChoice]:li},a={question:t,forceDisableHtml:n,appearance:o,onSubmit:i},l={[hr.Open]:{},[hr.Link]:{},[hr.Rating]:{displayQuestionIndex:r},[hr.SingleChoice]:{displayQuestionIndex:r},[hr.MultipleChoice]:{displayQuestionIndex:r}};return qo(s[t.type],{...{...a,...l[t.type]}})};function wi(e){return!en(Event)&&ki(e,Event)}function ki(e,t){try{return e instanceof t}catch{return!1}}function Mi(e){return rn(e)||!Qt(e)&&!Kt(e)}function Ti(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function xi(e){return Ti(e,"DOMError")}mn.__PosthogExtensions__=mn.__PosthogExtensions__||{},mn.__PosthogExtensions__.canActivateRepeatedly=uo,mn.__PosthogExtensions__.generateSurveys=vi,mn.extendPostHogWithSurveys=vi;const Ai=/\(error: (.*)\)/,Ei=50,Ni="?";function Oi(e,t,n,r){const o={platform:"javascript",filename:e,function:"<anonymous>"===t?Ni:t,in_app:!0};return en(n)||(o.lineno=n),en(r)||(o.colno=r),o}const Li=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ri=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Di=/\((\S*)(?::(\d+))(?::(\d+))\)/,Fi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Pi=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=Ai.test(t)?t.replace(Ai,"$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>=Ei)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return t.reverse(),t.slice(0,Ei).map((e=>({...e,filename:e.filename||Zi(t).filename,function:e.function||Ni})))}(n)}}(...[[30,e=>{const t=Li.exec(e);if(t){const[,e,n,r]=t;return Oi(e,Ni,+n,+r)}const n=Ri.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Di.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Bi(n[1]||Ni,n[2]);return Oi(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Fi.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Hi.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]||Ni;return[n,e]=Bi(n,e),Oi(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Zi(e){return e[e.length-1]||{}}const Bi=(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]:Ni,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let Wi;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Wi||(Wi={}));const Gi=["fatal","error","warning","log","info","debug"],qi=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Vi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.stacktrace||e.stack||"",r=function(e){if(e&&Yi.test(e.message))return 1;return 0}(e);try{const e=Pi(n,r);return e.slice(0,e.length-t)}catch{}return[]}const Yi=/Minified React error #\d+;/i;function $i(e,t){var n,r;const o=Vi(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,type:"raw"},mechanism:{handled:i,synthetic:s}}],$exception_level:"error"}}function ji(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=Vi(t.syntheticException,1);e.length&&(a.stacktrace={frames:e,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function Ui(e){return tn(e)&&!nn(e)&&Gi.indexOf(e)>=0}function zi(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:wi(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=Vi(null==t?void 0:t.syntheticException,1);e.length&&(l.stacktrace={frames:e,type:"raw"})}return{$exception_list:[l],$exception_level:Ui(e.level)?e.level:"error"}}function Xi(e,t){let[n,r,o,i,s]=e,a={$exception_list:[]};const l=s||n;if(xi(l)||function(e){return Ti(e,"DOMException")}(l)){const e=l;if(function(e){return"stack"in e}(l))a=$i(l,t);else{const n=e.name||(xi(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n,o=xi(e)?"DOMError":"DOMException";a=ji(r,{...t,overrideExceptionType:o,defaultExceptionMessage:r})}return"code"in e&&(a.$exception_DOMException_code=`${e.code}`),a}if(function(e){return Ti(e,"ErrorEvent")}(l)&&l.error)return $i(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 ki(e,Error)}}(l))return $i(l,t);if(function(e){return Ti(e,"Object")}(l)||wi(l)){return zi(l,t)}if(en(s)&&tn(n)){let e="Error",r=n;const o=n.match(qi);return o&&(e=o[1],r=o[2]),ji(r,{...t,overrideExceptionType:e,defaultExceptionMessage:r})}return ji(l,t)}function Ji(e){let[t]=e;const n=function(e){if(Mi(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 Mi(n)?ji(`Non-Error promise rejection captured with value: ${String(n)}`,{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Xi([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}const Ki={wrapOnError:e=>{const t=un;t||yn.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=Xi(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=un;t||yn.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=Ji(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}}};mn.__PosthogExtensions__=mn.__PosthogExtensions__||{},mn.__PosthogExtensions__.errorWrappingFunctions=Ki,mn.__PosthogExtensions__.parseErrorAsProperties=Xi,mn.posthogErrorWrappingFunctions=Ki,mn.parseErrorAsProperties=Xi;const Qi=(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)};mn.__PosthogExtensions__=mn.__PosthogExtensions__||{};const es={_patchFetch:e=>Un(un,"fetch",(t=>async function(n,r){const o=new Request(n,r);return Qi(e,o),t(o)})),_patchXHR:e=>Un(un.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 Qi(e,a),t.call(this,n,a.url,o,i,s)}))};mn.__PosthogExtensions__.tracingHeadersPatchFns=es,mn.postHogTracingHeadersPatchFns=es;var ts,ns,rs,os=-1,is=function(e){addEventListener("pageshow",(function(t){t.persisted&&(os=t.timeStamp,e(t))}),!0)},ss=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},as=function(){var e=ss();return e&&e.activationStart||0},ls=function(e,t){var n=ss(),r="navigate";return os>=0?r="back-forward-cache":n&&(document.prerendering||as()>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}},cs=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){}},us=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))}},ds=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ps=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},hs=function(e){var t=!1;return function(){t||(e(),t=!0)}},fs=-1,ms=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},gs=function(e){"hidden"===document.visibilityState&&fs>-1&&(fs="visibilitychange"===e.type?e.timeStamp:0,vs())},ys=function(){addEventListener("visibilitychange",gs,!0),addEventListener("prerenderingchange",gs,!0)},vs=function(){removeEventListener("visibilitychange",gs,!0),removeEventListener("prerenderingchange",gs,!0)},bs=function(){return fs<0&&(fs=ms(),ys(),is((function(){setTimeout((function(){fs=ms(),ys()}),0)}))),{get firstHiddenTime(){return fs}}},_s=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Cs=[1800,3e3],Is=function(e,t){t=t||{},_s((function(){var n,r=bs(),o=ls("FCP"),i=cs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-as(),0),o.entries.push(e),n(!0)))}))}));i&&(n=us(e,o,Cs,t.reportAllChanges),is((function(r){o=ls("FCP"),n=us(e,o,Cs,t.reportAllChanges),ds((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Ss=[.1,.25],ws=[2500,4e3],ks={},Ms=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ts=function(e){if("loading"===document.readyState)return"loading";var t=Ms();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"},xs=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},As=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:xs(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},Es=-1,Ns=function(e,t){var n=Ms(),r="navigate";return Es>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=Ms();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}},Os=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){}},Ls=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))}},Rs=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Ds=0,Fs=1/0,Hs=0,Ps=function(e){e.forEach((function(e){e.interactionId&&(Fs=Math.min(Fs,e.interactionId),Hs=Math.max(Hs,e.interactionId),Ds=Hs?(Hs-Fs)/7+1:0)}))},Zs=function(){"interactionCount"in performance||ts||(ts=Os("event",Ps,{type:"event",buffered:!0,durationThreshold:0}))},Bs=[],Ws=new Map,Gs=0,qs=function(){return(ts?Ds:performance.interactionCount||0)-Gs},Vs=[],Ys=function(e){if(Vs.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Bs[Bs.length-1],n=Ws.get(e.interactionId);if(n||Bs.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]};Ws.set(r.id,r),Bs.push(r)}Bs.sort((function(e,t){return t.latency-e.latency})),Bs.length>10&&Bs.splice(10).forEach((function(e){return Ws.delete(e.id)}))}}},$s=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),Rs(e)),n},js=[200,500],Us=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;Zs();var r,o=Ns("INP"),i=function(e){$s((function(){e.forEach(Ys);var t,n=(t=Math.min(Bs.length-1,Math.floor(qs()/50)),Bs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},s=Os("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Ls(e,o,js,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Rs((function(){i(s.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(Es=t.timeStamp,e(t))}),!0)}((function(){Gs=0,Bs.length=0,Ws.clear(),o=Ns("INP"),r=Ls(e,o,js,t.reportAllChanges)})))})))},zs=[],Xs=[],Js=new WeakMap,Ks=new Map,Qs=-1,ea=function(e){zs=zs.concat(e),ta()},ta=function(){Qs<0&&(Qs=$s(na))},na=function(){Ks.size>10&&Ks.forEach((function(e,t){Ws.has(t)||Ks.delete(t)}));var e=Bs.map((function(e){return Js.get(e.entries[0])})),t=Xs.length-50;Xs=Xs.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Xs.length;r++){var o=Xs[r];ra(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var s=zs[zs.length-1-i];if(!s||s.startTime<rs)break;n.add(s)}zs=Array.from(n),Qs=-1};Vs.push((function(e){e.interactionId&&e.target&&!Ks.has(e.interactionId)&&Ks.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;rs=Math.max(rs,e.processingEnd);for(var r=Xs.length-1;r>=0;r--){var o=Xs[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]},Xs.push(t)),(e.interactionId||"first-input"===e.entryType)&&Js.set(e,t),ta()}));var ra=function(e,t){for(var n,r=[],o=0;n=zs[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r};const oa={onLCP:function(e,t){t=t||{},_s((function(){var n,r=bs(),o=ls("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-as(),0),o.entries=[e],n())}))},s=cs("largest-contentful-paint",i);if(s){n=us(e,o,ws,t.reportAllChanges);var a=hs((function(){ks[o.id]||(i(s.takeRecords()),s.disconnect(),ks[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=hs(e),"hidden"===document.visibilityState?e():(n=t(e),ps(e)),n}(a)}),!0)})),ps(a),is((function(r){o=ls("LCP"),n=us(e,o,ws,t.reportAllChanges),ds((function(){o.value=performance.now()-r.timeStamp,ks[o.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},Is(hs((function(){var n,r=ls("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=cs("layout-shift",s);a&&(n=us(e,r,Ss,t.reportAllChanges),ps((function(){s(a.takeRecords()),n(!0)})),is((function(){o=0,r=ls("CLS",0),n=us(e,r,Ss,t.reportAllChanges),ds((function(){return n()}))})),setTimeout(n,0))})))},onFCP:Is,onINP:function(e,t){ns||(ns=Os("long-animation-frame",ea)),Us((function(t){var n=function(e){var t=e.entries[0],n=Js.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),s=ra(t.startTime,o),a=e.entries.find((function(e){return e.target})),l=a&&a.target||Ks.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:As(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:Ts(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function ia(e,t){return t.length>e?t.slice(0,e)+"...":t}function sa(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do{t=t.previousSibling}while(t&&!Tn(t));return t}function aa(e,t,n,r){const o=e.tagName.toLowerCase(),i={tag_name:o};On.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=ia(1024,Gn(e)):i.$el_text=ia(1024,Nn(e)));const s=En(e);s.length>0&&(i.classes=s.filter((function(e){return""!==e}))),Cn(e.attributes,(function(n){var o;if((!Rn(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&Wn(n.value)&&(o=n.name,!tn(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){let e=n.value;"class"===n.name&&(e=An(e).join(" ")),i["attr__"+n.name]=ia(1024,e)}}));let a=1,l=1,c=e;for(;c=sa(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function la(e,t){var n,r;let{e:o,maskAllElementAttributes:i,maskAllText:s,elementAttributeIgnoreList:a,elementsChainAsString:l}=t;const c=[e];let u=e;for(;u.parentNode&&!xn(u,"body");)(d=u.parentNode)&&11===d.nodeType?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d;const p=[],h={};let f,m=!1,g=!1;if(Cn(c,(e=>{const t=Ln(e);"a"===e.tagName.toLowerCase()&&(m=e.getAttribute("href"),m=t&&m&&Wn(m)&&m);Sn(En(e),"ph-no-capture")&&(g=!0),p.push(aa(e,i,s,a));const n=function(e){if(!Ln(e))return{};const t={};return Cn(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){const n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&Wn(r)&&(t[n]=r)}})),t}(e);In(h,n)})),g)return{props:{},explicitNoCapture:g};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=Gn(e):p[0].$el_text=Nn(e)),m){var y,v;p[0].attr__href=m;const e=null===(y=(e=>{const t=null==fn?void 0:fn.createElement("a");return en(t)?null:(t.href=e,t)})(m))||void 0===y?void 0:y.host,t=null==un||null===(v=un.location)||void 0===v?void 0:v.host;e&&t&&e!==t&&(f=m)}return{props:In({$event_type:o.type,$ce_version:1},l?{$elements_chain:Vn(p)}:{$elements:p},null!==(n=p[0])&&void 0!==n&&n.$el_text?{$el_text:null===(r=p[0])||void 0===r?void 0:r.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},h)}}mn.__PosthogExtensions__=mn.__PosthogExtensions__||{},mn.__PosthogExtensions__.postHogWebVitalsCallbacks=oa,mn.postHogWebVitalsCallbacks=oa;const ca={element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500};function ua(e){const t=function(e){return en(e.target)?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function da(e,t){return sn(e)&&e>=t}class pa{_clicks=[];asRequiredConfig(e){var t,n,r,o;return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:ca.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:ca.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==r?r:ca.selection_change_threshold_ms,mutation_threshold_ms:null!==(o=null==e?void 0:e.mutation_threshold_ms)&&void 0!==o?o:ca.mutation_threshold_ms}}constructor(e,t){this.instance=e,this._config=this.asRequiredConfig(t)}start(e){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(e)}_startMutationObserver(e){this._mutationObserver||(this._mutationObserver=new MutationObserver((e=>{this.onMutation(e)})),this._mutationObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}))}stop(){var e;null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._mutationObserver=void 0,mn.removeEventListener("click",this._onClick),mn.removeEventListener("scroll",this._onScroll,!0),mn.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){mn.addEventListener("click",this._onClick)}_onClick=e=>{const t=ua(e);rn(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&en(this._checkClickTimer)&&(this._checkClickTimer=mn.setTimeout((()=>{this._checkClicks()}),1e3))};_startScrollObserver(){mn.addEventListener("scroll",this._onScroll,!0)}_onScroll=()=>{const e=Date.now();e%50==0&&this._clicks.forEach((t=>{en(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))};_startSelectionChangedObserver(){mn.addEventListener("selectionchange",this._onSelectionChange)}_onSelectionChange=()=>{this._lastSelectionChanged=Date.now()};_ignoreClick(e){if(!e)return!0;if((t=e.node).id===Mn||null!==(n=t.closest)&&void 0!==n&&n.call(t,"#"+Mn))return!0;var t,n;const r=this._clicks.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!r||!(!xn(e.node,"html")&&Tn(e.node)&&!On.includes(e.node.tagName.toLowerCase()))}_checkClicks(){if(!this._clicks.length)return;clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;const e=this._clicks;this._clicks=[];for(const n of e){var t;n.mutationDelayMs=null!==(t=n.mutationDelayMs)&&void 0!==t?t:this._lastMutation&&n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0,n.absoluteDelayMs=Date.now()-n.timestamp,n.selectionChangedDelayMs=this._lastSelectionChanged&&n.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-n.timestamp:void 0;const e=da(n.scrollDelayMs,this._config.scroll_threshold_ms),r=da(n.selectionChangedDelayMs,this._config.selection_change_threshold_ms),o=da(n.mutationDelayMs,this._config.mutation_threshold_ms),i=da(n.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=sn(n.scrollDelayMs)&&n.scrollDelayMs<this._config.scroll_threshold_ms,a=sn(n.mutationDelayMs)&&n.mutationDelayMs<this._config.mutation_threshold_ms,l=sn(n.selectionChangedDelayMs)&&n.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||a||l||(e||o||i||r?this._captureDeadClick(n,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:n.timestamp,$dead_click_scroll_timeout:e,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:i,$dead_click_selection_changed_timeout:r}):n.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(n))}this._clicks.length&&en(this._checkClickTimer)&&(this._checkClickTimer=mn.setTimeout((()=>{this._checkClicks()}),1e3))}_captureDeadClick(e,t){this.instance.capture("$dead_click",{...t,...la(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props,$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs},{timestamp:new Date(e.timestamp)})}}mn.__PosthogExtensions__=mn.__PosthogExtensions__||{},mn.__PosthogExtensions__.initDeadClicksAutocapture=e=>new pa(e)}();
1
+ !function(){"use strict";var e,t=Object.defineProperty,n=(e,n,o)=>((e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o)(e,"symbol"!=typeof n?n+"":n,o),o=Object.defineProperty,r=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i=(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))(i||{});const s={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},a={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},l={};function c(e){if(l[e])return l[e];const t=globalThis[e],n=t.prototype,o=e in s?s[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in a?a[e]:void 0,c=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&c)return l[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?l[e]=i:n}catch{return n}}const u={};function d(e,t,n){var o;const r=`${e}.${String(n)}`;if(u[r])return u[r].call(t);const i=c(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(u[r]=s,s.call(t)):t[n]}const p={};function h(e,t,n){const o=`${e}.${String(n)}`;if(p[o])return p[o].bind(t);const r=c(e)[n];return"function"!=typeof r?t[n]:(p[o]=r,r.bind(t))}const f={childNodes:function(e){return d("Node",e,"childNodes")},parentNode:function(e){return d("Node",e,"parentNode")},parentElement:function(e){return d("Node",e,"parentElement")},textContent:function(e){return d("Node",e,"textContent")},contains:function(e,t){return h("Node",e,"contains")(t)},getRootNode:function(e){return h("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?d("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?d("Element",e,"shadowRoot"):null},querySelector:function(e,t){return d("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return d("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return c("MutationObserver").constructor}};function m(e){return e.nodeType===e.ELEMENT_NODE}function g(e){const t=e&&"host"in e&&"mode"in e&&f.host(e)||null;return Boolean(t&&"shadowRoot"in t&&f.shadowRoot(t)===e)}function y(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function v(e){try{const n=e.rules||e.cssRules;if(!n)return null;const o=Array.from(n,(t=>b(t,e.href))).join("");return(t=o).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function b(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=v(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(n){t=e.cssText}return e.styleSheet.href?A(t,e.styleSheet.href):t}{let n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(n)),t?A(n,t):n}}function _(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let C=class{constructor(){r(this,"idNodeMap",new Map),r(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const n=null==(t=this.getMeta(e))?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 S(e){let{element:t,maskInputOptions:n,tagName:o,type:r,value:i,maskInputFn:s}=e,a=i||"";const l=r&&I(r);return(n[o.toLowerCase()]||l&&n[l])&&(a=s?s(a,t):"*".repeat(a.length)),a}function I(e){return e.toLowerCase()}const w="__rrweb_original__";function k(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?I(t):null}function T(e,t){var n;let o;try{o=new URL(e,null!=t?t:window.location.href)}catch(e){return null}const r=o.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==r?void 0:r[1])&&void 0!==n?n:null}const M=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,x=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,E=/^(data:)([^,]*),(.*)/i;function A(e,t){return(e||"").replace(M,((e,n,o,r,i,s)=>{const a=o||i||s,l=n||r||"";if(!a)return e;if(x.test(a)||N.test(a))return`url(${l}${a}${l})`;if(E.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})`}))}let R=1;const O=new RegExp("[^a-z0-9-_:]"),L=-2;function D(){return R++}let F,B;const H=/^[^ \t\n\r\u000c]+/,P=/^[, \t\n\r\u000c]+/;const Z=new WeakMap;function q(e,t){return t&&""!==t.trim()?V(e,t):t}function W(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function V(e,t){let n=Z.get(e);if(n||(n=e.createElement("a"),Z.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Y(e,t,n,o){return o?"src"===n||"href"===n&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&"#"!==o[0]?q(e,o):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function o(e){let o;const r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}const r=[];for(;o(P),!(n>=t.length);){let i=o(H);if(","===i.slice(-1))i=q(e,i.substring(0,i.length-1)),r.push(i);else{let o="";i=q(e,i);let s=!1;for(;;){const e=t.charAt(n);if(""===e){r.push((i+o).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){n+=1,r.push((i+o).trim());break}"("===e&&(s=!0)}o+=e,n+=1}}}return r.join(", ")}(e,o):"style"===n?A(o,V(e)):"object"===t&&"data"===n?q(e,o):o:q(e,o):o}function $(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function G(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&G(f.parentNode(e),t,n);for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return!!n&&G(f.parentNode(e),t,n)}function j(e,t,n,o){let r;if(m(e)){if(r=e,!f.childNodes(r).length)return!1}else{if(null===f.parentElement(e))return!1;r=f.parentElement(e)}try{if("string"==typeof t){if(o){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(G(r,t,o))return!0;if(n)if(o){if(r.closest(n))return!0}else if(r.matches(n))return!0}catch(e){}return!1}function z(e,t){const{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:d,dataURLOptions:p={},inlineImages:h,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,o);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:i.Document,childNodes:[],compatMode:e.compatMode}:{type:i.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:i.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:o,blockSelector:r,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m}=t,g=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 o=e.classList[n];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,r),y=function(e){if(e instanceof HTMLFormElement)return"form";const t=I(e.tagName);return O.test(t)?"div":t}(e);let b={};const C=e.attributes.length;for(let t=0;t<C;t++){const o=e.attributes[t];$(y,o.name,o.value)||(b[o.name]=Y(n,y,I(o.name),o.value))}if("link"===y&&s){const t=e.href;let o=_(n,t);if(!o&&t.includes(".css")){o=_(n,window.location.origin+"/"+t.replace(window.location.href,""))}let r=null;o&&(r=v(o)),r&&(delete b.rel,delete b.href,b._cssText=r)}if("style"===y&&e.sheet&&!(e.innerText||f.textContent(e)||"").trim().length){const t=v(e.sheet);t&&(b._cssText=t)}if("input"===y||"textarea"===y||"select"===y){const t=e.value,n=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&t?b.value=S({element:e,type:k(e),tagName:y,value:t,maskInputOptions:a,maskInputFn:l}):n&&(b.checked=n)}"option"===y&&(e.selected&&!a.select?b.selected=!0:delete b.selected);"dialog"===y&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===y&&d)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let o=0;o<e.height;o+=50){const r=t.getImageData,i=w in r?r[w]:r;if(new Uint32Array(i.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),o=n.createElement("canvas");o.width=e.width,o.height=e.height;t!==o.toDataURL(c.type,c.quality)&&(b.rr_dataURL=t)}if("img"===y&&u){F||(F=n.createElement("canvas"),B=F.getContext("2d"));const t=e,o=t.currentSrc||t.getAttribute("src")||"<unknown-src>",r=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{F.width=t.naturalWidth,F.height=t.naturalHeight,B.drawImage(t,0,0),b.rr_dataURL=F.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${o}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(r?b.crossOrigin=r:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===y||"video"===y){const t=b;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop));if(g){const{width:t,height:n}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==y||p(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);let T;try{customElements.get(y)&&(T=!0)}catch(e){}return{type:i.Element,tagName:y,attributes:b,childNodes:[],isSVG:W(e)||void 0,needBlock:g,rootId:m,isCustom:T}}(e,{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:l,maskInputOptions:c,maskInputFn:d,dataURLOptions:p,inlineImages:h,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){var n;const{needsMask:o,maskTextFn:r,rootId:s}=t,a=f.parentNode(e),l=a&&a.tagName;let c=f.textContent(e);const u="STYLE"===l||void 0,d="SCRIPT"===l||void 0;if(u&&c){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(c=v(a.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}c=A(c,V(t.doc))}d&&(c="SCRIPT_PLACEHOLDER");!u&&!d&&c&&o&&(c=r?r(c,f.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:i.Text,textContent:c||"",isStyle:u,rootId:s}}(e,{doc:n,needsMask:a,maskTextFn:u,rootId:b});case e.CDATA_SECTION_NODE:return{type:i.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:i.Comment,textContent:f.textContent(e)||"",rootId:b};default:return!1}}function U(e){return null==e?"":e.toLowerCase()}function X(e,t){const{doc:n,mirror:o,blockClass:r,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:d={},maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:C=!1,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:N=!1}=t;let{needsMask:E}=t,{preserveWhiteSpace:A=!0}=t;if(!E){E=j(e,a,l,void 0===E)}const R=z(e,{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,dataURLOptions:b,inlineImages:_,recordCanvas:C,keepIframeSrcFn:x,newlyAddedElement:N});if(!R)return console.warn(e,"not serialized"),null;let O;O=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===i.Comment)return!0;if(e.type===i.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"===T(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===U(e.attributes.name)||"icon"===U(e.attributes.rel)||"apple-touch-icon"===U(e.attributes.rel)||"shortcut icon"===U(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===U(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===U(e.attributes.name)||"googlebot"===U(e.attributes.name)||"bingbot"===U(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===U(e.attributes.name)||"generator"===U(e.attributes.name)||"framework"===U(e.attributes.name)||"publisher"===U(e.attributes.name)||"progid"===U(e.attributes.name)||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===U(e.attributes.name)||"yandex-verification"===U(e.attributes.name)||"csrf-token"===U(e.attributes.name)||"p:domain_verify"===U(e.attributes.name)||"verify-v1"===U(e.attributes.name)||"verification"===U(e.attributes.name)||"shopify-checkout-api-token"===U(e.attributes.name)))return!0}}return!1}(R,v)&&(A||R.type!==i.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?D():L;const F=Object.assign(R,{id:O});if(o.add(e,F),O===L)return null;S&&S(e);let B=!c;if(F.type===i.Element){B=B&&!F.needBlock,delete F.needBlock;const t=f.shadowRoot(e);t&&y(t)&&(F.isShadowHost=!0)}if((F.type===i.Document||F.type===i.Element)&&B){v.headWhitespace&&F.type===i.Element&&"head"===F.tagName&&(A=!1);const t={doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:c,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x};if(F.type===i.Element&&"textarea"===F.tagName&&void 0!==F.attributes.value);else for(const n of Array.from(f.childNodes(e))){const e=X(n,t);e&&F.childNodes.push(e)}let g=null;if(m(e)&&(g=f.shadowRoot(e)))for(const e of Array.from(f.childNodes(g))){const n=X(e,t);n&&(y(g)&&(n.isShadow=!0),F.childNodes.push(n))}}const H=f.parentNode(e);return H&&g(H)&&y(H)&&(F.isShadow=!0),F.type===i.Element&&"iframe"===F.tagName&&function(e,t,n){const o=e.contentWindow;if(!o)return;let r,i=!1;try{r=o.document.readyState}catch(e){return}if("complete"!==r){const o=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}const s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&I){const n=X(t,{doc:t,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x});n&&I(e,n)}}),w),F.type===i.Element&&"link"===F.tagName&&"string"==typeof F.attributes.rel&&("stylesheet"===F.attributes.rel||"preload"===F.attributes.rel&&"string"==typeof F.attributes.href&&"css"===T(F.attributes.href))&&function(e,t,n){let o,r=!1;try{o=e.sheet}catch(e){return}if(o)return;const i=setTimeout((()=>{r||(t(),r=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),r=!0,t()}))}(e,(()=>{if(k){const t=X(e,{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x});t&&k(e,t)}}),M),F}let K=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const J={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Q={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ee={};function te(e){if(ee[e])return ee[e];const t=globalThis[e],n=t.prototype,o=e in J?J[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in Q?Q[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return ee[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?ee[e]=i:n}catch{return n}}const ne={};function oe(e,t,n){var o;const r=`${e}.${String(n)}`;if(ne[r])return ne[r].call(t);const i=te(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(ne[r]=s,s.call(t)):t[n]}const re={};function ie(e,t,n){const o=`${e}.${String(n)}`;if(re[o])return re[o].bind(t);const r=te(e)[n];return"function"!=typeof r?t[n]:(re[o]=r,r.bind(t))}function se(){return te("MutationObserver").constructor}const ae={childNodes:function(e){return oe("Node",e,"childNodes")},parentNode:function(e){return oe("Node",e,"parentNode")},parentElement:function(e){return oe("Node",e,"parentElement")},textContent:function(e){return oe("Node",e,"textContent")},contains:function(e,t){return ie("Node",e,"contains")(t)},getRootNode:function(e){return ie("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?oe("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?oe("Element",e,"shadowRoot"):null},querySelector:function(e,t){return oe("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return oe("Element",e,"querySelectorAll")(t)},mutationObserver:se};function le(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const o={capture:!0,passive:!0};return n.addEventListener(e,t,o),()=>n.removeEventListener(e,t,o)}const ce="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 ue={map:{},getId:()=>(console.error(ce),-1),getNode:()=>(console.error(ce),null),removeNodeFromMap(){console.error(ce)},has:()=>(console.error(ce),!1),reset(){console.error(ce)}};function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=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();r||!1!==n.leading||(r=l);const c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,s)):o||!1===n.trailing||(o=setTimeout((()=>{r=!1===n.leading?0:Date.now(),o=null,e.apply(u,s)}),c))}}function pe(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>pe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ue=new Proxy(ue,{get:(e,t,n)=>("map"===t&&console.error(ce),Reflect.get(e,t,n))}));let fe=Date.now;function me(e){var t,n,o,r;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ae.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(o=ae.parentElement(i.body))?void 0:o.scrollTop)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollTop)||0}}function ge(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ye(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ve(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ae.parentElement(e)}function be(e,t,n,o){if(!e)return!1;const r=ve(e);if(!r)return!1;try{if("string"==typeof t){if(r.classList.contains(t))return!0;if(o&&null!==r.closest("."+t))return!0}else if(G(r,t,o))return!0}catch(e){}if(n){if(r.matches(n))return!0;if(o&&null!==r.closest(n))return!0}return!1}function _e(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===L}function Ce(e,t){if(g(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const o=ae.parentNode(e);return(!o||o.nodeType!==e.DOCUMENT_NODE)&&(!o||Ce(o,t))}function Se(e){return Boolean(e.changedTouches)}function Ie(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function we(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ke(e){return!!e&&(e instanceof K&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ae.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(fe=()=>(new Date).getTime());let Te=class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(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 Me(e){var t;let n=null;return"getRootNode"in e&&(null==(t=ae.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ae.host(ae.getRootNode(e))&&(n=ae.host(ae.getRootNode(e))),n}function xe(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Me(n);)n=t;return n}(e);return ae.contains(t,n)}function Ne(e){const t=e.ownerDocument;return!!t&&(ae.contains(t,e)||xe(e))}var Ee=(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))(Ee||{}),Ae=(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))(Ae||{}),Re=(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))(Re||{}),Oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Oe||{}),Le=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Le||{}),De=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(De||{});function Fe(e){return"__ln"in e}class Be{constructor(){n(this,"length",0),n(this,"head",null),n(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&&Fe(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&&Fe(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 He=(e,t)=>`${e}@${t}`;class Pe{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),n(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Be,o=e=>{let t=e,n=L;for(;n===L;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{const i=ae.parentNode(r);if(!i||!Ne(r)||"TEXTAREA"===i.tagName)return;const s=g(i)?this.mirror.getId(Me(r)):this.mirror.getId(i),a=o(r);if(-1===s||-1===a)return n.addNode(r);const l=X(r,{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=>{Ie(e,this.mirror)&&this.iframeManager.addIframe(e),we(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ke(r)&&this.shadowDomManager.addShadowRoot(ae.shadowRoot(r),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)qe(this.removes,e,this.mirror)&&!this.movedSet.has(ae.parentNode(e))||r(e);for(const e of this.addedSet)We(this.droppedSet,e)||qe(this.removes,e,this.mirror)?We(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(ae.parentNode(i.value)),n=o(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(ae.parentNode(n.value));if(-1===o(n.value))continue;if(-1!==t){e=n;break}{const t=n.value,o=ae.parentNode(t);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=ae.host(o);if(-1!==this.mirror.getId(t)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),r(e.value)}const s={texts:this.texts.map((e=>{const t=e.node,n=ae.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{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),o=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+o).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};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))})),n(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(ae.childNodes(e),(e=>ae.textContent(e)||"")).join("")})),n(this,"processMutation",(e=>{if(!_e(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=ae.textContent(e.target);be(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:j(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ve(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,o=e.target.getAttribute(n);if("value"===n){const e=k(t);o=S({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:o,maskInputFn:this.maskInputFn})}if(be(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let r=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(o)){if(t.contentDocument)return;n="rr_src"}if(r||(r={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e.target,r)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!$(t.tagName,n))if(r.attributes[n]=Y(this.doc,I(t.tagName),I(n),o),"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 o=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);o!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?r.styleDiff[e]=""===i?o:[o,i]:r._unchangedStyles[e]=[o,i]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(r.styleDiff[e]=!1)}else"open"===n&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":if(be(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 n=this.mirror.getId(t),o=g(e.target)?this.mirror.getId(ae.host(e.target)):this.mirror.getId(e.target);be(e.target,this.blockClass,this.blockSelector,!1)||_e(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Ze(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ce(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[He(n,o)]?Ze(this.movedSet,t):this.removes.push({parentId:o,id:n,isShadow:!(!g(e.target)||!y(e.target))||void 0})),this.mapRemoves.push(t))}))}})),n(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(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[He(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);be(e,this.blockClass,this.blockSelector,!1)||(ae.childNodes(e).forEach((e=>this.genAdds(e))),ke(e)&&ae.childNodes(ae.shadowRoot(e)).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 Ze(e,t){e.delete(t),ae.childNodes(t).forEach((t=>Ze(e,t)))}function qe(e,t,n){return 0!==e.length&&function(e,t,n){let o=ae.parentNode(t);for(;o;){const t=n.getId(o);if(e.some((e=>e.id===t)))return!0;o=ae.parentNode(o)}return!1}(e,t,n)}function We(e,t){return 0!==e.size&&Ve(e,t)}function Ve(e,t){const n=ae.parentNode(t);return!!n&&(!!e.has(n)||Ve(e,n))}let Ye;const $e=e=>{if(!Ye)return e;return function(){try{return e(...arguments)}catch(e){if(Ye&&!0===Ye(e))return;throw e}}},Ge=[];function je(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{}return e&&e.target}function ze(e,t){const n=new Pe;Ge.push(n),n.init(e);const o=new(se())($e(n.processMutations.bind(n)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ue(e){let{mouseInteractionCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[];let c=null;return Object.keys(Re).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((e=>{let s=I(e);const a=(e=>n=>{const s=je(n);if(be(s,r,i,!0))return;let a=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=Oe.Mouse;break;case"touch":a=Oe.Touch;break;case"pen":a=Oe.Pen}a===Oe.Touch?Re[e]===Re.MouseDown?l="TouchStart":Re[e]===Re.MouseUp&&(l="TouchEnd"):Oe.Pen}else Se(n)&&(a=Oe.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===Oe.Touch||l.startsWith("Mouse")&&a===Oe.Mouse)&&(a=null)):Re[e]===Re.Click&&(a=c,c=null);const u=Se(n)?n.changedTouches[0]:n;if(!u)return;const d=o.getId(s),{clientX:p,clientY:h}=u;$e(t)({type:Re[l],id:d,x:p,y:h,...null!==a&&{pointerType:a}})})(e);if(window.PointerEvent)switch(Re[e]){case Re.MouseDown:case Re.MouseUp:s=s.replace("mouse","pointer");break;case Re.TouchStart:case Re.TouchEnd:return}l.push(le(s,a,n))})),$e((()=>{l.forEach((e=>e()))}))}function Xe(e){let{scrollCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,sampling:s}=e;return le("scroll",$e(de($e((e=>{const s=je(e);if(!s||be(s,r,i,!0))return;const a=o.getId(s);if(s===n&&n.defaultView){const e=me(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 Ke=["INPUT","TEXTAREA","SELECT"],Je=new WeakMap;function Qe(e){return function(e,t){if(ot("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ot("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ot("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ot("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 et(e,t,n){let o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function tt(e,t){let{mirror:n,stylesheetManager:o}=e;var r,i,s;let a=null;a="#document"===t.nodeName?n.getId(t):n.getId(ae.host(t));const l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(s=null==(i=t.ownerDocument)?void 0:i.defaultView)?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.call(this)},set(e){var t;const n=null==(t=c.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{o.adoptStyleSheets(e,a)}catch(e){}return n}}),$e((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function nt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.doc.defaultView;if(!n)return()=>{};let o;!function(e,t){const{mutationCb:n,mousemoveCb:o,mouseInteractionCb:r,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),o(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),r(...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&&(o=ze(e,e.doc));const r=function(e){let{mousemoveCb:t,sampling:n,doc:o,mirror:r}=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=de($e((e=>{const n=Date.now()-a;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],a=null})),s),u=$e(de($e((e=>{const t=je(e),{clientX:n,clientY:o}=Se(e)?e.changedTouches[0]:e;a||(a=fe()),l.push({x:n,y:o,id:r.getId(t),timeOffset:fe()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ae.Drag:e instanceof MouseEvent?Ae.MouseMove:Ae.TouchMove)})),i,{trailing:!1})),d=[le("mousemove",u,o),le("touchmove",u,o),le("drag",u,o)];return $e((()=>{d.forEach((e=>e()))}))}(e),i=Ue(e),s=Xe(e),a=function(e,t){let{viewportResizeCb:n}=e,{win:o}=t,r=-1,i=-1;return le("resize",$e(de($e((()=>{const e=ge(),t=ye();r===e&&i===t||(n({width:Number(t),height:Number(e)}),r=e,i=t)})),200)),o)}(e,{win:n}),l=function(e){let{inputCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d}=e;function p(e){let t=je(e);const o=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=ae.parentElement(t)),!t||!u||Ke.indexOf(u)<0||be(t,r,i,!0))return;if(t.classList.contains(s)||a&&t.matches(a))return;let p=t.value,f=!1;const m=k(t)||"";"radio"===m||"checkbox"===m?f=t.checked:(l[u.toLowerCase()]||l[m])&&(p=S({element:t,maskInputOptions:l,tagName:u,type:m,value:p,maskInputFn:c})),h(t,d?{text:p,isChecked:f,userTriggered:o}:{text:p,isChecked:f});const g=t.name;"radio"===m&&g&&f&&n.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==t){const t=e.value;h(e,d?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function h(e,n){const r=Je.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Je.set(e,n);const r=o.getId(e);$e(t)({...n,id:r})}}const f=("last"===u.input?["change"]:["input","change"]).map((e=>le(e,$e(p),n))),m=n.defaultView;if(!m)return()=>{f.forEach((e=>e()))};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&f.push(...y.map((e=>pe(e[0],e[1],{set(){$e(p)({target:this,isTrusted:!1})}},!1,m)))),$e((()=>{f.forEach((e=>e()))}))}(e),c=function(e){let{mediaInteractionCb:t,blockClass:n,blockSelector:o,mirror:r,sampling:i,doc:s}=e;const a=$e((e=>de($e((i=>{const s=je(i);if(!s||be(s,n,o,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:d}=s;t({type:e,id:r.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u,loop:d})})),i.media||500))),l=[le("play",a(De.Play),s),le("pause",a(De.Pause),s),le("seeked",a(De.Seeked),s),le("volumechange",a(De.VolumeChange),s),le("ratechange",a(De.RateChange),s)];return $e((()=>{l.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function(e,t){let{styleSheetRuleCb:n,mirror:o,stylesheetManager:r}=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:$e(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=et(t,o,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:a}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.addRule=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length;const o=`${e} { ${t} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[o,n])};const a=i.CSSStyleSheet.prototype.deleteRule;let l,c;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:$e(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.removeRule=function(e){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(l=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:$e(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.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:$e(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replaceSync:s}),e.apply(t,i)}))}));const u={};rt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(rt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),rt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),rt("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:$e(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=et(t.parentStyleSheet,o,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:[...Qe(t),a||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:$e(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t.parentStyleSheet,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:[...Qe(t),s]}]}),e.apply(t,i)}))})})),$e((()=>{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}),d=tt(e,e.doc),p=function(e,t){let{styleDeclarationCb:n,mirror:o,ignoreCSSAttributes:r,stylesheetManager:i}=e,{win:s}=t;const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:$e(((e,t,s)=>{var l;const[c,u,d]=s;if(r.has(c))return a.apply(t,[c,u,d]);const{id:p,styleId:h}=et(null==(l=t.parentRule)?void 0:l.parentStyleSheet,o,i.styleMirror);return(p&&-1!==p||h&&-1!==h)&&n({id:p,styleId:h,set:{property:c,value:u,priority:d},index:Qe(t.parentRule)}),e.apply(t,s)}))});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:$e(((e,t,s)=>{var a;const[c]=s;if(r.has(c))return l.apply(t,[c]);const{id:u,styleId:d}=et(null==(a=t.parentRule)?void 0:a.parentStyleSheet,o,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:Qe(t.parentRule)}),e.apply(t,s)}))}),$e((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n}),e.collectFonts&&(h=function(e){let{fontCb:t,doc:n}=e;const o=n.defaultView;if(!o)return()=>{};const r=[],i=new WeakMap,s=o.FontFace;o.FontFace=function(e,t,n){const o=new s(e,t,n);return i.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};const a=he(n.fonts,"add",(function(e){return function(n){return setTimeout($e((()=>{const e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{o.FontFace=s})),r.push(a),$e((()=>{r.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:o,blockSelector:r,selectionCb:i}=e;let s=!0;const a=$e((()=>{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;be(s,o,r,!0)||be(c,o,r,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:a})}));return a(),le("selectionchange",a)}(e),m=function(e){let{doc:t,customElementCb:n}=e;const o=t.defaultView;return o&&o.customElements?he(o.customElements,"define",(function(e){return function(t,o,r){try{n({define:{name:t}})}catch(e){console.warn(`Custom element callback failed for ${t}`)}return e.apply(this,[t,o,r])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return $e((()=>{Ge.forEach((e=>e.reset())),null==o||o.disconnect(),r(),i(),s(),a(),l(),c(),u(),d(),p(),h(),f(),m(),g.forEach((e=>e()))}))}function ot(e){return void 0!==window[e]}function rt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class it{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,o){const r=n||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e);let s=r.get(t);return s||(s=this.generateIdFn(),r.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,o)))}getRemoteId(e,t,n){const o=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const r=o.get(t);return r||-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 st{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new it(D)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new it(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,o;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(o=this.loadListener)||o.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 o=this.transformCrossOriginEvent(n,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Ee.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:Ee.IncrementalSnapshot,data:{source:Ae.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ee.Meta:case Ee.Load:case Ee.DomContentLoaded:return!1;case Ee.Plugin:return t;case Ee.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ee.IncrementalSnapshot:switch(t.data.source){case Ae.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 Ae.Drag:case Ae.TouchMove:case Ae.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ae.ViewportResize:return!1;case Ae.MediaInteraction:case Ae.MouseInteraction:case Ae.Scroll:case Ae.CanvasMutation:case Ae.Input:return this.replaceIds(t.data,e,["id"]),t;case Ae.StyleSheetRule:case Ae.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ae.Font:return t;case Ae.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Ae.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,o){for(const r of o)(Array.isArray(t[r])||"number"==typeof t[r])&&(Array.isArray(t[r])?t[r]=e.getIds(n,t[r]):t[r]=e.getId(n,t[r]));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(e,t){e.type===i.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class at{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(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(!y(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=ze({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Xe({...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(ae.host(e))),this.restoreHandlers.push(tt({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(he(e.prototype,"attachShadow",(function(e){return function(o){const r=e.call(this,o),i=ae.shadowRoot(this);return i&&Ne(this)&&n.addShadowRoot(i,t),r}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ut=0;ut<64;ut++)ct[lt.charCodeAt(ut)]=ut;const dt=new Map;const pt=(e,t,n)=>{if(!e||!mt(e,t)&&"object"!=typeof e)return;const o=function(e,t){let n=dt.get(e);return n||(n=new Map,dt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r};function ht(e,t,n){if(e instanceof Array)return e.map((e=>ht(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t<o;t+=3)r+=lt[n[t]>>2],r+=lt[(3&n[t])<<4|n[t+1]>>4],r+=lt[(15&n[t+1])<<2|n[t+2]>>6],r+=lt[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[ht(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:[ht(e.data,t,n),e.width,e.height]}}if(mt(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:pt(e,t,n)}}return e}const ft=(e,t,n)=>e.map((e=>ht(e,t,n))),mt=(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 gt(e,t,n,o){const r=[];try{const i=he(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(!be(this,t,n,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(r);if("__context"in this||(this.__context=e),o&&["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,[r,...s])}}));r.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach((e=>e()))}}function yt(e,t,n,o,r,i){const s=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=he(e,l,(function(e){return function(){for(var s=arguments.length,a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];const u=e.apply(this,a);if(pt(u,i,this),"tagName"in this.canvas&&!be(this.canvas,o,r,!0)){const e=ft(a,i,this),o={type:t,property:l,args:e};n(this.canvas,o)}return u}}));s.push(a)}catch{const o=pe(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});s.push(o)}return s}const vt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",bt="undefined"!=typeof window&&window.Blob&&new Blob([(_t=vt,Uint8Array.from(atob(_t),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var _t;function Ct(e){let t;try{if(t=bt&&(window.URL||window.webkitURL).createObjectURL(bt),!t)throw"";const n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(t){return new Worker("data:text/javascript;base64,"+vt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class St{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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:o,blockClass:r,blockSelector:i,recordCanvas:s,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(o,r,i),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,o,r,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,o,r){const i=gt(t,n,o,!0),s=new Map,a=new Ct;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:o,width:r,height:i}=e.data;this.mutationCb({id:t,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,r,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:o}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[],r=t=>{t.querySelectorAll("canvas").forEach((t=>{be(t,n,o,!0)||e.push(t)})),t.querySelectorAll("*").forEach((e=>{e.shadowRoot&&r(e.shadowRoot)}))};return r(t.document),e})().forEach((async e=>{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.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const o=e.clientWidth||e.width,i=e.clientHeight||e.height,l=await createImageBitmap(e,{resizeWidth:o,resizeHeight:i});a.postMessage({id:n,bitmap:l,width:o,height:i,dataURLOptions:r.dataURLOptions},[l])}))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=gt(e,t,n,!1),r=function(e,t,n,o){const r=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const i=he(t.CanvasRenderingContext2D.prototype,s,(function(r){return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return be(this.canvas,n,o,!0)||setTimeout((()=>{const n=ft(a,t,this);e(this.canvas,{type:Le["2D"],property:s,args:n})}),0),r.apply(this,a)}}));r.push(i)}catch{const n=pe(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:Le["2D"],property:s,args:[t],setter:!0})}});r.push(n)}return()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,o){const r=[];return r.push(...yt(t.WebGLRenderingContext.prototype,Le.WebGL,e,n,o,t)),void 0!==t.WebGL2RenderingContext&&r.push(...yt(t.WebGL2RenderingContext.prototype,Le.WebGL2,e,n,o,t)),()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{o(),r(),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 o=n.map((e=>{const{type:t,...n}=e;return n})),{type:r}=n[0];this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}class It{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new Te),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:[]},o=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),o.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,n)=>({rule:b(e,t.href),index:n})))})),n.styleIds.push(e)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class wt{constructor(){n(this,"nodeMap",new WeakMap),n(this,"active",!1)}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let kt,Tt,Mt,xt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){console.debug("Unable to override Array.from",e)}const Nt=new C;function Et(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:r="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:h,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:_,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:M=!1,inlineImages:x=!1,plugins:N,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:R}=e;Ye=R;const O=!w||window.parent===window;let L=!1;if(!O)try{window.parent.document&&(L=!1)}catch(e){L=!0}if(O&&!t)throw new Error("emit function is required");if(!O&&!L)return()=>{};void 0!==_&&void 0===v.mousemove&&(v.mousemove=_),Nt.reset();const D=!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}:void 0!==p?p:{password:!0},F=!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===h,headMetaDescKeywords:"all"===h,headTitleMutations:"all"===h}:h||{};let B;!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let H=0;const P=e=>{for(const t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!L&&(e=y(e)),e};kt=(e,r)=>{var i;const s=e;if(s.timestamp=fe(),!(null==(i=Ge[0])?void 0:i.isFrozen())||s.type===Ee.FullSnapshot||s.type===Ee.IncrementalSnapshot&&s.data.source===Ae.Mutation||Ge.forEach((e=>e.unfreeze())),O)null==t||t(P(s),r);else if(L){const e={type:"rrweb",event:P(s),origin:window.location.origin,isCheckout:r};window.parent.postMessage(e,"*")}if(s.type===Ee.FullSnapshot)B=s,H=0;else if(s.type===Ee.IncrementalSnapshot){if(s.data.source===Ae.Mutation&&s.data.isAttachIframe)return;H++;const e=o&&H>=o,t=n&&s.timestamp-B.timestamp>n;(e||t)&&Tt(!0)}};const Z=e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Mutation,...e}})},q=e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Scroll,...e}}),W=e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.CanvasMutation,...e}}),V=new It({mutationCb:Z,adoptedStyleSheetCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.AdoptedStyleSheet,...e}})}),Y=new st({mirror:Nt,mutationCb:Z,stylesheetManager:V,recordCrossOriginIframes:w,wrappedEmit:kt});for(const e of N||[])e.getMirror&&e.getMirror({nodeMirror:Nt,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const $=new wt;Mt=new St({recordCanvas:I,mutationCb:W,win:window,blockClass:r,blockSelector:i,mirror:Nt,sampling:v.canvas,dataURLOptions:b});const G=new at({mutationCb:Z,scrollCb:q,bypassOptions:{blockClass:r,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:D,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:I,inlineImages:x,sampling:v,slimDOMOptions:F,iframeManager:Y,stylesheetManager:V,canvasManager:Mt,keepIframeSrcFn:E,processedNodeManager:$},mirror:Nt});Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!S)return;kt({type:Ee.Meta,data:{href:window.location.href,width:ye(),height:ge()}},e),V.reset(),G.init(),Ge.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new C,blockClass:o="rr-block",blockSelector:r=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:S=(()=>!1)}=t||{};return X(e,{doc:e,mirror:n,blockClass:o,blockSelector:r,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===h,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===h?{}:h,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:Nt,blockClass:r,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:I,inlineImages:x,onSerialize:e=>{Ie(e,Nt)&&Y.addIframe(e),we(e,Nt)&&V.trackLinkElement(e),ke(e)&&G.addShadowRoot(ae.shadowRoot(e),document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!t)return console.warn("Failed to snapshot the document");kt({type:Ee.FullSnapshot,data:{node:t,initialOffset:me(window)}},e),Ge.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Nt.getId(document))};try{const e=[],t=e=>{var t;return $e(nt)({mutationCb:Z,mousemoveCb:(e,t)=>kt({type:Ee.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.MouseInteraction,...e}}),scrollCb:q,viewportResizeCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.ViewportResize,...e}}),inputCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Input,...e}}),mediaInteractionCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.MediaInteraction,...e}}),styleSheetRuleCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.StyleSheetRule,...e}}),styleDeclarationCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Font,...e}}),selectionCb:e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Selection,...e}})},customElementCb:e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.CustomElement,...e}})},blockClass:r,ignoreClass:s,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:I,inlineImages:x,userTriggeredOnInput:T,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:F,dataURLOptions:b,mirror:Nt,iframeManager:Y,stylesheetManager:V,shadowDomManager:G,processedNodeManager:$,canvasManager:Mt,ignoreCSSAttributes:A,plugins:(null==(t=null==N?void 0:N.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>kt({type:Ee.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};Y.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{Tt(),e.push(t(document)),xt=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(le("DOMContentLoaded",(()=>{kt({type:Ee.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&n()}))),e.push(le("load",(()=>{kt({type:Ee.Load,data:{}}),"load"===k&&n()}),window))),()=>{e.forEach((e=>e())),$.destroy(),xt=!1,Ye=void 0}}catch(e){console.warn(e)}}var At,Rt;Et.addCustomEvent=(e,t)=>{if(!xt)throw new Error("please add custom event after start recording");kt({type:Ee.Custom,data:{tag:e,payload:t}})},Et.freezePage=()=>{Ge.forEach((e=>e.freeze()))},Et.takeFullSnapshot=e=>{if(!xt)throw new Error("please take full snapshot after start recording");Tt(e)},Et.mirror=Nt,(Rt=At||(At={}))[Rt.NotStarted=0]="NotStarted",Rt[Rt.Running=1]="Running",Rt[Rt.Stopped=2]="Stopped";var Ot,Lt=Object.defineProperty,Dt=(e,t,n)=>((e,t,n)=>t in e?Lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ft=Object.defineProperty,Bt=(e,t,n)=>((e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ht=Object.defineProperty,Pt=(e,t,n)=>((e,t,n)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);const Zt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wt={};function Vt(e){if(Wt[e])return Wt[e];const t=globalThis[e],n=t.prototype,o=e in Zt?Zt[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in qt?qt[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return Wt[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?Wt[e]=i:n}catch{return n}}const Yt={};function $t(e,t,n){var o;const r=`${e}.${String(n)}`;if(Yt[r])return Yt[r].call(t);const i=Vt(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(Yt[r]=s,s.call(t)):t[n]}const Gt={};function jt(e,t,n){const o=`${e}.${String(n)}`;if(Gt[o])return Gt[o].bind(t);const r=Vt(e)[n];return"function"!=typeof r?t[n]:(Gt[o]=r,r.bind(t))}const zt={childNodes:function(e){return $t("Node",e,"childNodes")},parentNode:function(e){return $t("Node",e,"parentNode")},parentElement:function(e){return $t("Node",e,"parentElement")},textContent:function(e){return $t("Node",e,"textContent")},contains:function(e,t){return jt("Node",e,"contains")(t)},getRootNode:function(e){return jt("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?$t("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?$t("Element",e,"shadowRoot"):null},querySelector:function(e,t){return $t("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return $t("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Vt("MutationObserver").constructor}};class Ut{constructor(){Pt(this,"idNodeMap",new Map),Pt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const n=null==(t=this.getMeta(e))?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 Xt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Xt(zt.parentNode(e),t,n);for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return!!n&&Xt(zt.parentNode(e),t,n)}class Kt{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Kt))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Jt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},en={};function tn(e){if(en[e])return en[e];const t=globalThis[e],n=t.prototype,o=e in Jt?Jt[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in Qt?Qt[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return en[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?en[e]=i:n}catch{return n}}const nn={};function on(e,t,n){var o;const r=`${e}.${String(n)}`;if(nn[r])return nn[r].call(t);const i=tn(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(nn[r]=s,s.call(t)):t[n]}const rn={};function sn(e,t,n){const o=`${e}.${String(n)}`;if(rn[o])return rn[o].bind(t);const r=tn(e)[n];return"function"!=typeof r?t[n]:(rn[o]=r,r.bind(t))}const an={childNodes:function(e){return on("Node",e,"childNodes")},parentNode:function(e){return on("Node",e,"parentNode")},parentElement:function(e){return on("Node",e,"parentElement")},textContent:function(e){return on("Node",e,"textContent")},contains:function(e,t){return sn("Node",e,"contains")(t)},getRootNode:function(e){return sn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?on("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?on("Element",e,"shadowRoot"):null},querySelector:function(e,t){return on("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return on("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return tn("MutationObserver").constructor}};const ln="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 cn={map:{},getId:()=>(console.error(ln),-1),getNode:()=>(console.error(ln),null),removeNodeFromMap(){console.error(ln)},has:()=>(console.error(ln),!1),reset(){console.error(ln)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cn=new Proxy(cn,{get:(e,t,n)=>("map"===t&&console.error(ln),Reflect.get(e,t,n))}));let un=Date.now;function dn(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:an.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>(new Date).getTime());function pn(e){var t;let n=null;return"getRootNode"in e&&(null==(t=an.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&an.host(an.getRootNode(e))&&(n=an.host(an.getRootNode(e))),n}function hn(e){let t,n=e;for(;t=pn(n);)n=t;return n}function fn(e){const t=e.ownerDocument;if(!t)return!1;const n=hn(e);return an.contains(t,n)}const mn=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Bt(this,"id",1),Bt(this,"styleIDMap",new WeakMap),Bt(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++}},get _mirror(){return cn},closestElementOfNode:dn,getBaseDimension:function e(t,n){var o,r;const i=null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=i.getBoundingClientRect(),a=e(i,n),l=s.height/i.clientHeight;return{x:s.x*a.relativeScale+a.x,y:s.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,n){const o=t[n[0]];return 1===n.length?o:e(o.cssRules[n[1]].cssRules,n.slice(2))},getPositionsAndIndex:function(e){const t=[...e],n=t.pop();return{positions:t,index:n}},getRootShadowHost:hn,getShadowHost:pn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,o,r;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=an.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(o=an.parentElement(i.body))?void 0:o.scrollTop)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof Kt&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(an.shadowRoot(e)))},hookSetter:function e(t,n,o,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const s=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,r?o:{set(e){setTimeout((()=>{o.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>e(t,n,s||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(an.contains(t,e)||fn(e))},isAncestorRemoved:function e(t,n){if(function(e){const t=e&&"host"in e&&"mode"in e&&zt.host(e)||null;return Boolean(t&&"shadowRoot"in t&&zt.shadowRoot(t)===e)}(t))return!1;const o=n.getId(t);if(!n.has(o))return!0;const r=an.parentNode(t);return(!r||r.nodeType!==t.DOCUMENT_NODE)&&(!r||e(r,n))},isBlocked:function(e,t,n,o){if(!e)return!1;const r=dn(e);if(!r)return!1;try{if("string"==typeof t){if(r.classList.contains(t))return!0;if(o&&null!==r.closest("."+t))return!0}else if(Xt(r,t,o))return!0}catch(e){}if(n){if(r.matches(n))return!0;if(o&&null!==r.closest(n))return!0}return!1},isIgnored:function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,n){n(t.value);for(let o=t.children.length-1;o>=0;o--)e(t.children[o],n)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return un},on:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const o={capture:!0,passive:!0};return n.addEventListener(e,t,o),()=>n.removeEventListener(e,t,o)},patch:function(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}},polyfill:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){const t={},n=(e,n)=>{const o={value:e,parent:n,children:[]};return t[e.node.id]=o,o},o=[];for(const r of e){const{nextId:e,parentId:i}=r;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,n(r,i.parent))}else{const e=o.indexOf(i);o.splice(e,0,n(r,null))}}else if(i in t){const e=t[i];e.children.push(n(r,e))}else o.push(n(r,null))}return o},shadowHostInDom:fn,throttle:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=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();r||!1!==n.leading||(r=l);const c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,s)):o||!1===n.trailing||(o=setTimeout((()=>{r=!1===n.leading?0:Date.now(),o=null,e.apply(u,s)}),c))}},uniqueTextMutations:function(e){const t=new Set,n=[];for(let o=e.length;o--;){const r=e[o];t.has(r.id)||(n.push(r),t.add(r.id))}return n}},Symbol.toStringTag,{value:"Module"}));for(var gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vn=0;vn<64;vn++)yn[gn.charCodeAt(vn)]=vn;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Ot=e.contentWindow)?void 0:Ot.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var bn;new Ut,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(bn||(bn={}));class _n{constructor(e){Dt(this,"fileName"),Dt(this,"functionName"),Dt(this,"lineNumber"),Dt(this,"columnNumber"),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 Cn=/(^|@)\S+:\d+/,Sn=/^\s*at .*(\S+:\d+|\(native\))/m,In=/^(eval@)?(\[native code])?$/,wn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Sn)?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(Sn)}),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 o=t.split(/\s+/).slice(1),r=this.extractLocation(n?n[1]:o.pop()),i=o.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new _n({functionName:i,fileName:s,lineNumber:r[1],columnNumber:r[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(In)}),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 _n({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),o=n&&n[1]?n[1]:void 0,r=this.extractLocation(e.replace(t,""));return new _n({functionName:o,fileName:r[0],lineNumber:r[1],columnNumber:r[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"),o=[];for(let e=2,r=n.length;e<r;e+=2){const r=t.exec(n[e]);r&&o.push(new _n({fileName:r[2],lineNumber:parseFloat(r[1])}))}return o},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),o=[];for(let e=0,r=n.length;e<r;e+=2){const r=t.exec(n[e]);r&&o.push(new _n({functionName:r[3]||void 0,fileName:r[2],lineNumber:parseFloat(r[1])}))}return o},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Cn)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),n=this.extractLocation(t.pop()),o=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new _n({functionName:o,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function kn(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();const o=e.parentElement,r=[];if(o.children&&o.children.length>0)for(let e=0;e<o.children.length;e++){const t=o.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===n&&r.push(t)}r.length>1&&(n+=`:eq(${r.indexOf(e)})`),t=n+(t?">"+t:""),e=o}return t}function Tn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Mn(e,t){if(0===t)return!0;const n=Object.keys(e);for(const o of n)if(Tn(e[o])&&Mn(e[o],t-1))return!0;return!1}function xn(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const o=[],r=[];return JSON.stringify(e,(function(e,t){if(o.length>0){const n=o.indexOf(this);~n?o.splice(n+1):o.push(this),~n?r.splice(n,1/0,e):r.push(e),~o.indexOf(t)&&(t=o[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,o.indexOf(t)).join(".")+"]")}else o.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Tn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Tn(e)&&Mn(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 o=t[n];Array.isArray(o)?e[n]=kn(o.length?o[0]:null):e[n]=o}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 Nn={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 En(e,t,n){const o=n?Object.assign({},Nn,n):Nn,r=o.logger;if(!r)return()=>{};let i;i="string"==typeof r?t[r]:r;let s=0,a=!1;const l=[];if(o.level.includes("error")){const n=t=>{const n=t.message,r=t.error,i=wn.parse(r).map((e=>e.toString())),s=[xn(n,o.stringifyOptions)];e({level:"error",trace:i,payload:s})};t.addEventListener("error",n),l.push((()=>{t.removeEventListener("error",n)}));const r=t=>{let n,r;t.reason instanceof Error?(n=t.reason,r=[xn(`Uncaught (in promise) ${n.name}: ${n.message}`,o.stringifyOptions)]):(n=new Error,r=[xn("Uncaught (in promise)",o.stringifyOptions),xn(t.reason,o.stringifyOptions)]);const i=wn.parse(n).map((e=>e.toString()));e({level:"error",trace:i,payload:r})};t.addEventListener("unhandledrejection",r),l.push((()=>{t.removeEventListener("unhandledrejection",r)}))}for(const e of o.level)l.push(c(i,e));return()=>{l.forEach((e=>e()))};function c(t,n){var r=this;return t[n]?mn.patch(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(r,l),!("assert"===n&&l[0]||a)){a=!0;try{const t=wn.parse(new Error).map((e=>e.toString())).splice(1),r=("assert"===n?l.slice(1):l).map((e=>xn(e,o.stringifyOptions)));s++,s<o.lengthThreshold?e({level:n,trace:t,payload:r}):s===o.lengthThreshold&&e({level:"warn",trace:[],payload:[xn("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{a=!1}}})):()=>{}}}const An=e=>({name:"rrweb/console@1",observer:En,options:e}),Rn=Array.isArray,On=Object.prototype,Ln=On.hasOwnProperty,Dn=On.toString,Fn=Rn||function(e){return"[object Array]"===Dn.call(e)},Bn=function(e){return"function"==typeof e},Hn=function(e){return e===Object(e)&&!Fn(e)},Pn=function(e){return void 0===e},Zn=function(e){return"[object String]"==Dn.call(e)},qn=function(e){return Zn(e)&&0===e.trim().length},Wn=function(e){return null===e},Vn=function(e){return Pn(e)||Wn(e)},Yn=function(e){return"[object Number]"==Dn.call(e)},$n=function(e){return"[object Boolean]"===Dn.call(e)},Gn=e=>e instanceof Document,jn=e=>e instanceof FormData,zn="undefined"!=typeof window?window:void 0,Un="undefined"!=typeof globalThis?globalThis:zn,Xn=Array.prototype.forEach,Kn=null==Un?void 0:Un.navigator,Jn=null==Un?void 0:Un.document;null==Un||Un.location,null==Un||Un.fetch,null!=Un&&Un.XMLHttpRequest&&"withCredentials"in new Un.XMLHttpRequest&&Un.XMLHttpRequest,null==Un||Un.AbortController,null==Kn||Kn.userAgent;const Qn=null!=zn?zn:{},eo="[PostHog.js]",to={_log:function(e){if(zn&&Qn.POSTHOG_DEBUG&&!Pn(zn.console)&&zn.console){const r="__rrweb_original__"in zn.console[e]?zn.console[e].__rrweb_original__:zn.console[e];for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r(eo,...n)}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];to._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];to._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];to._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(eo,...t)},uninitializedWarning:e=>{to.error(`You must initialize PostHog before calling ${e}`)}},no={},oo=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ro(e,t,n){if(Fn(e))if(Xn&&e.forEach===Xn)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(let o=0,r=e.length;o<r;o++)if(o in e&&t.call(n,e[o],o)===no)return}function io(e,t,n){if(!Vn(e)){if(Fn(e))return ro(e,t,n);if(jn(e)){for(const o of e.entries())if(t.call(n,o[1],o[0])===no)return}else for(const o in e)if(Ln.call(e,o)&&t.call(n,e[o],o)===no)return}}const so=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return ro(n,(function(t){for(const n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function ao(e,t){return-1!==e.indexOf(t)}function lo(e){const t=Object.keys(e);let n=t.length;const o=new Array(n);for(;n--;)o[n]=[t[n],e[t[n]]];return o}const co=function(e){let t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";const r=[];return io(e,(function(e,o){Pn(e)||Pn(o)||"undefined"===o||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(o),r[r.length]=n+"="+t)})),r.join(o)},uo="__POSTHOG_TOOLBAR__";function po(e){return!!e&&1===e.nodeType}function ho(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function fo(e){return e?oo(e).split(/\s+/):[]}function mo(e){let t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return fo(t)}function go(e){let t="";return vo(e)&&!bo(e)&&e.childNodes&&e.childNodes.length&&io(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return Vn(e)?null:oo(e).split(/(\s+)/).filter((e=>To(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),oo(t)}const yo=["a","button","form","input","select","textarea","label"];function vo(e){for(let t=e;t.parentNode&&!ho(t,"body");t=t.parentNode){const e=mo(t);if(ao(e,"ph-sensitive")||ao(e,"ph-no-capture"))return!1}if(ao(mo(e),"ph-include"))return!0;const t=e.type||"";if(Zn(t))switch(t.toLowerCase()){case"hidden":case"password":return!1}const n=e.name||e.id||"";if(Zn(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function bo(e){return!!(ho(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ho(e,"select")||ho(e,"textarea")||"true"===e.getAttribute("contenteditable"))}const _o="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Co=new RegExp(`^(?:${_o})$`),So=new RegExp(_o),Io="\\d{3}-?\\d{2}-?\\d{4}",wo=new RegExp(`^(${Io})$`),ko=new RegExp(`(${Io})`);function To(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Vn(e))return!1;if(Zn(e)){e=oo(e);if((t?Co:So).test((e||"").replace(/[- ]/g,"")))return!1;if((t?wo:ko).test(e))return!1}return!0}function Mo(e){let t=go(e);return t=`${t} ${xo(e)}`.trim(),To(t)?t:""}function xo(e){let t="";return e&&e.childNodes&&e.childNodes.length&&io(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{const n=go(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${xo(e)}`.trim())}catch(e){to.error(e)}})),t}function No(e){return function(e){const t=e.map((e=>{var t,n;let o="";if(e.tag_name&&(o+=e.tag_name),e.attr_class){e.attr_class.sort();for(const t of e.attr_class)o+=`.${t.replace(/"/g,"")}`}const r={...e.text?{text:e.text}:{},"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0,...e.href?{href:e.href}:{},...e.attr_id?{attr_id:e.attr_id}:{},...e.attributes},i={};return lo(r).sort(((e,t)=>{let[n]=e,[o]=t;return n.localeCompare(o)})).forEach((e=>{let[t,n]=e;return i[Eo(t.toString())]=Eo(n.toString())})),o+=":",o+=lo(r).map((e=>{let[t,n]=e;return`${t}="${n}"`})).join(""),o}));return t.join(";")}(function(e){return e.map((e=>{var t,n;const o={text:null===(t=e.$el_text)||void 0===t?void 0:t.slice(0,400),tag_name:e.tag_name,href:null===(n=e.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:Ao(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return lo(e).filter((e=>{let[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{let[t,n]=e;return o.attributes[t]=n})),o}))}(e))}function Eo(e){return e.replace(/"|\\"/g,'\\"')}function Ao(e){const t=e.attr__class;return t?Fn(t)?t:fo(t):void 0}const Ro={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 Oo(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return Bn(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}}function Lo(e,t){var n;const o=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),r={hostname:o,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==o||!o.trim().length)return r;for(const e of t.payloadHostDenyList)if(o.endsWith(e))return{hostname:o,isHostDenied:!0};return r}const Do=e=>"navigation"===e.entryType,Fo=e=>"resource"===e.entryType;function Bo(e,t,n){if(n.recordInitialRequests){const o=t.performance.getEntries().filter((e=>Do(e)||Fo(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:o.flatMap((e=>Vo({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}const o=new t.PerformanceObserver((t=>{const o=t.getEntries().filter((e=>Do(e)||Fo(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:o.flatMap((e=>Vo({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),r=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:r}),()=>{o.disconnect()}}function Ho(e,t){return!!t&&($n(t)||t[e])}function Po(e){let{type:t,recordBody:n,headers:o}=e;function r(e){const t=Object.keys(o).find((e=>"content-type"===e.toLowerCase())),n=t&&o[t];return e.some((e=>null==n?void 0:n.includes(e)))}if(!n)return!1;if($n(n))return!0;if(Fn(n))return r(n);const i=n[t];return $n(i)?i:r(i)}async function Zo(e,t,n,o,r){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return to.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=>Fo(e)&&e.initiatorType===t&&(Pn(o)||e.startTime>=o)&&(Pn(r)||e.startTime<=r)));return s||(await new Promise((e=>setTimeout(e,50*i))),Zo(e,t,n,o,r,i+1))}function qo(e){let{body:t,options:n,url:o}=e;if(Vn(t))return null;const{hostname:r,isHostDenied:i}=Lo(o,n);if(i)return r+" is in deny list";if(Zn(t))return t;if(Gn(t))return t.textContent;if(jn(t))return co(t);if(Hn(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 Wo=e=>!Wn(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Vo(e){let{entry:t,method:n,status:o,networkRequest:r,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:Pn(s)?void 0:Math.round(s),endTime:Pn(a)?void 0:Math.round(a),timeOrigin:u,timestamp:d,method:n,initiatorType:t?t.initiatorType:c,status:o,requestHeaders:r.requestHeaders,requestBody:r.requestBody,responseHeaders:r.responseHeaders,responseBody:r.responseBody,isInitial:i}];if(Wo(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 Yo=["video/","audio/"];function $o(e){return new Promise(((t,n)=>{const o=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(o)))}catch{clearTimeout(o),t("[SessionReplay] Failed to read body")}}))}async function Go(e){let{r:t,options:n,url:o}=e;const r=function(e){var t;let{r:n,options:o,url:r}=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=Yo.some((e=>null==i?void 0:i.startsWith(e)));if(i&&s)return`Content-Type ${i} is not supported`;const{hostname:a,isHostDenied:l}=Lo(r,o);return l?a+" is in deny list":null}({r:t,options:n,url:o});return Wn(r)?$o(t):Promise.resolve(r)}function jo(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};const o=Ho("request",n.recordHeaders),r=Ho("response",n.recordHeaders),i=Oo(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})),o&&(u.requestHeaders=e),Po({type:"request",headers:e,url:s,recordBody:n.recordBody})&&(u.requestBody=await async function(e){let{r:t,options:n,url:o}=e;const{hostname:r,isHostDenied:i}=Lo(o,n);return i?Promise.resolve(r+" is in deny list"):$o(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})),r&&(u.responseHeaders=a),Po({type:"response",headers:a,url:s,recordBody:n.recordBody})&&(u.responseBody=await Go({r:c,options:n,url:s})),c}finally{Zo(t,"fetch",l.url,d,p).then((t=>{var n;const o=Vo({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:o})})).catch((()=>{}))}}));return()=>{i()}}let zo=null;function Uo(e,t,n){if(!("performance"in t))return()=>{};if(zo)return to.warn("Network observer already initialised, doing nothing"),()=>{};const o=n?Object.assign({},Ro,n):Ro,r=t=>{const n=[];t.requests.forEach((e=>{const t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e({...t,requests:n})},i=Bo(r,t,o);let s=()=>{},a=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};const o=Ho("request",n.recordHeaders),r=Ho("response",n.recordHeaders),i=Oo(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,m;const g={},y=d.setRequestHeader.bind(d);d.setRequestHeader=(e,t)=>(g[e]=t,y(e,t)),o&&(h.requestHeaders=g);const v=d.send.bind(d);d.send=e=>(Po({type:"request",headers:g,url:a,recordBody:n.recordBody})&&(h.requestBody=qo({body:e,options:n,url:a})),f=t.performance.now(),v(e)),d.addEventListener("readystatechange",(()=>{if(d.readyState!==d.DONE)return;m=t.performance.now();const o={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{const t=e.split(": "),n=t.shift(),r=t.join(": ");n&&(o[n]=r)})),r&&(h.responseHeaders=o),Po({type:"response",headers:o,url:a,recordBody:n.recordBody})&&(h.responseBody=qo({body:d.response,options:n,url:a})),Zo(t,"xmlhttprequest",p.url,f,m).then((t=>{const n=Vo({entry:t,method:p.method,status:null==d?void 0:d.status,networkRequest:h,start:f,end:m,url:a.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))})),i.call(d,s,a,l,c,u)}));return()=>{i()}}(r,t,o),a=jo(r,t,o)),zo=()=>{i(),s(),a()},zo}const Xo=e=>({name:"rrweb/network@1",observer:Uo,options:e});let Ko,Jo,Qo;Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{},Qn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:An,getRecordNetworkPlugin:Xo},Qn.__PosthogExtensions__.rrweb={record:Et,version:"v2"},Qn.rrweb={record:Et,version:"v2"},Qn.rrwebConsoleRecord={getRecordConsolePlugin:An},Qn.getRecordNetworkPlugin=Xo,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(Ko||(Ko={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(Jo||(Jo={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(Qo||(Qo={}));var er,tr,nr,or,rr,ir,sr,ar,lr={},cr=[],ur=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,dr=Array.isArray;function pr(e,t){for(var n in t)e[n]=t[n];return e}function hr(e){var t=e.parentNode;t&&t.removeChild(e)}function fr(e,t,n){var o,r,i,s={};for(i in t)"key"==i?o=t[i]:"ref"==i?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?er.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 mr(e,s,o,r,null)}function mr(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++nr:r,__i:-1,__u:0};return null==r&&null!=tr.vnode&&tr.vnode(i),i}function gr(e){return e.children}function yr(e,t){this.props=e,this.context=t}function vr(e,t){if(null==t)return e.__?vr(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?vr(e):null}function br(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 br(e)}}function _r(e){(!e.__d&&(e.__d=!0)&&or.push(e)&&!Cr.__r++||rr!==tr.debounceRendering)&&((rr=tr.debounceRendering)||ir)(Cr)}function Cr(){var e,t,n,o,r,i,s,a,l;for(or.sort(sr);e=or.shift();)e.__d&&(t=or.length,o=void 0,i=(r=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((o=pr({},r)).__v=r.__v+1,tr.vnode&&tr.vnode(o),Nr(s,o,r,n.__n,void 0!==s.ownerSVGElement,32&r.__u?[i]:null,a,null==i?vr(r):i,!!(32&r.__u),l),o.__.__k[o.__i]=o,Er(a,o,l),o.__e!=i&&br(o)),or.length>t&&or.sort(sr));Cr.__r=0}function Sr(e,t,n,o,r,i,s,a,l,c,u){var d,p,h,f,m,g=o&&o.__k||cr,y=t.length;for(n.__d=l,function(e,t,n){var o,r,i,s,a,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],o=0;o<l;o++)null!=(r=e.__k[o]=null==(r=t[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?mr(null,r,null,null,r):dr(r)?mr(gr,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?mr(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=wr(r,n,s=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__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!==o+d&&(r.__u|=65536))):(i=n[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=vr(i)),Rr(i,i,!1),n[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(i=n[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=vr(i)),Rr(i,i))}(n,t,g),l=n.__d,d=0;d<y;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?lr:g[h.__i]||lr,h.__i=d,Nr(e,h,p,r,i,s,a,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Ar(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?l=Ir(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=m}function Ir(e,t,n){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=Ir(o[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function wr(e,t,n,o){var r=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&r==l.key&&i===l.type)return n;if(o>(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)&&r==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&0==(131072&l.__u)&&r==l.key&&i===l.type)return a;a++}}return-1}function kr(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ur.test(t)?n:n+"px"}function Tr(e,t,n,o,r){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||kr(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||kr(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?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?xr:Mr,i)):e.removeEventListener(t,i?xr:Mr,i);else{if(r)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 Mr(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(tr.event?tr.event(e):e)}function xr(e){return this.l[e.type+!0](tr.event?tr.event(e):e)}function Nr(e,t,n,o,r,i,s,a,l,c){var u,d,p,h,f,m,g,y,v,b,_,C,S,I,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=tr.__b)&&u(t);e:if("function"==typeof k)try{if(y=t.props,v=(u=k.contextType)&&o[u.__c],b=u?v?v.props.value:u.__:o,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,b):(t.__c=d=new yr(y,b),d.constructor=k,d.render=Or),v&&v.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=o,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=pr({},d.__s)),pr(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,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||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)})),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,f,m)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,C=tr.__r,S=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do{d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(o=pr(pr({},o),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),Sr(e,dr(w=null!=u&&u.type===gr&&null==u.key?u.props.children:u)?w:[w],t,n,o,r,i,s,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),g&&(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),tr.__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,o,r,i,s,a,l){var c,u,d,p,h,f,m,g=n.props,y=t.props,v=t.type;if("svg"===v&&(r=!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=r?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),i=null,a=!1}if(null===v)g===y||a&&e.data===y||(e.data=y);else{if(i=i&&er.call(e.childNodes),g=n.props||lr,!a&&null!=i)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)h=g[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in y||Tr(e,c,null,h,r));for(c in y)h=y[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||a&&"function"!=typeof h||g[c]===h||Tr(e,c,h,g[c],r);if(u)a||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),Sr(e,dr(p)?p:[p],t,n,o,r&&"foreignObject"!==v,i,s,i?i[0]:n.__k&&vr(n,0),a,l),null!=i)for(c=i.length;c--;)null!=i[c]&&hr(i[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==g[c])&&Tr(e,c,f,g[c],!1),c="checked",void 0!==m&&m!==e[c]&&Tr(e,c,m,g[c],!1))}return e}(n.__e,t,n,o,r,i,s,l,c);(u=tr.diffed)&&u(t)}function Er(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)Ar(n[o],n[++o],n[++o]);tr.__c&&tr.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){tr.__e(e,t.__v)}}))}function Ar(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){tr.__e(e,n)}}function Rr(e,t,n){var o,r;if(tr.unmount&&tr.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Ar(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){tr.__e(e,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&Rr(o[r],t,n||"function"!=typeof e.type);n||null==e.__e||hr(e.__e),e.__=e.__e=e.__d=void 0}function Or(e,t,n){return this.constructor(e,n)}function Lr(e,t,n){var o,r,i,s;tr.__&&tr.__(e,t),r=(o="function"==typeof n)?null:t.__k,i=[],s=[],Nr(t,e=(!o&&n||t).__k=fr(gr,null,[e]),r||lr,lr,void 0!==t.ownerSVGElement,!o&&n?[n]:r?null:t.firstChild?er.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),Er(i,e,s)}function Dr(e,t,n){var o,r,i,s,a=pr({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==i?o=t[i]:"ref"==i?r=t[i]:a[i]=void 0===t[i]&&void 0!==s?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?er.call(arguments,2):n),mr(e.type,a,o||e.key,r||e.ref,null)}er=cr.slice,tr={__e:function(e,t,n,o){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},nr=0,yr.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=pr({},this.state),"function"==typeof e&&(e=e(pr({},n),this.props)),e&&pr(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),_r(this))},yr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_r(this))},yr.prototype.render=gr,or=[],ir="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sr=function(e,t){return e.__v.__b-t.__v.__b},Cr.__r=0,ar=0;const Fr=zn,Br=Jn,Hr="seenSurvey_",Pr=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: ${qr((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 Zr(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 qr(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vr;"#"===t[0]&&(e=Zr(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=Zr(n)),!e)return"black";const o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){const e=parseInt(o[1]),t=parseInt(o[2]),n=parseInt(o[3]);return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)>127.5?"black":"white"}return"black"}const 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"},Vr="#eeeded",Yr=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o&&(localStorage.setItem(Xr(n),"true"),o.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=o.get_session_replay_url)||void 0===e?void 0:e.call(o),...t,$set:{[Kr(n,"responded")]:!0}}),Fr.dispatchEvent(new Event("PHSurveySent")))},$r=(e,t,n)=>{var o;!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===(o=t.get_session_replay_url)||void 0===o?void 0:o.call(t),$set:{[Kr(e,"dismissed")]:!0}}),localStorage.setItem(Xr(e),"true"),Fr.dispatchEvent(new Event("PHSurveyClosed")))},Gr=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),jr=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,zr=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?jr(e.questions,Gr(e.questions)):e.questions),Ur=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,o,r,i,s;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(o=n.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(s=i.values)||void 0===s?void 0:s.length)>0})(e))},Xr=e=>{let t=`${Hr}${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`${Hr}${e.id}_${e.current_iteration}`),t},Kr=(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},Jr=function(e,t){var n={__c:t="__cC"+ar++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,_r(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}),Qr=e=>{let{component:t,children:n,renderAsHtml:o,style:r}=e;return Dr(t,o?{dangerouslySetInnerHTML:{__html:n},style:r}:{children:n,style:r})},ei=Jn;var ti,ni,oi,ri,ii=0,si=[],ai=[],li=tr.__b,ci=tr.__r,ui=tr.diffed,di=tr.__c,pi=tr.unmount;function hi(e,t){tr.__h&&tr.__h(ni,e,ii||t),ii=0;var n=ni.__H||(ni.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ai}),n.__[e]}function fi(e){return ii=1,function(e,t,n){var o=hi(ti++,2);if(o.t=e,!o.__c&&(o.__=[ki(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=ni,!ni.u)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&o.__c.props===e)&&(!i||i.call(this,e,t,n))};ni.u=!0;var i=ni.shouldComponentUpdate,s=ni.componentWillUpdate;ni.componentWillUpdate=function(e,t,n){if(this.__e){var o=i;i=void 0,r(e,t,n),i=o}s&&s.call(this,e,t,n)},ni.shouldComponentUpdate=r}return o.__N||o.__}(ki,e)}function mi(e,t){var n=hi(ti++,3);!tr.__s&&wi(n.__H,t)&&(n.__=e,n.i=t,ni.__H.__h.push(n))}function gi(e){return ii=5,yi((function(){return{current:e}}),[])}function yi(e,t){var n=hi(ti++,7);return wi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function vi(e){var t=ni.context[e.__c],n=hi(ti++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ni)),t.props.value):e.__}function bi(){for(var e;e=si.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Si),e.__H.__h.forEach(Ii),e.__H.__h=[]}catch(t){e.__H.__h=[],tr.__e(t,e.__v)}}tr.__b=function(e){ni=null,li&&li(e)},tr.__r=function(e){ci&&ci(e),ti=0;var t=(ni=e.__c).__H;t&&(oi===ni?(t.__h=[],ni.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ai,e.__N=e.i=void 0}))):(t.__h.forEach(Si),t.__h.forEach(Ii),t.__h=[],ti=0)),oi=ni},tr.diffed=function(e){ui&&ui(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==si.push(t)&&ri===tr.requestAnimationFrame||((ri=tr.requestAnimationFrame)||Ci)(bi)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ai&&(e.__=e.__V),e.i=void 0,e.__V=ai}))),oi=ni=null},tr.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Si),e.__h=e.__h.filter((function(e){return!e.__||Ii(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],tr.__e(n,e.__v)}})),di&&di(e,t)},tr.unmount=function(e){pi&&pi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Si(e)}catch(e){t=e}})),n.__H=void 0,t&&tr.__e(t,n.__v))};var _i="function"==typeof requestAnimationFrame;function Ci(e){var t,n=function(){clearTimeout(o),_i&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);_i&&(t=requestAnimationFrame(n))}function Si(e){var t=ni,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ni=t}function Ii(e){var t=ni;e.__c=e.__(),ni=t}function wi(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ki(e,t){return"function"==typeof t?t(e):t}var Ti=0;function Mi(e,t,n,o,r,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:--Ti,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return tr.vnode&&tr.vnode(c),c}const xi=Mi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mi("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"})}),Ni=Mi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mi("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"})}),Ei=Mi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mi("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"})}),Ai=Mi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mi("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"})}),Ri=Mi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mi("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"})}),Oi=Mi("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mi("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"})}),Li=Mi("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mi("g",{"clip-path":"url(#clip0_2415_6911)",children:[Mi("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Mi("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Mi("g",{mask:"url(#mask0_2415_6911)",children:[Mi("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"}),Mi("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"}),Mi("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"}),Mi("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"}),Mi("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"}),Mi("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"})]})]}),Mi("defs",{children:Mi("clipPath",{id:"clip0_2415_6911",children:Mi("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Di=Mi("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mi("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 Fi(){return Mi("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Li]})}function Bi(e){let{text:t,submitDisabled:n,appearance:o,onSubmit:r,link:i}=e;const{isPreviewMode:s,isPopup:a}=vi(Jr),l=o.submitButtonTextColor||qr(o.submitButtonColor||Wr.submitButtonColor);return Mi("div",{className:"bottom-section",children:[Mi("div",{className:"buttons",children:Mi("button",{className:"form-submit",disabled:n&&!s,type:"button",style:a?{color:l}:{},onClick:()=>{s||(i&&(null==zn||zn.open(i)),r())},children:t})}),!o.whiteLabel&&Mi(Fi,{})]})}function Hi(e){let{question:t,description:n,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e;const{isPopup:s}=vi(Jr);return Mi("div",{style:s?{backgroundColor:r||Wr.backgroundColor}:{},children:[Mi("div",{className:"survey-question",children:t}),n&&Qr({component:fr("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==o})]})}function Pi(e){let{onClick:t}=e;const{isPreviewMode:n}=vi(Jr);return Mi("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Mi("button",{className:"form-cancel",onClick:t,disabled:n,children:Oi})})}function Zi(e){let{header:t,description:n,contentType:o,forceDisableHtml:r,appearance:i,onClose:s,styleOverrides:a}=e;const l=qr(i.backgroundColor||Wr.backgroundColor),{isPopup:c}=vi(Jr);return Mi(gr,{children:Mi("div",{className:"thank-you-message",style:{...a},children:Mi("div",{className:"thank-you-message-container",children:[c&&Mi(Pi,{onClick:()=>s()}),Mi("h3",{className:"thank-you-message-header",style:{color:l},children:t}),n&&Qr({component:fr("div",{className:"thank-you-message-body"}),children:n,renderAsHtml:!r&&"text"!==o,style:{color:l}}),c&&Mi(Bi,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>s()})]})})})}function qi(e){var t;const n=gi(null),[o,r]=fi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return mi((()=>{if(n.current){const e=function(e){const t=Fr.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 o=parseInt(n[1]),r=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(n.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:o}}function Wi(e){let{question:t,forceDisableHtml:n,appearance:o,onSubmit:r}=e;const i=gi(null),[s,a]=fi("");return Mi("div",{ref:i,children:[Mi(Hi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:n}),Mi("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),Mi(Bi,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:o,onSubmit:()=>r(s)})]})}function Vi(e){let{question:t,forceDisableHtml:n,appearance:o,onSubmit:r}=e;return Mi(gr,{children:[Mi(Hi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Mi(Bi,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function Yi(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s=t.scale,a=10===t.scale?0:1,[l,c]=fi(null);return Mi(gr,{children:[Mi(Hi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:r.backgroundColor}),Mi("div",{className:"rating-section",children:[Mi("div",{className:"rating-options",children:["emoji"===t.display&&Mi("div",{className:"rating-options-emoji",children:(3===t.scale?ji:zi).map(((e,t)=>{const n=t+1===l;return Mi("button",{className:`ratings-emoji question-${o}-rating-${t} ${n?"rating-active":null}`,value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},t)}))}),"number"===t.display&&Mi("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${s-a+1}, minmax(0, 1fr))`},children:Ji(t.scale).map(((e,t)=>Mi($i,{displayQuestionIndex:o,active:l===e,appearance:r,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),Mi("div",{className:"rating-text",children:[Mi("div",{children:t.lowerBoundLabel}),Mi("div",{children:t.upperBoundLabel})]})]}),Mi(Bi,{text:t.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:Wn(l)&&!t.optional,appearance:r,onSubmit:()=>i(l)})]})}function $i(e){let{num:t,active:n,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e;const{textColor:s,ref:a}=qi({appearance:r,defaultTextColor:"black",forceUpdate:n});return Mi("button",{ref:a,className:`ratings-number question-${o}-rating-${t} ${n?"rating-active":null}`,type:"button",onClick:()=>{i(t)},style:{color:s,backgroundColor:n?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:t})}function Gi(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s=gi(null),a=yi((()=>(e=>{if(!e.shuffleOptions)return e.choices;const t=e.choices;let n="";e.hasOpenChoice&&(n=t.pop());const o=jr(t,Gr(t));return e.hasOpenChoice&&(e.choices.push(n),o.push(n)),o})(t)),[t]),[l,c]=fi(t.type===Jo.MultipleChoice?[]:null),[u,d]=fi(!1),[p,h]=fi(""),f=t.type===Jo.SingleChoice?"radio":"checkbox";return Mi("div",{ref:s,children:[Mi(Hi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:r.backgroundColor}),Mi("div",{className:"multiple-choice-options",children:a.map(((e,n)=>{let r="choice-option";const i=e,s=e;return t.hasOpenChoice&&n===t.choices.length-1&&(r+=" choice-option-open"),Mi("div",{className:r,children:[Mi("input",{type:f,id:`surveyQuestion${o}Choice${n}`,name:`question${o}`,value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?d(!u):t.type===Jo.SingleChoice?c(i):t.type===Jo.MultipleChoice&&Fn(l)?l.includes(i)?c(l.filter((e=>e!==i))):c([...l,i]):void 0}),Mi("label",{htmlFor:`surveyQuestion${o}Choice${n}`,style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Mi(gr,{children:[Mi("span",{children:[s,":"]}),Mi("input",{type:"text",id:`surveyQuestion${o}Choice${n}Open`,name:`question${o}`,onInput:e=>{const n=e.currentTarget.value;return t.type===Jo.SingleChoice?c(n):t.type===Jo.MultipleChoice&&Fn(l)?h(n):void 0}})]}):s}),Mi("span",{className:"choice-check",style:{color:"black"},children:Di})]})}))}),Mi(Bi,{text:t.buttonText||"Submit",submitDisabled:(Wn(l)||Fn(l)&&!u&&0===l.length||Fn(l)&&u&&!p&&0===l.length&&!t.optional)&&!t.optional,appearance:r,onSubmit:()=>{u&&t.type===Jo.MultipleChoice?Fn(l)&&i([...l,p]):i(l)}})]})}const ji=[Ei,Ni,xi],zi=[Ai,Ei,Ni,xi,Ri],Ui=[1,2,3,4,5],Xi=[1,2,3,4,5,6,7],Ki=[0,1,2,3,4,5,6,7,8,9,10];function Ji(e){switch(e){case 5:default:return Ui;case 7:return Xi;case 10:return Ki}}const Qi=zn,es=Jn;class ts{constructor(e){this.posthog=e,this.surveyInFocus=null}canShowNextEventBasedSurvey=()=>{const e=es.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,o=localStorage.getItem("lastSeenSurveyDate");if(n&&o){const e=new Date,t=Math.abs(e.getTime()-new Date(o).getTime());if(Math.ceil(t/864e5)<n)return}const r=(e=>!!localStorage.getItem(Xr(e))&&!Ur(e))(e);if(!r){this.addSurveyToFocus(e.id);const t=((e,t,n)=>{const o=Br.createElement("div");o.className=`PostHogSurvey${t}`;const r=o.attachShadow({mode:"open"});if(e){const t=Object.assign(Br.createElement("style"),{innerText:e});r.appendChild(t)}return Br.body.appendChild(o),r})(Pr(null==e?void 0:e.appearance),e.id);Lr(Mi(rs,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),t)}};handleWidget=e=>{const t=function(e){var t;const n=ei.createElement("div");n.className=`PostHogWidget${e.id}`;const o=n.attachShadow({mode:"open"}),r=`\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 o.append(Object.assign(ei.createElement("style"),{innerText:r})),ei.body.appendChild(n),o}(e),n=Pr(e.appearance);t.appendChild(Object.assign(es.createElement("style"),{innerText:n})),Lr(Mi(ss,{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)&&es.querySelector(e.appearance.widgetSelector);if(n)if(0===es.querySelectorAll(`.PostHogWidget${e.id}`).length)this.handleWidget(e);else if(1===es.querySelectorAll(`.PostHogWidget${e.id}`).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var o,r;const t=null===(o=es.querySelector(`.PostHogWidget${e.id}`))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.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,o;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(o=t.appearance)||void 0===o?void 0:o.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!=Ko.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)=>{Lr(Mi(rs,{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(Wn(e.surveyInFocus)){var n,o,r;if(t.type===Ko.Widget)"tab"===(null===(n=t.appearance)||void 0===n?void 0:n.widgetType)&&0===es.querySelectorAll(`.PostHogWidget${t.id}`).length&&e.handleWidget(t),"selector"===(null===(o=t.appearance)||void 0===o?void 0:o.widgetType)&&null!==(r=t.appearance)&&void 0!==r&&r.widgetSelector&&e.handleWidgetSelector(t);t.type===Ko.Popover&&e.canShowNextEventBasedSurvey()&&e.handlePopoverSurvey(t)}}))}),n)}})();addSurveyToFocus=e=>{Wn(this.surveyInFocus)||to.error(`Survey ${[...this.surveyInFocus]} already in focus. Cannot add survey ${e}.`),this.surveyInFocus=e};removeSurveyFromFocus=e=>{this.surveyInFocus!==e&&to.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 ns(e){if(!es||!Qi)return;const t=new ts(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}function os(e,t,n,o,r){const[i,s]=fi(o||0===n),[a,l]=fi(!1);return mi((()=>{if(o||!t)return;const i=()=>{r(e.id),s(!1)},a=()=>{var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(l(!0),r(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((()=>{s(!1)}),5e3)):(r(e.id),s(!1))},c=()=>{var n;s(!0),Qi.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 Qi.addEventListener("PHSurveyClosed",i),Qi.addEventListener("PHSurveySent",a),n>0?(()=>{const e=setTimeout((()=>{c()}),n);return()=>{clearTimeout(e),Qi.removeEventListener("PHSurveyClosed",i),Qi.removeEventListener("PHSurveySent",a)}})():(c(),()=>{Qi.removeEventListener("PHSurveyClosed",i),Qi.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:s}}function rs(e){var t,n,o,r,i,s;let{survey:a,forceDisableHtml:l,posthog:c,style:u,previewPageIndex:d,removeSurveyFromFocus:p,isPopup:h}=e;const f=Number.isInteger(d),m=null!==(t=a.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:y,setIsPopupVisible:v}=os(a,c,m,f,p),b=y||d===a.questions.length,_=null!==(n=u)&&void 0!==n&&n.left&&Yn(null===(o=u)||void 0===o?void 0:o.left)?{left:u.left-40}:{};return f&&(u=u||{},u.left="unset",u.right="unset",u.transform="unset"),g?Mi(Jr.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>$r(a,c,f),isPopup:h||!1},children:b?Mi(Zi,{header:(null===(r=a.appearance)||void 0===r?void 0:r.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||Wr,styleOverrides:{...u,..._},onClose:()=>v(!1)}):Mi(is,{survey:a,forceDisableHtml:!!l,posthog:c,styleOverrides:u})}):Mi(gr,{})}function is(e){var t,n;let{survey:o,forceDisableHtml:r,posthog:i,styleOverrides:s}=e;const a=qr((null===(t=o.appearance)||void 0===t?void 0:t.backgroundColor)||Wr.backgroundColor),[l,c]=fi({}),{isPreviewMode:u,previewPageIndex:d,handleCloseSurveyPopup:p,isPopup:h}=vi(Jr),[f,m]=fi(d||0),g=yi((()=>zr(o)),[o]);mi((()=>{m(null!=d?d:0)}),[d]);return Mi("form",{className:"survey-form",style:h?{color:a,borderColor:null===(n=o.appearance)||void 0===n?void 0:n.borderColor,...s}:{},children:g.map(((e,t)=>{var n;const{originalQuestionIndex:s}=e;return(u?f===s:f===t)&&Mi("div",{className:"survey-box",style:h?{backgroundColor:(null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||Wr.backgroundColor}:{},children:[h&&Mi(Pi,{onClick:()=>p()}),as({question:e,forceDisableHtml:r,displayQuestionIndex:t,appearance:o.appearance||Wr,onSubmit:e=>(e=>{let{res:t,originalQuestionIndex:n,displayQuestionIndex:r}=e;if(!i)return;const s=0===n?"$survey_response":`$survey_response_${n}`;if(c({...l,[s]:t}),!i.getNextSurveyStep)return void(r===o.questions.length-1?Yr({...l,[s]:t},o,i):m(r+1));const a=i.getNextSurveyStep(o,r,t);a===Qo.End?Yr({...l,[s]:t},o,i):m(a)})({res:e,originalQuestionIndex:s,displayQuestionIndex:t})})]})}))})}function ss(e){var t,n;let{survey:o,forceDisableHtml:r,posthog:i,readOnly:s,removeSurveyFromFocus:a}=e;const[l,c]=fi(!1),[u,d]=fi({}),p=gi(null);return mi((()=>{var e,t;if(!s&&i){if("tab"===(null===(e=o.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=o.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6"}`};d(t)}if("selector"===(null===(t=o.appearance)||void 0===t?void 0:t.widgetType)){const e=es.querySelector(o.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{c(!l)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Mi(gr,{children:["tab"===(null===(t=o.appearance)||void 0===t?void 0:t.widgetType)&&Mi("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!s&&c(!l),style:{color:qr(o.appearance.widgetColor)},children:[Mi("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=o.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Mi(rs,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const as=e=>{let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s={[Jo.Open]:Wi,[Jo.Link]:Vi,[Jo.Rating]:Yi,[Jo.SingleChoice]:Gi,[Jo.MultipleChoice]:Gi},a={question:t,forceDisableHtml:n,appearance:r,onSubmit:i},l={[Jo.Open]:{},[Jo.Link]:{},[Jo.Rating]:{displayQuestionIndex:o},[Jo.SingleChoice]:{displayQuestionIndex:o},[Jo.MultipleChoice]:{displayQuestionIndex:o}};return Mi(s[t.type],{...{...a,...l[t.type]}})};function ls(e){return!Pn(Event)&&cs(e,Event)}function cs(e,t){try{return e instanceof t}catch{return!1}}function us(e){return Wn(e)||!Hn(e)&&!Bn(e)}function ds(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function ps(e){return ds(e,"DOMError")}Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{},Qn.__PosthogExtensions__.canActivateRepeatedly=Ur,Qn.__PosthogExtensions__.generateSurveys=ns,Qn.extendPostHogWithSurveys=ns;const hs=/\(error: (.*)\)/,fs=50,ms="?";function gs(e,t,n,o){const r={platform:"javascript",filename:e,function:"<anonymous>"===t?ms:t,in_app:!0};return Pn(n)||(r.lineno=n),Pn(o)||(r.colno=o),r}const ys=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bs=/\((\S*)(?::(\d+))(?::(\d+))\)/,_s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Cs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ss=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=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=[],r=e.split("\n");for(let e=t;e<r.length;e++){const t=r[e];if(t.length>1024)continue;const i=hs.test(t)?t.replace(hs,"$1"):t;if(!i.match(/\S*Error: /)){for(const e of o){const t=e(i);if(t){n.push(t);break}}if(n.length>=fs)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return t.reverse(),t.slice(0,fs).map((e=>({...e,filename:e.filename||Is(t).filename,function:e.function||ms})))}(n)}}(...[[30,e=>{const t=ys.exec(e);if(t){const[,e,n,o]=t;return gs(e,ms,+n,+o)}const n=vs.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=bs.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=ws(n[1]||ms,n[2]);return gs(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=_s.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Cs.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]||ms;return[n,e]=ws(n,e),gs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Is(e){return e[e.length-1]||{}}const ws=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),o=-1!==e.indexOf("safari-web-extension");return n||o?[-1!==e.indexOf("@")?e.split("@")[0]:ms,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let ks;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(ks||(ks={}));const Ts=["fatal","error","warning","log","info","debug"],Ms=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function xs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.stacktrace||e.stack||"",o=function(e){if(e&&Ns.test(e.message))return 1;return 0}(e);try{const e=Ss(n,o);return e.slice(0,e.length-t)}catch{}return[]}const Ns=/Minified React error #\d+;/i;function Es(e,t){var n,o;const r=xs(e),i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null!==(o=null==t?void 0:t.synthetic)&&void 0!==o&&o;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:r,type:"raw"},mechanism:{handled:i,synthetic:s}}],$exception_level:"error"}}function As(e,t){var n,o,r;const i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null===(o=null==t?void 0:t.synthetic)||void 0===o||o,a={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(r=null==t?void 0:t.defaultExceptionType)&&void 0!==r?r:"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=xs(t.syntheticException,1);e.length&&(a.stacktrace={frames:e,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function Rs(e){return Zn(e)&&!qn(e)&&Ts.indexOf(e)>=0}function Os(e,t){var n,o;const r=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(o=null==t?void 0:t.synthetic)||void 0===o||o,s=null!=t&&t.overrideExceptionType?t.overrideExceptionType:ls(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 o=n.slice(0,e).join(", ");if(!(o.length>t))return e===n.length||o.length<=t?o:`${o.slice(0,t)}...`}return""}(e)}`,l={type:s,value:a,mechanism:{handled:r,synthetic:i}};if(null!=t&&t.syntheticException){const e=xs(null==t?void 0:t.syntheticException,1);e.length&&(l.stacktrace={frames:e,type:"raw"})}return{$exception_list:[l],$exception_level:Rs(e.level)?e.level:"error"}}function Ls(e,t){let[n,o,r,i,s]=e,a={$exception_list:[]};const l=s||n;if(ps(l)||function(e){return ds(e,"DOMException")}(l)){const e=l;if(function(e){return"stack"in e}(l))a=Es(l,t);else{const n=e.name||(ps(e)?"DOMError":"DOMException"),o=e.message?`${n}: ${e.message}`:n,r=ps(e)?"DOMError":"DOMException";a=As(o,{...t,overrideExceptionType:r,defaultExceptionMessage:o})}return"code"in e&&(a.$exception_DOMException_code=`${e.code}`),a}if(function(e){return ds(e,"ErrorEvent")}(l)&&l.error)return Es(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 cs(e,Error)}}(l))return Es(l,t);if(function(e){return ds(e,"Object")}(l)||ls(l)){return Os(l,t)}if(Pn(s)&&Zn(n)){let e="Error",o=n;const r=n.match(Ms);return r&&(e=r[1],o=r[2]),As(o,{...t,overrideExceptionType:e,defaultExceptionMessage:o})}return As(l,t)}function Ds(e){let[t]=e;const n=function(e){if(us(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 us(n)?As(`Non-Error promise rejection captured with value: ${String(n)}`,{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Ls([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}const Fs={wrapOnError:e=>{const t=zn;t||to.info("window not available, cannot wrap onerror");const n=t.onerror;return t.onerror=function(){for(var t,o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];const s=Ls(r);return e(s),null!==(t=null==n?void 0:n(...r))&&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=zn;t||to.info("window not available, cannot wrap onUnhandledRejection");const n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var o,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];const a=Ds(i);return e(a),null!==(o=null==n?void 0:n.apply(t,i))&&void 0!==o&&o},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{},Qn.__PosthogExtensions__.errorWrappingFunctions=Fs,Qn.__PosthogExtensions__.parseErrorAsProperties=Ls,Qn.posthogErrorWrappingFunctions=Fs,Qn.parseErrorAsProperties=Ls;const Bs=(e,t)=>{const{sessionId:n,windowId:o}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",o)};Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{};const Hs={_patchFetch:e=>Oo(zn,"fetch",(t=>async function(n,o){const r=new Request(n,o);return Bs(e,r),t(r)})),_patchXHR:e=>Oo(zn.XMLHttpRequest.prototype,"open",(t=>function(n,o){let r=!(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(o);return Bs(e,a),t.call(this,n,a.url,r,i,s)}))};Qn.__PosthogExtensions__.tracingHeadersPatchFns=Hs,Qn.postHogTracingHeadersPatchFns=Hs;var Ps,Zs,qs,Ws=-1,Vs=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Ws=t.timeStamp,e(t))}),!0)},Ys=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},$s=function(){var e=Ys();return e&&e.activationStart||0},Gs=function(e,t){var n=Ys(),o="navigate";return Ws>=0?o="back-forward-cache":n&&(document.prerendering||$s()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=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:o}},js=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var o=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},n||{})),o}}catch(e){}},zs=function(e,t,n,o){var r,i;return function(s){t.value>=0&&(s||o)&&((i=t.value-(r||0))||void 0===r)&&(r=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))}},Us=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Xs=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Ks=function(e){var t=!1;return function(){t||(e(),t=!0)}},Js=-1,Qs=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ea=function(e){"hidden"===document.visibilityState&&Js>-1&&(Js="visibilitychange"===e.type?e.timeStamp:0,na())},ta=function(){addEventListener("visibilitychange",ea,!0),addEventListener("prerenderingchange",ea,!0)},na=function(){removeEventListener("visibilitychange",ea,!0),removeEventListener("prerenderingchange",ea,!0)},oa=function(){return Js<0&&(Js=Qs(),ta(),Vs((function(){setTimeout((function(){Js=Qs(),ta()}),0)}))),{get firstHiddenTime(){return Js}}},ra=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},ia=[1800,3e3],sa=function(e,t){t=t||{},ra((function(){var n,o=oa(),r=Gs("FCP"),i=js("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<o.firstHiddenTime&&(r.value=Math.max(e.startTime-$s(),0),r.entries.push(e),n(!0)))}))}));i&&(n=zs(e,r,ia,t.reportAllChanges),Vs((function(o){r=Gs("FCP"),n=zs(e,r,ia,t.reportAllChanges),Us((function(){r.value=performance.now()-o.timeStamp,n(!0)}))})))}))},aa=[.1,.25],la=[2500,4e3],ca={},ua=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},da=function(e){if("loading"===document.readyState)return"loading";var t=ua();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"},pa=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ha=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var o=e,r=o.id?"#"+o.id:pa(o)+(o.classList&&o.classList.value&&o.classList.value.trim()&&o.classList.value.trim().length?"."+o.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+r.length>(t||100)-1)return n||r;if(n=n?r+">"+n:r,o.id)break;e=o.parentNode}}catch(e){}return n},fa=-1,ma=function(e,t){var n=ua(),o="navigate";return fa>=0?o="back-forward-cache":n&&(document.prerendering||function(){var e=ua();return e&&e.activationStart||0}()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=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:o}},ga=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var o=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},n||{})),o}}catch(e){}},ya=function(e,t,n,o){var r,i;return function(s){t.value>=0&&(s||o)&&((i=t.value-(r||0))||void 0===r)&&(r=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))}},va=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ba=0,_a=1/0,Ca=0,Sa=function(e){e.forEach((function(e){e.interactionId&&(_a=Math.min(_a,e.interactionId),Ca=Math.max(Ca,e.interactionId),ba=Ca?(Ca-_a)/7+1:0)}))},Ia=function(){"interactionCount"in performance||Ps||(Ps=ga("event",Sa,{type:"event",buffered:!0,durationThreshold:0}))},wa=[],ka=new Map,Ta=0,Ma=function(){return(Ps?ba:performance.interactionCount||0)-Ta},xa=[],Na=function(e){if(xa.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=wa[wa.length-1],n=ka.get(e.interactionId);if(n||wa.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 o={id:e.interactionId,latency:e.duration,entries:[e]};ka.set(o.id,o),wa.push(o)}wa.sort((function(e,t){return t.latency-e.latency})),wa.length>10&&wa.splice(10).forEach((function(e){return ka.delete(e.id)}))}}},Ea=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),va(e)),n},Aa=[200,500],Ra=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 o,r=ma("INP"),i=function(e){Ea((function(){e.forEach(Na);var t,n=(t=Math.min(wa.length-1,Math.floor(Ma()/50)),wa[t]);n&&n.latency!==r.value&&(r.value=n.latency,r.entries=n.entries,o())}))},s=ga("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});o=ya(e,r,Aa,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),va((function(){i(s.takeRecords()),o(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(fa=t.timeStamp,e(t))}),!0)}((function(){Ta=0,wa.length=0,ka.clear(),r=ma("INP"),o=ya(e,r,Aa,t.reportAllChanges)})))})))},Oa=[],La=[],Da=new WeakMap,Fa=new Map,Ba=-1,Ha=function(e){Oa=Oa.concat(e),Pa()},Pa=function(){Ba<0&&(Ba=Ea(Za))},Za=function(){Fa.size>10&&Fa.forEach((function(e,t){ka.has(t)||Fa.delete(t)}));var e=wa.map((function(e){return Da.get(e.entries[0])})),t=La.length-50;La=La.filter((function(n,o){return o>=t||e.includes(n)}));for(var n=new Set,o=0;o<La.length;o++){var r=La[o];qa(r.startTime,r.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var s=Oa[Oa.length-1-i];if(!s||s.startTime<qs)break;n.add(s)}Oa=Array.from(n),Ba=-1};xa.push((function(e){e.interactionId&&e.target&&!Fa.has(e.interactionId)&&Fa.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;qs=Math.max(qs,e.processingEnd);for(var o=La.length-1;o>=0;o--){var r=La[o];if(Math.abs(n-r.renderTime)<=8){(t=r).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]},La.push(t)),(e.interactionId||"first-input"===e.entryType)&&Da.set(e,t),Pa()}));var qa=function(e,t){for(var n,o=[],r=0;n=Oa[r];r++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;o.push(n)}return o};const Wa={onLCP:function(e,t){t=t||{},ra((function(){var n,o=oa(),r=Gs("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<o.firstHiddenTime&&(r.value=Math.max(e.startTime-$s(),0),r.entries=[e],n())}))},s=js("largest-contentful-paint",i);if(s){n=zs(e,r,la,t.reportAllChanges);var a=Ks((function(){ca[r.id]||(i(s.takeRecords()),s.disconnect(),ca[r.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=Ks(e),"hidden"===document.visibilityState?e():(n=t(e),Xs(e)),n}(a)}),!0)})),Xs(a),Vs((function(o){r=Gs("LCP"),n=zs(e,r,la,t.reportAllChanges),Us((function(){r.value=performance.now()-o.timeStamp,ca[r.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},sa(Ks((function(){var n,o=Gs("CLS",0),r=0,i=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e])}})),r>o.value&&(o.value=r,o.entries=i,n())},a=js("layout-shift",s);a&&(n=zs(e,o,aa,t.reportAllChanges),Xs((function(){s(a.takeRecords()),n(!0)})),Vs((function(){r=0,o=Gs("CLS",0),n=zs(e,o,aa,t.reportAllChanges),Us((function(){return n()}))})),setTimeout(n,0))})))},onFCP:sa,onINP:function(e,t){Zs||(Zs=ga("long-animation-frame",Ha)),Ra((function(t){var n=function(e){var t=e.entries[0],n=Da.get(t),o=t.processingStart,r=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),s=qa(t.startTime,r),a=e.entries.find((function(e){return e.target})),l=a&&a.target||Fa.get(t.interactionId),c=[t.startTime+t.duration,r].concat(s.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,c),d={interactionTarget:ha(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:i,longAnimationFrameEntries:s,inputDelay:o-t.startTime,processingDuration:r-o,presentationDelay:Math.max(u-r,0),loadState:da(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function Va(e,t){return t.length>e?t.slice(0,e)+"...":t}function Ya(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do{t=t.previousSibling}while(t&&!po(t));return t}function $a(e,t,n,o){const r=e.tagName.toLowerCase(),i={tag_name:r};yo.indexOf(r)>-1&&!n&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?i.$el_text=Va(1024,Mo(e)):i.$el_text=Va(1024,go(e)));const s=mo(e);s.length>0&&(i.classes=s.filter((function(e){return""!==e}))),io(e.attributes,(function(n){var r;if((!bo(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==o||!o.includes(n.name))&&!t&&To(n.value)&&(r=n.name,!Zn(r)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7)))){let e=n.value;"class"===n.name&&(e=fo(e).join(" ")),i["attr__"+n.name]=Va(1024,e)}}));let a=1,l=1,c=e;for(;c=Ya(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function Ga(e,t){var n,o;let{e:r,maskAllElementAttributes:i,maskAllText:s,elementAttributeIgnoreList:a,elementsChainAsString:l}=t;const c=[e];let u=e;for(;u.parentNode&&!ho(u,"body");)(d=u.parentNode)&&11===d.nodeType?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d;const p=[],h={};let f,m=!1,g=!1;if(io(c,(e=>{const t=vo(e);"a"===e.tagName.toLowerCase()&&(m=e.getAttribute("href"),m=t&&m&&To(m)&&m);ao(mo(e),"ph-no-capture")&&(g=!0),p.push($a(e,i,s,a));const n=function(e){if(!vo(e))return{};const t={};return io(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){const n=e.name.replace("data-ph-capture-attribute-",""),o=e.value;n&&o&&To(o)&&(t[n]=o)}})),t}(e);so(h,n)})),g)return{props:{},explicitNoCapture:g};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=Mo(e):p[0].$el_text=go(e)),m){var y,v;p[0].attr__href=m;const e=null===(y=(e=>{const t=null==Jn?void 0:Jn.createElement("a");return Pn(t)?null:(t.href=e,t)})(m))||void 0===y?void 0:y.host,t=null==zn||null===(v=zn.location)||void 0===v?void 0:v.host;e&&t&&e!==t&&(f=m)}return{props:so({$event_type:r.type,$ce_version:1},l?{$elements_chain:No(p)}:{$elements:p},null!==(n=p[0])&&void 0!==n&&n.$el_text?{$el_text:null===(o=p[0])||void 0===o?void 0:o.$el_text}:{},f&&"click"===r.type?{$external_click_url:f}:{},h)}}Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{},Qn.__PosthogExtensions__.postHogWebVitalsCallbacks=Wa,Qn.postHogWebVitalsCallbacks=Wa;const ja={element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500};function za(e){const t=function(e){return Pn(e.target)?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function Ua(e,t){return Yn(e)&&e>=t}class Xa{_clicks=[];asRequiredConfig(e){var t,n,o,r;return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:ja.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:ja.scroll_threshold_ms,selection_change_threshold_ms:null!==(o=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==o?o:ja.selection_change_threshold_ms,mutation_threshold_ms:null!==(r=null==e?void 0:e.mutation_threshold_ms)&&void 0!==r?r:ja.mutation_threshold_ms}}constructor(e,t){this.instance=e,this._config=this.asRequiredConfig(t)}start(e){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(e)}_startMutationObserver(e){this._mutationObserver||(this._mutationObserver=new MutationObserver((e=>{this.onMutation(e)})),this._mutationObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}))}stop(){var e;null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._mutationObserver=void 0,Qn.removeEventListener("click",this._onClick),Qn.removeEventListener("scroll",this._onScroll,!0),Qn.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){Qn.addEventListener("click",this._onClick)}_onClick=e=>{const t=za(e);Wn(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&Pn(this._checkClickTimer)&&(this._checkClickTimer=Qn.setTimeout((()=>{this._checkClicks()}),1e3))};_startScrollObserver(){Qn.addEventListener("scroll",this._onScroll,!0)}_onScroll=()=>{const e=Date.now();e%50==0&&this._clicks.forEach((t=>{Pn(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))};_startSelectionChangedObserver(){Qn.addEventListener("selectionchange",this._onSelectionChange)}_onSelectionChange=()=>{this._lastSelectionChanged=Date.now()};_ignoreClick(e){if(!e)return!0;if((t=e.node).id===uo||null!==(n=t.closest)&&void 0!==n&&n.call(t,"#"+uo))return!0;var t,n;const o=this._clicks.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!o||!(!ho(e.node,"html")&&po(e.node)&&!yo.includes(e.node.tagName.toLowerCase()))}_checkClicks(){if(!this._clicks.length)return;clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;const e=this._clicks;this._clicks=[];for(const n of e){var t;n.mutationDelayMs=null!==(t=n.mutationDelayMs)&&void 0!==t?t:this._lastMutation&&n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0,n.absoluteDelayMs=Date.now()-n.timestamp,n.selectionChangedDelayMs=this._lastSelectionChanged&&n.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-n.timestamp:void 0;const e=Ua(n.scrollDelayMs,this._config.scroll_threshold_ms),o=Ua(n.selectionChangedDelayMs,this._config.selection_change_threshold_ms),r=Ua(n.mutationDelayMs,this._config.mutation_threshold_ms),i=Ua(n.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=Yn(n.scrollDelayMs)&&n.scrollDelayMs<this._config.scroll_threshold_ms,a=Yn(n.mutationDelayMs)&&n.mutationDelayMs<this._config.mutation_threshold_ms,l=Yn(n.selectionChangedDelayMs)&&n.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||a||l||(e||r||i||o?this._captureDeadClick(n,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:n.timestamp,$dead_click_scroll_timeout:e,$dead_click_mutation_timeout:r,$dead_click_absolute_timeout:i,$dead_click_selection_changed_timeout:o}):n.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(n))}this._clicks.length&&Pn(this._checkClickTimer)&&(this._checkClickTimer=Qn.setTimeout((()=>{this._checkClicks()}),1e3))}_captureDeadClick(e,t){this.instance.capture("$dead_click",{...t,...Ga(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props,$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs},{timestamp:new Date(e.timestamp)})}}Qn.__PosthogExtensions__=Qn.__PosthogExtensions__||{},Qn.__PosthogExtensions__.initDeadClicksAutocapture=e=>new Xa(e)}();
2
2
  //# sourceMappingURL=all-external-dependencies.js.map