1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[174],{83198:function(e,t,r){let i,n,o,s,a,l;function isElement(e){return e.nodeType===e.ELEMENT_NODE}function isShadowRoot(e){let t=null==e?void 0:e.host;return(null==t?void 0:t.shadowRoot)===e}function isNativeShadowDom(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function fixBrowserCompatibilityIssuesInCSS(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function escapeImportStatement(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function stringifyStylesheet(e){try{let t=e.rules||e.cssRules;return t?fixBrowserCompatibilityIssuesInCSS(Array.from(t,stringifyRule).join("")):null}catch(e){return null}}function stringifyRule(e){let t;if(isCSSImportRule(e))try{t=stringifyStylesheet(e.styleSheet)||escapeImportStatement(e)}catch(e){}else if(isCSSStyleRule(e)&&e.selectorText.includes(":"))return fixSafariColons(e.cssText);return t||e.cssText}function fixSafariColons(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function isCSSImportRule(e){return"styleSheet"in e}function isCSSStyleRule(e){return"selectorText"in e}r.d(t,{Z:function(){return tm}}),(z=H||(H={}))[z.Document=0]="Document",z[z.DocumentType=1]="DocumentType",z[z.Element=2]="Element",z[z.Text=3]="Text",z[z.CDATA=4]="CDATA",z[z.Comment=5]="Comment";let Mirror=class Mirror{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function createMirror(){return new Mirror}function maskInputValue({element:e,maskInputOptions:t,tagName:r,type:i,value:n,maskInputFn:o}){let s=n||"",a=i&&toLowerCase(i);return(t[r.toLowerCase()]||a&&t[a])&&(s=o?o(s,e):"*".repeat(s.length)),s}function toLowerCase(e){return e.toLowerCase()}let c="__rrweb_original__";function is2DCanvasBlank(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let i=0;i<e.height;i+=50){let n=t.getImageData,o=c in n?n[c]:n,s=new Uint32Array(o.call(t,r,i,Math.min(50,e.width-r),Math.min(50,e.height-i)).data.buffer);if(s.some(e=>0!==e))return!1}return!0}function getInputType(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?toLowerCase(t):null}function extractFileExtension(e,t){var r;let i;try{i=new URL(e,null!=t?t:window.location.href)}catch(e){return null}let n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}let p=1,u=RegExp("[^a-z0-9-_:]");function genId(){return p++}function getValidTagName(e){if(e instanceof HTMLFormElement)return"form";let t=toLowerCase(e.tagName);return u.test(t)?"div":t}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}let d=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,h=/^(?:[a-z+]+:)?\/\//i,f=/^www\..*/i,_=/^(data:)([^,]*),(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(d,(e,r,i,n,o,s)=>{let a=i||o||s,l=r||n||"";if(!a)return e;if(h.test(a)||f.test(a)||_.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${extractOrigin(t)+a}${l})`;let c=t.split("/"),p=a.split("/");for(let e of(c.pop(),p))"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}let g=/^[^ \t\n\r\u000c]+/,m=/^[, \t\n\r\u000c]+/;function getAbsoluteSrcsetString(e,t){if(""===t.trim())return t;let r=0;function collectCharacters(e){let i;let n=e.exec(t.substring(r));return n?(i=n[0],r+=i.length,i):""}let i=[];for(;collectCharacters(m),!(r>=t.length);){let n=collectCharacters(g);if(","===n.slice(-1))n=absoluteToDoc(e,n.substring(0,n.length-1)),i.push(n);else{let o="";n=absoluteToDoc(e,n);let s=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((n+o).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){r+=1,i.push((n+o).trim());break}"("===e&&(s=!0)}o+=e,r+=1}}}return i.join(", ")}function absoluteToDoc(e,t){if(!t||""===t.trim())return t;let r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return!!("svg"===e.tagName||e.ownerSVGElement)}function getHref(){let e=document.createElement("a");return e.href="",e.href}
1function transformAttribute(e,t,r,i){return i?"src"!==r&&("href"!==r||"use"===t&&"#"===i[0])&&("xlink:href"!==r||"#"===i[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?getAbsoluteSrcsetString(e,i):"style"===r?absoluteToStylesheet(i,getHref()):"object"===t&&"data"===r?absoluteToDoc(e,i):i:absoluteToDoc(e,i):i}function ignoreAttribute(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function _isBlockedElement(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let i=e.classList[r];if(t.test(i))return!0}if(r)return e.matches(r)}catch(e){}return!1}function classMatchesRegex(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&classMatchesRegex(e.parentNode,t,r);for(let r=e.classList.length;r--;){let i=e.classList[r];if(t.test(i))return!0}return!!r&&classMatchesRegex(e.parentNode,t,r)}function needMaskingText(e,t,r,i){try{let n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(classMatchesRegex(n,t,i))return!0;if(r){if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}}catch(e){}return!1}function onceIframeLoaded(e,t,r){let i;let n=e.contentWindow;if(!n)return;let o=!1;try{i=n.document.readyState}catch(e){return}if("complete"!==i){let i=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),o=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function onceStylesheetLoaded(e,t,r){let i,n=!1;try{i=e.sheet}catch(e){return}if(i)return;let o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}function serializeNode(e,t){let{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:p,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:_=!1}=t,g=getRootId(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:H.Document,childNodes:[],compatMode:e.compatMode};return{type:H.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return serializeElementNode(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:p,dataURLOptions:u,inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:_,rootId:g});case e.TEXT_NODE:return serializeTextNode(e,{needsMask:s,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:H.Comment,textContent:e.textContent||"",rootId:g};default:return!1}}function getRootId(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}function serializeTextNode(e,t){var r;let{needsMask:i,maskTextFn:n,rootId:o}=t,s=e.parentNode&&e.parentNode.tagName,a=e.textContent,l="STYLE"===s||void 0,c="SCRIPT"===s||void 0;if(l&&a){try{e.nextSibling||e.previousSibling||(null===(r=e.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(a=stringifyStylesheet(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}a=absoluteToStylesheet(a,getHref())}return c&&(a="SCRIPT_PLACEHOLDER"),!l&&!c&&a&&i&&(a=n?n(a,e.parentElement):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",isStyle:l,rootId:o}}function serializeElementNode(e,t){let r;let{doc:o,blockClass:s,blockSelector:a,inlineStylesheet:l,maskInputOptions:c={},maskInputFn:p,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:_=!1,rootId:g}=t,m=_isBlockedElement(e,s,a),y=getValidTagName(e),v={},b=e.attributes.length;for(let t=0;t<b;t++){let r=e.attributes[t];ignoreAttribute(y,r.name,r.value)||(v[r.name]=transformAttribute(o,y,toLowerCase(r.name),r.value))}if("link"===y&&l){let t=Array.from(o.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=stringifyStylesheet(t)),r&&(delete v.rel,delete v.href,v._cssText=absoluteToStylesheet(r,t.href))}if("style"===y&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=stringifyStylesheet(e.sheet);t&&(v._cssText=absoluteToStylesheet(t,getHref()))}if("input"===y||"textarea"===y||"select"===y){let t=e.value,r=e.checked;"radio"!==v.type&&"checkbox"!==v.type&&"submit"!==v.type&&"button"!==v.type&&t?v.value=maskInputValue({element:e,type:getInputType(e),tagName:y,value:t,maskInputOptions:c,maskInputFn:p}):r&&(v.checked=r)}if("option"===y&&(e.selected&&!c.select?v.selected=!0:delete v.selected),"canvas"===y&&h){if("2d"===e.__context)is2DCanvasBlank(e)||(v.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let t=e.toDataURL(u.type,u.quality),r=document.createElement("canvas");r.width=e.width,r.height=e.height;let i=r.toDataURL(u.type,u.quality);t!==i&&(v.rr_dataURL=t)}}if("img"===y&&d){i||(n=(i=o.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let recordInlineImage=()=>{e.removeEventListener("load",recordInlineImage);
1try{i.width=e.naturalWidth,i.height=e.naturalHeight,n.drawImage(e,0,0),v.rr_dataURL=i.toDataURL(u.type,u.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}t?v.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?recordInlineImage():e.addEventListener("load",recordInlineImage)}if("audio"===y||"video"===y){let t=v;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}if(!_&&(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),m){let{width:t,height:r}=e.getBoundingClientRect();v={class:v.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==y||f(v.src)||(e.contentDocument||(v.rr_src=v.src),delete v.src);try{customElements.get(y)&&(r=!0)}catch(e){}return{type:H.Element,tagName:y,attributes:v,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:m,rootId:g,isCustom:r}}function lowerIfExists(e){return null==e?"":e.toLowerCase()}function slimDOMExcluded(e,t){if(t.comment&&e.type===H.Comment)return!0;if(e.type===H.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===extractFileExtension(e.attributes.href))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(lowerIfExists(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===lowerIfExists(e.attributes.name)||"icon"===lowerIfExists(e.attributes.rel)||"apple-touch-icon"===lowerIfExists(e.attributes.rel)||"shortcut icon"===lowerIfExists(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&lowerIfExists(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(lowerIfExists(e.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===lowerIfExists(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===lowerIfExists(e.attributes.name)||"googlebot"===lowerIfExists(e.attributes.name)||"bingbot"===lowerIfExists(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===lowerIfExists(e.attributes.name)||"generator"===lowerIfExists(e.attributes.name)||"framework"===lowerIfExists(e.attributes.name)||"publisher"===lowerIfExists(e.attributes.name)||"progid"===lowerIfExists(e.attributes.name)||lowerIfExists(e.attributes.property).match(/^article:/)||lowerIfExists(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===lowerIfExists(e.attributes.name)||"yandex-verification"===lowerIfExists(e.attributes.name)||"csrf-token"===lowerIfExists(e.attributes.name)||"p:domain_verify"===lowerIfExists(e.attributes.name)||"verify-v1"===lowerIfExists(e.attributes.name)||"verification"===lowerIfExists(e.attributes.name)||"shopify-checkout-api-token"===lowerIfExists(e.attributes.name)))return!0}}return!1}function serializeNodeWithId(e,t){let r;let{doc:i,mirror:n,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:p=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:_={},inlineImages:g=!1,recordCanvas:m=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:k=!1}=t,{needsMask:w}=t,{preserveWhiteSpace:I=!0}=t;if(!w&&e.childNodes){let t=void 0===w;w=needMaskingText(e,a,l,t)}let E=serializeNode(e,{doc:i,mirror:n,blockClass:o,blockSelector:s,needsMask:w,inlineStylesheet:p,maskInputOptions:u,maskTextFn:d,maskInputFn:h,dataURLOptions:_,inlineImages:g,recordCanvas:m,keepIframeSrcFn:x,newlyAddedElement:k});if(!E)return console.warn(e,"not serialized"),null;r=n.hasNode(e)?n.getId(e):!slimDOMExcluded(E,f)&&(I||E.type!==H.Text||E.isStyle||E.textContent.replace(/^\s+|\s+$/gm,"").length)?genId():-2;let O=Object.assign(E,{id:r});if(n.add(e,O),-2===r)return null;y&&y(e);let C=!c;
1if(O.type===H.Element){C=C&&!O.needBlock,delete O.needBlock;let t=e.shadowRoot;t&&isNativeShadowDom(t)&&(O.isShadowHost=!0)}if((O.type===H.Document||O.type===H.Element)&&C){f.headWhitespace&&O.type===H.Element&&"head"===O.tagName&&(I=!1);let t={doc:i,mirror:n,blockClass:o,blockSelector:s,needsMask:w,maskTextClass:a,maskTextSelector:l,skipChild:c,inlineStylesheet:p,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:_,inlineImages:g,recordCanvas:m,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:x};if(O.type===H.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(let r of Array.from(e.childNodes)){let e=serializeNodeWithId(r,t);e&&O.childNodes.push(e)}if(isElement(e)&&e.shadowRoot)for(let r of Array.from(e.shadowRoot.childNodes)){let i=serializeNodeWithId(r,t);i&&(isNativeShadowDom(e.shadowRoot)&&(i.isShadow=!0),O.childNodes.push(i))}}return e.parentNode&&isShadowRoot(e.parentNode)&&isNativeShadowDom(e.parentNode)&&(O.isShadow=!0),O.type===H.Element&&"iframe"===O.tagName&&onceIframeLoaded(e,()=>{let t=e.contentDocument;if(t&&v){let r=serializeNodeWithId(t,{doc:t,mirror:n,blockClass:o,blockSelector:s,needsMask:w,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:_,inlineImages:g,recordCanvas:m,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:x});r&&v(e,r)}},b),O.type===H.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===extractFileExtension(O.attributes.href))&&onceStylesheetLoaded(e,()=>{if(S){let t=serializeNodeWithId(e,{doc:i,mirror:n,blockClass:o,blockSelector:s,needsMask:w,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:_,inlineImages:g,recordCanvas:m,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:x});t&&S(e,t)}},M),O}function snapshot(e,t){let{mirror:r=new Mirror,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:p=!1,maskTextFn:u,maskInputFn:d,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1}=t||{},M=!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===p?{password:!0}:p,x=!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;return serializeNodeWithId(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:M,maskTextFn:u,maskInputFn:d,slimDOMOptions:x,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}function on(e,t,r=document){let i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}let y="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",v={map:{},getId:()=>(console.error(y),-1),getNode:()=>(console.error(y),null),removeNodeFromMap(){console.error(y)},has:()=>(console.error(y),!1),reset(){console.error(y)}};function throttle(e,t,r={}){let i=null,n=0;return function(...o){let s=Date.now();n||!1!==r.leading||(n=s);let a=t-(s-n),l=this;a<=0||a>t?(i&&(clearTimeout(i),i=null),n=s,e.apply(l,o)):i||!1===r.trailing||(i=setTimeout(()=>{n=!1===r.leading?0:Date.now(),i=null,e.apply(l,o)},a))}}function hookSetter(e,t,r,i,n=window){let o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>
1hookSetter(e,t,o||{},!0)}function patch(e,t,r){try{if(!(t in e))return()=>{};let i=e[t],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(v=new Proxy(v,{get:(e,t,r)=>("map"===t&&console.error(y),Reflect.get(e,t,r))}));let b=Date.now;function getWindowScroll(e){var t,r,i,n,o,s;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null===(r=null===(t=null==a?void 0:a.body)||void 0===t?void 0:t.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===(i=null==a?void 0:a.body)||void 0===i?void 0:i.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null===(o=null===(n=null==a?void 0:a.body)||void 0===n?void 0:n.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(s=null==a?void 0:a.body)||void 0===s?void 0:s.scrollTop)||0}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function closestElementOfNode(e){if(!e)return null;let t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t}function isBlocked(e,t,r,i){if(!e)return!1;let n=closestElementOfNode(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t)||i&&null!==n.closest("."+t))return!0}else if(classMatchesRegex(n,t,i))return!0}catch(e){}return!!(r&&(n.matches(r)||i&&null!==n.closest(r)))}function isSerialized(e,t){return -1!==t.getId(e)}function isIgnored(e,t){return -2===t.getId(e)}function isAncestorRemoved(e,t){if(isShadowRoot(e))return!1;let r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode,t))}function legacy_isTouchEvent(e){return!!e.changedTouches}function polyfill(e=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),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function isSerializedIframe(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function isSerializedStylesheet(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function hasShadowRoot(e){return!!(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(b=()=>new Date().getTime());let StyleSheetMirror=class StyleSheetMirror{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}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 getShadowHost(e){var t,r;let i=null;return(null===(r=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===r?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(i=e.getRootNode().host),i}function getRootShadowHost(e){let t,r=e;for(;t=getShadowHost(r);)r=t;return r}function shadowHostInDom(e){let t=e.ownerDocument;if(!t)return!1;let r=getRootShadowHost(e);return t.contains(r)}function inDom(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||shadowHostInDom(e))}var S,M,x,k,w,I,E,O,C,L,T,R,N,D,P,A,q,F,B,U,W,j,$,z,G,H,V,Q,K,J=((G=J||{})[G.DomContentLoaded=0]="DomContentLoaded",G[G.Load=1]="Load",G[G.FullSnapshot=2]="FullSnapshot",G[G.IncrementalSnapshot=3]="IncrementalSnapshot",G[G.Meta=4]="Meta",G[G.Custom=5]="Custom",G[G.Plugin=6]="Plugin",G),X=((x=X||{})[x.Mutation=0]="Mutation",x[x.MouseMove=1]="MouseMove",x[x.MouseInteraction=2]="MouseInteraction",x[x.Scroll=3]="Scroll",x[x.ViewportResize=4]="ViewportResize",x[x.Input=5]="Input",x[x.TouchMove=6]="TouchMove",x[x.MediaInteraction=7]="MediaInteraction",x[x.StyleSheetRule=8]="StyleSheetRule",x[x.CanvasMutation=9]="CanvasMutation",x[x.Font=10]="Font",x[x.Log=11]="Log",x[x.Drag=12]="Drag",x[x.StyleDeclaration=13]="StyleDeclaration",x[x.Selection=14]="Selection",x[x.AdoptedStyleSheet=15]="AdoptedStyleSheet",x[x.CustomElement=16]="CustomElement",x),Y=((k=Y||{})[k.MouseUp=0]="MouseUp",k[k.MouseDown=1]="MouseDown",k[k.Click=2]="Click",k[k.ContextMenu=3]="ContextMenu",k[k.DblClick=4]="DblClick",k[k.Focus=5]="Focus",k[k.Blur=6]="Blur",k[k.TouchStart=7]="TouchStart",k[k.TouchMove_Departed=8]="TouchMove_Departed",k[k.TouchEnd=9]="TouchEnd",k[k.TouchCancel=10]="TouchCancel",k),Z=((w=Z||{})[w.Mouse=0]="Mouse",w[w.Pen=1]="Pen",w[w.Touch=2]="Touch",w),ee=((I=ee||{})[I["2D"]=0]="2D",I[I.WebGL=1]="WebGL",I[I.WebGL2=2]="WebGL2",I);let DoubleLinkedList=class DoubleLinkedList{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;
1this.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--)}};let moveKey=(e,t)=>`${e}@${t}`;let MutationBuffer=class MutationBuffer{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new DoubleLinkedList,getNextId=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},pushAdd=i=>{if(!i.parentNode||!inDom(i)||"TEXTAREA"===i.parentNode.tagName)return;let n=isShadowRoot(i.parentNode)?this.mirror.getId(getShadowHost(i)):this.mirror.getId(i.parentNode),o=getNextId(i);if(-1===n||-1===o)return r.addNode(i);let s=serializeNodeWithId(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{isSerializedIframe(e,this.mirror)&&this.iframeManager.addIframe(e),isSerializedStylesheet(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),hasShadowRoot(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:n,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!isParentRemoved(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&pushAdd(e);for(let e of this.addedSet)isAncestorInSet(this.droppedSet,e)||isParentRemoved(this.removes,e,this.mirror)?isAncestorInSet(this.movedSet,e)?pushAdd(e):this.droppedSet.add(e):pushAdd(e);let i=null;for(;r.length;){let e=null;if(i){let t=this.mirror.getId(i.value.parentNode),r=getNextId(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r.value.parentNode),i=getNextId(r.value);if(-1===i)continue;if(-1!==t){e=r;break}{let t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let i=t.parentNode.host,n=this.mirror.getId(i);if(-1!==n){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),pushAdd(e.value)}let n={texts:this.texts.map(e=>{let 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=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+i).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};(n.texts.length||n.attributes.length||n.removes.length||n.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(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("")},this.processMutation=e=>{if(!isIgnored(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;isBlocked(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:needMaskingText(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,closestElementOfNode(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if("value"===r){let e=getInputType(t);i=maskInputValue({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:i,maskInputFn:this.maskInputFn})}if(isBlocked(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(i)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ignoreAttribute(t.tagName,r)&&(n.attributes[r]=transformAttribute(this.doc,toLowerCase(t.tagName),toLowerCase(r),i),"style"===r)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let i of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(i),o=t.style.getPropertyPriority(i);e!==r.style.getPropertyValue(i)||o!==r.style.getPropertyPriority(i)?""===o?n.styleDiff[i]=e:n.styleDiff[i]=[e,o]:n._unchangedStyles[i]=[e,o]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}break}case"childList":if(isBlocked(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=isShadowRoot(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);!(isBlocked(e.target,this.blockClass,this.blockSelector,!1)||isIgnored(t,this.mirror))&&isSerialized(t,this.mirror)&&(this.addedSet.has(t)?(deepDelete(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||isAncestorRemoved(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[moveKey(r,i)]?deepDelete(this.movedSet,t):this.removes.push({parentId:i,id:r,isShadow:!!(isShadowRoot(e.target)&&isNativeShadowDom(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(isIgnored(e,this.mirror))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[moveKey(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!isBlocked(e,this.blockClass,this.blockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),hasShadowRoot(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 deepDelete(e,t){e.delete(t),t.childNodes.forEach(t=>deepDelete(e,t))}function isParentRemoved(e,t,r){return 0!==e.length&&_isParentRemoved(e,t,r)}function _isParentRemoved(e,t,r){let{parentNode:i}=t;if(!i)return!1;let n=r.getId(i);return!!e.some(e=>e.id===n)||_isParentRemoved(e,i,r)}function isAncestorInSet(e,t){return 0!==e.size&&_isAncestorInSet(e,t)}function _isAncestorInSet(e,t){let{parentNode:r}=t;return!!r&&(!!e.has(r)||_isAncestorInSet(e,r))}function registerErrorHandler(e){o=e}function unregisterErrorHandler(){o=void 0}let callbackWrapper=e=>o?(...t)=>{try{return e(...t)}catch(e){if(o&&!0===o(e))return;throw e}}:e,et=[];function getEventTarget(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function initMutationObserver(e,t){var r,i;let n=new MutationBuffer;et.push(n),n.init(e);let o=window.MutationObserver||window.__rrMutationObserver,s=null===(i=null===(r=null==window?void 0:window.Zone)||void 0===r?void 0:r.__symbol__)||void 0===i?void 0:i.call(r,"MutationObserver");s&&window[s]&&(o=window[s]);let a=new o(callbackWrapper(n.processMutations.bind(n)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function initMoveObserver({mousemoveCb:e,sampling:t,doc:r,mirror:i}){let n;if(!1===t.mousemove)return()=>{};let o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=throttle(callbackWrapper(t=>{let r=Date.now()-n;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],n=null}),s),c=callbackWrapper(throttle(callbackWrapper(e=>{let t=getEventTarget(e),{clientX:r,clientY:o}=legacy_isTouchEvent(e)?e.changedTouches[0]:e;n||(n=b()),a.push({x:r,y:o,id:i.getId(t),timeOffset:b()-n}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),o,{trailing:!1})),p=[on("mousemove",c,r),on("touchmove",c,r),on("drag",c,r)];return callbackWrapper(()=>
1{p.forEach(e=>e())})}function initMouseInteractionObserver({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[],l=null,getHandler=t=>o=>{let s=getEventTarget(o);if(isBlocked(s,i,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Z.Mouse;break;case"touch":a=Z.Touch;break;case"pen":a=Z.Pen}a===Z.Touch?Y[t]===Y.MouseDown?c="TouchStart":Y[t]===Y.MouseUp&&(c="TouchEnd"):Z.Pen}else legacy_isTouchEvent(o)&&(a=Z.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Z.Touch||c.startsWith("Mouse")&&a===Z.Mouse)&&(a=null)):Y[t]===Y.Click&&(a=l,l=null);let p=legacy_isTouchEvent(o)?o.changedTouches[0]:o;if(!p)return;let u=r.getId(s),{clientX:d,clientY:h}=p;callbackWrapper(e)(Object.assign({type:Y[c],id:u,x:d,y:h},null!==a&&{pointerType:a}))};return Object.keys(Y).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(e=>{let r=toLowerCase(e),i=getHandler(e);if(window.PointerEvent)switch(Y[e]){case Y.MouseDown:case Y.MouseUp:r=r.replace("mouse","pointer");break;case Y.TouchStart:case Y.TouchEnd:return}a.push(on(r,i,t))}),callbackWrapper(()=>{a.forEach(e=>e())})}function initScrollObserver({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){let s=callbackWrapper(throttle(callbackWrapper(o=>{let s=getEventTarget(o);if(!s||isBlocked(s,i,n,!0))return;let a=r.getId(s);if(s===t&&t.defaultView){let r=getWindowScroll(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100));return on("scroll",s,t)}function initViewportResizeObserver({viewportResizeCb:e},{win:t}){let r=-1,i=-1,n=callbackWrapper(throttle(callbackWrapper(()=>{let t=getWindowHeight(),n=getWindowWidth();(r!==t||i!==n)&&(e({width:Number(n),height:Number(t)}),r=t,i=n)}),200));return on("resize",n,t)}let er=["INPUT","TEXTAREA","SELECT"],ei=new WeakMap;function initInputObserver({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:p}){function eventHandler(e){let r=getEventTarget(e),c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=r.parentElement),!r||!u||0>er.indexOf(u)||isBlocked(r,i,n,!0)||r.classList.contains(o)||s&&r.matches(s))return;let d=r.value,h=!1,f=getInputType(r)||"";"radio"===f||"checkbox"===f?h=r.checked:(a[u.toLowerCase()]||a[f])&&(d=maskInputValue({element:r,maskInputOptions:a,tagName:u,type:f,value:d,maskInputFn:l})),cbWithDedup(r,p?{text:d,isChecked:h,userTriggered:c}:{text:d,isChecked:h});let _=r.name;"radio"===f&&_&&h&&t.querySelectorAll(`input[type="radio"][name="${_}"]`).forEach(e=>{if(e!==r){let t=e.value;cbWithDedup(e,p?{text:t,isChecked:!h,userTriggered:!1}:{text:t,isChecked:!h})}})}function cbWithDedup(t,i){let n=ei.get(t);if(!n||n.text!==i.text||n.isChecked!==i.isChecked){ei.set(t,i);let n=r.getId(t);callbackWrapper(e)(Object.assign(Object.assign({},i),{id:n}))}}let u="last"===c.input?["change"]:["input","change"],d=u.map(e=>on(e,callbackWrapper(eventHandler),t)),h=t.defaultView;if(!h)return()=>{d.forEach(e=>e())};let f=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),_=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&d.push(..._.map(e=>hookSetter(e[0],e[1],{set(){callbackWrapper(eventHandler)({target:this,isTrusted:!1})}},!1,h))),callbackWrapper(()=>{d.forEach(e=>e())})}function getNestedCSSRulePositions(e){return function(e,t){if(hasNestedCSSRule("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||hasNestedCSSRule("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||hasNestedCSSRule("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||hasNestedCSSRule("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules),i=r.indexOf(e);t.unshift(i)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules),i=r.indexOf(e);t.unshift(i)}return t}(e,[])}function getIdAndStyleId(e,t,r){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}function initStyleSheetObserver({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){let n,o;
1if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};let s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:callbackWrapper((i,n,o)=>{let[s,a]=o,{id:l,styleId:c}=getIdAndStyleId(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:a}]}),i.apply(n,o)})});let a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:callbackWrapper((i,n,o)=>{let[s]=o,{id:a,styleId:l}=getIdAndStyleId(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:s}]}),i.apply(n,o)})}),i.CSSStyleSheet.prototype.replace&&(n=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:callbackWrapper((i,n,o)=>{let[s]=o,{id:a,styleId:l}=getIdAndStyleId(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:s}),i.apply(n,o)})})),i.CSSStyleSheet.prototype.replaceSync&&(o=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:callbackWrapper((i,n,o)=>{let[s]=o,{id:a,styleId:l}=getIdAndStyleId(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:s}),i.apply(n,o)})}));let l={};canMonkeyPatchNestedCSSRule("CSSGroupingRule")?l.CSSGroupingRule=i.CSSGroupingRule:(canMonkeyPatchNestedCSSRule("CSSMediaRule")&&(l.CSSMediaRule=i.CSSMediaRule),canMonkeyPatchNestedCSSRule("CSSConditionRule")&&(l.CSSConditionRule=i.CSSConditionRule),canMonkeyPatchNestedCSSRule("CSSSupportsRule")&&(l.CSSSupportsRule=i.CSSSupportsRule));let c={};return Object.entries(l).forEach(([i,n])=>{c[i]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[i].insertRule,{apply:callbackWrapper((i,n,o)=>{let[s,a]=o,{id:l,styleId:c}=getIdAndStyleId(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:[...getNestedCSSRulePositions(n),a||0]}]}),i.apply(n,o)})}),n.prototype.deleteRule=new Proxy(c[i].deleteRule,{apply:callbackWrapper((i,n,o)=>{let[s]=o,{id:a,styleId:l}=getIdAndStyleId(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...getNestedCSSRulePositions(n),s]}]}),i.apply(n,o)})})}),callbackWrapper(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,n&&(i.CSSStyleSheet.prototype.replace=n),o&&(i.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}function initAdoptedStyleSheetObserver({mirror:e,stylesheetManager:t},r){var i,n,o;let s=null;s="#document"===r.nodeName?e.getId(r):e.getId(r.host);let a="#document"===r.nodeName?null===(i=r.defaultView)||void 0===i?void 0:i.Document:null===(o=null===(n=r.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===o?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null===(e=l.get)||void 0===e?void 0:e.call(this)},set(e){var r;let i=null===(r=l.set)||void 0===r?void 0:r.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return i}}),callbackWrapper(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function initStyleDeclarationObserver({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){let o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:callbackWrapper((n,s,a)=>{var l;let[c,p,u]=a;if(r.has(c))return o.apply(s,[c,p,u]);let{id:d,styleId:h}=getIdAndStyleId(null===(l=s.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,i.styleMirror);return(d&&-1!==d||h&&-1!==h)&&e({id:d,styleId:h,set:{property:c,value:p,priority:u},index:getNestedCSSRulePositions(s.parentRule)}),n.apply(s,a)})});let s=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:callbackWrapper((n,o,a)=>{var l;let[c]=a;if(r.has(c))return s.apply(o,[c]);let{id:p,styleId:u}=getIdAndStyleId(null===(l=o.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,i.styleMirror);return(p&&-1!==p||u&&-1!==u)&&e({id:p,styleId:u,remove:{property:c},index:getNestedCSSRulePositions(o.parentRule)}),n.apply(o,a)})}),callbackWrapper(()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=s})}function initMediaInteractionObserver({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:n,doc:o}){let s=callbackWrapper(o=>throttle(callbackWrapper(n=>{let s=getEventTarget(n);if(!s||isBlocked(s,t,r,!0))return;let{currentTime:a,volume:l,muted:c,playbackRate:p,loop:u}=s;e({type:o,id:i.getId(s),currentTime:a,volume:l,muted:c,playbackRate:p,loop:u})}),n.media||500)),a=[on("play",s(0),o),on("pause",s(1),o),on("seeked",s(2),o),on("volumechange",s(3),o),on("ratechange",s(4),o)];return callbackWrapper(()=>
1{a.forEach(e=>e())})}function initFontObserver({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let i=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){let i=new o(e,t,r);return n.set(i,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};let s=patch(t.fonts,"add",function(t){return function(r){return setTimeout(callbackWrapper(()=>{let t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return i.push(()=>{r.FontFace=o}),i.push(s),callbackWrapper(()=>{i.forEach(e=>e())})}function initSelectionObserver(e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,selectionCb:o}=e,s=!0,a=callbackWrapper(()=>{let e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let o=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:c,endOffset:p}=o,u=isBlocked(s,i,n,!0)||isBlocked(c,i,n,!0);u||a.push({start:r.getId(s),startOffset:l,end:r.getId(c),endOffset:p})}o({ranges:a})});return a(),on("selectionchange",a)}function initCustomElementObserver({doc:e,customElementCb:t}){let r=e.defaultView;if(!r||!r.customElements)return()=>{};let i=patch(r.customElements,"define",function(e){return function(r,i,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,i,n])}});return i}function mergeHooks(e,t){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:p,canvasMutationCb:u,fontCb:d,selectionCb:h,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),i(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),p(...e)}
1,e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),h(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}function initObservers(e,t={}){let r;let i=e.doc.defaultView;if(!i)return()=>{};mergeHooks(e,t),e.recordDOM&&(r=initMutationObserver(e,e.doc));let n=initMoveObserver(e),o=initMouseInteractionObserver(e),s=initScrollObserver(e),a=initViewportResizeObserver(e,{win:i}),l=initInputObserver(e),c=initMediaInteractionObserver(e),styleSheetObserver=()=>{},adoptedStyleSheetObserver=()=>{},styleDeclarationObserver=()=>{},fontObserver=()=>{};e.recordDOM&&(styleSheetObserver=initStyleSheetObserver(e,{win:i}),adoptedStyleSheetObserver=initAdoptedStyleSheetObserver(e,e.doc),styleDeclarationObserver=initStyleDeclarationObserver(e,{win:i}),e.collectFonts&&(fontObserver=initFontObserver(e)));let p=initSelectionObserver(e),u=initCustomElementObserver(e),d=[];for(let t of e.plugins)d.push(t.observer(t.callback,i,t.options));return callbackWrapper(()=>{et.forEach(e=>e.reset()),null==r||r.disconnect(),n(),o(),s(),a(),l(),c(),styleSheetObserver(),adoptedStyleSheetObserver(),styleDeclarationObserver(),fontObserver(),p(),u(),d.forEach(e=>e())})}function hasNestedCSSRule(e){return void 0!==window[e]}function canMonkeyPatchNestedCSSRule(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}let CrossOriginIframeMirror=class CrossOriginIframeMirror{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),s=n.get(t);return s||(s=this.generateIdFn(),n.set(t,s),o.set(s,t)),s}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}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}};let IframeManager=class IframeManager{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new CrossOriginIframeMirror(genId),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new CrossOriginIframeMirror(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 r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||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){if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;let t=e.source;if(!t)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case J.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:J.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case J.Meta:case J.Load:case J.DomContentLoaded:break;case J.Plugin:return t;case J.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case J.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}
1),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 X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,["id"]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(r=t.data.styles)||void 0===r||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let n of i)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}
1patchRootIdOnNode(e,t){e.type===H.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}};let ShadowDomManager=class ShadowDomManager{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!isNativeShadowDom(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=initMutationObserver(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(initScrollObserver(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(initAdoptedStyleSheetObserver({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){let r=this;this.restoreHandlers.push(patch(e.prototype,"attachShadow",function(e){return function(i){let n=e.call(this,i);return this.shadowRoot&&inDom(this)&&r.addShadowRoot(this.shadowRoot,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}};/*! ***************************************************************************** 2Copyright (c) Microsoft Corporation. 3 4Permission to use, copy, modify, and/or distribute this software for any 5purpose with or without fee is hereby granted. 6 7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 12OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13PERFORMANCE OF THIS SOFTWARE. 14***************************************************************************** */function __rest(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function __awaiter(e,t,r,i){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i.throw(e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})}for(var en="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),es=0;es<en.length;es++)eo[en.charCodeAt(es)]=es;var encode=function(e){var t,r=new Uint8Array(e),i=r.length,n="";for(t=0;t<i;t+=3)n+=en[r[t]>>2]+en[(3&r[t])<<4|r[t+1]>>4]+en[(15&r[t+1])<<2|r[t+2]>>6]+en[63&r[t+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n};let ea=new Map;function variableListFor(e,t){let r=ea.get(e);return r||(r=new Map,ea.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}let saveWebGLVar=(e,t,r)=>{if(!e||!(isInstanceOfWebGLObject(e,t)||"object"==typeof e))return;let i=e.constructor.name,n=variableListFor(r,i),o=n.indexOf(e);return -1===o&&(o=n.length,n.push(e)),o};function serializeArg(e,t,r){if(e instanceof Array)return e.map(e=>serializeArg(e,t,r));if(null===e);else 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){let t=e.constructor.name;return{rr_type:t,args:[Object.values(e)]}}else if(e instanceof ArrayBuffer){let t=e.constructor.name,r=encode(e);return{rr_type:t,base64:r}}else if(e instanceof DataView){let i=e.constructor.name;return{rr_type:i,args:[serializeArg(e.buffer,t,r),e.byteOffset,e.byteLength]}}else if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}else if(e instanceof HTMLCanvasElement){let t=e.toDataURL();return{rr_type:"HTMLImageElement",src:t}}else if(e instanceof ImageData){let i=e.constructor.name;return{rr_type:i,args:[serializeArg(e.data,t,r),e.width,e.height]}}else if(isInstanceOfWebGLObject(e,t)||"object"==typeof e){let i=e.constructor.name,n=saveWebGLVar(e,t,r);return{rr_type:i,index:n}}return e}
14let serializeArgs=(e,t,r)=>e.map(e=>serializeArg(e,t,r)),isInstanceOfWebGLObject=(e,t)=>{let r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return!!r.find(r=>e instanceof t[r])};function initCanvas2DMutationObserver(e,t,r,i){let n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;let o=patch(t.CanvasRenderingContext2D.prototype,s,function(n){return function(...o){return isBlocked(this.canvas,r,i,!0)||setTimeout(()=>{let r=serializeArgs(o,t,this);e(this.canvas,{type:ee["2D"],property:s,args:r})},0),n.apply(this,o)}});n.push(o)}catch(i){let r=hookSetter(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:ee["2D"],property:s,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}function getNormalizedContextName(e){return"experimental-webgl"===e?"webgl":e}function initCanvasContextObserver(e,t,r,i){let n=[];try{let o=patch(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...o){if(!isBlocked(this,t,r,!0)){let e=getNormalizedContextName(n);if("__context"in this||(this.__context=e),i&&["webgl","webgl2"].includes(e)){if(o[0]&&"object"==typeof o[0]){let e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[n,...o])}});n.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function patchGLPrototype(e,t,r,i,n,o,s){let a=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if("function"!=typeof e[o])continue;let l=patch(e,o,function(e){return function(...a){let l=e.apply(this,a);if(saveWebGLVar(l,s,this),"tagName"in this.canvas&&!isBlocked(this.canvas,i,n,!0)){let e=serializeArg
14s(a,s,this),i={type:t,property:o,args:e};r(this.canvas,i)}return l}});a.push(l)}catch(n){let i=hookSetter(e,o,{set(e){r(this.canvas,{type:t,property:o,args:[e],setter:!0})}});a.push(i)}return a}function initCanvasWebGLMutationObserver(e,t,r,i,n){let o=[];return o.push(...patchGLPrototype(t.WebGLRenderingContext.prototype,ee.WebGL,e,r,i,n,t)),void 0!==t.WebGL2RenderingContext&&o.push(...patchGLPrototype(t.WebGL2RenderingContext.prototype,ee.WebGL2,e,r,i,n,t)),()=>{o.forEach(e=>e())}}function funcToSource(e,t){var r=void 0===t?null:t,i=e.toString().split("\n");i.pop(),i.shift();for(var n=i[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,s=0,a=i.length;s<a;++s)i[s]=i[s].substring(n).replace(o,"$1use strict$2")+"\n";return r&&i.push("//# sourceMappingURL="+r+"\n"),i}function createURL(e,t){var r=funcToSource(e,t),i=new Blob(r,{type:"application/javascript"});return URL.createObjectURL(i)}var el=(S=function(){!function(){/*! ***************************************************************************** 15 Copyright (c) Microsoft Corporation. 16 17 Permission to use, copy, modify, and/or distribute this software for any 18 purpose with or without fee is hereby granted. 19 20 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 21 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 22 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 23 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 24 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 25 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 26 PERFORMANCE OF THIS SOFTWARE. 27 ***************************************************************************** */function __awaiter(e,t,r,i){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i.throw(e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})}for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),r=0;r<e.length;r++)t[e.charCodeAt(r)]=r;var encode=function(t){var r,i=new Uint8Array(t),n=i.length,o="";for(r=0;r<n;r+=3)o+=e[i[r]>>2]+e[(3&i[r])<<4|i[r+1]>>4]+e[(15&i[r+1])<<2|i[r+2]>>6]+e[63&i[r+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o};let i=new Map,n=new Map;function getTransparentBlobFor(e,t,r){return __awaiter(this,void 0,void 0,function*(){let i=`${e}-${t}`;if(!("OffscreenCanvas"in globalThis))return"";{if(n.has(i))return n.get(i);let o=new OffscreenCanvas(e,t);o.getContext("2d");let s=yield o.convertToBlob(r),a=yield s.arrayBuffer(),l=encode(a);return n.set(i,l),l}})}let o=self;o.onmessage=function(e){return __awaiter(this,void 0,void 0,function*(){if(!("OffscreenCanvas"in globalThis))return o.postMessage({id:e.data.id});{let{id:t,bitmap:r,width:n,height:s,dataURLOptions:a}=e.data,l=getTransparentBlobFor(n,s,a),c=new OffscreenCanvas(n,s),p=c.getContext("2d");p.drawImage(r,0,0),r.close();let u=yield c.convertToBlob(a),d=u.type,h=yield u.arrayBuffer(),f=encode(h);if(!i.has(t)&&(yield l)===f)return i.set(t,f),o.postMessage({id:t});if(i.get(t)===f)return o.postMessage({id:t});o.postMessage({id:t,type:d,base64:f,width:n,height:s}),i.set(t,f)}})}}()},function(e){return M=M||createURL(S,null),new Worker(M,e)});let CanvasManager=class CanvasManager{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{let r=this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId;(r||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,i,n),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:s})}initCanvasFPSObserver(e,t,r,i,n){let o;let s=initCanvasContextObserver(t,r,i,!0),a=new Map,l=new el;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:r,type:i,width:n,height:o}=e.data;this.mutationCb({id:t,type:ee["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})};let c=1e3/e,p=0,getCanvas=()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{isBlocked(t,r,i,!0)||e.push(t)}),e},takeCanvasSnapshots=e=>{if(p&&e-p<c){o=requestAnimationFrame(takeCanvasSnapshots);return}
27p=e,getCanvas().forEach(e=>__awaiter(this,void 0,void 0,function*(){var t;let r=this.mirror.getId(e);if(a.get(r)||0===e.width||0===e.height)return;if(a.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);(null===(t=null==r?void 0:r.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)===!1&&r.clear(r.COLOR_BUFFER_BIT)}let i=yield createImageBitmap(e);l.postMessage({id:r,bitmap:i,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[i])})),o=requestAnimationFrame(takeCanvasSnapshots)};o=requestAnimationFrame(takeCanvasSnapshots),this.resetObservers=()=>{s(),cancelAnimationFrame(o)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=initCanvasContextObserver(e,t,r,!1),n=initCanvas2DMutationObserver(this.processMutation.bind(this),e,t,r),o=initCanvasWebGLMutationObserver(this.processMutation.bind(this),e,t,r,this.mirror);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let setLatestRAFTimestamp=e=>{this.rafStamps.latestId=e,requestAnimationFrame(setLatestRAFTimestamp)};requestAnimationFrame(setLatestRAFTimestamp)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let i=r.map(e=>{let t=__rest(e,["type"]);return t}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}};let StylesheetManager=class StylesheetManager{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new StyleSheetMirror,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;let r={id:t,styleIds:[]},i=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),i.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:stringifyRule(e),index:t}))})),r.styleIds.push(e)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}};let ProcessedNodeManager=class ProcessedNodeManager{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}};function wrapEvent(e){return Object.assign(Object.assign({},e),{timestamp:b()})}let ec=!1,ep=createMirror();function record(e={}){let t;let{emit:r,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:c=null,ignoreClass:p="rr-ignore",ignoreSelector:u=null,maskTextClass:d="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:_,maskInputOptions:g,slimDOMOptions:m,maskInputFn:y,maskTextFn:v,hooks:b,packFn:S,sampling:M={},dataURLOptions:x={},mousemoveWait:k,recordDOM:w=!0,recordCanvas:I=!1,recordCrossOriginIframes:E=!1,recordAfter:O="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:C=!1,collectFonts:L=!1,inlineImages:T=!1,plugins:R,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:P}=e;registerErrorHandler(P);let A=!E||window.parent===window,q=!1;if(!A)try{window.parent.document&&(q=!1)}catch(e){q=!0}if(A&&!r)throw Error("emit function is required");void 0!==k&&void 0===M.mousemove&&(M.mousemove=k),ep.reset();let F=!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==g?g:{password:!0},B=!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===m,headMetaDescKeywords:"all"===m}:m||{};polyfill();let U=0,eventProcessor=e=>{for(let t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!q&&(e=S(e)),e};s=(e,o)=>{var s;if((null===(s=et[0])||void 0===s?void 0:s.isFrozen())&&e.type!==J.FullSnapshot&&!(e.type===J.IncrementalSnapshot&&e.data.source===X.Mutation)&&et.forEach(e
27=>e.unfreeze()),A)null==r||r(eventProcessor(e),o);else if(q){let t={type:"rrweb",event:eventProcessor(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===J.FullSnapshot)t=e,U=0;else if(e.type===J.IncrementalSnapshot){if(e.data.source===X.Mutation&&e.data.isAttachIframe)return;U++;let r=n&&U>=n,o=i&&e.timestamp-t.timestamp>i;(r||o)&&a(!0)}};let wrappedMutationEmit=e=>{s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.Mutation},e)}))},wrappedScrollEmit=e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.Scroll},e)})),wrappedCanvasMutationEmit=e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.CanvasMutation},e)})),W=new StylesheetManager({mutationCb:wrappedMutationEmit,adoptedStyleSheetCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.AdoptedStyleSheet},e)}))}),j=new IframeManager({mirror:ep,mutationCb:wrappedMutationEmit,stylesheetManager:W,recordCrossOriginIframes:E,wrappedEmit:s});for(let e of R||[])e.getMirror&&e.getMirror({nodeMirror:ep,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});let $=new ProcessedNodeManager;l=new CanvasManager({recordCanvas:I,mutationCb:wrappedCanvasMutationEmit,win:window,blockClass:o,blockSelector:c,mirror:ep,sampling:M.canvas,dataURLOptions:x});let z=new ShadowDomManager({mutationCb:wrappedMutationEmit,scrollCb:wrappedScrollEmit,bypassOptions:{blockClass:o,blockSelector:c,maskTextClass:d,maskTextSelector:h,inlineStylesheet:f,maskInputOptions:F,dataURLOptions:x,maskTextFn:v,maskInputFn:y,recordCanvas:I,inlineImages:T,sampling:M,slimDOMOptions:B,iframeManager:j,stylesheetManager:W,canvasManager:l,keepIframeSrcFn:N,processedNodeManager:$},mirror:ep});a=(e=!1)=>{if(!w)return;s(wrapEvent({type:J.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e),W.reset(),z.init(),et.forEach(e=>e.lock());let t=snapshot(document,{mirror:ep,blockClass:o,blockSelector:c,maskTextClass:d,maskTextSelector:h,inlineStylesheet:f,maskAllInputs:F,maskTextFn:v,slimDOM:B,dataURLOptions:x,recordCanvas:I,inlineImages:T,onSerialize:e=>{isSerializedIframe(e,ep)&&j.addIframe(e),isSerializedStylesheet(e,ep)&&W.trackLinkElement(e),hasShadowRoot(e)&&z.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:N});if(!t)return console.warn("Failed to snapshot the document");s(wrapEvent({type:J.FullSnapshot,data:{node:t,initialOffset:getWindowScroll(window)}}),e),et.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,ep.getId(document))};try{let e=[],observe=e=>{var t;return callbackWrapper(initObservers)({mutationCb:wrappedMutationEmit,mousemoveCb:(e,t)=>s(wrapEvent({type:J.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.MouseInteraction},e)})),scrollCb:wrappedScrollEmit,viewportResizeCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.ViewportResize},e)})),inputCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.Input},e)})),mediaInteractionCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.MediaInteraction},e)})),styleSheetRuleCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.StyleSheetRule},e)})),styleDeclarationCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.StyleDeclaration},e)})),canvasMutationCb:wrappedCanvasMutationEmit,fontCb:e=>s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.Font},e)})),selectionCb:e=>{s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.Selection},e)}))},customElementCb:e=>{s(wrapEvent({type:J.IncrementalSnapshot,data:Object.assign({source:X.CustomElement},e)}))},blockClass:o,ignoreClass:p,ignoreSelector:u,maskTextClass:d,maskTextSelector:h,maskInputOptions:F,inlineStylesheet:f,sampling:M,recordDOM:w,recordCanvas:I,inlineImages:T,userTriggeredOnInput:C,collectFonts:L,doc:e,maskInputFn:y,maskTextFn:v,keepIframeSrcFn:N,blockSelector:c,slimDOMOptions:B,dataURLOptions:x,mirror:ep,iframeManager:j,stylesheetManager:W,shadowDomManager:z,processedNodeManager:$,canvasManager:l,ignoreCSSAttributes:D,plugins:(null===(t=null==R?void 0:R.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>s(wrapEvent({type:J.Plugin,data:{plugin:e.name,payload:t}}
27))})))||[]},b)};j.addLoadListener(t=>{try{e.push(observe(t.contentDocument))}catch(e){console.warn(e)}});let init=()=>{a(),e.push(observe(document)),ec=!0};return"interactive"===document.readyState||"complete"===document.readyState?init():(e.push(on("DOMContentLoaded",()=>{s(wrapEvent({type:J.DomContentLoaded,data:{}})),"DOMContentLoaded"===O&&init()})),e.push(on("load",()=>{s(wrapEvent({type:J.Load,data:{}})),"load"===O&&init()},window))),()=>{e.forEach(e=>e()),$.destroy(),ec=!1,unregisterErrorHandler()}}catch(e){console.warn(e)}}record.addCustomEvent=(e,t)=>{if(!ec)throw Error("please add custom event after start recording");s(wrapEvent({type:J.Custom,data:{tag:e,payload:t}}))},record.freezePage=()=>{et.forEach(e=>e.freeze())},record.takeFullSnapshot=e=>{if(!ec)throw Error("please take full snapshot after start recording");a(e)},record.mirror=ep;var eu=((E=eu||{})[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),ed=((O=ed||{})[O.Mutation=0]="Mutation",O[O.MouseMove=1]="MouseMove",O[O.MouseInteraction=2]="MouseInteraction",O[O.Scroll=3]="Scroll",O[O.ViewportResize=4]="ViewportResize",O[O.Input=5]="Input",O[O.TouchMove=6]="TouchMove",O[O.MediaInteraction=7]="MediaInteraction",O[O.StyleSheetRule=8]="StyleSheetRule",O[O.CanvasMutation=9]="CanvasMutation",O[O.Font=10]="Font",O[O.Log=11]="Log",O[O.Drag=12]="Drag",O[O.StyleDeclaration=13]="StyleDeclaration",O[O.Selection=14]="Selection",O[O.AdoptedStyleSheet=15]="AdoptedStyleSheet",O[O.CustomElement=16]="CustomElement",O),eh={DEBUG:!1,LIB_VERSION:"2.55.1"};if("undefined"==typeof window){var ef={hostname:""};V={navigator:{userAgent:"",onLine:!0},document:{location:ef,referrer:""},screen:{width:0,height:0},location:ef}}else V=window;var e_=Array.prototype,eg=Function.prototype,em=Object.prototype,ey=e_.slice,ev=em.toString,eb=em.hasOwnProperty,eS=V.console,eM=V.navigator,ex=V.document,ek=V.opera,ew=V.screen,eI=eM.userAgent,eE=eg.bind,eO=e_.forEach,eC=e_.indexOf,eL=e_.map,eT=Array.isArray,eR={},eN={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},eD={log:function(){if(eh.DEBUG&&!eN.isUndefined(eS)&&eS)try{eS.log.apply(eS,arguments)}catch(e){eN.each(arguments,function(e){eS.log(e)})}},warn:function(){if(eh.DEBUG&&!eN.isUndefined(eS)&&eS){var e=["Mixpanel warning:"].concat(eN.toArray(arguments));try{eS.warn.apply(eS,e)}catch(t){eN.each(e,function(e){eS.warn(e)})}}},error:function(){if(eh.DEBUG&&!eN.isUndefined(eS)&&eS){var e=["Mixpanel error:"].concat(eN.toArray(arguments));try{eS.error.apply(eS,e)}catch(t){eN.each(e,function(e){eS.error(e)})}}},critical:function(){if(!eN.isUndefined(eS)&&eS){var e=["Mixpanel error:"].concat(eN.toArray(arguments));try{eS.error.apply(eS,e)}catch(t){eN.each(e,function(e){eS.error(e)})}}}},log_func_with_prefix=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(eD,arguments)}},console_with_prefix=function(e){return{log:log_func_with_prefix(eD.log,e),error:log_func_with_prefix(eD.error,e),critical:log_func_with_prefix(eD.critical,e)}};eN.bind=function(e,t){var r,i;if(eE&&e.bind===eE)return eE.apply(e,ey.call(arguments,1));if(!eN.isFunction(e))throw TypeError();return r=ey.call(arguments,2),i=function(){if(!(this instanceof i))return e.apply(t,r.concat(ey.call(arguments)));var n={};n.prototype=e.prototype;var o=new n;n.prototype=null;var s=e.apply(o,r.concat(ey.call(arguments)));return Object(s)===s?s:o}},eN.each=function(e,t,r){if(null!=e){if(eO&&e.forEach===eO)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,n=e.length;i<n;i++)if(i in e&&t.call(r,e[i],i,e)===eR)return}else for(var o in e)if(eb.call(e,o)&&t.call(r,e[o],o,e)===eR)return}},eN.extend=function(e){return eN.each(ey.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])}),e},eN.isArray=eT||function(e){return"[object Array]"===ev.call(e)},eN.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},eN.isArguments=function(e){return!!(e&&eb.call(e,"callee"))},eN.toArray=function(e){return e?e.toArray?e.toArray():eN.isArray(e)||eN.isArguments(e)?ey.call(e):eN.values(e):[]},eN.map=function(e,t,r){if(eL&&e.map===eL)return e.map(t,r);var i=[];return eN.each(e,function(e){i.push(t.call(r,e))}),i},eN.keys=function(e){var t=[];return null===e||eN.each(e,function(e,r){t[t.length]=r}),t},eN.values=function(e){var t=[];return null===e||eN.each(e,function(e){t[t.length]=e}),t},eN.include=function(e,t){var r=!1;return null===e?r:eC&&e.indexOf===eC?-1!=e.indexOf(t):(eN.each(e,function(e){if(r||(r=e===t))return eR}),r)},eN.includes=function(e,t){return -1!==e.indexOf(t)},eN.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},eN.isObject=function(e){return e===Object(e)&&!eN.isArray(e)},eN.isEmptyObject=function(e){if(eN.isObject(e)){for(var t in e)if(eb.call(e,t))return!1;return!0}return!1},eN.isUndefined=function(e){return void 0===e},eN.isString=function(e){return"[object String]"==ev.call(e)},eN.isDate=function(e){return"[object Date]"==ev.call(e)},eN.isNumber=function(e){return"[object Number]"==ev.call(e)},eN.isElement=function(e){return!!(e&&1===e.nodeType)},eN.encodeDates=function(e){return eN.each(e,function(t,r){eN.isDate(t)?e[r]=eN.formatDate(t):eN.isObject(t)&&(e[r]=eN.encodeDates(t))}),e},eN.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},eN.formatDate=function(e){function pad(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+pad(e.getUTCMonth()+1)+"-"+pad(e.getUTCDate())+"T"+pad(e.getUTCHours())+":"+pad(e.getUTCMinutes())+":"+pad(e.getUTCSeconds())},eN.strip_empty_properties=function(e){var t={};return eN.each(e,function(e,r){eN.isString(e)&&e.length>0&&(t[r]=e)}),t},eN.truncate=function(e,t){var r;return"string"==typeof e?r=e.slice(0,t):eN.isArray(e)?(r=[],eN.each(e,function(e){r.push(eN.truncate(e,t))})):eN.isObject(e)?(r={},eN.each(e,function(e,i){r[i]=eN.truncate(e,t)})):r=e,r},eN.JSONEncode=function(e){var quote=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},str=function(e,t){var r="",i=0,n="",o="",s=0,a=r,l=[],c=t[e];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(r+=" ",l=[],"[object Array]"===ev.apply(c)){for(i=0,s=c.length;i<s;i+=1)l[i]=str(i,c)||"null";
27return o=0===l.length?"[]":r?"[\n"+r+l.join(",\n"+r)+"\n"+a+"]":"["+l.join(",")+"]",r=a,o}for(n in c)eb.call(c,n)&&(o=str(n,c))&&l.push(quote(n)+(r?": ":":")+o);return o=0===l.length?"{}":r?"{"+l.join(",")+a+"}":"{"+l.join(",")+"}",r=a,o}};return str("",{"":e})},eN.JSONDecode=(N={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},D=function(e){var t=SyntaxError(e);throw t.at=C,t.text=T,t},P=function(e){return e&&e!==L&&D("Expected '"+e+"' instead of '"+L+"'"),L=T.charAt(C),C+=1,L},A=function(){var e,t="";for("-"===L&&(t="-",P("-"));L>="0"&&L<="9";)t+=L,P();if("."===L)for(t+=".";P()&&L>="0"&&L<="9";)t+=L;if("e"===L||"E"===L)for(t+=L,P(),("-"===L||"+"===L)&&(t+=L,P());L>="0"&&L<="9";)t+=L,P();if(isFinite(e=+t))return e;D("Bad number")},q=function(){var e,t,r,i="";if('"'===L)for(;P();){if('"'===L)return P(),i;if("\\"===L){if(P(),"u"===L){for(t=0,r=0;t<4&&isFinite(e=parseInt(P(),16));t+=1)r=16*r+e;i+=String.fromCharCode(r)}else if("string"==typeof N[L])i+=N[L];else break}else i+=L}D("Bad string")},F=function(){for(;L&&L<=" ";)P()},B=function(){switch(L){case"t":return P("t"),P("r"),P("u"),P("e"),!0;case"f":return P("f"),P("a"),P("l"),P("s"),P("e"),!1;case"n":return P("n"),P("u"),P("l"),P("l"),null}D('Unexpected "'+L+'"')},U=function(){var e=[];if("["===L){if(P("["),F(),"]"===L)return P("]"),e;for(;L;){if(e.push(R()),F(),"]"===L)return P("]"),e;P(","),F()}}D("Bad array")},W=function(){var e,t={};if("{"===L){if(P("{"),F(),"}"===L)return P("}"),t;for(;L;){if(e=q(),F(),P(":"),Object.hasOwnProperty.call(t,e)&&D('Duplicate key "'+e+'"'),t[e]=R(),F(),"}"===L)return P("}"),t;P(","),F()}}D("Bad object")},R=function(){switch(F(),L){case"{":return W();case"[":return U();case'"':return q();case"-":return A();default:return L>="0"&&L<="9"?A():B()}},function(e){var t;return T=e,C=0,L=" ",t=R(),F(),L&&D("Syntax error"),t}),eN.base64Encode=function(e){var t,r,i,n,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,c="",p=[];if(!e)return e;e=eN.utf8Encode(e);do t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=o>>12&63,i=o>>6&63,n=63&o,p[l++]=s.charAt(t)+s.charAt(r)+s.charAt(i)+s.charAt(n);while(a<e.length);switch(c=p.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},eN.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var t,r,i,n="",o=0;for(i=0,t=r=0,o=e.length;i<o;i++){var s=e.charCodeAt(i),a=null;s<128?r++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(r>t&&(n+=e.substring(t,r)),n+=a,t=r=i+1)}return r>t&&(n+=e.substring(t,e.length)),n},eN.UUID=(j=function(){var e,t=1*new Date;if(V.performance&&V.performance.now)e=V.performance.now();else for(e=0;t==1*new Date;)e++;return t.toString(16)+Math.floor(e).toString(16)},$=function(){var e,t,r=[],i=0;function xor(e,t){var i,n=0;for(i=0;i<t.length;i++)n|=r[i]<<8*i;return e^n}for(e=0;e<eI.length;e++)t=eI.charCodeAt(e),r.unshift(255&t),r.length>=4&&(i=xor(i,r),r=[]);return r.length>0&&(i=xor(i,r)),i.toString(16)},function(){var e=(ew.height*ew.width).toString(16);return j()+"-"+Math.random().toString(16).replace(".","")+"-"+$()+"-"+e+"-"+j()});var eP=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];eN.isBlockedUA=function(e){var t;for(t=0,e=e.toLowerCase();t<eP.length;t++)if(-1!==e.indexOf(eP[t]))return!0;return!1},eN.HTTPBuildQuery=function(e,t){var r,i,n=[];return eN.isUndefined(t)&&(t="&"),eN.each(e,function(e,t){r=encodeURIComponent(e.toString()),i=encodeURIComponent(t),n[n.length]=i+"="+r}),n.join(t)},eN.getQueryParam=function(e,t){var r=RegExp("[\\?&]"+(t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]"))+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var i=r[1];try{i=decodeURIComponent(i)}catch(e){eD.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},eN.cookie={get:function(e){for(var t=e+"=",r=ex.cookie.split(";"),i=0;i<r.length;i++){for(var n=r[i];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return null},parse:function(e){var t;try{t=eN.JSONDecode(eN.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,r,i,n,o,s){var a="",l="",c="";if(s)a="; domain="+s;else if(i){var p=extract_domain(ex.location.hostname);a=p?"; domain=."+p:""}if(r){var u=new Date;u.setTime(u.getTime()+1e3*r),l="; expires="+u.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure"),ex.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c},set:function(e,t,r,i,n,o,s){var a="",l="",c="";if(s)a="; domain="+s;else if(i){var p=extract_domain(ex.location.hostname);a=p?"; domain=."+p:""}if(r){var u=new Date;u.setTime(u.getTime()+864e5*r),l="; expires="+u.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure");var d=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c;return ex.cookie=d,d},remove:function(e,t,r){eN.cookie.set(e,"",-1,t,!1,!1,r)}};var eA=null,localStorageSupported=function(e,t){if(null!==eA&&!t)return eA;var r=!0;try{e=e||window.localStorage;var i="__mplss_"+cheap_guid(8);e.setItem(i,"xyz"),"xyz"!==e.getItem(i)&&(r=!1),e.removeItem(i)}catch(e){r=!1}return eA=r,r};eN.localStorage={is_supported:function(e){var t=localStorageSupported(null,e);return t||eD.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){eD.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){eN.localStorage.error(e)}return null},parse:function(e){try{return eN.JSONDecode(eN.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){eN.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){eN.localStorage.error(e)}}},eN.register_event=function(){function makeHandler(e,t,r){return function(i){if(i=i||fixEvent(window.event)){var n,o,s=!0;return eN.isFunction(r)&&(n=r(i)),o=t.call(e,i),(!1===n||!1===o)&&(s=!1),s}}}function fixEvent(e){return e&&(e.preventDefault=fixEvent.preventDefault,e.stopPropagation=fixEvent.stopPropagation),e}return fixEvent.preventDefault=function(){this.returnValue=!1},fixEvent.stopPropagation=function(){this.cancelBubble=!0},function(e,t,r,i,n){if(!e){eD.error("No valid element provided to register_event");return}if(e.addEventListener&&!i)e.addEventListener(t,r,!!n);else{var o="on"+t,s=e[o];e[o]=makeHandler(e,r,s)}}}();var eq=RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');eN.dom_query=function(){function getAllChildren(e){return e.all?e.all:e.getElementsByTagName("*")}var e=/[\t\r\n]/g;function hasClass(t,r){return(" "+t.className+" ").replace(e," ").indexOf(" "+r+" ")>=0}function getElementsBySelector(e){if(!ex.getElementsByTagName)return[];var t=e.split(" "),r=[ex];for(d=0;d<t.length;d++){if((a=t[d].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){c=(l=a.split("#"))[0];var i=l[1],n=ex.getElementById(i);if(!n||c&&n.nodeName.toLowerCase()!=c)return[];r=[n];continue}if(a.indexOf(".")>-1){c=(l=a.split("."))[0];var o=l[1];for(c||(c="*"),p=[],u=0,h=0;h<r.length;h++)for(f=0,_="*"==c?getAllChildren(r[h]):r[h].getElementsByTagName(c);f<_.length;f++)p[u++]=_[f];for(h=0,r=[],g=0;h<p.length;h++)p[h].className&&eN.isString(p[h].className)&&hasClass(p[h],o)&&(r[g++]=p[h]);continue}var s=a.match(eq);if(s){c=s[1];var a,l,c,p,u,d,h,f,_,g,m,y=s[2],v=s[3],b=s[4];for(c||(c="*"),p=[],u=0,h=0;h<r.length;h++)for(f=0,_="*"==c?getAllChildren(r[h]):r[h].getElementsByTagName(c);f<_.length;f++)p[u++]=_[f];switch(r=[],g=0,v){case"=":m=function(e){return e.getAttribute(y)==b};break;case"~":m=function(e){return e.getAttribute(y).match(RegExp("\\b"+b+"\\b"))};break;case"|":m=function(e){return e.getAttribute(y).match(RegExp("^"+b+"-?"))};break;case"^":m=function(e){return 0===e.getAttribute(y).indexOf(b)};break;case"$":m=function(e){return e.getAttribute(y).lastIndexOf(b)==e.getAttribute(y).length-b.length};break;case"*":m=function(e){return e.getAttribute(y).indexOf(b)>-1};break;default:m=function(e){return e.getAttribute(y)}}for(h=0,r=[],g=0;h<p.length;h++)m(p[h])&&(r[g++]=p[h]);continue}for(h=0,c=a,p=[],u=0;h<r.length;h++)for(f=0,_=r[h].getElementsByTagName(c);f<_.length;f++)p[u++]=_[f];r=p}return r}return function(e){return eN.isElement(e)?[e]:eN.isObject(e)&&!eN.isUndefined(e.length)?e:getElementsBySelector.call(this,e)}}();var eF=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],eB=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];eN.info={campaignParams:function(e){var t="",r={};return eN.each(eF,function(i){(t=eN.getQueryParam(ex.URL,i)).length?r[i]=t:void 0!==e&&(r[i]=e)}),r},clickParams:function(){var e="",t={};return eN.each(eB,function(r){(e=eN.getQueryParam(ex.URL,r)).length&&(t[r]=e)}),t},marketingParams:function(){return eN.extend(eN.info.campaignParams(),eN.info.clickParams())},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=eN.info.searchEngine(e),r={};if(null!==t){r.$search_engine=t;var i=eN.getQueryParam(e,"yahoo"!=t?"q":"p");
27i.length&&(r.mp_keyword=i)}return r},browser:function(e,t,r){if(t=t||"",r||eN.includes(e," OPR/"))return eN.includes(e,"Mini")?"Opera Mini":"Opera";if(/(BlackBerry|PlayBook|BB10)/i.test(e))return"BlackBerry";if(eN.includes(e,"IEMobile")||eN.includes(e,"WPDesktop"))return"Internet Explorer Mobile";if(eN.includes(e,"SamsungBrowser/"))return"Samsung Internet";if(eN.includes(e,"Edge")||eN.includes(e,"Edg/"))return"Microsoft Edge";if(eN.includes(e,"FBIOS"))return"Facebook Mobile";if(eN.includes(e,"Chrome"))return"Chrome";else if(eN.includes(e,"CriOS"))return"Chrome iOS";else if(eN.includes(e,"UCWEB")||eN.includes(e,"UCBrowser"))return"UC Browser";else if(eN.includes(e,"FxiOS"))return"Firefox iOS";else if(eN.includes(t,"Apple"))return eN.includes(e,"Mobile")?"Mobile Safari":"Safari";else if(eN.includes(e,"Android"))return"Android Mobile";else if(eN.includes(e,"Konqueror"))return"Konqueror";else if(eN.includes(e,"Firefox"))return"Firefox";else if(eN.includes(e,"MSIE")||eN.includes(e,"Trident/"))return"Internet Explorer";else if(eN.includes(e,"Gecko"))return"Mozilla";else return""},browserVersion:function(e,t,r){var i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[eN.info.browser(e,t,r)];if(void 0===i)return null;var n=e.match(i);return n?parseFloat(n[n.length-2]):null},os:function(){if(/Windows/i.test(eI))return/Phone/.test(eI)||/WPDesktop/.test(eI)?"Windows Phone":"Windows";if(/(iPhone|iPad|iPod)/.test(eI))return"iOS";if(/Android/.test(eI))return"Android";if(/(BlackBerry|PlayBook|BB10)/i.test(eI))return"BlackBerry";if(/Mac/i.test(eI))return"Mac OS X";if(/Linux/.test(eI))return"Linux";if(/CrOS/.test(eI))return"Chrome OS";else return""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return V.location.href},properties:function(e){return"object"!=typeof e&&(e={}),eN.extend(eN.strip_empty_properties({$os:eN.info.os(),$browser:eN.info.browser(eI,eM.vendor,ek),$referrer:ex.referrer,$referring_domain:eN.info.referringDomain(ex.referrer),$device:eN.info.device(eI)}),{$current_url:eN.info.currentUrl(),$browser_version:eN.info.browserVersion(eI,eM.vendor,ek),$screen_height:ew.height,$screen_width:ew.width,mp_lib:"web",$lib_version:eh.LIB_VERSION,$insert_id:cheap_guid(),time:eN.timestamp()/1e3},eN.strip_empty_properties(e))},people_properties:function(){return eN.extend(eN.strip_empty_properties({$os:eN.info.os(),$browser:eN.info.browser(eI,eM.vendor,ek)}),{$browser_version:eN.info.browserVersion(eI,eM.vendor,ek)})},mpPageViewProperties:function(){return eN.strip_empty_properties({current_page_title:ex.title,current_domain:V.location.hostname,current_url_path:V.location.pathname,current_url_protocol:V.location.protocol,current_url_search:V.location.search})}};var cheap_guid=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},eU=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,eW=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,extract_domain=function(e){var t=eW,r=e.split("."),i=r[r.length-1];(i.length>4||"com"===i||"org"===i)&&(t=eU);var n=e.match(t);return n?n[0]:""},isOnline=function(){var e=V.navigator.onLine;return eN.isUndefined(e)||e},ej=null,e$=null;function optIn(e,t){_optInOut(!0,e,t)}function optOut(e,t){_optInOut(!1,e,t)}function hasOptedIn(e,t){return"1"===_getStorageValue(e,t)}function hasOptedOut(e,t){if(_hasDoNotTrackFlagOn(t))return eD.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===_getStorageValue(e,t);return r&&eD.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function addOptOutCheckMixpanelLib(e){return _addOptOutCheck(e,function(e){return this.get_config(e)})}function addOptOutCheckMixpanelPeople(e){return _addOptOutCheck(e,function(e){return this._get_config(e)})}function addOptOutCheckMixpanelGroup(e){return _addOptOutCheck(e,function(e){return this._get_config(e)})}
27function clearOptInOut(e,t){_getStorage(t=t||{}).remove(_getStorageKey(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _getStorage(e){return"localStorage"===(e=e||{}).persistenceType?eN.localStorage:eN.cookie}function _getStorageKey(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function _getStorageValue(e,t){return _getStorage(t).get(_getStorageKey(e,t))}function _hasDoNotTrackFlagOn(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||V,r=t.navigator||{},i=!1;return eN.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(e){eN.includes([!0,1,"1","yes"],e)&&(i=!0)}),i}function _optInOut(e,t,r){if(!eN.isString(t)||!t.length){eD.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}_getStorage(r=r||{}).set(_getStorageKey(t,r),e?1:0,eN.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function _addOptOutCheck(e,t){return function(){var r=!1;try{var i=t.call(this,"token"),n=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");i&&(r=hasOptedOut(i,{ignoreDnt:n,persistenceType:o,persistencePrefix:s,window:a}))}catch(e){eD.error("Unexpected error when checking tracking opt-out status: "+e)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}"undefined"!=typeof JSON&&(ej=JSON.stringify,e$=JSON.parse),ej=ej||eN.JSONEncode,e$=e$||eN.JSONDecode,eN.toArray=eN.toArray,eN.isObject=eN.isObject,eN.JSONEncode=eN.JSONEncode,eN.JSONDecode=eN.JSONDecode,eN.isBlockedUA=eN.isBlockedUA,eN.isEmptyObject=eN.isEmptyObject,eN.info=eN.info,eN.info.device=eN.info.device,eN.info.browser=eN.info.browser,eN.info.browserVersion=eN.info.browserVersion,eN.info.properties=eN.info.properties;var ez=console_with_prefix("lock"),SharedLock=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};SharedLock.prototype.withLock=function(e,t,r){r||"function"==typeof t||(r=t,t=null);var i=r||new Date().getTime()+"|"+Math.random(),n=new Date().getTime(),o=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,l=this.storage,c=o+":X",p=o+":Y",u=o+":Z",reportError=function(e){t&&t(e)},delay=function(e){if(new Date().getTime()-n>a){ez.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+i+"]"),l.removeItem(u),l.removeItem(p),loop();return}setTimeout(function(){try{e()}catch(e){reportError(e)}},s*(Math.random()+.1))},waitFor=function(e,t){e()?t():delay(function(){waitFor(e,t)})},getSetY=function(){var e=l.getItem(p);if(e&&e!==i)return!1;if(l.setItem(p,i),l.getItem(p)===i)return!0;if(!localStorageSupported(l,!0))throw Error("localStorage support dropped while acquiring lock");return!1},loop=function(){l.setItem(c,i),waitFor(getSetY,function(){if(l.getItem(c)===i){criticalSection();return}delay(function(){if(l.getItem(p)!==i){loop();return}waitFor(function(){return!l.getItem(u)},criticalSection)})})},criticalSection=function(){l.setItem(u,"1");try{e()}finally{l.removeItem(u),l.getItem(p)===i&&l.removeItem(p),l.getItem(c)===i&&l.removeItem(c)}};try{if(localStorageSupported(l,!0))loop();else throw Error("localStorage support check failed")}catch(e){reportError(e)}};var eG=console_with_prefix("batch"),RequestQueue=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||eN.bind(eG.error,eG),this.lock=new SharedLock(e,{storage:this.storage}),this.usePersistence=t.usePersistence,this.pid=t.pid||null,this.memQueue=[]};RequestQueue.prototype.enqueue=function(e,t,r){var i={id:cheap_guid(),flushAfter:new Date().getTime()+2*t,payload:e};this.usePersistence?this.lock.withLock(eN.bind(function(){var t;try{var n=this.readFromStorage();n.push(i),(t=this.saveToStorage(n))&&this.memQueue.push(i)}catch(r){this.reportError("Error enqueueing item",e),t=!1}r&&r(t)},this),eN.bind(function(e){this.reportError("Error acquiring storage lock",e),r&&r(!1)},this),this.pid):(this.memQueue.push(i),r&&r(!0))},RequestQueue.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(this.usePersistence&&t.length<e){var r=this.readFromStorage();if(r.length){var i={};eN.each(t,function(e){i[e.id]=!0});for(var n=0;n<r.length;n++){var o=r[n];if(new Date().getTime()>o.flushAfter&&!i[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var filterOutIDsAndInvalid=function(e,t){var r=[];return eN.each(e,function(e){e.id&&!t[e.id]&&r.push(e)}),r};RequestQueue.prototype.removeItemsByID=function(e,t){var r={};if(eN.each(e,function(e){r[e]=!0}),this.memQueue=filterOutIDsAndInvalid(this.memQueue,r),this.usePersistence){var i=eN.bind(function(){var t;try{var i=this.readFromStorage();if(i=filterOutIDsAndInvalid(i,r),t=this.saveToStorage(i)){i=this.readFromStorage();for(var n=0;n<i.length;n++){var o=i[n];if(o.id&&r[o.id])return this.reportError("Item not removed from storage"),!1}}}catch(r){this.reportError("Error removing items",e),t=!1}return t},this);this.lock.withLock(function(){var e=i();t&&t(e)},eN.bind(function(e){var r=!1;if(this.reportError("Error acquiring storage lock",e),!localStorageSupported(this.storage,!0)&&!(r=i()))try{this.storage.removeItem(this.storageKey)}catch(e){this.reportError("Error clearing queue",e)}t&&t(r)},this),this.pid)}else t&&t(!0)};var updatePayloads=function(e,t){var r=[];return eN.each(e,function(e){var i=e.id;if(i in t){var n=t[i];null!==n&&(e.payload=n,r.push(e))}else r.push(e)}),r};RequestQueue.prototype.updatePayloads=function(e,t){this.memQueue=updatePayloads(this.memQueue,e),this.usePersistence?this.lock.withLock(eN.bind(function(){var r;try{var i=this.readFromStorage();i=updatePayloads(i,e),r=this.saveToStorage(i)}catch(t){this.reportError("Error updating items",e),r=!1}t&&t(r)},this),eN.bind(function(e){this.reportError("Error acquiring storage lock",e),t&&t(!1)},this),this.pid):t&&t(!0)},RequestQueue.prototype.readFromStorage=function(){var e;try{(e=this.storage.getItem(this.storageKey))&&(e=e$(e),eN.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null))}catch(t){this.reportError("Error retrieving queue",t),e=null}return e||[]},RequestQueue.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,ej(e)),!0}catch(e){return this.reportError("Error saving queue",e),!1}},RequestQueue.prototype.clear=function(){this.memQueue=[],this.usePersistence&&this.storage.removeItem(this.storageKey)};var eH=console_with_prefix("batch"),RequestBatcher=function(e,t){this.errorReporter=t.errorReporter,this.queue=new RequestQueue(e,{errorReporter:eN.bind(this.reportError,this),storage:t.storage,usePersistence:t.usePersistence}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1};RequestBatcher.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},RequestBatcher.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},RequestBatcher.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},RequestBatcher.prototype.clear=function(){this.queue.clear()},RequestBatcher.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},RequestBatcher.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},RequestBatcher.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(eN.bind(function(){this.stopped||this.flush()},this),this.flushInterval))},RequestBatcher.prototype.flush=function(e){try{if(this.requestInProgress){eH.log("Flush: Request already in progress");return}e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),i=this.batchSize,n=this.queue.fillBatch(i),o=n.length===i,s=[],a={};if(eN.each(n,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=eN.extend({},t.properties,{mp_sent_by_lib_version:eh.LIB_VERSION}));var r=!0,i=e.id;i?(this.itemIdsSentSuccessfully[i]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[i]}),r=!1):this.reportError("[dupe] found item with no ID",{item:e}),r&&s.push(t)}a[e.id]=t},this),s.length<1){this.resetFlush();return}this.requestInProgress=!0;var l=eN.bind(function(s){this.requestInProgress=!1;try{var l=!1;if(e.unloading)this.queue.updatePayloads(a);else if(eN.isObject(s)&&"timeout"===s.error&&new Date().getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(eN.isObject(s)&&(s.httpStatusCode>=500||429===s.httpStatusCode||s.httpStatusCode<=0&&!isOnline()||"timeout"===s.error)){var c=2*this.flushInterval;s.retryAfter&&(c=1e3*parseInt(s.retryAfter,10)||c),c=Math.min(6e5,c),this.reportError("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(eN.isObject(s)&&413===s.httpStatusCode){if(n.length>1){var p=Math.max(1,Math.floor(i/2));this.batchSize=Math.min(this.batchSize,p,n.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",n),this.resetBatchSize(),l=!0}else l=!0;l&&(this.queue.removeItemsByID(eN.map(n,function(e){return e.id}),eN.bind(function(e){e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?this.resetFlush():this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),eN.each(n,eN.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}},this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(c.transport="sendBeacon"),eH.log("MIXPANEL REQUEST:",s),this.sendRequest(s,c,l)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},RequestBatcher.prototype.reportError=function(e,t){if(eH.error.apply(eH.error,arguments),this.errorReporter)try{t instanceof Error||(t=Error(e)),this.errorReporter(e,t)}catch(e){eH.error(e)}};var eV=console_with_prefix("recorder"),eQ=V.CompressionStream,eK={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},eJ=new Set([ed.MouseMove,ed.MouseInteraction,ed.Scroll,ed.ViewportResize,ed.Input,ed.TouchMove,ed.MediaInteraction,ed.Drag,ed.Selection]);function isUserEvent(e){return e.type===eu.IncrementalSnapshot&&eJ.has(e.data.source)}var MixpanelRecorder=function(e){this._mixpanel=e,this._stopRecording=null,this.recEvents=[],this.seqNo=0,this.replayId=null,this.replayStartTime=null,this.sendBatchId=null,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=864e5,this.recordMinMs=0,this._initBatcher()};MixpanelRecorder.prototype._initBatcher=function(){this.batcher=new RequestBatcher("__mprec",{libConfig:eK,sendRequestFunc:eN.bind(this.flushEventsWithOptOut,this),errorReporter:eN.bind(this.reportError,this),flushOnlyOnInterval:!0,usePersistence:!1})},MixpanelRecorder.prototype.get_config=function(e){return this._mixpanel.get_config(e)},MixpanelRecorder.prototype.startRecording=function(e){if(null!==this._stopRecording){eV.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.get_config("record_max_ms"),this.recordMaxMs>864e5&&(this.recordMaxMs=864e5,eV.critical("record_max_ms cannot be greater than 86400000ms. Capping value.")),this.recordMinMs=this.get_config("record_min_ms"),this.recordMinMs>8e3&&(this.recordMinMs=8e3,eV.critical("record_min_ms cannot be greater than 8000ms. Capping value.")),this.recEvents=[],this.seqNo=0,this.replayStartTime=new Date().getTime(),this.replayId=eN.UUID(),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=eN.bind(function(){clearTimeout(this.idleTimeoutId),this.idleTimeoutId=setTimeout(eN.bind(function(){eV.log("Idle timeout reached, restarting recording."),this.resetRecording()},this),this.get_config("record_idle_timeout_ms"))},this),r=this.get_config("record_block_selector");(""===r||null===r)&&(r=void 0),this._stopRecording=record({emit:eN.bind(function(e){this.batcher.enqueue(e),isUserEvent(e)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t())},this),blockClass:this.get_config("record_block_class"),blockSelector:r,collectFonts:this.get_config("record_collect_fonts"),inlineImages:this.get_config("record_inline_images"),maskAllInputs:!0,maskTextClass:this.get_config("record_mask_text_class"),maskTextSelector:this.get_config("record_mask_text_selector")}),t(),this.maxTimeoutId=setTimeout(eN.bind(this.resetRecording,this),this.recordMaxMs)},MixpanelRecorder.prototype.resetRecording=function(){this.stopRecording(),this.startRecording(!0)},MixpanelRecorder.prototype.stopRecording=function(){null!==this._stopRecording&&(this._stopRecording(),this._stopRecording=null),this.batcher.stopped?this.batcher.clear():(this.batcher.flush(),this.batcher.stop()),this.replayId=null,clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId)},MixpanelRecorder.prototype.flushEventsWithOptOut=function(e,t,r){this._flushEvents(e,t,r,eN.bind(this._onOptOut,this))},MixpanelRecorder.prototype._onOptOut=function(e){0===e&&(this.recEvents=[],this.stopRecording())},MixpanelRecorder.prototype._sendRequest=function(e,t,r,i){var n=eN.bind(function(t,r){200===t.status&&this.replayId===e&&this.seqNo++,i({status:0,httpStatusCode:t.status,responseBody:r,retryAfter:t.headers.get("Retry-After")})},this);V.fetch(this.get_config("api_host")+"/"+this.get_config("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.get_config("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(e){e.json().then(function(t){n(e,t)}).catch(function(e){i({error:e})})}).catch(function(e){i({error:e,httpStatusCode:0})})},MixpanelRecorder.prototype._flushEvents=addOptOutCheckMixpanelLib(function(e,t,r){let i=e.length;if(i>0){var n=this.replayId,o=e[0].timestamp;0!==this.seqNo&&this.replayStartTime||(0!==this.seqNo&&this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var s=e[i-1].timestamp-this.replayStartTime,a={distinct_id:String(this._mixpanel.get_distinct_id()),seq:this.seqNo,batch_start_time:o/1e3,replay_id:n,replay_length_ms:s,replay_start_time:this.replayStartTime/1e3},l=eN.JSONEncode(e),c=this._mixpanel.get_property("$device_id");c&&(a.$device_id=c);var p=this._mixpanel.get_property("$user_id");if(p&&(a.$user_id=p),eQ){var u=new Blob([l],{type:"application/json"}).stream().pipeThrough(new eQ("gzip"));new Response(u).blob().then(eN.bind(function(e){a.format="gzip",this._sendRequest(n,a,e,r)},this))}else a.format="body",this._sendRequest(n,a,l,r)}}),MixpanelRecorder.prototype.reportError=function(e,t){eV.error.apply(eV.error,arguments);try{t||e instanceof Error||(e=Error(e)),this.get_config("error_reporter")(e,t)}catch(e){eV.error(e)}},V.__mp_recorder=MixpanelRecorder;var DomTracker=function(){};DomTracker.prototype.create_properties=function(){},DomTracker.prototype.event_handler=function(){},DomTracker.prototype.after_track_handler=function(){},DomTracker.prototype.init=function(e){return this.mp=e,this},DomTracker.prototype.track=function(e,t,r,i){var n=this,o=eN.dom_query(e);if(0===o.length){eD.error("The DOM query ("+e
27+") returned 0 elements");return}return eN.each(o,function(e){eN.register_event(e,this.override_event,function(e){var o={},s=n.create_properties(r,this),a=n.mp.get_config("track_links_timeout");n.event_handler(e,this,o),window.setTimeout(n.track_callback(i,s,o,!0),a),n.mp.track(t,s,n.track_callback(i,s,o))})},this),!0},DomTracker.prototype.track_callback=function(e,t,r,i){i=i||!1;var n=this;return function(){!r.callback_fired&&(r.callback_fired=!0,e&&!1===e(i,t)||n.after_track_handler(t,r,i))}},DomTracker.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):eN.extend({},e)};var LinkTracker=function(){this.override_event="click"};eN.inherit(LinkTracker,DomTracker),LinkTracker.prototype.create_properties=function(e,t){var r=LinkTracker.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r},LinkTracker.prototype.event_handler=function(e,t,r){r.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,r.href=t.href,r.new_tab||e.preventDefault()},LinkTracker.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var FormTracker=function(){this.override_event="submit"};eN.inherit(FormTracker,DomTracker),FormTracker.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()},FormTracker.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var eX="$set",eY="$set_once",eZ="$unset",e0="$add",e1="$append",e2="$union",e3="$remove",e6={set_action:function(e,t){var r={},i={};return eN.isObject(e)?eN.each(e,function(e,t){this._is_reserved_property(t)||(i[t]=e)},this):i[e]=t,r[eX]=i,r},unset_action:function(e){var t={},r=[];return eN.isArray(e)||(e=[e]),eN.each(e,function(e){this._is_reserved_property(e)||r.push(e)},this),t[eZ]=r,t},set_once_action:function(e,t){var r={},i={};return eN.isObject(e)?eN.each(e,function(e,t){this._is_reserved_property(t)||(i[t]=e)},this):i[e]=t,r[eY]=i,r},union_action:function(e,t){var r={},i={};return eN.isObject(e)?eN.each(e,function(e,t){this._is_reserved_property(t)||(i[t]=eN.isArray(e)?e:[e])},this):i[e]=eN.isArray(t)?t:[t],r[e2]=i,r},append_action:function(e,t){var r={},i={};return eN.isObject(e)?eN.each(e,function(e,t){this._is_reserved_property(t)||(i[t]=e)},this):i[e]=t,r[e1]=i,r},remove_action:function(e,t){var r={},i={};return eN.isObject(e)?eN.each(e,function(e,t){this._is_reserved_property(t)||(i[t]=e)},this):i[e]=t,r[e3]=i,r},delete_action:function(){var e={};return e.$delete="",e}},MixpanelGroup=function(){};eN.extend(MixpanelGroup.prototype,e6),MixpanelGroup.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r},MixpanelGroup.prototype.set=addOptOutCheckMixpanelGroup(function(e,t,r){var i=this.set_action(e,t);return eN.isObject(e)&&(r=t),this._send_request(i,r)}),MixpanelGroup.prototype.set_once=addOptOutCheckMixpanelGroup(function(e,t,r){var i=this.set_once_action(e,t);return eN.isObject(e)&&(r=t),this._send_request(i,r)}),MixpanelGroup.prototype.unset=addOptOutCheckMixpanelGroup(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),MixpanelGroup.prototype.union=addOptOutCheckMixpanelGroup(function(e,t,r){eN.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)}),MixpanelGroup.prototype.delete=addOptOutCheckMixpanelGroup(function(e){var t=this.delete_action();return this._send_request(t,e)}),MixpanelGroup.prototype.remove=addOptOutCheckMixpanelGroup(function(e,t,r){var i=this.remove_action(e,t);return this._send_request(i,r)}),MixpanelGroup.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=eN.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},MixpanelGroup.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},MixpanelGroup.prototype._get_config=function(e){return this._mixpanel.get_config(e)},MixpanelGroup.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},MixpanelGroup.prototype.remove=MixpanelGroup.prototype.remove,MixpanelGroup.prototype.set=MixpanelGroup.prototype.set,MixpanelGroup.prototype.set_once=MixpanelGroup.prototype.set_once,MixpanelGroup.prototype.union=MixpanelGroup.prototype.union,MixpanelGroup.prototype.unset=MixpanelGroup.prototype.unset,MixpanelGroup.prototype.toString=MixpanelGroup.prototype.toString;var MixpanelPeople=function(){};eN.extend(MixpanelPeople.prototype,e6),MixpanelPeople.prototype._init=function(e){this._mixpanel=e},MixpanelPeople.prototype.set=addOptOutCheckMixpanelPeople(function(e,t,r){var i=this.set_action(e,t);return eN.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),i[eX]=eN.extend({},eN.info.people_properties(),i[eX]),this._send_request(i,r)}),MixpanelPeople.prototype.set_once=addOptOutCheckMixpanelPeople(function(e,t,r){var i=this.set_once_action(e,t);return eN.isObject(e)&&(r=t),this._send_request(i,r)}),MixpanelPeople.prototype.unset=addOptOutCheckMixpanelPeople(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),MixpanelPeople.prototype.increment=addOptOutCheckMixpanelPeople(function(e,t,r){var i={},n={};return eN.isObject(e)?(eN.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e))){eD.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}n[t]=e}},this),r=t):(eN.isUndefined(t)&&(t=1),n[e]=t),i[e0]=n,this._send_request(i,r)}),MixpanelPeople.prototype.append=addOptOutCheckMixpanelPeople(function(e,t,r){eN.isObject(e)&&(r=t);var i=this.append_action(e,t);return this._send_request(i,r)}),MixpanelPeople.prototype.remove=addOptOutCheckMixpanelPeople(function(e,t,r){eN.isObject(e)&&(r=t);var i=this.remove_action(e,t);return this._send_request(i,r)}),MixpanelPeople.prototype.union=addOptOutCheckMixpanelPeople(function(e,t,r){eN.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)}),MixpanelPeople.prototype.track_charge=addOptOutCheckMixpanelPeople(function(e,t,r){if(!eN.isNumber(e)&&isNaN(e=parseFloat(e))){eD.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",eN.extend({$amount:e},t),r)}),MixpanelPeople.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},MixpanelPeople.prototype.delete_user=function(){if(!this._identify_called()){eD.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)},MixpanelPeople.prototype.toString=function(){return this._mixpanel.toString()+".people"},MixpanelPeople.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),i=this._mixpanel.get_property("$user_id"),n=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),i&&(e.$user_id=i),n&&(e.$had_persisted_distinct_id=n);var o=eN.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),eN.isUndefined(t)||t(this._get_config("verbose")?{status:-1,error:null}:-1),eN.truncate(o,255))},MixpanelPeople.prototype._get_config=function(e){return this._mixpanel.get_config(e)},MixpanelPeople.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},MixpanelPeople.prototype._enqueue=function(e){eX in e?this._mixpanel.persistence._add_to_people_queue(eX,e):eY in e?this._mixpanel.persistence._add_to_people_queue(eY,e):eZ in e?this._mixpanel.persistence._add_to_people_queue(eZ,e):e0 in e?this._mixpanel.persistence._add_to_people_queue(e0,e):e1 in e?this._mixpanel.persistence._add_to_people_queue(e1,e):e3 in e?this._mixpanel.persistence._add_to_people_queue(e3,e):e2 in e?this._mixpanel.persistence._add_to_people_queue(e2,e):eD.error("Invalid call to _enqueue():",e)},MixpanelPeople.prototype._flush_one_queue=function(e,t,r,i){var n=this,o=eN.extend({},this._mixpanel.persistence.load_queue(e)),s=o;!eN.isUndefined(o)&&eN.isObject(o)&&!eN.isEmptyObject(o)&&(n._mixpanel.persistence._pop_from_people_queue(e,o),n._mixpanel.persistence.save(),i&&(s=i(o)),t.call(n,s,function(t,i){0===t&&n._mi
27xpanel.persistence._add_to_people_queue(e,o),eN.isUndefined(r)||r(t,i)}))},MixpanelPeople.prototype._flush=function(e,t,r,i,n,o,s){var a=this;this._flush_one_queue(eX,this.set,e),this._flush_one_queue(eY,this.set_once,i),this._flush_one_queue(eZ,this.unset,o,function(e){return eN.keys(e)}),this._flush_one_queue(e0,this.increment,t),this._flush_one_queue(e2,this.union,n);var l=this._mixpanel.persistence.load_queue(e1);if(!eN.isUndefined(l)&&eN.isArray(l)&&l.length)for(var c,append_callback=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(e1,c),eN.isUndefined(r)||r(e,t)},p=l.length-1;p>=0;p--)c=(l=this._mixpanel.persistence.load_queue(e1)).pop(),a._mixpanel.persistence.save(),eN.isEmptyObject(c)||a.append(c,append_callback);var u=this._mixpanel.persistence.load_queue(e3);if(!eN.isUndefined(u)&&eN.isArray(u)&&u.length)for(var d,remove_callback=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(e3,d),eN.isUndefined(s)||s(e,t)},h=u.length-1;h>=0;h--)d=(u=this._mixpanel.persistence.load_queue(e3)).pop(),a._mixpanel.persistence.save(),eN.isEmptyObject(d)||a.remove(d,remove_callback)},MixpanelPeople.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},MixpanelPeople.prototype.set=MixpanelPeople.prototype.set,MixpanelPeople.prototype.set_once=MixpanelPeople.prototype.set_once,MixpanelPeople.prototype.unset=MixpanelPeople.prototype.unset,MixpanelPeople.prototype.increment=MixpanelPeople.prototype.increment,MixpanelPeople.prototype.append=MixpanelPeople.prototype.append,MixpanelPeople.prototype.remove=MixpanelPeople.prototype.remove,MixpanelPeople.prototype.union=MixpanelPeople.prototype.union,MixpanelPeople.prototype.track_charge=MixpanelPeople.prototype.track_charge,MixpanelPeople.prototype.clear_charges=MixpanelPeople.prototype.clear_charges,MixpanelPeople.prototype.delete_user=MixpanelPeople.prototype.delete_user,MixpanelPeople.prototype.toString=MixpanelPeople.prototype.toString;var e5="__mps",e4="__mpso",e8="__mpus",e9="__mpa",e7="__mpap",te="__mpr",tt="__mpu",tr="$people_distinct_id",ti="__alias",tn="__timers",to=[e5,e4,e8,e9,e7,te,tt,tr,ti,tn],MixpanelPersistence=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(eD.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&eN.localStorage.is_supported()?this.storage=eN.localStorage:this.storage=eN.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};MixpanelPersistence.prototype.properties=function(){var e={};return this.load(),eN.each(this.props,function(t,r){eN.include(to,r)||(e[r]=t)}),e},MixpanelPersistence.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=eN.extend({},e))}},MixpanelPersistence.prototype.upgrade=function(){var e,t;this.storage===eN.localStorage?(e=eN.cookie.parse(this.name),eN.cookie.remove(this.name),eN.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===eN.cookie&&(t=eN.localStorage.parse(this.name),eN.localStorage.remove(this.name),t&&this.register_once(t))},MixpanelPersistence.prototype.save=function(){this.disabled||this.storage.set(this.name,eN.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},MixpanelPersistence.prototype.load_prop=function(e){return this.load(),this.props[e]},MixpanelPersistence.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},MixpanelPersistence.prototype.clear=function(){this.remove(),this.props={}},MixpanelPersistence.prototype.register_once=function(e,t,r){return!!eN.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===r?this.default_expiry:r,this.load(),eN.each(e,function(e,r){this.props.hasOwnProperty(r)&&this.props[r]!==t||(this.props[r]=e)},this),this.save(),!0)},MixpanelPersistence.prototype.register=function(e,t){return!!eN.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),eN.extend(this.props,e),this.save(),!0)},MixpanelPersistence.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},MixpanelPersistence.prototype.update_search_keyword=function(e){this.register(eN.info.searchInfo(e))},MixpanelPersistence.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:eN.info.referringDomain(e)||"$direct"},"")},MixpanelPersistence.prototype.get_referrer_info=function(){return eN.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},MixpanelPersistence.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},MixpanelPersistence.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},MixpanelPersistence.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},MixpanelPersistence.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},MixpanelPersistence.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},MixpanelPersistence.prototype.get_cross_subdomain=function(){return this.cross_subdomain},MixpanelPersistence.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},MixpanelPersistence.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),i=t[e],n=this._get_or_create_queue(eX),o=this._get_or_create_queue(eY),s=this._get_or_create_queue(eZ),a=this._get_or_create_queue(e0),l=this._get_or_create_queue(e2),c=this._get_or_create_queue(e3,[]),p=this._get_or_create_queue(e1,[]);r===e5?(eN.extend(n,i),this._pop_from_people_queue(e0,i),this._pop_from_people_queue(e2,i),this._pop_from_people_queue(eZ,i)):r===e4?(eN.each(i,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(eZ,i)):r===e8?eN.each(i,function(e){eN.each([n,o,a,l],function(t){e in t&&delete t[e]}),eN.each(p,function(t){e in t&&delete t[e]}),s[e]=!0}):r===e9?(eN.each(i,function(e,t){t in n?n[t]+=e:(t in a||(a[t]=0),a[t]+=e)},this),this._pop_from_people_queue(eZ,i)):r===tt?(eN.each(i,function(e,t){eN.isArray(e)&&(t in l||(l[t]=[]),l[t]=l[t].concat(e))}),this._pop_from_people_queue(eZ,i)):r===te?(c.push(i),this._pop_from_people_queue(e1,i)):r===e7&&(p.push(i),this._pop_from_people_queue(eZ,i)),eD.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),eD.log(t),this.save()},MixpanelPersistence.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];eN.isUndefined(r)||eN.each(t,function(t,i){e===e1||e===e3?eN.each(r,function(e){e[i]===t&&delete e[i]}):delete r[i]},this)},MixpanelPersistence.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},MixpanelPersistence.prototype._get_queue_key=function(e){return e===eX?e5:e
27===eY?e4:e===eZ?e8:e===e0?e9:e===e1?e7:e===e3?te:e===e2?tt:void eD.error("Invalid queue:",e)},MixpanelPersistence.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=eN.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)},MixpanelPersistence.prototype.set_event_timer=function(e,t){var r=this.load_prop(tn)||{};r[e]=t,this.props[tn]=r,this.save()},MixpanelPersistence.prototype.remove_event_timer=function(e){var t=(this.load_prop(tn)||{})[e];return eN.isUndefined(t)||(delete this.props[tn][e],this.save()),t};var load_extra_bundle=function(e,t){throw Error(e+" not available in this build.")},IDENTITY_FUNC=function(e){return e},NOOP_FUNC=function(){},ts="mixpanel",ta="base64",tl="$device:",tc=V.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,tp=!tc&&-1===eI.indexOf("MSIE")&&-1===eI.indexOf("Mozilla"),tu=null;eM.sendBeacon&&(tu=function(){return eM.sendBeacon.apply(eM,arguments)});var td={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},th={api_host:"https://api-js.mixpanel.com",api_routes:td,api_method:"POST",api_transport:"XHR",api_payload_format:ta,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:NOOP_FUNC,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:NOOP_FUNC,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_collect_fonts:!1,record_idle_timeout_ms:18e5,record_inline_images:!1,record_mask_text_class:RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:864e5,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},tf=!1,MixpanelLib=function(){},create_mplib=function(e,t,r){var i,n=r===ts?K:K[r];if(n&&0===Q)i=n;else{if(n&&!eN.isArray(n)){eD.error("You have already initialized "+r);return}i=new MixpanelLib}if(i._cached_groups={},i._init(e,t,r),i.people=new MixpanelPeople,i.people._init(i),!i.get_config("skip_first_touch_marketing")){var o=eN.info.campaignParams(null),s={},a=!1;eN.each(o,function(e,t){s["initial_"+t]=e,e&&(a=!0)}),a&&i.people.set_once(s)}return eh.DEBUG=eh.DEBUG||i.get_config("debug"),!eN.isUndefined(n)&&eN.isArray(n)&&(i._execute_array.call(i.people,n.people),i._execute_array(n)),i};MixpanelLib.prototype.init=function(e,t,r){if(eN.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===ts){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var i=create_mplib(e,t,r);return K[r]=i,i._loaded(),i},MixpanelLib.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var i={};if(!("api_payload_format"in t)&&(t.api_host||th.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json"),this.set_config(eN.extend({},th,i,t,{name:r,token:e,callback_fn:(r===ts?r:ts+"."+r)+"._jsc"})),this._jsc=NOOP_FUNC,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(eN.localStorage.is_supported(!0)&&tc){if(this.init_batchers(),tu&&V.addEventListener){var n=eN.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);V.addEventListener("pagehide",function(e){e.persisted&&n()}),V.addEventListener("visibilitychange",function(){"hidden"===ex.visibilityState&&n()})}}else this._batch_requests=!1,eD.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),eN.each(this.get_batcher_configs(),function(e){eD.log("Clearing batch queue "+e.queue_key),eN.localStorage.remove(e.queue_key)})}this.persistence=this.cookie=new MixpanelPersistence(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=eN.UUID();this.get_distinct_id()||this.register_once({distinct_id:tl+o,$device_id:o},"");var s=this.get_config("track_pageview");s&&this._init_url_change_tracking(s),this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent")&&this.start_session_recording()},MixpanelLib.prototype.start_session_recording=addOptOutCheckMixpanelLib(function(){if(!V.MutationObserver){eD.critical("Browser does not support MutationObserver; skipping session recording");return}var e=eN.bind(function(){this._recorder=this._recorder||new V.__mp_recorder(this),this._recorder.startRecording()},this);eN.isUndefined(V.__mp_recorder)?load_extra_bundle(this.get_config("recorder_src"),e):e()}),MixpanelLib.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():eD.critical("Session recorder module not loaded")},MixpanelLib.prototype.get_session_recording_properties=function(){var e={};if(this._recorder){var t=this._recorder.replayId;t&&(e.$mp_replay_id=t)}return e},MixpanelLib.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=eN.info.campaignParams(null);eN.each(e,(function(e,t){this.unregister(t)}).bind(this))}},MixpanelLib.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(ex.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(eN.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(ex.referrer)},MixpanelLib.prototype._dom_loaded=function(){eN.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||eN.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},MixpanelLib.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!tf)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)},MixpanelLib.prototype._init_url_change_tracking=function(e){var t="";if(this.track_pageview()&&(t=eN.info.currentUrl()),eN.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){V.addEventListener("popstate",function(){V.dispatchEvent(new Event("mp_locationchange"))}),V.addEventListener("hashchange",function(){V.dispatchEvent(new Event("mp_locationchange"))});var r=V.history.pushState;"function"==typeof r&&(V.history.pushState=function(e,t,i){r.call(V.history,e,t,i),V.dispatchEvent(new Event("mp_locationchange"))});var i=V.history.replaceState;"function"==typeof i&&(V.history.replaceState=function(e,t,r){i.call(V.history,e,t,r),V.dispatchEvent(new Event("mp_locationchange"))}),V.addEventListener("mp_locationchange",(function(){var r=eN.info.currentUrl(),i=!1;"full-url"===e?i=r!==t:"url-with-path-and-query-string"===e?i=r.split("#")[0]!==t.split("#")[0]:"url-with-path"===e&&(i=r.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),i&&this.track_pageview()&&(t=r)}).bind(this))}},MixpanelLib.prototype._prepare_callback=function(e,t){if(eN.isUndefined(e))return null;if(tc)return function(r){e(r,t)};var r=this._jsc,i=""+Math.floor(1e8*Math.random()),n=this.get_config("callback_fn")+"["+i+"]";return r[i]=function(n){delete r[i],e(n,t)},n},MixpanelLib.prototype._send_request=function(e,t,r,i){var n=!0;if(tp)return this.__request_queue.push(arguments),n;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose
27:this.get_config("verbose")},s=null;!i&&(eN.isFunction(r)||"string"==typeof r)&&(i=r,r=null),r=eN.extend(o,r||{}),tc||(r.method="GET");var a="POST"===r.method,l=tu&&a&&"sendbeacon"===r.transport.toLowerCase(),c=r.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),!tc&&(i?t.callback=i:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+eN.HTTPBuildQuery(t);var p=this;if("img"in t){var u=ex.createElement("img");u.src=e,ex.body.appendChild(u)}else if(l){try{n=tu(e,s)}catch(e){p.report_error(e),n=!1}try{i&&i(n?1:0)}catch(e){p.report_error(e)}}else if(tc)try{var d=new XMLHttpRequest;d.open(r.method,e,!0);var h=this.get_config("xhr_headers");if(a&&(h["Content-Type"]="application/x-www-form-urlencoded"),eN.each(h,function(e,t){d.setRequestHeader(t,e)}),r.timeout_ms&&void 0!==d.timeout){d.timeout=r.timeout_ms;var f=new Date().getTime()}d.withCredentials=!0,d.onreadystatechange=function(){if(4===d.readyState){if(200===d.status){if(i){if(c){try{e=eN.JSONDecode(d.responseText)}catch(t){if(p.report_error(t),!r.ignore_json_errors)return;e=d.responseText}i(e)}else i(Number(d.responseText))}}else if(t=d.timeout&&!d.status&&new Date().getTime()-f>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,p.report_error(t),i){if(c){var e,t,n=d.responseHeaders||{};i({status:0,httpStatusCode:d.status,error:t,retryAfter:n["Retry-After"]})}else i(0)}}},d.send(s)}catch(e){p.report_error(e),n=!1}else{var _=ex.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var g=ex.getElementsByTagName("script")[0];g.parentNode.insertBefore(_,g)}return n},MixpanelLib.prototype._execute_array=function(e){var t,r=[],i=[],n=[];eN.each(e,function(e){e&&(t=e[0],eN.isArray(t)?n.push(e):"function"==typeof e?e.call(this):eN.isArray(e)&&"alias"===t?r.push(e):eN.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?n.push(e):i.push(e))},this);var execute=function(e,t){eN.each(e,function(e){if(eN.isArray(e[0])){var r=t;eN.each(e,function(e){r=r[e[0]].apply(r,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};execute(r,this),execute(i,this),execute(n,this)},MixpanelLib.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},MixpanelLib.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs},MixpanelLib.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=eN.bind(function(e){return new RequestBatcher(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:eN.bind(function(t,r,i){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),r,this._prepare_callback(i,t))},this),beforeSendHook:eN.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:eN.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},MixpanelLib.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,eN.each(this.request_batchers,function(e){e.start()}))},MixpanelLib.prototype.stop_batch_senders=function(){this._batch_requests=!1,eN.each(this.request_batchers,function(e){e.stop(),e.clear()})},MixpanelLib.prototype.push=function(e){this._execute_array([e])},MixpanelLib.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},MixpanelLib.prototype._encode_data_for_request=function(e){var t=eN.JSONEncode(e);return this.get_config("api_payload_format")===ta&&(t=eN.base64Encode(t)),{data:t}},MixpanelLib.prototype._track_or_batch=function(e,t){var r=eN.truncate(e.data,255),i=e.endpoint,n=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||NOOP_FUNC;var a=!0,l=eN.bind(function(){return(s.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r)?(eD.log("MIXPANEL REQUEST:"),eD.log(r),this._send_request(i,this._encode_data_for_request(r),s,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?n.enqueue(r,function(e){e?t(1,r):l()}):a=l(),a&&r},MixpanelLib.prototype.track=addOptOutCheckMixpanelLib(function(e,t,r,i){i||"function"!=typeof r||(i=r,r=null);var n=(r=r||{}).transport;n&&(r.transport=n);var o=r.send_immediately;if("function"!=typeof i&&(i=NOOP_FUNC),eN.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}
27if(this._event_is_disabled(e)){i(0);return}(t=eN.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!eN.isUndefined(s)){var a=new Date().getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?eN.info.marketingParams():{};t=eN.extend({},eN.info.properties({mp_loader:this.get_config("mp_loader")}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var c=this.get_config("property_blacklist");eN.isArray(c)?eN.each(c,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+c);var p={event:e,properties:t};return this._track_or_batch({type:"events",data:p,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},i)}),MixpanelLib.prototype.set_group=addOptOutCheckMixpanelLib(function(e,t,r){eN.isArray(t)||(t=[t]);var i={};return i[e]=t,this.register(i),this.people.set(e,t,r)}),MixpanelLib.prototype.add_group=addOptOutCheckMixpanelLib(function(e,t,r){var i=this.get_property(e),n={};return void 0===i?(n[e]=[t],this.register(n)):-1===i.indexOf(t)&&(i.push(t),n[e]=i,this.register(n)),this.people.union(e,t,r)}),MixpanelLib.prototype.remove_group=addOptOutCheckMixpanelLib(function(e,t,r){var i=this.get_property(e);if(void 0!==i){var n=i.indexOf(t);n>-1&&(i.splice(n,1),this.register({group_key:i})),0===i.length&&this.unregister(e)}return this.people.remove(e,t,r)}),MixpanelLib.prototype.track_with_groups=addOptOutCheckMixpanelLib(function(e,t,r,i){var n=eN.extend({},t||{});return eN.each(r,function(e,t){null!=e&&(n[t]=e)}),this.track(e,n,i)}),MixpanelLib.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},MixpanelLib.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},MixpanelLib.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),i=this._cached_groups[r];return(void 0===i||i._group_key!==e||i._group_id!==t)&&((i=new MixpanelGroup)._init(this,e,t),this._cached_groups[r]=i),i},MixpanelLib.prototype.track_pageview=addOptOutCheckMixpanelLib(function(e,t){"object"!=typeof e&&(e={});var r=(t=t||{}).event_name||"$mp_web_page_view",i=eN.extend(eN.info.mpPageViewProperties(),eN.info.campaignParams(),eN.info.clickParams()),n=eN.extend({},i,e);return this.track(r,n)}),MixpanelLib.prototype.track_links=function(){return this._track_dom.call(this,LinkTracker,arguments)},MixpanelLib.prototype.track_forms=function(){return this._track_dom.call(this,FormTracker,arguments)},MixpanelLib.prototype.time_event=function(e){if(eN.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var t_={persistent:!0},options_for_register=function(e){var t;return t=eN.isObject(e)?e:eN.isUndefined(e)?{}:{days:e},eN.extend({},t_,t)};MixpanelLib.prototype.register=function(e,t){var r=options_for_register(t);r.persistent?this.persistence.register(e,r.days):eN.extend(this.unpersisted_superprops,e)},MixpanelLib.prototype.register_once=function(e,t,r){var i=options_for_register(r);i.persistent?this.persistence.register_once(e,t,i.days):(void 0===t&&(t="None"),eN.each(e,function(e,r){this.unpersisted_superprops.hasOwnProperty(r)&&this.unpersisted_superprops[r]!==t||(this.unpersisted_superprops[r]=e)},this))},MixpanelLib.prototype.unregister=function(e,t){(t=options_for_register(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},MixpanelLib.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)},MixpanelLib.prototype.identify=function(e,t,r,i,n,o,s,a){var l=this.get_distinct_id();if(e&&l!==e){if("string"==typeof e&&0===e.indexOf(tl))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),e!==l&&e!==this.get_property(ti)&&(this.unregister(ti),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,i,n,o,s,a),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0})},MixpanelLib.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=eN.UUID();this.register_once({distinct_id:tl+e,$device_id:e},"")},MixpanelLib.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},MixpanelLib.prototype.alias=function(e,t){if(e===this.get_property(tr))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return(eN.isUndefined(t)&&(t=this.get_distinct_id()),e!==t)?(this._register_single(ti,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},MixpanelLib.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},MixpanelLib.prototype.set_config=function(e){eN.isObject(e)&&(eN.extend(this.config,e),e.batch_size&&eN.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),eh.DEBUG=eh.DEBUG||this.get_config("debug"))},MixpanelLib.prototype.get_config=function(e){return this.config[e]},MixpanelLib.prototype._run_hook=function(e){var t=(this.config.hooks[e]||IDENTITY_FUNC).apply(this,ey.call(arguments,1
27));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},MixpanelLib.prototype.get_property=function(e){return this.persistence.load_prop([e])},MixpanelLib.prototype.toString=function(){var e=this.get_config("name");return e!==ts&&(e=ts+"."+e),e},MixpanelLib.prototype._event_is_disabled=function(e){return eN.isBlockedUA(eI)||this._flags.disable_all_events||eN.include(this.__disabled_events,e)},MixpanelLib.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&eN.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||eN.cookie.get("mp_optout"))&&(eN.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},MixpanelLib.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()},MixpanelLib.prototype._gdpr_call_func=function(e,t){return t=eN.extend({track:eN.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),eN.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},MixpanelLib.prototype.opt_in_tracking=function(e){e=eN.extend({enable_persistence:!0},e),this._gdpr_call_func(optIn,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.opt_out_tracking=function(e){(e=eN.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(optOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(hasOptedIn,e)},MixpanelLib.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(hasOptedOut,e)},MixpanelLib.prototype.clear_opt_in_out_tracking=function(e){e=eN.extend({enable_persistence:!0},e),this._gdpr_call_func(clearOptInOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.report_error=function(e,t){eD.error.apply(eD.error,arguments);try{t||e instanceof Error||(e=Error(e)),this.get_config("error_reporter")(e,t)}catch(e){eD.error(e)}},MixpanelLib.prototype.init=MixpanelLib.prototype.init,MixpanelLib.prototype.reset=MixpanelLib.prototype.reset,MixpanelLib.prototype.disable=MixpanelLib.prototype.disable,MixpanelLib.prototype.time_event=MixpanelLib.prototype.time_event,MixpanelLib.prototype.track=MixpanelLib.prototype.track,MixpanelLib.prototype.track_links=MixpanelLib.prototype.track_links,MixpanelLib.prototype.track_forms=MixpanelLib.prototype.track_forms,MixpanelLib.prototype.track_pageview=MixpanelLib.prototype.track_pageview,MixpanelLib.prototype.register=MixpanelLib.prototype.register,MixpanelLib.prototype.register_once=MixpanelLib.prototype.register_once,MixpanelLib.prototype.unregister=MixpanelLib.prototype.unregister,MixpanelLib.prototype.identify=MixpanelLib.prototype.identify,MixpanelLib.prototype.alias=MixpanelLib.prototype.alias,MixpanelLib.prototype.name_tag=MixpanelLib.prototype.name_tag,MixpanelLib.prototype.set_config=MixpanelLib.prototype.set_config,MixpanelLib.prototype.get_config=MixpanelLib.prototype.get_config,MixpanelLib.prototype.get_property=MixpanelLib.prototype.get_property,MixpanelLib.prototype.get_distinct_id=MixpanelLib.prototype.get_distinct_id,MixpanelLib.prototype.toString=MixpanelLib.prototype.toString,MixpanelLib.prototype.opt_out_tracking=MixpanelLib.prototype.opt_out_tracking,MixpanelLib.prototype.opt_in_tracking=MixpanelLib.prototype.opt_in_tracking,MixpanelLib.prototype.has_opted_out_tracking=MixpanelLib.prototype.has_opted_out_tracking,MixpanelLib.prototype.has_opted_in_tracking=MixpanelLib.prototype.has_opted_in_tracking,MixpanelLib.prototype.clear_opt_in_out_tracking=MixpanelLib.prototype.clear_opt_in_out_tracking,MixpanelLib.prototype.get_group=MixpanelLib.prototype.get_group,MixpanelLib.prototype.set_group=MixpanelLib.prototype.set_group,MixpanelLib.prototype.add_group=MixpanelLib.prototype.add_group,MixpanelLib.prototype.remove_group=MixpanelLib.prototype.remove_group,MixpanelLib.prototype.track_with_groups=MixpanelLib.prototype.track_with_groups,MixpanelLib.prototype.start_batch_senders=MixpanelLib.prototype.start_batch_senders,MixpanelLib.prototype.stop_batch_senders=MixpanelLib.prototype.stop_batch_senders,MixpanelLib.prototype.start_session_recording=MixpanelLib.prototype.start_session_recording,MixpanelLib.prototype.stop_session_recording=MixpanelLib.prototype.stop_session_recording,MixpanelLib.prototype.get_session_recording_properties=MixpanelLib.prototype.get_session_recording_properties,MixpanelLib.prototype.DEFAULT_API_ROUTES=td,MixpanelPersistence.prototype.properties=MixpanelPersistence.prototype.properties,MixpanelPersistence.prototype.update_search_keyword=MixpanelPersistence.prototype.update_search_keyword,MixpanelPersistence.prototype.update_referrer_info=MixpanelPersistence.prototype.update_referrer_info,MixpanelPersistence.prototype.get_cross_subdomain=MixpanelPersistence.prototype.get_cross_subdomain,MixpanelPersistence.prototype.clear=MixpanelPersistence.prototype.clear;var tg={},extend_mp=function(){eN.each(tg,function(e,t){t!==ts&&(K[t]=e)}),K._=eN},tm=(load_extra_bundle=function(e,t){t()},Q=0,(K=new MixpanelLib).init=function(e,t,r){if(r)return K[r]||(K[r]=tg[r]=create_mplib
27(e,t,r),K[r]._loaded()),K[r];var i=K;tg[ts]?i=tg[ts]:e&&((i=create_mplib(e,t,ts))._loaded(),tg[ts]=i),K=i,1===Q&&(V[ts]=K),extend_mp()},K.init(),function(){function dom_loaded_handler(){dom_loaded_handler.done||(dom_loaded_handler.done=!0,tf=!0,tp=!1,eN.each(tg,function(e){e._dom_loaded()}))}function do_scroll_check(){try{ex.documentElement.doScroll("left")}catch(e){setTimeout(do_scroll_check,1);return}dom_loaded_handler()}if(ex.addEventListener)"complete"===ex.readyState?dom_loaded_handler():ex.addEventListener("DOMContentLoaded",dom_loaded_handler,!1);else if(ex.attachEvent){ex.attachEvent("onreadystatechange",dom_loaded_handler);var e=!1;try{e=null===V.frameElement}catch(e){}ex.documentElement.doScroll&&e&&do_scroll_check()}eN.register_event(V,"load",dom_loaded_handler,!0)}(),K)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.