@tachybase/plugin-pagespy 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.js +1 -14
- package/dist/externalVersion.js +4 -4
- package/package.json +7 -7
package/dist/client/index.js
CHANGED
|
@@ -907,20 +907,7 @@ body.dragging iframe {
|
|
|
907
907
|
</button>
|
|
908
908
|
`),"text/html"),sr=Sr=>ar.querySelector.call(ar,Sr),ir=Sr=>sr(".".concat(Sr)),or=sr("#open-log-action"),cr=ir(oa),lr=ir(_a),dr=ir(xa),pr=sr("#period-min"),hr=sr("#period-max"),fr=sr("#harbor-remark"),mr=sr("#upload-periods"),gr=sr("#download-periods"),vr=ir(Ia),yr=sr("#copy-replay-url"),Ir=ir(da),Pr=ir(ua),Rr=ir(fa),$r={max:0,periods:[],firstTime:0,lastTime:0},_r=()=>{const{max:Sr}=$r,Tr=+pr.value,Cr=+hr.value,Ar=Tr/Sr,Zr=1-Cr/Sr;dr.style.setProperty("--left","".concat((100*Ar).toFixed(3),"%")),dr.style.setProperty("--right","".concat((100*Zr).toFixed(3),"%")),dr.style.setProperty("--min-text",'"'.concat(ce$1(Tr),'"')),dr.style.setProperty("--max-text",'"'.concat(ce$1(Cr),'"'))},kr=()=>{const Sr=er.harbor.getPeriodList(),Tr=Sr[0].time.getTime(),Cr=Sr[Sr.length-1].time.getTime(),Ar=Math.floor((Cr-Tr)/1e3),Zr=Ar.toString();pr.max=Zr,pr.value="0",hr.max=Zr,hr.value=Zr,$r.max=Ar,$r.periods=Sr,$r.firstTime=Tr,$r.lastTime=Cr,_r()},wr=()=>{const{firstTime:Sr}=$r;return{startTime:Sr+1e3*+pr.value,endTime:Sr+1e3*+hr.value,remark:fr.value}};lr.addEventListener("click",()=>{kr(),nr.message(Xn.t("refreshed"))}),pr.addEventListener("input",function(){const Sr=+hr.value,Tr=+this.value;if(Tr>Sr-1)return void(pr.value=String(Sr-1));(Sr-Tr)/$r.max<=Ca($r.max)?dr.dataset.maxTextPosition="bottom":dr.dataset.maxTextPosition="top",dr.dataset.minTextPosition="top",_r()}),hr.addEventListener("input",function(){const Sr=+pr.value,Tr=+this.value;if(Tr<Sr+1)return void(hr.value=String(Sr+1));(Tr-Sr)/$r.max<=Ca($r.max)?dr.dataset.minTextPosition="bottom":dr.dataset.minTextPosition="top",dr.dataset.maxTextPosition="top",_r()}),yr.addEventListener("click",()=>{const{url:Sr}=yr.dataset,Tr=ia(Sr);nr.message(Tr?Xn.t("copied"):Xn.t("copyFailed")),rr.close()}),mr.addEventListener("click",()=>Dr(null,null,function*(){try{mr.disabled=!0;const Sr=yield er.onOfflineLog("upload-periods",wr());yr.dataset.url=Sr,rr.show({content:vr,footer:[yr]})}catch(Sr){g$1.error(Sr),nr.message(Sr.message)}finally{mr.disabled=!1}})),gr.addEventListener("click",()=>Dr(null,null,function*(){try{gr.disabled=!0,yield er.onOfflineLog("download-periods",wr()),nr.message(Xn.t("success"))}catch(Sr){g$1.error(Sr),nr.message(Sr.message)}finally{gr.disabled=!1}}));let Lr=null;const xr=()=>{const{isPaused:Sr,startTimestamp:Tr}=er;if(Sr)Ir.classList.add(la);else if(Ir.classList.remove(la),Tr&&Pr){const Cr=parseInt(String((Date.now()-Tr)/1e3),10);Pr.innerHTML=ce$1(Cr).split("").map(Ar=>'<span class="'.concat(Ar===":"?ha:"duration-item",'">').concat(Ar,"</span>")).join("")}};Ir.addEventListener("click",()=>{er.isPaused?er.resume():er.pause(),xr()}),Rr.addEventListener("click",Sr=>{Sr.stopPropagation(),Sr.preventDefault()}),or==null||or.addEventListener("click",()=>{var Sr;(Sr=er.$pageSpyConfig)!==null&&Sr!==void 0&&Sr.api?mr.disabled=!1:mr.disabled=!0,Lr&&clearInterval(Lr),xr(),Lr=setInterval(xr,1e3),kr(),rr.show({content:cr,footer:[mr,gr]})}),rr.build({footer:[...rr.config.footer,or]})},Sa={maximum:ea,caredData:{console:!0,network:!0,storage:!0,system:!0,"rrweb-event":!0},filename:()=>new Date().toLocaleString(),onDownload:null,onAfterUpload:null};class Ea{constructor(er){t$1(this,"enforce","pre"),t$1(this,"name","DataHarborPlugin"),t$1(this,"apiBase",""),t$1(this,"isPaused",!1),t$1(this,"startTimestamp",0),t$1(this,"periodTimer",null),t$1(this,"$socketStore",null),t$1(this,"$pageSpyConfig",null),this.$harborConfig=ur(ur({},Sa),er),this.harbor=new ta({maximum:this.$harborConfig.maximum})}onInit(er){return Dr(this,null,function*(){let{socketStore:rr,config:nr}=er;if(Ea.hasInited)return;Ea.hasInited=!0,this.$pageSpyConfig=nr,this.$socketStore=rr;const{api:ar,enableSSL:sr,offline:ir,lang:or}=nr;if(or&&Xn.setLang(or),ir||ar){const cr=sr?"https://":"http://";this.apiBase=v$1("".concat(cr).concat(ar))}else g$1.warn("Cannot upload log to PageSpy for miss 'api' configuration. See: ",nr);this.initPeriodTimer(),this.$socketStore.addListener("public-data",cr=>{if(this.isPaused||!this.isCaredPublicData(cr))return;const lr=((dr,pr)=>(sessionStorage.getItem("harbor-debug")&&g$1.unproxy.debug("harbor-debug",pr),{type:dr,timestamp:Date.now(),data:ie$1(pr)}))(cr.type,cr.data);this.startTimestamp||(this.startTimestamp=lr.timestamp),this.harbor.add(lr)||g$1.warn("[".concat(this.name,"] Fail to save data in harbor "),lr)})})}initPeriodTimer(){this.periodTimer&&clearInterval(this.periodTimer),this.periodTimer=setInterval(()=>{var er;this.harbor.add(Qn),(er=this.$socketStore)===null||er===void 0||er.dispatchEvent("harbor-clear",null)},3e5)}onMounted(er){var rr;let{modal:nr,toast:ar,root:sr}=er;Ea.hasMounted||(Ea.hasMounted=!0,(rr=window.dataHarborStyles)===null||rr===void 0||rr.forEach(ir=>{sr.appendChild(ir.cloneNode(!0))}),nr&&ar&&Oa({plugin:this,modal:nr,toast:ar}))}getParams(er,rr){return Dr(this,null,function*(){var nr;let ar;if(["download-periods","upload-periods"].includes(er)){if(!(gr=>!!gr&&["startTime","endTime"].every(vr=>Object.prototype.hasOwnProperty.call(gr,vr)))(rr)||rr.startTime>rr.endTime)throw new Error(Xn.t("invalidParams"));if(ar=yield this.harbor.getPeriodData(rr),!ar.length)throw new Error(Xn.t("noData"));const pr=rr.startTime,hr=ar[0].timestamp,fr=pr<hr?hr:pr;if(ar.filter(gr=>gr.timestamp>=fr&&gr.timestamp<=rr.endTime).length<5)throw new Error(Xn.t("eventCountNotEnough"));ar.push({type:"meta",timestamp:rr.endTime,data:ie$1(br(ur({ua:navigator.userAgent,title:document.title,url:window.location.href},rr),{startTime:fr}))})}else{var sr;if(ar=yield this.harbor.getAll(),!ar.length)throw new Error(Xn.t("noData"));const pr=ar[0].timestamp,hr=ar[ar.length-1].timestamp;ar.push({type:"meta",timestamp:hr,data:ie$1({ua:navigator.userAgent,title:document.title,url:window.location.href,startTime:pr,endTime:hr,remark:(sr=rr==null?void 0:rr.remark)!==null&&sr!==void 0?sr:""})})}const{onDownload:ir,filename:or}=this.$harborConfig;if(er==="download"||er==="download-periods")return{data:ar,filename:or,customDownload:ir};const{project:cr="",title:lr=""}=this.$pageSpyConfig||{},dr={project:cr,title:lr,deviceId:re$1(),userAgent:navigator.userAgent,remark:(nr=rr==null?void 0:rr.remark)!==null&&nr!==void 0?nr:""};if(er==="upload"||er==="upload-periods"){const pr=((fr,mr)=>{const gr=new Blob([JSON.stringify(fr)],{type:"application/json"});return new File([gr],"".concat(se$1(mr),".json"),{type:"application/json"})})(ar,or()),hr=new FormData;return hr.append("log",pr),{url:"".concat(this.apiBase,"/api/v1/log/upload?").concat(new URLSearchParams(dr).toString()),body:hr}}})}onOfflineLog(rr){return Dr(this,arguments,function*(er){let nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{clearCache:!0,remark:""};const ar=yield this.getParams(er,nr),sr=["upload","upload-periods"].includes(er)?yield(cr=>Dr(this,null,function*(){let{url:lr,body:dr}=cr;try{const pr=yield fetch(lr,{method:"POST",body:dr});if(!pr.ok)return g$1.warn("Upload failed"),null;const hr=yield pr.json();return hr.success?hr:(g$1.warn(hr.message),null)}catch(pr){return g$1.error(pr.message),null}}))(ar):yield(cr=>Dr(this,null,function*(){let{data:lr,filename:dr,customDownload:pr}=cr;if(pr)return void(yield pr(lr));const hr=new Blob([JSON.stringify(lr)],{type:"application/json"}),fr=document.getElementsByTagName("body")[0]||document.documentElement;if(!fr)throw new Error("Download file failed because cannot find the document.body & document.documentElement");const mr=URL.createObjectURL(hr),gr=document.createElement("a");gr.download="".concat(se$1(dr()),".json"),gr.href=mr,gr.style.display="none",fr.insertAdjacentElement("beforeend",gr),gr.click(),fr.removeChild(gr),URL.revokeObjectURL(mr),g$1.info("".concat(Xn.t("success")))}))(ar);if(nr.clearCache===!0&&this.clearAndNotify(),sr){var ir,or;const cr=this.getDebugUrl(sr);return(ir=(or=this.$harborConfig).onAfterUpload)===null||ir===void 0||ir.call(or,cr,ar.remark),cr}})}upload(er){return Dr(this,null,function*(){return yield this.onOfflineLog("upload",er)})}uploadPeriods(er){return Dr(this,null,function*(){return yield this.onOfflineLog("upload-periods",er)})}download(er){return Dr(this,null,function*(){yield this.onOfflineLog("download",er)})}downloadPeriods(er){return Dr(this,null,function*(){yield this.onOfflineLog("download-periods",er)})}onReset(){this.periodTimer&&(clearInterval(this.periodTimer),this.periodTimer=null),this.clearAndNotify(!1),Ea.hasInited=!1,Ea.hasMounted=!1}pause(){this.isPaused=!0}resume(){this.isPaused=!1}reharbor(){this.initPeriodTimer(),this.clearAndNotify(),this.isPaused&&(this.isPaused=!1)}clearAndNotify(){let er=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];var rr;this.harbor.clear(),this.startTimestamp=0,er&&((rr=this.$socketStore)===null||rr===void 0||rr.dispatchEvent("harbor-clear",null))}isCaredPublicData(er){if(!er)return!1;const{type:rr}=er,{caredData:nr}=this.$harborConfig;switch(rr){case"console":case"storage":case"system":case"rrweb-event":return nr[rr];case"network":const{url:ar}=er.data,sr=this.harbor.stock.includes(ar);return!(!nr.network||sr);default:return!1}}getDebugUrl(er){var rr;if(!er||!er.success)return"";const nr="".concat(v$1((rr=this.$pageSpyConfig)===null||rr===void 0?void 0:rr.clientOrigin),"/#/replay"),ar="".concat(this.apiBase,"/api/v1/log/download?fileId=").concat(er.data.fileId);return"".concat(nr,"?url=").concat(ar)}}t$1(Ea,"hasInited",!1),t$1(Ea,"hasMounted",!1);function e(tr){var er=function(rr,nr){if(typeof rr!="object"||!rr)return rr;var ar=rr[Symbol.toPrimitive];if(ar!==void 0){var sr=ar.call(rr,nr);if(typeof sr!="object")return sr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(nr==="string"?String:Number)(rr)}(tr,"string");return typeof er=="symbol"?er:er+""}function t(tr,er,rr){return(er=e(er))in tr?Object.defineProperty(tr,er,{value:rr,enumerable:!0,configurable:!0,writable:!0}):tr[er]=rr,tr}var n;function o(tr){var er=tr==null?void 0:tr.host;return(er==null?void 0:er.shadowRoot)===tr}function r(tr){return Object.prototype.toString.call(tr)==="[object ShadowRoot]"}function i(tr){try{var er=tr.rules||tr.cssRules;return er?((rr=Array.from(er).map(a).join("")).includes(" background-clip: text;")&&!rr.includes(" -webkit-background-clip: text;")&&(rr=rr.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),rr):null}catch(nr){return null}var rr}function a(tr){var er=tr.cssText;if(function(rr){return"styleSheet"in rr}(tr))try{er=i(tr.styleSheet)||er}catch(rr){}return er}(function(tr){tr[tr.Document=0]="Document",tr[tr.DocumentType=1]="DocumentType",tr[tr.Element=2]="Element",tr[tr.Text=3]="Text",tr[tr.CDATA=4]="CDATA",tr[tr.Comment=5]="Comment"})(n||(n={}));var s=function(){function tr(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return tr.prototype.getId=function(er){var rr;if(!er)return-1;var nr=(rr=this.getMeta(er))===null||rr===void 0?void 0:rr.id;return nr!=null?nr:-1},tr.prototype.getNode=function(er){return this.idNodeMap.get(er)||null},tr.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},tr.prototype.getMeta=function(er){return this.nodeMetaMap.get(er)||null},tr.prototype.removeNodeFromMap=function(er){var rr=this,nr=this.getId(er);this.idNodeMap.delete(nr),er.childNodes&&er.childNodes.forEach(function(ar){return rr.removeNodeFromMap(ar)})},tr.prototype.has=function(er){return this.idNodeMap.has(er)},tr.prototype.hasNode=function(er){return this.nodeMetaMap.has(er)},tr.prototype.add=function(er,rr){var nr=rr.id;this.idNodeMap.set(nr,er),this.nodeMetaMap.set(er,rr)},tr.prototype.replace=function(er,rr){var nr=this.getNode(er);if(nr){var ar=this.nodeMetaMap.get(nr);ar&&this.nodeMetaMap.set(rr,ar)}this.idNodeMap.set(er,rr)},tr.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},tr}();function l(tr){var er=tr.maskInputOptions,rr=tr.tagName,nr=tr.type,ar=tr.value,sr=tr.maskInputFn,ir=ar||"";return(er[rr.toLowerCase()]||er[nr])&&(ir=sr?sr(ir):"*".repeat(ir.length)),ir}var c="__rrweb_original__",d,u,h=1,p=new RegExp("[^a-z0-9-_:]"),g=-2;function m(){return h++}var I=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,C=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,f=/^(data:)([^,]*),(.*)/i;function y(tr,er){return(tr||"").replace(I,function(rr,nr,ar,sr,ir,or){var cr,lr=ar||ir||or,dr=nr||sr||"";if(!lr)return rr;if(!C.test(lr)||f.test(lr))return"url(".concat(dr).concat(lr).concat(dr,")");if(lr[0]==="/")return"url(".concat(dr).concat((cr=er,(cr.indexOf("//")>-1?cr.split("/").slice(0,3).join("/"):cr.split("/")[0]).split("?")[0]+lr)).concat(dr,")");var pr=er.split("/"),hr=lr.split("/");pr.pop();for(var fr=0,mr=hr;fr<mr.length;fr++){var gr=mr[fr];gr!=="."&&(gr===".."?pr.pop():pr.push(gr))}return"url(".concat(dr).concat(pr.join("/")).concat(dr,")")})}var v=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function b(tr,er){if(!er||er.trim()==="")return er;var rr=tr.createElement("a");return rr.href=er,rr.href}function A(tr){return!!(tr.tagName==="svg"||tr.ownerSVGElement)}function k(){var tr=document.createElement("a");return tr.href="",tr.href}function w(tr,er,rr,nr){return rr==="src"||rr==="href"&&nr&&(er!=="use"||nr[0]!=="#")||rr==="xlink:href"&&nr&&nr[0]!=="#"?b(tr,nr):rr!=="background"||!nr||er!=="table"&&er!=="td"&&er!=="th"?rr==="srcset"&&nr?function(ar,sr){if(sr.trim()==="")return sr;var ir=0;function or(fr){var mr,gr=fr.exec(sr.substring(ir));return gr?(mr=gr[0],ir+=mr.length,mr):""}for(var cr=[];or(S),!(ir>=sr.length);){var lr=or(v);if(lr.slice(-1)===",")lr=b(ar,lr.substring(0,lr.length-1)),cr.push(lr);else{var dr="";lr=b(ar,lr);for(var pr=!1;;){var hr=sr.charAt(ir);if(hr===""){cr.push((lr+dr).trim());break}if(pr)hr===")"&&(pr=!1);else{if(hr===","){ir+=1,cr.push((lr+dr).trim());break}hr==="("&&(pr=!0)}dr+=hr,ir+=1}}}return cr.join(", ")}(tr,nr):rr==="style"&&nr?y(nr,k()):er==="object"&&rr==="data"&&nr?b(tr,nr):nr:b(tr,nr)}function M(tr,er,rr){if(!tr)return!1;if(tr.nodeType!==tr.ELEMENT_NODE)return!!rr&&M(tr.parentNode,er,rr);for(var nr=tr.classList.length;nr--;){var ar=tr.classList[nr];if(er.test(ar))return!0}return!!rr&&M(tr.parentNode,er,rr)}function T(tr,er,rr){var nr=tr.nodeType===tr.ELEMENT_NODE?tr:tr.parentElement;if(nr===null)return!1;if(typeof er=="string"){if(nr.classList.contains(er)||nr.closest(".".concat(er)))return!0}else if(M(nr,er,!0))return!0;return!!(rr&&(nr.matches(rr)||nr.closest(rr)))}function N(tr,er){var rr=er.doc,nr=er.mirror,ar=er.blockClass,sr=er.blockSelector,ir=er.maskTextClass,or=er.maskTextSelector,cr=er.inlineStylesheet,lr=er.maskInputOptions,dr=lr===void 0?{}:lr,pr=er.maskTextFn,hr=er.maskInputFn,fr=er.dataURLOptions,mr=fr===void 0?{}:fr,gr=er.inlineImages,vr=er.recordCanvas,yr=er.keepIframeSrcFn,Ir=er.newlyAddedElement,Pr=Ir!==void 0&&Ir,Rr=function($r,_r){if(_r.hasNode($r)){var kr=_r.getId($r);return kr===1?void 0:kr}}(rr,nr);switch(tr.nodeType){case tr.DOCUMENT_NODE:return tr.compatMode!=="CSS1Compat"?{type:n.Document,childNodes:[],compatMode:tr.compatMode}:{type:n.Document,childNodes:[]};case tr.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:tr.name,publicId:tr.publicId,systemId:tr.systemId,rootId:Rr};case tr.ELEMENT_NODE:return function($r,_r){for(var kr=_r.doc,wr=_r.blockClass,Lr=_r.blockSelector,xr=_r.inlineStylesheet,Sr=_r.maskInputOptions,Tr=Sr===void 0?{}:Sr,Cr=_r.maskInputFn,Ar=_r.dataURLOptions,Zr=Ar===void 0?{}:Ar,Mr=_r.inlineImages,jr=_r.recordCanvas,Fr=_r.keepIframeSrcFn,Kr=_r.newlyAddedElement,Xr=Kr!==void 0&&Kr,Jr=_r.rootId,Br=function($a,Ra,La){if(typeof Ra=="string"){if($a.classList.contains(Ra))return!0}else for(var Da=$a.classList.length;Da--;){var ja=$a.classList[Da];if(Ra.test(ja))return!0}return!!La&&$a.matches(La)}($r,wr,Lr),Hr=function($a){if($a instanceof HTMLFormElement)return"form";var Ra=$a.tagName.toLowerCase().trim();return p.test(Ra)?"div":Ra}($r),Nr={},Or=$r.attributes.length,zr=0;zr<Or;zr++){var Aa=$r.attributes[zr];Nr[Aa.name]=w(kr,Hr,Aa.name,Aa.value)}if(Hr==="link"&&xr){var Vr=Array.from(kr.styleSheets).find(function($a){return $a.href===$r.href}),Qr=null;Vr&&(Qr=i(Vr)),Qr&&(delete Nr.rel,delete Nr.href,Nr._cssText=y(Qr,Vr.href))}if(Hr==="style"&&$r.sheet&&!($r.innerText||$r.textContent||"").trim().length&&(Qr=i($r.sheet))&&(Nr._cssText=y(Qr,k())),Hr==="input"||Hr==="textarea"||Hr==="select"){var Ur=$r.value,Er=$r.checked;Nr.type!=="radio"&&Nr.type!=="checkbox"&&Nr.type!=="submit"&&Nr.type!=="button"&&Ur?Nr.value=l({type:Nr.type,tagName:Hr,value:Ur,maskInputOptions:Tr,maskInputFn:Cr}):Er&&(Nr.checked=Er)}if(Hr==="option"&&($r.selected&&!Tr.select?Nr.selected=!0:delete Nr.selected),Hr==="canvas"&&jr){if($r.__context==="2d")(function($a){var Ra=$a.getContext("2d");if(!Ra)return!0;for(var La=0;La<$a.width;La+=50)for(var Da=0;Da<$a.height;Da+=50){var ja=Ra.getImageData,za=c in ja?ja[c]:ja;if(new Uint32Array(za.call(Ra,La,Da,Math.min(50,$a.width-La),Math.min(50,$a.height-Da)).data.buffer).some(function(Ua){return Ua!==0}))return!1}return!0})($r)||(Nr.rr_dataURL=$r.toDataURL(Zr.type,Zr.quality));else if(!("__context"in $r)){var qr=$r.toDataURL(Zr.type,Zr.quality),Gr=document.createElement("canvas");Gr.width=$r.width,Gr.height=$r.height,qr!==Gr.toDataURL(Zr.type,Zr.quality)&&(Nr.rr_dataURL=qr)}}if(Hr==="img"&&Mr){d||(d=kr.createElement("canvas"),u=d.getContext("2d"));var Yr=$r,Wr=Yr.crossOrigin;Yr.crossOrigin="anonymous";var Pa=function(){try{d.width=Yr.naturalWidth,d.height=Yr.naturalHeight,u.drawImage(Yr,0,0),Nr.rr_dataURL=d.toDataURL(Zr.type,Zr.quality)}catch($a){console.warn("Cannot inline img src=".concat(Yr.currentSrc,"! Error: ").concat($a))}Wr?Nr.crossOrigin=Wr:Yr.removeAttribute("crossorigin")};Yr.complete&&Yr.naturalWidth!==0?Pa():Yr.onload=Pa}if(Hr!=="audio"&&Hr!=="video"||(Nr.rr_mediaState=$r.paused?"paused":"played",Nr.rr_mediaCurrentTime=$r.currentTime),Xr||($r.scrollLeft&&(Nr.rr_scrollLeft=$r.scrollLeft),$r.scrollTop&&(Nr.rr_scrollTop=$r.scrollTop)),Br){var Na=$r.getBoundingClientRect(),Ma=Na.width,Za=Na.height;Nr={class:Nr.class,rr_width:"".concat(Ma,"px"),rr_height:"".concat(Za,"px")}}return Hr!=="iframe"||Fr(Nr.src)||($r.contentDocument||(Nr.rr_src=Nr.src),delete Nr.src),{type:n.Element,tagName:Hr,attributes:Nr,childNodes:[],isSVG:A($r)||void 0,needBlock:Br,rootId:Jr}}(tr,{doc:rr,blockClass:ar,blockSelector:sr,inlineStylesheet:cr,maskInputOptions:dr,maskInputFn:hr,dataURLOptions:mr,inlineImages:gr,recordCanvas:vr,keepIframeSrcFn:yr,newlyAddedElement:Pr,rootId:Rr});case tr.TEXT_NODE:return function($r,_r){var kr,wr=_r.maskTextClass,Lr=_r.maskTextSelector,xr=_r.maskTextFn,Sr=_r.rootId,Tr=$r.parentNode&&$r.parentNode.tagName,Cr=$r.textContent,Ar=Tr==="STYLE"||void 0,Zr=Tr==="SCRIPT"||void 0;if(Ar&&Cr){try{$r.nextSibling||$r.previousSibling||!((kr=$r.parentNode.sheet)===null||kr===void 0)&&kr.cssRules&&(Cr=(Mr=$r.parentNode.sheet).cssRules?Array.from(Mr.cssRules).map(function(jr){return jr.cssText||""}).join(""):"")}catch(jr){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(jr),$r)}Cr=y(Cr,k())}var Mr;return Zr&&(Cr="SCRIPT_PLACEHOLDER"),!Ar&&!Zr&&Cr&&T($r,wr,Lr)&&(Cr=xr?xr(Cr):Cr.replace(/[\S]/g,"*")),{type:n.Text,textContent:Cr||"",isStyle:Ar,rootId:Sr}}(tr,{maskTextClass:ir,maskTextSelector:or,maskTextFn:pr,rootId:Rr});case tr.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:Rr};case tr.COMMENT_NODE:return{type:n.Comment,textContent:tr.textContent||"",rootId:Rr};default:return!1}}function R(tr){return tr===void 0?"":tr.toLowerCase()}function O(tr,er){var rr,nr=er.doc,ar=er.mirror,sr=er.blockClass,ir=er.blockSelector,or=er.maskTextClass,cr=er.maskTextSelector,lr=er.skipChild,dr=lr!==void 0&&lr,pr=er.inlineStylesheet,hr=pr===void 0||pr,fr=er.maskInputOptions,mr=fr===void 0?{}:fr,gr=er.maskTextFn,vr=er.maskInputFn,yr=er.slimDOMOptions,Ir=er.dataURLOptions,Pr=Ir===void 0?{}:Ir,Rr=er.inlineImages,$r=Rr!==void 0&&Rr,_r=er.recordCanvas,kr=_r!==void 0&&_r,wr=er.onSerialize,Lr=er.onIframeLoad,xr=er.iframeLoadTimeout,Sr=xr===void 0?5e3:xr,Tr=er.onStylesheetLoad,Cr=er.stylesheetLoadTimeout,Ar=Cr===void 0?5e3:Cr,Zr=er.keepIframeSrcFn,Mr=Zr===void 0?function(){return!1}:Zr,jr=er.newlyAddedElement,Fr=jr!==void 0&&jr,Kr=er.preserveWhiteSpace,Xr=Kr===void 0||Kr,Jr=N(tr,{doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,keepIframeSrcFn:Mr,newlyAddedElement:Fr});if(!Jr)return console.warn(tr,"not serialized"),null;rr=ar.hasNode(tr)?ar.getId(tr):!function(Er,qr){return!!(qr.comment&&Er.type===n.Comment||Er.type===n.Element&&(qr.script&&(Er.tagName==="script"||Er.tagName==="link"&&Er.attributes.rel==="preload"&&Er.attributes.as==="script"||Er.tagName==="link"&&Er.attributes.rel==="prefetch"&&typeof Er.attributes.href=="string"&&Er.attributes.href.endsWith(".js"))||qr.headFavicon&&(Er.tagName==="link"&&Er.attributes.rel==="shortcut icon"||Er.tagName==="meta"&&(R(Er.attributes.name).match(/^msapplication-tile(image|color)$/)||R(Er.attributes.name)==="application-name"||R(Er.attributes.rel)==="icon"||R(Er.attributes.rel)==="apple-touch-icon"||R(Er.attributes.rel)==="shortcut icon"))||Er.tagName==="meta"&&(qr.headMetaDescKeywords&&R(Er.attributes.name).match(/^description|keywords$/)||qr.headMetaSocial&&(R(Er.attributes.property).match(/^(og|twitter|fb):/)||R(Er.attributes.name).match(/^(og|twitter):/)||R(Er.attributes.name)==="pinterest")||qr.headMetaRobots&&(R(Er.attributes.name)==="robots"||R(Er.attributes.name)==="googlebot"||R(Er.attributes.name)==="bingbot")||qr.headMetaHttpEquiv&&Er.attributes["http-equiv"]!==void 0||qr.headMetaAuthorship&&(R(Er.attributes.name)==="author"||R(Er.attributes.name)==="generator"||R(Er.attributes.name)==="framework"||R(Er.attributes.name)==="publisher"||R(Er.attributes.name)==="progid"||R(Er.attributes.property).match(/^article:/)||R(Er.attributes.property).match(/^product:/))||qr.headMetaVerification&&(R(Er.attributes.name)==="google-site-verification"||R(Er.attributes.name)==="yandex-verification"||R(Er.attributes.name)==="csrf-token"||R(Er.attributes.name)==="p:domain_verify"||R(Er.attributes.name)==="verify-v1"||R(Er.attributes.name)==="verification"||R(Er.attributes.name)==="shopify-checkout-api-token"))))}(Jr,yr)&&(Xr||Jr.type!==n.Text||Jr.isStyle||Jr.textContent.replace(/^\s+|\s+$/gm,"").length)?m():g;var Br=Object.assign(Jr,{id:rr});if(ar.add(tr,Br),rr===g)return null;wr&&wr(tr);var Hr=!dr;if(Br.type===n.Element){Hr=Hr&&!Br.needBlock,delete Br.needBlock;var Nr=tr.shadowRoot;Nr&&r(Nr)&&(Br.isShadowHost=!0)}if((Br.type===n.Document||Br.type===n.Element)&&Hr){yr.headWhitespace&&Br.type===n.Element&&Br.tagName==="head"&&(Xr=!1);for(var Or={doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:dr,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr},zr=0,Aa=Array.from(tr.childNodes);zr<Aa.length;zr++)(Ur=O(Aa[zr],Or))&&Br.childNodes.push(Ur);if(function(Er){return Er.nodeType===Er.ELEMENT_NODE}(tr)&&tr.shadowRoot)for(var Vr=0,Qr=Array.from(tr.shadowRoot.childNodes);Vr<Qr.length;Vr++){var Ur;(Ur=O(Qr[Vr],Or))&&(r(tr.shadowRoot)&&(Ur.isShadow=!0),Br.childNodes.push(Ur))}}return tr.parentNode&&o(tr.parentNode)&&r(tr.parentNode)&&(Br.isShadow=!0),Br.type===n.Element&&Br.tagName==="iframe"&&function(Er,qr,Gr){var Yr=Er.contentWindow;if(Yr){var Wr,Pa=!1;try{Wr=Yr.document.readyState}catch(Za){return}if(Wr==="complete"){var Na="about:blank";if(Yr.location.href!==Na||Er.src===Na||Er.src==="")return setTimeout(qr,0),Er.addEventListener("load",qr);Er.addEventListener("load",qr)}else{var Ma=setTimeout(function(){Pa||(qr(),Pa=!0)},Gr);Er.addEventListener("load",function(){clearTimeout(Ma),Pa=!0,qr()})}}}(tr,function(){var Er=tr.contentDocument;if(Er&&Lr){var qr=O(Er,{doc:Er,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:!1,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr});qr&&Lr(tr,qr)}},Sr),Br.type===n.Element&&Br.tagName==="link"&&Br.attributes.rel==="stylesheet"&&function(Er,qr,Gr){var Yr,Wr=!1;try{Yr=Er.sheet}catch(Na){return}if(!Yr){var Pa=setTimeout(function(){Wr||(qr(),Wr=!0)},Gr);Er.addEventListener("load",function(){clearTimeout(Pa),Wr=!0,qr()})}}(tr,function(){if(Tr){var Er=O(tr,{doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:!1,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr});Er&&Tr(tr,Er)}},Ar),Br}function E(tr,er){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;const nr={capture:!0,passive:!0};return rr.addEventListener(tr,er,nr),()=>rr.removeEventListener(tr,er,nr)}const F=`Please stop import mirror directly. Instead of that,\r
|
|
909
909
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
910
|
-
or you can use record.mirror to access the mirror instance during recording.`;let x={map:{},getId:()=>(console.error(F),-1),getNode:()=>(console.error(F),null),removeNodeFromMap(){console.error(F)},has:()=>(console.error(F),!1),reset(){console.error(F)}};function L(tr,er){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nr=null,ar=0;return function(){for(var sr=arguments.length,ir=new Array(sr),or=0;or<sr;or++)ir[or]=arguments[or];const cr=Date.now();ar||rr.leading!==!1||(ar=cr);const lr=er-(cr-ar),dr=this;lr<=0||lr>er?(nr&&(clearTimeout(nr),nr=null),ar=cr,tr.apply(dr,ir)):nr||rr.trailing===!1||(nr=setTimeout(()=>{ar=rr.leading===!1?0:Date.now(),nr=null,tr.apply(dr,ir)},lr))}}function D(tr,er,rr,nr){let ar=arguments.length>4&&arguments[4]!==void 0?arguments[4]:window;const sr=ar.Object.getOwnPropertyDescriptor(tr,er);return ar.Object.defineProperty(tr,er,nr?rr:{set(ir){setTimeout(()=>{rr.set.call(this,ir)},0),sr&&sr.set&&sr.set.call(this,ir)}}),()=>D(tr,er,sr||{},!0)}function W(tr,er,rr){try{if(!(er in tr))return()=>{};const nr=tr[er],ar=rr(nr);return typeof ar=="function"&&(ar.prototype=ar.prototype||{},Object.defineProperties(ar,{__rrweb_original__:{enumerable:!1,value:nr}})),tr[er]=ar,()=>{tr[er]=nr}}catch(nr){return()=>{}}}function Z(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(tr,er,rr,nr){if(!tr)return!1;const ar=tr.nodeType===tr.ELEMENT_NODE?tr:tr.parentElement;if(!ar)return!1;if(typeof er=="string"){if(ar.classList.contains(er)||nr&&ar.closest("."+er)!==null)return!0}else if(M(ar,er,nr))return!0;return!!(rr&&(tr.matches(rr)||nr&&ar.closest(rr)!==null))}function V(tr,er){return er.getId(tr)===g}function U(tr,er){if(o(tr))return!1;const rr=er.getId(tr);return!er.has(rr)||(!tr.parentNode||tr.parentNode.nodeType!==tr.DOCUMENT_NODE)&&(!tr.parentNode||U(tr.parentNode,er))}function K(tr){return!!tr.changedTouches}function Y(tr,er){return!!(tr.nodeName==="IFRAME"&&er.getMeta(tr))}function _(tr,er){return!!(tr.nodeName==="LINK"&&tr.nodeType===tr.ELEMENT_NODE&&tr.getAttribute&&tr.getAttribute("rel")==="stylesheet"&&er.getMeta(tr))}function J(tr){return!!(tr!=null&&tr.shadowRoot)}typeof window!="undefined"&&window.Proxy&&window.Reflect&&(x=new Proxy(x,{get:(tr,er,rr)=>(er==="map"&&console.error(F),Reflect.get(tr,er,rr))}));class z{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(er){var rr;return(rr=this.styleIDMap.get(er))!==null&&rr!==void 0?rr:-1}has(er){return this.styleIDMap.has(er)}add(er,rr){if(this.has(er))return this.getId(er);let nr;return nr=rr===void 0?this.id++:rr,this.styleIDMap.set(er,nr),this.idStyleMap.set(nr,er),nr}getStyle(er){return this.idStyleMap.get(er)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var Q=(tr=>(tr[tr.DomContentLoaded=0]="DomContentLoaded",tr[tr.Load=1]="Load",tr[tr.FullSnapshot=2]="FullSnapshot",tr[tr.IncrementalSnapshot=3]="IncrementalSnapshot",tr[tr.Meta=4]="Meta",tr[tr.Custom=5]="Custom",tr[tr.Plugin=6]="Plugin",tr))(Q||{}),H=(tr=>(tr[tr.Mutation=0]="Mutation",tr[tr.MouseMove=1]="MouseMove",tr[tr.MouseInteraction=2]="MouseInteraction",tr[tr.Scroll=3]="Scroll",tr[tr.ViewportResize=4]="ViewportResize",tr[tr.Input=5]="Input",tr[tr.TouchMove=6]="TouchMove",tr[tr.MediaInteraction=7]="MediaInteraction",tr[tr.StyleSheetRule=8]="StyleSheetRule",tr[tr.CanvasMutation=9]="CanvasMutation",tr[tr.Font=10]="Font",tr[tr.Log=11]="Log",tr[tr.Drag=12]="Drag",tr[tr.StyleDeclaration=13]="StyleDeclaration",tr[tr.Selection=14]="Selection",tr[tr.AdoptedStyleSheet=15]="AdoptedStyleSheet",tr))(H||{}),P=(tr=>(tr[tr.MouseUp=0]="MouseUp",tr[tr.MouseDown=1]="MouseDown",tr[tr.Click=2]="Click",tr[tr.ContextMenu=3]="ContextMenu",tr[tr.DblClick=4]="DblClick",tr[tr.Focus=5]="Focus",tr[tr.Blur=6]="Blur",tr[tr.TouchStart=7]="TouchStart",tr[tr.TouchMove_Departed=8]="TouchMove_Departed",tr[tr.TouchEnd=9]="TouchEnd",tr[tr.TouchCancel=10]="TouchCancel",tr))(P||{}),j=(tr=>(tr[tr["2D"]=0]="2D",tr[tr.WebGL=1]="WebGL",tr[tr.WebGL2=2]="WebGL2",tr))(j||{});function X(tr){return"__ln"in tr}class q{constructor(){this.length=0,this.head=null}get(er){if(er>=this.length)throw new Error("Position outside of list range");let rr=this.head;for(let nr=0;nr<er;nr++)rr=(rr==null?void 0:rr.next)||null;return rr}addNode(er){const rr={value:er,previous:null,next:null};if(er.__ln=rr,er.previousSibling&&X(er.previousSibling)){const nr=er.previousSibling.__ln.next;rr.next=nr,rr.previous=er.previousSibling.__ln,er.previousSibling.__ln.next=rr,nr&&(nr.previous=rr)}else if(er.nextSibling&&X(er.nextSibling)&&er.nextSibling.__ln.previous){const nr=er.nextSibling.__ln.previous;rr.previous=nr,rr.next=er.nextSibling.__ln,er.nextSibling.__ln.previous=rr,nr&&(nr.next=rr)}else this.head&&(this.head.previous=rr),rr.next=this.head,this.head=rr;this.length++}removeNode(er){const rr=er.__ln;this.head&&(rr.previous?(rr.previous.next=rr.next,rr.next&&(rr.next.previous=rr.previous)):(this.head=rr.next,this.head&&(this.head.previous=null)),er.__ln&&delete er.__ln,this.length--)}}const $=(tr,er)=>"".concat(tr,"@").concat(er);class ee{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=er=>{er.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const er=[],rr=new q,nr=or=>{let cr=or,lr=g;for(;lr===g;)cr=cr&&cr.nextSibling,lr=cr&&this.mirror.getId(cr);return lr},ar=or=>{var cr,lr,dr,pr;let hr=null;((lr=(cr=or.getRootNode)===null||cr===void 0?void 0:cr.call(or))===null||lr===void 0?void 0:lr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&or.getRootNode().host&&(hr=or.getRootNode().host);let fr=hr;for(;((pr=(dr=fr==null?void 0:fr.getRootNode)===null||dr===void 0?void 0:dr.call(fr))===null||pr===void 0?void 0:pr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fr.getRootNode().host;)fr=fr.getRootNode().host;const mr=!(this.doc.contains(or)||fr&&this.doc.contains(fr));if(!or.parentNode||mr)return;const gr=o(or.parentNode)?this.mirror.getId(hr):this.mirror.getId(or.parentNode),vr=nr(or);if(gr===-1||vr===-1)return rr.addNode(or);const yr=O(or,{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:Ir=>{Y(Ir,this.mirror)&&this.iframeManager.addIframe(Ir),_(Ir,this.mirror)&&this.stylesheetManager.trackLinkElement(Ir),J(or)&&this.shadowDomManager.addShadowRoot(or.shadowRoot,this.doc)},onIframeLoad:(Ir,Pr)=>{this.iframeManager.attachIframe(Ir,Pr),this.shadowDomManager.observeAttachShadow(Ir)},onStylesheetLoad:(Ir,Pr)=>{this.stylesheetManager.attachLinkElement(Ir,Pr)}});yr&&er.push({parentId:gr,nextId:vr,node:yr})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const or of Array.from(this.movedSet.values()))ne(this.removes,or,this.mirror)&&!this.movedSet.has(or.parentNode)||ar(or);for(const or of Array.from(this.addedSet.values()))re(this.droppedSet,or)||ne(this.removes,or,this.mirror)?re(this.movedSet,or)?ar(or):this.droppedSet.add(or):ar(or);let sr=null;for(;rr.length;){let or=null;if(sr){const cr=this.mirror.getId(sr.value.parentNode),lr=nr(sr.value);cr!==-1&&lr!==-1&&(or=sr)}if(!or)for(let cr=rr.length-1;cr>=0;cr--){const lr=rr.get(cr);if(lr){const dr=this.mirror.getId(lr.value.parentNode);if(nr(lr.value)===-1)continue;if(dr!==-1){or=lr;break}{const pr=lr.value;if(pr.parentNode&&pr.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const hr=pr.parentNode.host;if(this.mirror.getId(hr)!==-1){or=lr;break}}}}}if(!or){for(;rr.head;)rr.removeNode(rr.head.value);break}sr=or.previous,rr.removeNode(or.value),ar(or.value)}const ir={texts:this.texts.map(or=>({id:this.mirror.getId(or.node),value:or.value})).filter(or=>this.mirror.has(or.id)),attributes:this.attributes.map(or=>({id:this.mirror.getId(or.node),attributes:or.attributes})).filter(or=>this.mirror.has(or.id)),removes:this.removes,adds:er};(ir.texts.length||ir.attributes.length||ir.removes.length||ir.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(ir))},this.processMutation=er=>{if(!V(er.target,this.mirror))switch(er.type){case"characterData":{const rr=er.target.textContent;G(er.target,this.blockClass,this.blockSelector,!1)||rr===er.oldValue||this.texts.push({value:T(er.target,this.maskTextClass,this.maskTextSelector)&&rr?this.maskTextFn?this.maskTextFn(rr):rr.replace(/[\S]/g,"*"):rr,node:er.target});break}case"attributes":{const rr=er.target;let nr=er.target.getAttribute(er.attributeName);if(er.attributeName==="value"&&(nr=l({maskInputOptions:this.maskInputOptions,tagName:er.target.tagName,type:er.target.getAttribute("type"),value:nr,maskInputFn:this.maskInputFn})),G(er.target,this.blockClass,this.blockSelector,!1)||nr===er.oldValue)return;let ar=this.attributes.find(sr=>sr.node===er.target);if(rr.tagName==="IFRAME"&&er.attributeName==="src"&&!this.keepIframeSrcFn(nr)){if(rr.contentDocument)return;er.attributeName="rr_src"}if(ar||(ar={node:er.target,attributes:{}},this.attributes.push(ar)),er.attributeName==="style"){const sr=this.doc.createElement("span");er.oldValue&&sr.setAttribute("style",er.oldValue),ar.attributes.style!==void 0&&ar.attributes.style!==null||(ar.attributes.style={});const ir=ar.attributes.style;for(const or of Array.from(rr.style)){const cr=rr.style.getPropertyValue(or),lr=rr.style.getPropertyPriority(or);cr===sr.style.getPropertyValue(or)&&lr===sr.style.getPropertyPriority(or)||(ir[or]=lr===""?cr:[cr,lr])}for(const or of Array.from(sr.style))rr.style.getPropertyValue(or)===""&&(ir[or]=!1)}else ar.attributes[er.attributeName]=w(this.doc,rr.tagName,er.attributeName,nr);break}case"childList":if(G(er.target,this.blockClass,this.blockSelector,!0))return;er.addedNodes.forEach(rr=>this.genAdds(rr,er.target)),er.removedNodes.forEach(rr=>{const nr=this.mirror.getId(rr),ar=o(er.target)?this.mirror.getId(er.target.host):this.mirror.getId(er.target);G(er.target,this.blockClass,this.blockSelector,!1)||V(rr,this.mirror)||!function(sr,ir){return ir.getId(sr)!==-1}(rr,this.mirror)||(this.addedSet.has(rr)?(te(this.addedSet,rr),this.droppedSet.add(rr)):this.addedSet.has(er.target)&&nr===-1||U(er.target,this.mirror)||(this.movedSet.has(rr)&&this.movedMap[$(nr,ar)]?te(this.movedSet,rr):this.removes.push({parentId:ar,id:nr,isShadow:!(!o(er.target)||!r(er.target))||void 0})),this.mapRemoves.push(rr))})}},this.genAdds=(er,rr)=>{if(this.mirror.hasNode(er)){if(V(er,this.mirror))return;this.movedSet.add(er);let nr=null;rr&&this.mirror.hasNode(rr)&&(nr=this.mirror.getId(rr)),nr&&nr!==-1&&(this.movedMap[$(this.mirror.getId(er),nr)]=!0)}else this.addedSet.add(er),this.droppedSet.delete(er);G(er,this.blockClass,this.blockSelector,!1)||er.childNodes.forEach(nr=>this.genAdds(nr))}}init(er){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(rr=>{this[rr]=er[rr]})}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 te(tr,er){tr.delete(er),er.childNodes.forEach(rr=>te(tr,rr))}function ne(tr,er,rr){return tr.length!==0&&oe(tr,er,rr)}function oe(tr,er,rr){const{parentNode:nr}=er;if(!nr)return!1;const ar=rr.getId(nr);return!!tr.some(sr=>sr.id===ar)||oe(tr,nr,rr)}function re(tr,er){return tr.size!==0&&ie(tr,er)}function ie(tr,er){const{parentNode:rr}=er;return!!rr&&(!!tr.has(rr)||ie(tr,rr))}const ae=[],se=typeof CSSGroupingRule!="undefined",le=typeof CSSMediaRule!="undefined",ce=typeof CSSSupportsRule!="undefined",de=typeof CSSConditionRule!="undefined";function ue(tr){try{if("composedPath"in tr){const er=tr.composedPath();if(er.length)return er[0]}else if("path"in tr&&tr.path.length)return tr.path[0];return tr.target}catch(er){return tr.target}}function he(tr,er){var rr,nr;const ar=new ee;ae.push(ar),ar.init(tr);let sr=window.MutationObserver||window.__rrMutationObserver;const ir=(nr=(rr=window==null?void 0:window.Zone)===null||rr===void 0?void 0:rr.__symbol__)===null||nr===void 0?void 0:nr.call(rr,"MutationObserver");ir&&window[ir]&&(sr=window[ir]);const or=new sr(ar.processMutations.bind(ar));return or.observe(er,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),or}function pe(tr){let{mouseInteractionCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;if(ir.mouseInteraction===!1)return()=>{};const or=ir.mouseInteraction===!0||ir.mouseInteraction===void 0?{}:ir.mouseInteraction,cr=[];return Object.keys(P).filter(lr=>Number.isNaN(Number(lr))&&!lr.endsWith("_Departed")&&or[lr]!==!1).forEach(lr=>{const dr=lr.toLowerCase(),pr=(hr=>fr=>{const mr=ue(fr);if(G(mr,ar,sr,!0))return;const gr=K(fr)?fr.changedTouches[0]:fr;if(!gr)return;const vr=nr.getId(mr),{clientX:yr,clientY:Ir}=gr;er({type:P[hr],id:vr,x:yr,y:Ir})})(lr);cr.push(E(dr,pr,rr))}),()=>{cr.forEach(lr=>lr())}}function ge(tr){let{scrollCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;return E("scroll",L(or=>{const cr=ue(or);if(!cr||G(cr,ar,sr,!0))return;const lr=nr.getId(cr);if(cr===rr){const dr=rr.scrollingElement||rr.documentElement;er({id:lr,x:dr.scrollLeft,y:dr.scrollTop})}else er({id:lr,x:cr.scrollLeft,y:cr.scrollTop})},ir.scroll||100),rr)}function me(tr,er){const rr=Object.assign({},tr);return er||delete rr.userTriggered,rr}const Ie=["INPUT","TEXTAREA","SELECT"],Ce=new WeakMap;function fe(tr){return function(er,rr){if(se&&er.parentRule instanceof CSSGroupingRule||le&&er.parentRule instanceof CSSMediaRule||ce&&er.parentRule instanceof CSSSupportsRule||de&&er.parentRule instanceof CSSConditionRule){const nr=Array.from(er.parentRule.cssRules).indexOf(er);rr.unshift(nr)}else if(er.parentStyleSheet){const nr=Array.from(er.parentStyleSheet.cssRules).indexOf(er);rr.unshift(nr)}return rr}(tr,[])}function ye(tr,er,rr){let nr,ar;return tr?(tr.ownerNode?nr=er.getId(tr.ownerNode):ar=rr.getId(tr),{styleId:ar,id:nr}):{}}function ve(tr,er){let{mirror:rr,stylesheetManager:nr}=tr;var ar,sr,ir;let or=null;or=er.nodeName==="#document"?rr.getId(er):rr.getId(er.host);const cr=er.nodeName==="#document"?(ar=er.defaultView)===null||ar===void 0?void 0:ar.Document:(ir=(sr=er.ownerDocument)===null||sr===void 0?void 0:sr.defaultView)===null||ir===void 0?void 0:ir.ShadowRoot,lr=Object.getOwnPropertyDescriptor(cr==null?void 0:cr.prototype,"adoptedStyleSheets");return or!==null&&or!==-1&&cr&&lr?(Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get(){var dr;return(dr=lr.get)===null||dr===void 0?void 0:dr.call(this)},set(dr){var pr;const hr=(pr=lr.set)===null||pr===void 0?void 0:pr.call(this,dr);if(or!==null&&or!==-1)try{nr.adoptStyleSheets(dr,or)}catch(fr){}return hr}}),()=>{Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get:lr.get,set:lr.set})}):()=>{}}function Se(tr){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const rr=tr.doc.defaultView;if(!rr)return()=>{};(function(vr,yr){const{mutationCb:Ir,mousemoveCb:Pr,mouseInteractionCb:Rr,scrollCb:$r,viewportResizeCb:_r,inputCb:kr,mediaInteractionCb:wr,styleSheetRuleCb:Lr,styleDeclarationCb:xr,canvasMutationCb:Sr,fontCb:Tr,selectionCb:Cr}=vr;vr.mutationCb=function(){yr.mutation&&yr.mutation(...arguments),Ir(...arguments)},vr.mousemoveCb=function(){yr.mousemove&&yr.mousemove(...arguments),Pr(...arguments)},vr.mouseInteractionCb=function(){yr.mouseInteraction&&yr.mouseInteraction(...arguments),Rr(...arguments)},vr.scrollCb=function(){yr.scroll&&yr.scroll(...arguments),$r(...arguments)},vr.viewportResizeCb=function(){yr.viewportResize&&yr.viewportResize(...arguments),_r(...arguments)},vr.inputCb=function(){yr.input&&yr.input(...arguments),kr(...arguments)},vr.mediaInteractionCb=function(){yr.mediaInteaction&&yr.mediaInteaction(...arguments),wr(...arguments)},vr.styleSheetRuleCb=function(){yr.styleSheetRule&&yr.styleSheetRule(...arguments),Lr(...arguments)},vr.styleDeclarationCb=function(){yr.styleDeclaration&&yr.styleDeclaration(...arguments),xr(...arguments)},vr.canvasMutationCb=function(){yr.canvasMutation&&yr.canvasMutation(...arguments),Sr(...arguments)},vr.fontCb=function(){yr.font&&yr.font(...arguments),Tr(...arguments)},vr.selectionCb=function(){yr.selection&&yr.selection(...arguments),Cr(...arguments)}})(tr,er);const nr=he(tr,tr.doc),ar=function(vr){let{mousemoveCb:yr,sampling:Ir,doc:Pr,mirror:Rr}=vr;if(Ir.mousemove===!1)return()=>{};const $r=typeof Ir.mousemove=="number"?Ir.mousemove:50,_r=typeof Ir.mousemoveCallback=="number"?Ir.mousemoveCallback:500;let kr,wr=[];const Lr=L(Tr=>{const Cr=Date.now()-kr;yr(wr.map(Ar=>(Ar.timeOffset-=Cr,Ar)),Tr),wr=[],kr=null},_r),xr=L(Tr=>{const Cr=ue(Tr),{clientX:Ar,clientY:Zr}=K(Tr)?Tr.changedTouches[0]:Tr;kr||(kr=Date.now()),wr.push({x:Ar,y:Zr,id:Rr.getId(Cr),timeOffset:Date.now()-kr}),Lr(typeof DragEvent!="undefined"&&Tr instanceof DragEvent?H.Drag:Tr instanceof MouseEvent?H.MouseMove:H.TouchMove)},$r,{trailing:!1}),Sr=[E("mousemove",xr,Pr),E("touchmove",xr,Pr),E("drag",xr,Pr)];return()=>{Sr.forEach(Tr=>Tr())}}(tr),sr=pe(tr),ir=ge(tr),or=function(vr){let{viewportResizeCb:yr}=vr,Ir=-1,Pr=-1;return E("resize",L(()=>{const Rr=Z(),$r=B();Ir===Rr&&Pr===$r||(yr({width:Number($r),height:Number(Rr)}),Ir=Rr,Pr=$r)},200),window)}(tr),cr=function(vr){let{inputCb:yr,doc:Ir,mirror:Pr,blockClass:Rr,blockSelector:$r,ignoreClass:_r,maskInputOptions:kr,maskInputFn:wr,sampling:Lr,userTriggeredOnInput:xr}=vr;function Sr(jr){let Fr=ue(jr);const Kr=jr.isTrusted;if(Fr&&Fr.tagName==="OPTION"&&(Fr=Fr.parentElement),!Fr||!Fr.tagName||Ie.indexOf(Fr.tagName)<0||G(Fr,Rr,$r,!0))return;const Xr=Fr.type;if(Fr.classList.contains(_r))return;let Jr=Fr.value,Br=!1;Xr==="radio"||Xr==="checkbox"?Br=Fr.checked:(kr[Fr.tagName.toLowerCase()]||kr[Xr])&&(Jr=l({maskInputOptions:kr,tagName:Fr.tagName,type:Xr,value:Jr,maskInputFn:wr})),Tr(Fr,me({text:Jr,isChecked:Br,userTriggered:Kr},xr));const Hr=Fr.name;Xr==="radio"&&Hr&&Br&&Ir.querySelectorAll('input[type="radio"][name="'.concat(Hr,'"]')).forEach(Nr=>{Nr!==Fr&&Tr(Nr,me({text:Nr.value,isChecked:!Br,userTriggered:!1},xr))})}function Tr(jr,Fr){const Kr=Ce.get(jr);if(!Kr||Kr.text!==Fr.text||Kr.isChecked!==Fr.isChecked){Ce.set(jr,Fr);const Xr=Pr.getId(jr);yr(Object.assign(Object.assign({},Fr),{id:Xr}))}}const Cr=(Lr.input==="last"?["change"]:["input","change"]).map(jr=>E(jr,Sr,Ir)),Ar=Ir.defaultView;if(!Ar)return()=>{Cr.forEach(jr=>jr())};const Zr=Ar.Object.getOwnPropertyDescriptor(Ar.HTMLInputElement.prototype,"value"),Mr=[[Ar.HTMLInputElement.prototype,"value"],[Ar.HTMLInputElement.prototype,"checked"],[Ar.HTMLSelectElement.prototype,"value"],[Ar.HTMLTextAreaElement.prototype,"value"],[Ar.HTMLSelectElement.prototype,"selectedIndex"],[Ar.HTMLOptionElement.prototype,"selected"]];return Zr&&Zr.set&&Cr.push(...Mr.map(jr=>D(jr[0],jr[1],{set(){Sr({target:this})}},!1,Ar))),()=>{Cr.forEach(jr=>jr())}}(tr),lr=function(vr){let{mediaInteractionCb:yr,blockClass:Ir,blockSelector:Pr,mirror:Rr,sampling:$r}=vr;const _r=wr=>L(Lr=>{const xr=ue(Lr);if(!xr||G(xr,Ir,Pr,!0))return;const{currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar}=xr;yr({type:wr,id:Rr.getId(xr),currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar})},$r.media||500),kr=[E("play",_r(0)),E("pause",_r(1)),E("seeked",_r(2)),E("volumechange",_r(3)),E("ratechange",_r(4))];return()=>{kr.forEach(wr=>wr())}}(tr),dr=function(vr,yr){let{styleSheetRuleCb:Ir,mirror:Pr,stylesheetManager:Rr}=vr,{win:$r}=yr;const _r=$r.CSSStyleSheet.prototype.insertRule;$r.CSSStyleSheet.prototype.insertRule=function(Tr,Cr){const{id:Ar,styleId:Zr}=ye(this,Pr,Rr.styleMirror);return(Ar&&Ar!==-1||Zr&&Zr!==-1)&&Ir({id:Ar,styleId:Zr,adds:[{rule:Tr,index:Cr}]}),_r.apply(this,[Tr,Cr])};const kr=$r.CSSStyleSheet.prototype.deleteRule;let wr,Lr;$r.CSSStyleSheet.prototype.deleteRule=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,removes:[{index:Tr}]}),kr.apply(this,[Tr])},$r.CSSStyleSheet.prototype.replace&&(wr=$r.CSSStyleSheet.prototype.replace,$r.CSSStyleSheet.prototype.replace=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replace:Tr}),wr.apply(this,[Tr])}),$r.CSSStyleSheet.prototype.replaceSync&&(Lr=$r.CSSStyleSheet.prototype.replaceSync,$r.CSSStyleSheet.prototype.replaceSync=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replaceSync:Tr}),Lr.apply(this,[Tr])});const xr={};se?xr.CSSGroupingRule=$r.CSSGroupingRule:(le&&(xr.CSSMediaRule=$r.CSSMediaRule),de&&(xr.CSSConditionRule=$r.CSSConditionRule),ce&&(xr.CSSSupportsRule=$r.CSSSupportsRule));const Sr={};return Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Sr[Cr]={insertRule:Ar.prototype.insertRule,deleteRule:Ar.prototype.deleteRule},Ar.prototype.insertRule=function(Zr,Mr){const{id:jr,styleId:Fr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(jr&&jr!==-1||Fr&&Fr!==-1)&&Ir({id:jr,styleId:Fr,adds:[{rule:Zr,index:[...fe(this),Mr||0]}]}),Sr[Cr].insertRule.apply(this,[Zr,Mr])},Ar.prototype.deleteRule=function(Zr){const{id:Mr,styleId:jr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(Mr&&Mr!==-1||jr&&jr!==-1)&&Ir({id:Mr,styleId:jr,removes:[{index:[...fe(this),Zr]}]}),Sr[Cr].deleteRule.apply(this,[Zr])}}),()=>{$r.CSSStyleSheet.prototype.insertRule=_r,$r.CSSStyleSheet.prototype.deleteRule=kr,wr&&($r.CSSStyleSheet.prototype.replace=wr),Lr&&($r.CSSStyleSheet.prototype.replaceSync=Lr),Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Ar.prototype.insertRule=Sr[Cr].insertRule,Ar.prototype.deleteRule=Sr[Cr].deleteRule})}}(tr,{win:rr}),pr=ve(tr,tr.doc),hr=function(vr,yr){let{styleDeclarationCb:Ir,mirror:Pr,ignoreCSSAttributes:Rr,stylesheetManager:$r}=vr,{win:_r}=yr;const kr=_r.CSSStyleDeclaration.prototype.setProperty;_r.CSSStyleDeclaration.prototype.setProperty=function(Lr,xr,Sr){var Tr;if(Rr.has(Lr))return kr.apply(this,[Lr,xr,Sr]);const{id:Cr,styleId:Ar}=ye((Tr=this.parentRule)===null||Tr===void 0?void 0:Tr.parentStyleSheet,Pr,$r.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,set:{property:Lr,value:xr,priority:Sr},index:fe(this.parentRule)}),kr.apply(this,[Lr,xr,Sr])};const wr=_r.CSSStyleDeclaration.prototype.removeProperty;return _r.CSSStyleDeclaration.prototype.removeProperty=function(Lr){var xr;if(Rr.has(Lr))return wr.apply(this,[Lr]);const{id:Sr,styleId:Tr}=ye((xr=this.parentRule)===null||xr===void 0?void 0:xr.parentStyleSheet,Pr,$r.styleMirror);return(Sr&&Sr!==-1||Tr&&Tr!==-1)&&Ir({id:Sr,styleId:Tr,remove:{property:Lr},index:fe(this.parentRule)}),wr.apply(this,[Lr])},()=>{_r.CSSStyleDeclaration.prototype.setProperty=kr,_r.CSSStyleDeclaration.prototype.removeProperty=wr}}(tr,{win:rr}),fr=tr.collectFonts?function(vr){let{fontCb:yr,doc:Ir}=vr;const Pr=Ir.defaultView;if(!Pr)return()=>{};const Rr=[],$r=new WeakMap,_r=Pr.FontFace;Pr.FontFace=function(wr,Lr,xr){const Sr=new _r(wr,Lr,xr);return $r.set(Sr,{family:wr,buffer:typeof Lr!="string",descriptors:xr,fontSource:typeof Lr=="string"?Lr:JSON.stringify(Array.from(new Uint8Array(Lr)))}),Sr};const kr=W(Ir.fonts,"add",function(wr){return function(Lr){return setTimeout(()=>{const xr=$r.get(Lr);xr&&(yr(xr),$r.delete(Lr))},0),wr.apply(this,[Lr])}});return Rr.push(()=>{Pr.FontFace=_r}),Rr.push(kr),()=>{Rr.forEach(wr=>wr())}}(tr):()=>{},mr=function(vr){const{doc:yr,mirror:Ir,blockClass:Pr,blockSelector:Rr,selectionCb:$r}=vr;let _r=!0;const kr=()=>{const wr=yr.getSelection();if(!wr||_r&&(wr!=null&&wr.isCollapsed))return;_r=wr.isCollapsed||!1;const Lr=[],xr=wr.rangeCount||0;for(let Sr=0;Sr<xr;Sr++){const Tr=wr.getRangeAt(Sr),{startContainer:Cr,startOffset:Ar,endContainer:Zr,endOffset:Mr}=Tr;G(Cr,Pr,Rr,!0)||G(Zr,Pr,Rr,!0)||Lr.push({start:Ir.getId(Cr),startOffset:Ar,end:Ir.getId(Zr),endOffset:Mr})}$r({ranges:Lr})};return kr(),E("selectionchange",kr)}(tr),gr=[];for(const vr of tr.plugins)gr.push(vr.observer(vr.callback,rr,vr.options));return()=>{ae.forEach(vr=>vr.reset()),nr.disconnect(),ar(),sr(),ir(),or(),cr(),lr(),dr(),pr(),hr(),fr(),mr(),gr.forEach(vr=>vr())}}class be{constructor(er){this.generateIdFn=er,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(er,rr,nr,ar){const sr=nr||this.getIdToRemoteIdMap(er),ir=ar||this.getRemoteIdToIdMap(er);let or=sr.get(rr);return or||(or=this.generateIdFn(),sr.set(rr,or),ir.set(or,rr)),or}getIds(er,rr){const nr=this.getIdToRemoteIdMap(er),ar=this.getRemoteIdToIdMap(er);return rr.map(sr=>this.getId(er,sr,nr,ar))}getRemoteId(er,rr,nr){const ar=nr||this.getRemoteIdToIdMap(er);return typeof rr!="number"?rr:ar.get(rr)||-1}getRemoteIds(er,rr){const nr=this.getRemoteIdToIdMap(er);return rr.map(ar=>this.getRemoteId(er,ar,nr))}reset(er){if(!er)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(er),this.iframeRemoteIdToIdMap.delete(er)}getIdToRemoteIdMap(er){let rr=this.iframeIdToRemoteIdMap.get(er);return rr||(rr=new Map,this.iframeIdToRemoteIdMap.set(er,rr)),rr}getRemoteIdToIdMap(er){let rr=this.iframeRemoteIdToIdMap.get(er);return rr||(rr=new Map,this.iframeRemoteIdToIdMap.set(er,rr)),rr}}class Ae{constructor(er){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new be(m),this.mutationCb=er.mutationCb,this.wrappedEmit=er.wrappedEmit,this.stylesheetManager=er.stylesheetManager,this.recordCrossOriginIframes=er.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new be(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=er.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(er){this.iframes.set(er,!0),er.contentWindow&&this.crossOriginIframeMap.set(er.contentWindow,er)}addLoadListener(er){this.loadListener=er}attachIframe(er,rr){var nr;this.mutationCb({adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(nr=this.loadListener)===null||nr===void 0||nr.call(this,er),er.contentDocument&&er.contentDocument.adoptedStyleSheets&&er.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(er.contentDocument.adoptedStyleSheets,this.mirror.getId(er.contentDocument))}handleMessage(er){if(er.data.type==="rrweb"){if(!er.source)return;const rr=this.crossOriginIframeMap.get(er.source);if(!rr)return;const nr=this.transformCrossOriginEvent(rr,er.data.event);nr&&this.wrappedEmit(nr,er.data.isCheckout)}}transformCrossOriginEvent(er,rr){var nr;switch(rr.type){case Q.FullSnapshot:return this.crossOriginIframeMirror.reset(er),this.crossOriginIframeStyleMirror.reset(er),this.replaceIdOnNode(rr.data.node,er),{timestamp:rr.timestamp,type:Q.IncrementalSnapshot,data:{source:H.Mutation,adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return rr;case Q.Custom:return this.replaceIds(rr.data.payload,er,["id","parentId","previousId","nextId"]),rr;case Q.IncrementalSnapshot:switch(rr.data.source){case H.Mutation:return rr.data.adds.forEach(ar=>{this.replaceIds(ar,er,["parentId","nextId","previousId"]),this.replaceIdOnNode(ar.node,er)}),rr.data.removes.forEach(ar=>{this.replaceIds(ar,er,["parentId","id"])}),rr.data.attributes.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr.data.texts.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.Drag:case H.TouchMove:case H.MouseMove:return rr.data.positions.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.ViewportResize:return!1;case H.MediaInteraction:case H.MouseInteraction:case H.Scroll:case H.CanvasMutation:case H.Input:return this.replaceIds(rr.data,er,["id"]),rr;case H.StyleSheetRule:case H.StyleDeclaration:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleId"]),rr;case H.Font:return rr;case H.Selection:return rr.data.ranges.forEach(ar=>{this.replaceIds(ar,er,["start","end"])}),rr;case H.AdoptedStyleSheet:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleIds"]),(nr=rr.data.styles)===null||nr===void 0||nr.forEach(ar=>{this.replaceStyleIds(ar,er,["styleId"])}),rr}}}replace(er,rr,nr,ar){for(const sr of ar)(Array.isArray(rr[sr])||typeof rr[sr]=="number")&&(Array.isArray(rr[sr])?rr[sr]=er.getIds(nr,rr[sr]):rr[sr]=er.getId(nr,rr[sr]));return rr}replaceIds(er,rr,nr){return this.replace(this.crossOriginIframeMirror,er,rr,nr)}replaceStyleIds(er,rr,nr){return this.replace(this.crossOriginIframeStyleMirror,er,rr,nr)}replaceIdOnNode(er,rr){this.replaceIds(er,rr,["id"]),"childNodes"in er&&er.childNodes.forEach(nr=>{this.replaceIdOnNode(nr,rr)})}}class ke{constructor(er){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=er.mutationCb,this.scrollCb=er.scrollCb,this.bypassOptions=er.bypassOptions,this.mirror=er.mirror;const rr=this;this.restorePatches.push(W(Element.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,this.ownerDocument),sr}}))}addShadowRoot(er,rr){r(er)&&(this.shadowDoms.has(er)||(this.shadowDoms.add(er),he(Object.assign(Object.assign({},this.bypassOptions),{doc:rr,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),er),ge(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:er,mirror:this.mirror})),setTimeout(()=>{er.adoptedStyleSheets&&er.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(er.adoptedStyleSheets,this.mirror.getId(er.host)),ve({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},er)},0)))}observeAttachShadow(er){if(er.contentWindow){const rr=this;this.restorePatches.push(W(er.contentWindow.HTMLElement.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,er.contentDocument),sr}}))}}reset(){this.restorePatches.forEach(er=>er()),this.shadowDoms=new WeakSet}}/*! *****************************************************************************
|
|
911
|
-
Copyright (c) Microsoft Corporation.
|
|
912
|
-
|
|
913
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
914
|
-
purpose with or without fee is hereby granted.
|
|
915
|
-
|
|
916
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
917
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
918
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
919
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
920
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
921
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
922
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
923
|
-
***************************************************************************** */function we(tr,er,rr,nr){return new(rr||(rr=Promise))(function(ar,sr){function ir(lr){try{cr(nr.next(lr))}catch(dr){sr(dr)}}function or(lr){try{cr(nr.throw(lr))}catch(dr){sr(dr)}}function cr(lr){var dr;lr.done?ar(lr.value):(dr=lr.value,dr instanceof rr?dr:new rr(function(pr){pr(dr)})).then(ir,or)}cr((nr=nr.apply(tr,[])).next())})}for(var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ne=0;Ne<64;Ne++)Te[Me.charCodeAt(Ne)]=Ne;const Re=new Map,Oe=(tr,er,rr)=>{if(!tr||!xe(tr,er)&&typeof tr!="object")return;const nr=function(sr,ir){let or=Re.get(sr);return or||(or=new Map,Re.set(sr,or)),or.has(ir)||or.set(ir,[]),or.get(ir)}(rr,tr.constructor.name);let ar=nr.indexOf(tr);return ar===-1&&(ar=nr.length,nr.push(tr)),ar};function Ee(tr,er,rr){if(tr instanceof Array)return tr.map(nr=>Ee(nr,er,rr));if(tr===null)return tr;if(tr instanceof Float32Array||tr instanceof Float64Array||tr instanceof Int32Array||tr instanceof Uint32Array||tr instanceof Uint8Array||tr instanceof Uint16Array||tr instanceof Int16Array||tr instanceof Int8Array||tr instanceof Uint8ClampedArray)return{rr_type:tr.constructor.name,args:[Object.values(tr)]};if(tr instanceof ArrayBuffer){const nr=tr.constructor.name,ar=function(sr){var ir,or=new Uint8Array(sr),cr=or.length,lr="";for(ir=0;ir<cr;ir+=3)lr+=Me[or[ir]>>2],lr+=Me[(3&or[ir])<<4|or[ir+1]>>4],lr+=Me[(15&or[ir+1])<<2|or[ir+2]>>6],lr+=Me[63&or[ir+2]];return cr%3==2?lr=lr.substring(0,lr.length-1)+"=":cr%3==1&&(lr=lr.substring(0,lr.length-2)+"=="),lr}(tr);return{rr_type:nr,base64:ar}}if(tr instanceof DataView)return{rr_type:tr.constructor.name,args:[Ee(tr.buffer,er,rr),tr.byteOffset,tr.byteLength]};if(tr instanceof HTMLImageElement){const nr=tr.constructor.name,{src:ar}=tr;return{rr_type:nr,src:ar}}return tr instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:tr.toDataURL()}:tr instanceof ImageData?{rr_type:tr.constructor.name,args:[Ee(tr.data,er,rr),tr.width,tr.height]}:xe(tr,er)||typeof tr=="object"?{rr_type:tr.constructor.name,index:Oe(tr,er,rr)}:tr}const Fe=(tr,er,rr)=>[...tr].map(nr=>Ee(nr,er,rr)),xe=(tr,er)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(nr=>typeof er[nr]=="function").find(nr=>tr instanceof er[nr]);function Le(tr,er,rr){const nr=[];try{const ar=W(tr.HTMLCanvasElement.prototype,"getContext",function(sr){return function(ir){G(this,er,rr,!0)||"__context"in this||(this.__context=ir);for(var or=arguments.length,cr=new Array(or>1?or-1:0),lr=1;lr<or;lr++)cr[lr-1]=arguments[lr];return sr.apply(this,[ir,...cr])}});nr.push(ar)}catch(ar){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{nr.forEach(ar=>ar())}}function De(tr,er,rr,nr,ar,sr,ir){const or=[],cr=Object.getOwnPropertyNames(tr);for(const lr of cr)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(lr))try{if(typeof tr[lr]!="function")continue;const dr=W(tr,lr,function(pr){return function(){for(var hr=arguments.length,fr=new Array(hr),mr=0;mr<hr;mr++)fr[mr]=arguments[mr];const gr=pr.apply(this,fr);if(Oe(gr,ir,this),!G(this.canvas,nr,ar,!0)){const vr=Fe([...fr],ir,this),yr={type:er,property:lr,args:vr};rr(this.canvas,yr)}return gr}});or.push(dr)}catch(dr){const pr=D(tr,lr,{set(hr){rr(this.canvas,{type:er,property:lr,args:[hr],setter:!0})}});or.push(pr)}return or}var We=null;try{var Ze=typeof module!="undefined"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof require=="function"&&require("worker_threads");We=Ze.Worker}catch(tr){}function Be(tr,er,rr){var nr=er===void 0?null:er,ar=function(or,cr){return Buffer.from(or,"base64").toString(cr?"utf16":"utf8")}(tr,rr!==void 0&&rr),sr=ar.indexOf(`
|
|
910
|
+
or you can use record.mirror to access the mirror instance during recording.`;let x={map:{},getId:()=>(console.error(F),-1),getNode:()=>(console.error(F),null),removeNodeFromMap(){console.error(F)},has:()=>(console.error(F),!1),reset(){console.error(F)}};function L(tr,er){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nr=null,ar=0;return function(){for(var sr=arguments.length,ir=new Array(sr),or=0;or<sr;or++)ir[or]=arguments[or];const cr=Date.now();ar||rr.leading!==!1||(ar=cr);const lr=er-(cr-ar),dr=this;lr<=0||lr>er?(nr&&(clearTimeout(nr),nr=null),ar=cr,tr.apply(dr,ir)):nr||rr.trailing===!1||(nr=setTimeout(()=>{ar=rr.leading===!1?0:Date.now(),nr=null,tr.apply(dr,ir)},lr))}}function D(tr,er,rr,nr){let ar=arguments.length>4&&arguments[4]!==void 0?arguments[4]:window;const sr=ar.Object.getOwnPropertyDescriptor(tr,er);return ar.Object.defineProperty(tr,er,nr?rr:{set(ir){setTimeout(()=>{rr.set.call(this,ir)},0),sr&&sr.set&&sr.set.call(this,ir)}}),()=>D(tr,er,sr||{},!0)}function W(tr,er,rr){try{if(!(er in tr))return()=>{};const nr=tr[er],ar=rr(nr);return typeof ar=="function"&&(ar.prototype=ar.prototype||{},Object.defineProperties(ar,{__rrweb_original__:{enumerable:!1,value:nr}})),tr[er]=ar,()=>{tr[er]=nr}}catch(nr){return()=>{}}}function Z(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(tr,er,rr,nr){if(!tr)return!1;const ar=tr.nodeType===tr.ELEMENT_NODE?tr:tr.parentElement;if(!ar)return!1;if(typeof er=="string"){if(ar.classList.contains(er)||nr&&ar.closest("."+er)!==null)return!0}else if(M(ar,er,nr))return!0;return!!(rr&&(tr.matches(rr)||nr&&ar.closest(rr)!==null))}function V(tr,er){return er.getId(tr)===g}function U(tr,er){if(o(tr))return!1;const rr=er.getId(tr);return!er.has(rr)||(!tr.parentNode||tr.parentNode.nodeType!==tr.DOCUMENT_NODE)&&(!tr.parentNode||U(tr.parentNode,er))}function K(tr){return!!tr.changedTouches}function Y(tr,er){return!!(tr.nodeName==="IFRAME"&&er.getMeta(tr))}function _(tr,er){return!!(tr.nodeName==="LINK"&&tr.nodeType===tr.ELEMENT_NODE&&tr.getAttribute&&tr.getAttribute("rel")==="stylesheet"&&er.getMeta(tr))}function J(tr){return!!(tr!=null&&tr.shadowRoot)}typeof window!="undefined"&&window.Proxy&&window.Reflect&&(x=new Proxy(x,{get:(tr,er,rr)=>(er==="map"&&console.error(F),Reflect.get(tr,er,rr))}));class z{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(er){var rr;return(rr=this.styleIDMap.get(er))!==null&&rr!==void 0?rr:-1}has(er){return this.styleIDMap.has(er)}add(er,rr){if(this.has(er))return this.getId(er);let nr;return nr=rr===void 0?this.id++:rr,this.styleIDMap.set(er,nr),this.idStyleMap.set(nr,er),nr}getStyle(er){return this.idStyleMap.get(er)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var Q=(tr=>(tr[tr.DomContentLoaded=0]="DomContentLoaded",tr[tr.Load=1]="Load",tr[tr.FullSnapshot=2]="FullSnapshot",tr[tr.IncrementalSnapshot=3]="IncrementalSnapshot",tr[tr.Meta=4]="Meta",tr[tr.Custom=5]="Custom",tr[tr.Plugin=6]="Plugin",tr))(Q||{}),H=(tr=>(tr[tr.Mutation=0]="Mutation",tr[tr.MouseMove=1]="MouseMove",tr[tr.MouseInteraction=2]="MouseInteraction",tr[tr.Scroll=3]="Scroll",tr[tr.ViewportResize=4]="ViewportResize",tr[tr.Input=5]="Input",tr[tr.TouchMove=6]="TouchMove",tr[tr.MediaInteraction=7]="MediaInteraction",tr[tr.StyleSheetRule=8]="StyleSheetRule",tr[tr.CanvasMutation=9]="CanvasMutation",tr[tr.Font=10]="Font",tr[tr.Log=11]="Log",tr[tr.Drag=12]="Drag",tr[tr.StyleDeclaration=13]="StyleDeclaration",tr[tr.Selection=14]="Selection",tr[tr.AdoptedStyleSheet=15]="AdoptedStyleSheet",tr))(H||{}),P=(tr=>(tr[tr.MouseUp=0]="MouseUp",tr[tr.MouseDown=1]="MouseDown",tr[tr.Click=2]="Click",tr[tr.ContextMenu=3]="ContextMenu",tr[tr.DblClick=4]="DblClick",tr[tr.Focus=5]="Focus",tr[tr.Blur=6]="Blur",tr[tr.TouchStart=7]="TouchStart",tr[tr.TouchMove_Departed=8]="TouchMove_Departed",tr[tr.TouchEnd=9]="TouchEnd",tr[tr.TouchCancel=10]="TouchCancel",tr))(P||{}),j=(tr=>(tr[tr["2D"]=0]="2D",tr[tr.WebGL=1]="WebGL",tr[tr.WebGL2=2]="WebGL2",tr))(j||{});function X(tr){return"__ln"in tr}class q{constructor(){this.length=0,this.head=null}get(er){if(er>=this.length)throw new Error("Position outside of list range");let rr=this.head;for(let nr=0;nr<er;nr++)rr=(rr==null?void 0:rr.next)||null;return rr}addNode(er){const rr={value:er,previous:null,next:null};if(er.__ln=rr,er.previousSibling&&X(er.previousSibling)){const nr=er.previousSibling.__ln.next;rr.next=nr,rr.previous=er.previousSibling.__ln,er.previousSibling.__ln.next=rr,nr&&(nr.previous=rr)}else if(er.nextSibling&&X(er.nextSibling)&&er.nextSibling.__ln.previous){const nr=er.nextSibling.__ln.previous;rr.previous=nr,rr.next=er.nextSibling.__ln,er.nextSibling.__ln.previous=rr,nr&&(nr.next=rr)}else this.head&&(this.head.previous=rr),rr.next=this.head,this.head=rr;this.length++}removeNode(er){const rr=er.__ln;this.head&&(rr.previous?(rr.previous.next=rr.next,rr.next&&(rr.next.previous=rr.previous)):(this.head=rr.next,this.head&&(this.head.previous=null)),er.__ln&&delete er.__ln,this.length--)}}const $=(tr,er)=>"".concat(tr,"@").concat(er);class ee{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=er=>{er.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const er=[],rr=new q,nr=or=>{let cr=or,lr=g;for(;lr===g;)cr=cr&&cr.nextSibling,lr=cr&&this.mirror.getId(cr);return lr},ar=or=>{var cr,lr,dr,pr;let hr=null;((lr=(cr=or.getRootNode)===null||cr===void 0?void 0:cr.call(or))===null||lr===void 0?void 0:lr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&or.getRootNode().host&&(hr=or.getRootNode().host);let fr=hr;for(;((pr=(dr=fr==null?void 0:fr.getRootNode)===null||dr===void 0?void 0:dr.call(fr))===null||pr===void 0?void 0:pr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fr.getRootNode().host;)fr=fr.getRootNode().host;const mr=!(this.doc.contains(or)||fr&&this.doc.contains(fr));if(!or.parentNode||mr)return;const gr=o(or.parentNode)?this.mirror.getId(hr):this.mirror.getId(or.parentNode),vr=nr(or);if(gr===-1||vr===-1)return rr.addNode(or);const yr=O(or,{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:Ir=>{Y(Ir,this.mirror)&&this.iframeManager.addIframe(Ir),_(Ir,this.mirror)&&this.stylesheetManager.trackLinkElement(Ir),J(or)&&this.shadowDomManager.addShadowRoot(or.shadowRoot,this.doc)},onIframeLoad:(Ir,Pr)=>{this.iframeManager.attachIframe(Ir,Pr),this.shadowDomManager.observeAttachShadow(Ir)},onStylesheetLoad:(Ir,Pr)=>{this.stylesheetManager.attachLinkElement(Ir,Pr)}});yr&&er.push({parentId:gr,nextId:vr,node:yr})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const or of Array.from(this.movedSet.values()))ne(this.removes,or,this.mirror)&&!this.movedSet.has(or.parentNode)||ar(or);for(const or of Array.from(this.addedSet.values()))re(this.droppedSet,or)||ne(this.removes,or,this.mirror)?re(this.movedSet,or)?ar(or):this.droppedSet.add(or):ar(or);let sr=null;for(;rr.length;){let or=null;if(sr){const cr=this.mirror.getId(sr.value.parentNode),lr=nr(sr.value);cr!==-1&&lr!==-1&&(or=sr)}if(!or)for(let cr=rr.length-1;cr>=0;cr--){const lr=rr.get(cr);if(lr){const dr=this.mirror.getId(lr.value.parentNode);if(nr(lr.value)===-1)continue;if(dr!==-1){or=lr;break}{const pr=lr.value;if(pr.parentNode&&pr.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const hr=pr.parentNode.host;if(this.mirror.getId(hr)!==-1){or=lr;break}}}}}if(!or){for(;rr.head;)rr.removeNode(rr.head.value);break}sr=or.previous,rr.removeNode(or.value),ar(or.value)}const ir={texts:this.texts.map(or=>({id:this.mirror.getId(or.node),value:or.value})).filter(or=>this.mirror.has(or.id)),attributes:this.attributes.map(or=>({id:this.mirror.getId(or.node),attributes:or.attributes})).filter(or=>this.mirror.has(or.id)),removes:this.removes,adds:er};(ir.texts.length||ir.attributes.length||ir.removes.length||ir.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(ir))},this.processMutation=er=>{if(!V(er.target,this.mirror))switch(er.type){case"characterData":{const rr=er.target.textContent;G(er.target,this.blockClass,this.blockSelector,!1)||rr===er.oldValue||this.texts.push({value:T(er.target,this.maskTextClass,this.maskTextSelector)&&rr?this.maskTextFn?this.maskTextFn(rr):rr.replace(/[\S]/g,"*"):rr,node:er.target});break}case"attributes":{const rr=er.target;let nr=er.target.getAttribute(er.attributeName);if(er.attributeName==="value"&&(nr=l({maskInputOptions:this.maskInputOptions,tagName:er.target.tagName,type:er.target.getAttribute("type"),value:nr,maskInputFn:this.maskInputFn})),G(er.target,this.blockClass,this.blockSelector,!1)||nr===er.oldValue)return;let ar=this.attributes.find(sr=>sr.node===er.target);if(rr.tagName==="IFRAME"&&er.attributeName==="src"&&!this.keepIframeSrcFn(nr)){if(rr.contentDocument)return;er.attributeName="rr_src"}if(ar||(ar={node:er.target,attributes:{}},this.attributes.push(ar)),er.attributeName==="style"){const sr=this.doc.createElement("span");er.oldValue&&sr.setAttribute("style",er.oldValue),ar.attributes.style!==void 0&&ar.attributes.style!==null||(ar.attributes.style={});const ir=ar.attributes.style;for(const or of Array.from(rr.style)){const cr=rr.style.getPropertyValue(or),lr=rr.style.getPropertyPriority(or);cr===sr.style.getPropertyValue(or)&&lr===sr.style.getPropertyPriority(or)||(ir[or]=lr===""?cr:[cr,lr])}for(const or of Array.from(sr.style))rr.style.getPropertyValue(or)===""&&(ir[or]=!1)}else ar.attributes[er.attributeName]=w(this.doc,rr.tagName,er.attributeName,nr);break}case"childList":if(G(er.target,this.blockClass,this.blockSelector,!0))return;er.addedNodes.forEach(rr=>this.genAdds(rr,er.target)),er.removedNodes.forEach(rr=>{const nr=this.mirror.getId(rr),ar=o(er.target)?this.mirror.getId(er.target.host):this.mirror.getId(er.target);G(er.target,this.blockClass,this.blockSelector,!1)||V(rr,this.mirror)||!function(sr,ir){return ir.getId(sr)!==-1}(rr,this.mirror)||(this.addedSet.has(rr)?(te(this.addedSet,rr),this.droppedSet.add(rr)):this.addedSet.has(er.target)&&nr===-1||U(er.target,this.mirror)||(this.movedSet.has(rr)&&this.movedMap[$(nr,ar)]?te(this.movedSet,rr):this.removes.push({parentId:ar,id:nr,isShadow:!(!o(er.target)||!r(er.target))||void 0})),this.mapRemoves.push(rr))})}},this.genAdds=(er,rr)=>{if(this.mirror.hasNode(er)){if(V(er,this.mirror))return;this.movedSet.add(er);let nr=null;rr&&this.mirror.hasNode(rr)&&(nr=this.mirror.getId(rr)),nr&&nr!==-1&&(this.movedMap[$(this.mirror.getId(er),nr)]=!0)}else this.addedSet.add(er),this.droppedSet.delete(er);G(er,this.blockClass,this.blockSelector,!1)||er.childNodes.forEach(nr=>this.genAdds(nr))}}init(er){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(rr=>{this[rr]=er[rr]})}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 te(tr,er){tr.delete(er),er.childNodes.forEach(rr=>te(tr,rr))}function ne(tr,er,rr){return tr.length!==0&&oe(tr,er,rr)}function oe(tr,er,rr){const{parentNode:nr}=er;if(!nr)return!1;const ar=rr.getId(nr);return!!tr.some(sr=>sr.id===ar)||oe(tr,nr,rr)}function re(tr,er){return tr.size!==0&&ie(tr,er)}function ie(tr,er){const{parentNode:rr}=er;return!!rr&&(!!tr.has(rr)||ie(tr,rr))}const ae=[],se=typeof CSSGroupingRule!="undefined",le=typeof CSSMediaRule!="undefined",ce=typeof CSSSupportsRule!="undefined",de=typeof CSSConditionRule!="undefined";function ue(tr){try{if("composedPath"in tr){const er=tr.composedPath();if(er.length)return er[0]}else if("path"in tr&&tr.path.length)return tr.path[0];return tr.target}catch(er){return tr.target}}function he(tr,er){var rr,nr;const ar=new ee;ae.push(ar),ar.init(tr);let sr=window.MutationObserver||window.__rrMutationObserver;const ir=(nr=(rr=window==null?void 0:window.Zone)===null||rr===void 0?void 0:rr.__symbol__)===null||nr===void 0?void 0:nr.call(rr,"MutationObserver");ir&&window[ir]&&(sr=window[ir]);const or=new sr(ar.processMutations.bind(ar));return or.observe(er,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),or}function pe(tr){let{mouseInteractionCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;if(ir.mouseInteraction===!1)return()=>{};const or=ir.mouseInteraction===!0||ir.mouseInteraction===void 0?{}:ir.mouseInteraction,cr=[];return Object.keys(P).filter(lr=>Number.isNaN(Number(lr))&&!lr.endsWith("_Departed")&&or[lr]!==!1).forEach(lr=>{const dr=lr.toLowerCase(),pr=(hr=>fr=>{const mr=ue(fr);if(G(mr,ar,sr,!0))return;const gr=K(fr)?fr.changedTouches[0]:fr;if(!gr)return;const vr=nr.getId(mr),{clientX:yr,clientY:Ir}=gr;er({type:P[hr],id:vr,x:yr,y:Ir})})(lr);cr.push(E(dr,pr,rr))}),()=>{cr.forEach(lr=>lr())}}function ge(tr){let{scrollCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;return E("scroll",L(or=>{const cr=ue(or);if(!cr||G(cr,ar,sr,!0))return;const lr=nr.getId(cr);if(cr===rr){const dr=rr.scrollingElement||rr.documentElement;er({id:lr,x:dr.scrollLeft,y:dr.scrollTop})}else er({id:lr,x:cr.scrollLeft,y:cr.scrollTop})},ir.scroll||100),rr)}function me(tr,er){const rr=Object.assign({},tr);return er||delete rr.userTriggered,rr}const Ie=["INPUT","TEXTAREA","SELECT"],Ce=new WeakMap;function fe(tr){return function(er,rr){if(se&&er.parentRule instanceof CSSGroupingRule||le&&er.parentRule instanceof CSSMediaRule||ce&&er.parentRule instanceof CSSSupportsRule||de&&er.parentRule instanceof CSSConditionRule){const nr=Array.from(er.parentRule.cssRules).indexOf(er);rr.unshift(nr)}else if(er.parentStyleSheet){const nr=Array.from(er.parentStyleSheet.cssRules).indexOf(er);rr.unshift(nr)}return rr}(tr,[])}function ye(tr,er,rr){let nr,ar;return tr?(tr.ownerNode?nr=er.getId(tr.ownerNode):ar=rr.getId(tr),{styleId:ar,id:nr}):{}}function ve(tr,er){let{mirror:rr,stylesheetManager:nr}=tr;var ar,sr,ir;let or=null;or=er.nodeName==="#document"?rr.getId(er):rr.getId(er.host);const cr=er.nodeName==="#document"?(ar=er.defaultView)===null||ar===void 0?void 0:ar.Document:(ir=(sr=er.ownerDocument)===null||sr===void 0?void 0:sr.defaultView)===null||ir===void 0?void 0:ir.ShadowRoot,lr=Object.getOwnPropertyDescriptor(cr==null?void 0:cr.prototype,"adoptedStyleSheets");return or!==null&&or!==-1&&cr&&lr?(Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get(){var dr;return(dr=lr.get)===null||dr===void 0?void 0:dr.call(this)},set(dr){var pr;const hr=(pr=lr.set)===null||pr===void 0?void 0:pr.call(this,dr);if(or!==null&&or!==-1)try{nr.adoptStyleSheets(dr,or)}catch(fr){}return hr}}),()=>{Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get:lr.get,set:lr.set})}):()=>{}}function Se(tr){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const rr=tr.doc.defaultView;if(!rr)return()=>{};(function(vr,yr){const{mutationCb:Ir,mousemoveCb:Pr,mouseInteractionCb:Rr,scrollCb:$r,viewportResizeCb:_r,inputCb:kr,mediaInteractionCb:wr,styleSheetRuleCb:Lr,styleDeclarationCb:xr,canvasMutationCb:Sr,fontCb:Tr,selectionCb:Cr}=vr;vr.mutationCb=function(){yr.mutation&&yr.mutation(...arguments),Ir(...arguments)},vr.mousemoveCb=function(){yr.mousemove&&yr.mousemove(...arguments),Pr(...arguments)},vr.mouseInteractionCb=function(){yr.mouseInteraction&&yr.mouseInteraction(...arguments),Rr(...arguments)},vr.scrollCb=function(){yr.scroll&&yr.scroll(...arguments),$r(...arguments)},vr.viewportResizeCb=function(){yr.viewportResize&&yr.viewportResize(...arguments),_r(...arguments)},vr.inputCb=function(){yr.input&&yr.input(...arguments),kr(...arguments)},vr.mediaInteractionCb=function(){yr.mediaInteaction&&yr.mediaInteaction(...arguments),wr(...arguments)},vr.styleSheetRuleCb=function(){yr.styleSheetRule&&yr.styleSheetRule(...arguments),Lr(...arguments)},vr.styleDeclarationCb=function(){yr.styleDeclaration&&yr.styleDeclaration(...arguments),xr(...arguments)},vr.canvasMutationCb=function(){yr.canvasMutation&&yr.canvasMutation(...arguments),Sr(...arguments)},vr.fontCb=function(){yr.font&&yr.font(...arguments),Tr(...arguments)},vr.selectionCb=function(){yr.selection&&yr.selection(...arguments),Cr(...arguments)}})(tr,er);const nr=he(tr,tr.doc),ar=function(vr){let{mousemoveCb:yr,sampling:Ir,doc:Pr,mirror:Rr}=vr;if(Ir.mousemove===!1)return()=>{};const $r=typeof Ir.mousemove=="number"?Ir.mousemove:50,_r=typeof Ir.mousemoveCallback=="number"?Ir.mousemoveCallback:500;let kr,wr=[];const Lr=L(Tr=>{const Cr=Date.now()-kr;yr(wr.map(Ar=>(Ar.timeOffset-=Cr,Ar)),Tr),wr=[],kr=null},_r),xr=L(Tr=>{const Cr=ue(Tr),{clientX:Ar,clientY:Zr}=K(Tr)?Tr.changedTouches[0]:Tr;kr||(kr=Date.now()),wr.push({x:Ar,y:Zr,id:Rr.getId(Cr),timeOffset:Date.now()-kr}),Lr(typeof DragEvent!="undefined"&&Tr instanceof DragEvent?H.Drag:Tr instanceof MouseEvent?H.MouseMove:H.TouchMove)},$r,{trailing:!1}),Sr=[E("mousemove",xr,Pr),E("touchmove",xr,Pr),E("drag",xr,Pr)];return()=>{Sr.forEach(Tr=>Tr())}}(tr),sr=pe(tr),ir=ge(tr),or=function(vr){let{viewportResizeCb:yr}=vr,Ir=-1,Pr=-1;return E("resize",L(()=>{const Rr=Z(),$r=B();Ir===Rr&&Pr===$r||(yr({width:Number($r),height:Number(Rr)}),Ir=Rr,Pr=$r)},200),window)}(tr),cr=function(vr){let{inputCb:yr,doc:Ir,mirror:Pr,blockClass:Rr,blockSelector:$r,ignoreClass:_r,maskInputOptions:kr,maskInputFn:wr,sampling:Lr,userTriggeredOnInput:xr}=vr;function Sr(jr){let Fr=ue(jr);const Kr=jr.isTrusted;if(Fr&&Fr.tagName==="OPTION"&&(Fr=Fr.parentElement),!Fr||!Fr.tagName||Ie.indexOf(Fr.tagName)<0||G(Fr,Rr,$r,!0))return;const Xr=Fr.type;if(Fr.classList.contains(_r))return;let Jr=Fr.value,Br=!1;Xr==="radio"||Xr==="checkbox"?Br=Fr.checked:(kr[Fr.tagName.toLowerCase()]||kr[Xr])&&(Jr=l({maskInputOptions:kr,tagName:Fr.tagName,type:Xr,value:Jr,maskInputFn:wr})),Tr(Fr,me({text:Jr,isChecked:Br,userTriggered:Kr},xr));const Hr=Fr.name;Xr==="radio"&&Hr&&Br&&Ir.querySelectorAll('input[type="radio"][name="'.concat(Hr,'"]')).forEach(Nr=>{Nr!==Fr&&Tr(Nr,me({text:Nr.value,isChecked:!Br,userTriggered:!1},xr))})}function Tr(jr,Fr){const Kr=Ce.get(jr);if(!Kr||Kr.text!==Fr.text||Kr.isChecked!==Fr.isChecked){Ce.set(jr,Fr);const Xr=Pr.getId(jr);yr(Object.assign(Object.assign({},Fr),{id:Xr}))}}const Cr=(Lr.input==="last"?["change"]:["input","change"]).map(jr=>E(jr,Sr,Ir)),Ar=Ir.defaultView;if(!Ar)return()=>{Cr.forEach(jr=>jr())};const Zr=Ar.Object.getOwnPropertyDescriptor(Ar.HTMLInputElement.prototype,"value"),Mr=[[Ar.HTMLInputElement.prototype,"value"],[Ar.HTMLInputElement.prototype,"checked"],[Ar.HTMLSelectElement.prototype,"value"],[Ar.HTMLTextAreaElement.prototype,"value"],[Ar.HTMLSelectElement.prototype,"selectedIndex"],[Ar.HTMLOptionElement.prototype,"selected"]];return Zr&&Zr.set&&Cr.push(...Mr.map(jr=>D(jr[0],jr[1],{set(){Sr({target:this})}},!1,Ar))),()=>{Cr.forEach(jr=>jr())}}(tr),lr=function(vr){let{mediaInteractionCb:yr,blockClass:Ir,blockSelector:Pr,mirror:Rr,sampling:$r}=vr;const _r=wr=>L(Lr=>{const xr=ue(Lr);if(!xr||G(xr,Ir,Pr,!0))return;const{currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar}=xr;yr({type:wr,id:Rr.getId(xr),currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar})},$r.media||500),kr=[E("play",_r(0)),E("pause",_r(1)),E("seeked",_r(2)),E("volumechange",_r(3)),E("ratechange",_r(4))];return()=>{kr.forEach(wr=>wr())}}(tr),dr=function(vr,yr){let{styleSheetRuleCb:Ir,mirror:Pr,stylesheetManager:Rr}=vr,{win:$r}=yr;const _r=$r.CSSStyleSheet.prototype.insertRule;$r.CSSStyleSheet.prototype.insertRule=function(Tr,Cr){const{id:Ar,styleId:Zr}=ye(this,Pr,Rr.styleMirror);return(Ar&&Ar!==-1||Zr&&Zr!==-1)&&Ir({id:Ar,styleId:Zr,adds:[{rule:Tr,index:Cr}]}),_r.apply(this,[Tr,Cr])};const kr=$r.CSSStyleSheet.prototype.deleteRule;let wr,Lr;$r.CSSStyleSheet.prototype.deleteRule=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,removes:[{index:Tr}]}),kr.apply(this,[Tr])},$r.CSSStyleSheet.prototype.replace&&(wr=$r.CSSStyleSheet.prototype.replace,$r.CSSStyleSheet.prototype.replace=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replace:Tr}),wr.apply(this,[Tr])}),$r.CSSStyleSheet.prototype.replaceSync&&(Lr=$r.CSSStyleSheet.prototype.replaceSync,$r.CSSStyleSheet.prototype.replaceSync=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replaceSync:Tr}),Lr.apply(this,[Tr])});const xr={};se?xr.CSSGroupingRule=$r.CSSGroupingRule:(le&&(xr.CSSMediaRule=$r.CSSMediaRule),de&&(xr.CSSConditionRule=$r.CSSConditionRule),ce&&(xr.CSSSupportsRule=$r.CSSSupportsRule));const Sr={};return Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Sr[Cr]={insertRule:Ar.prototype.insertRule,deleteRule:Ar.prototype.deleteRule},Ar.prototype.insertRule=function(Zr,Mr){const{id:jr,styleId:Fr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(jr&&jr!==-1||Fr&&Fr!==-1)&&Ir({id:jr,styleId:Fr,adds:[{rule:Zr,index:[...fe(this),Mr||0]}]}),Sr[Cr].insertRule.apply(this,[Zr,Mr])},Ar.prototype.deleteRule=function(Zr){const{id:Mr,styleId:jr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(Mr&&Mr!==-1||jr&&jr!==-1)&&Ir({id:Mr,styleId:jr,removes:[{index:[...fe(this),Zr]}]}),Sr[Cr].deleteRule.apply(this,[Zr])}}),()=>{$r.CSSStyleSheet.prototype.insertRule=_r,$r.CSSStyleSheet.prototype.deleteRule=kr,wr&&($r.CSSStyleSheet.prototype.replace=wr),Lr&&($r.CSSStyleSheet.prototype.replaceSync=Lr),Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Ar.prototype.insertRule=Sr[Cr].insertRule,Ar.prototype.deleteRule=Sr[Cr].deleteRule})}}(tr,{win:rr}),pr=ve(tr,tr.doc),hr=function(vr,yr){let{styleDeclarationCb:Ir,mirror:Pr,ignoreCSSAttributes:Rr,stylesheetManager:$r}=vr,{win:_r}=yr;const kr=_r.CSSStyleDeclaration.prototype.setProperty;_r.CSSStyleDeclaration.prototype.setProperty=function(Lr,xr,Sr){var Tr;if(Rr.has(Lr))return kr.apply(this,[Lr,xr,Sr]);const{id:Cr,styleId:Ar}=ye((Tr=this.parentRule)===null||Tr===void 0?void 0:Tr.parentStyleSheet,Pr,$r.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,set:{property:Lr,value:xr,priority:Sr},index:fe(this.parentRule)}),kr.apply(this,[Lr,xr,Sr])};const wr=_r.CSSStyleDeclaration.prototype.removeProperty;return _r.CSSStyleDeclaration.prototype.removeProperty=function(Lr){var xr;if(Rr.has(Lr))return wr.apply(this,[Lr]);const{id:Sr,styleId:Tr}=ye((xr=this.parentRule)===null||xr===void 0?void 0:xr.parentStyleSheet,Pr,$r.styleMirror);return(Sr&&Sr!==-1||Tr&&Tr!==-1)&&Ir({id:Sr,styleId:Tr,remove:{property:Lr},index:fe(this.parentRule)}),wr.apply(this,[Lr])},()=>{_r.CSSStyleDeclaration.prototype.setProperty=kr,_r.CSSStyleDeclaration.prototype.removeProperty=wr}}(tr,{win:rr}),fr=tr.collectFonts?function(vr){let{fontCb:yr,doc:Ir}=vr;const Pr=Ir.defaultView;if(!Pr)return()=>{};const Rr=[],$r=new WeakMap,_r=Pr.FontFace;Pr.FontFace=function(wr,Lr,xr){const Sr=new _r(wr,Lr,xr);return $r.set(Sr,{family:wr,buffer:typeof Lr!="string",descriptors:xr,fontSource:typeof Lr=="string"?Lr:JSON.stringify(Array.from(new Uint8Array(Lr)))}),Sr};const kr=W(Ir.fonts,"add",function(wr){return function(Lr){return setTimeout(()=>{const xr=$r.get(Lr);xr&&(yr(xr),$r.delete(Lr))},0),wr.apply(this,[Lr])}});return Rr.push(()=>{Pr.FontFace=_r}),Rr.push(kr),()=>{Rr.forEach(wr=>wr())}}(tr):()=>{},mr=function(vr){const{doc:yr,mirror:Ir,blockClass:Pr,blockSelector:Rr,selectionCb:$r}=vr;let _r=!0;const kr=()=>{const wr=yr.getSelection();if(!wr||_r&&(wr!=null&&wr.isCollapsed))return;_r=wr.isCollapsed||!1;const Lr=[],xr=wr.rangeCount||0;for(let Sr=0;Sr<xr;Sr++){const Tr=wr.getRangeAt(Sr),{startContainer:Cr,startOffset:Ar,endContainer:Zr,endOffset:Mr}=Tr;G(Cr,Pr,Rr,!0)||G(Zr,Pr,Rr,!0)||Lr.push({start:Ir.getId(Cr),startOffset:Ar,end:Ir.getId(Zr),endOffset:Mr})}$r({ranges:Lr})};return kr(),E("selectionchange",kr)}(tr),gr=[];for(const vr of tr.plugins)gr.push(vr.observer(vr.callback,rr,vr.options));return()=>{ae.forEach(vr=>vr.reset()),nr.disconnect(),ar(),sr(),ir(),or(),cr(),lr(),dr(),pr(),hr(),fr(),mr(),gr.forEach(vr=>vr())}}class be{constructor(er){this.generateIdFn=er,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(er,rr,nr,ar){const sr=nr||this.getIdToRemoteIdMap(er),ir=ar||this.getRemoteIdToIdMap(er);let or=sr.get(rr);return or||(or=this.generateIdFn(),sr.set(rr,or),ir.set(or,rr)),or}getIds(er,rr){const nr=this.getIdToRemoteIdMap(er),ar=this.getRemoteIdToIdMap(er);return rr.map(sr=>this.getId(er,sr,nr,ar))}getRemoteId(er,rr,nr){const ar=nr||this.getRemoteIdToIdMap(er);return typeof rr!="number"?rr:ar.get(rr)||-1}getRemoteIds(er,rr){const nr=this.getRemoteIdToIdMap(er);return rr.map(ar=>this.getRemoteId(er,ar,nr))}reset(er){if(!er)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(er),this.iframeRemoteIdToIdMap.delete(er)}getIdToRemoteIdMap(er){let rr=this.iframeIdToRemoteIdMap.get(er);return rr||(rr=new Map,this.iframeIdToRemoteIdMap.set(er,rr)),rr}getRemoteIdToIdMap(er){let rr=this.iframeRemoteIdToIdMap.get(er);return rr||(rr=new Map,this.iframeRemoteIdToIdMap.set(er,rr)),rr}}class Ae{constructor(er){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new be(m),this.mutationCb=er.mutationCb,this.wrappedEmit=er.wrappedEmit,this.stylesheetManager=er.stylesheetManager,this.recordCrossOriginIframes=er.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new be(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=er.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(er){this.iframes.set(er,!0),er.contentWindow&&this.crossOriginIframeMap.set(er.contentWindow,er)}addLoadListener(er){this.loadListener=er}attachIframe(er,rr){var nr;this.mutationCb({adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(nr=this.loadListener)===null||nr===void 0||nr.call(this,er),er.contentDocument&&er.contentDocument.adoptedStyleSheets&&er.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(er.contentDocument.adoptedStyleSheets,this.mirror.getId(er.contentDocument))}handleMessage(er){if(er.data.type==="rrweb"){if(!er.source)return;const rr=this.crossOriginIframeMap.get(er.source);if(!rr)return;const nr=this.transformCrossOriginEvent(rr,er.data.event);nr&&this.wrappedEmit(nr,er.data.isCheckout)}}transformCrossOriginEvent(er,rr){var nr;switch(rr.type){case Q.FullSnapshot:return this.crossOriginIframeMirror.reset(er),this.crossOriginIframeStyleMirror.reset(er),this.replaceIdOnNode(rr.data.node,er),{timestamp:rr.timestamp,type:Q.IncrementalSnapshot,data:{source:H.Mutation,adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return rr;case Q.Custom:return this.replaceIds(rr.data.payload,er,["id","parentId","previousId","nextId"]),rr;case Q.IncrementalSnapshot:switch(rr.data.source){case H.Mutation:return rr.data.adds.forEach(ar=>{this.replaceIds(ar,er,["parentId","nextId","previousId"]),this.replaceIdOnNode(ar.node,er)}),rr.data.removes.forEach(ar=>{this.replaceIds(ar,er,["parentId","id"])}),rr.data.attributes.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr.data.texts.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.Drag:case H.TouchMove:case H.MouseMove:return rr.data.positions.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.ViewportResize:return!1;case H.MediaInteraction:case H.MouseInteraction:case H.Scroll:case H.CanvasMutation:case H.Input:return this.replaceIds(rr.data,er,["id"]),rr;case H.StyleSheetRule:case H.StyleDeclaration:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleId"]),rr;case H.Font:return rr;case H.Selection:return rr.data.ranges.forEach(ar=>{this.replaceIds(ar,er,["start","end"])}),rr;case H.AdoptedStyleSheet:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleIds"]),(nr=rr.data.styles)===null||nr===void 0||nr.forEach(ar=>{this.replaceStyleIds(ar,er,["styleId"])}),rr}}}replace(er,rr,nr,ar){for(const sr of ar)(Array.isArray(rr[sr])||typeof rr[sr]=="number")&&(Array.isArray(rr[sr])?rr[sr]=er.getIds(nr,rr[sr]):rr[sr]=er.getId(nr,rr[sr]));return rr}replaceIds(er,rr,nr){return this.replace(this.crossOriginIframeMirror,er,rr,nr)}replaceStyleIds(er,rr,nr){return this.replace(this.crossOriginIframeStyleMirror,er,rr,nr)}replaceIdOnNode(er,rr){this.replaceIds(er,rr,["id"]),"childNodes"in er&&er.childNodes.forEach(nr=>{this.replaceIdOnNode(nr,rr)})}}class ke{constructor(er){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=er.mutationCb,this.scrollCb=er.scrollCb,this.bypassOptions=er.bypassOptions,this.mirror=er.mirror;const rr=this;this.restorePatches.push(W(Element.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,this.ownerDocument),sr}}))}addShadowRoot(er,rr){r(er)&&(this.shadowDoms.has(er)||(this.shadowDoms.add(er),he(Object.assign(Object.assign({},this.bypassOptions),{doc:rr,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),er),ge(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:er,mirror:this.mirror})),setTimeout(()=>{er.adoptedStyleSheets&&er.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(er.adoptedStyleSheets,this.mirror.getId(er.host)),ve({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},er)},0)))}observeAttachShadow(er){if(er.contentWindow){const rr=this;this.restorePatches.push(W(er.contentWindow.HTMLElement.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,er.contentDocument),sr}}))}}reset(){this.restorePatches.forEach(er=>er()),this.shadowDoms=new WeakSet}}function we(tr,er,rr,nr){return new(rr||(rr=Promise))(function(ar,sr){function ir(lr){try{cr(nr.next(lr))}catch(dr){sr(dr)}}function or(lr){try{cr(nr.throw(lr))}catch(dr){sr(dr)}}function cr(lr){var dr;lr.done?ar(lr.value):(dr=lr.value,dr instanceof rr?dr:new rr(function(pr){pr(dr)})).then(ir,or)}cr((nr=nr.apply(tr,[])).next())})}for(var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ne=0;Ne<64;Ne++)Te[Me.charCodeAt(Ne)]=Ne;const Re=new Map,Oe=(tr,er,rr)=>{if(!tr||!xe(tr,er)&&typeof tr!="object")return;const nr=function(sr,ir){let or=Re.get(sr);return or||(or=new Map,Re.set(sr,or)),or.has(ir)||or.set(ir,[]),or.get(ir)}(rr,tr.constructor.name);let ar=nr.indexOf(tr);return ar===-1&&(ar=nr.length,nr.push(tr)),ar};function Ee(tr,er,rr){if(tr instanceof Array)return tr.map(nr=>Ee(nr,er,rr));if(tr===null)return tr;if(tr instanceof Float32Array||tr instanceof Float64Array||tr instanceof Int32Array||tr instanceof Uint32Array||tr instanceof Uint8Array||tr instanceof Uint16Array||tr instanceof Int16Array||tr instanceof Int8Array||tr instanceof Uint8ClampedArray)return{rr_type:tr.constructor.name,args:[Object.values(tr)]};if(tr instanceof ArrayBuffer){const nr=tr.constructor.name,ar=function(sr){var ir,or=new Uint8Array(sr),cr=or.length,lr="";for(ir=0;ir<cr;ir+=3)lr+=Me[or[ir]>>2],lr+=Me[(3&or[ir])<<4|or[ir+1]>>4],lr+=Me[(15&or[ir+1])<<2|or[ir+2]>>6],lr+=Me[63&or[ir+2]];return cr%3==2?lr=lr.substring(0,lr.length-1)+"=":cr%3==1&&(lr=lr.substring(0,lr.length-2)+"=="),lr}(tr);return{rr_type:nr,base64:ar}}if(tr instanceof DataView)return{rr_type:tr.constructor.name,args:[Ee(tr.buffer,er,rr),tr.byteOffset,tr.byteLength]};if(tr instanceof HTMLImageElement){const nr=tr.constructor.name,{src:ar}=tr;return{rr_type:nr,src:ar}}return tr instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:tr.toDataURL()}:tr instanceof ImageData?{rr_type:tr.constructor.name,args:[Ee(tr.data,er,rr),tr.width,tr.height]}:xe(tr,er)||typeof tr=="object"?{rr_type:tr.constructor.name,index:Oe(tr,er,rr)}:tr}const Fe=(tr,er,rr)=>[...tr].map(nr=>Ee(nr,er,rr)),xe=(tr,er)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(nr=>typeof er[nr]=="function").find(nr=>tr instanceof er[nr]);function Le(tr,er,rr){const nr=[];try{const ar=W(tr.HTMLCanvasElement.prototype,"getContext",function(sr){return function(ir){G(this,er,rr,!0)||"__context"in this||(this.__context=ir);for(var or=arguments.length,cr=new Array(or>1?or-1:0),lr=1;lr<or;lr++)cr[lr-1]=arguments[lr];return sr.apply(this,[ir,...cr])}});nr.push(ar)}catch(ar){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{nr.forEach(ar=>ar())}}function De(tr,er,rr,nr,ar,sr,ir){const or=[],cr=Object.getOwnPropertyNames(tr);for(const lr of cr)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(lr))try{if(typeof tr[lr]!="function")continue;const dr=W(tr,lr,function(pr){return function(){for(var hr=arguments.length,fr=new Array(hr),mr=0;mr<hr;mr++)fr[mr]=arguments[mr];const gr=pr.apply(this,fr);if(Oe(gr,ir,this),!G(this.canvas,nr,ar,!0)){const vr=Fe([...fr],ir,this),yr={type:er,property:lr,args:vr};rr(this.canvas,yr)}return gr}});or.push(dr)}catch(dr){const pr=D(tr,lr,{set(hr){rr(this.canvas,{type:er,property:lr,args:[hr],setter:!0})}});or.push(pr)}return or}var We=null;try{var Ze=typeof module!="undefined"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof require=="function"&&require("worker_threads");We=Ze.Worker}catch(tr){}function Be(tr,er,rr){var nr=er===void 0?null:er,ar=function(or,cr){return Buffer.from(or,"base64").toString(cr?"utf16":"utf8")}(tr,rr!==void 0&&rr),sr=ar.indexOf(`
|
|
924
911
|
`,10)+1,ir=ar.substring(sr)+(nr?"//# sourceMappingURL="+nr:"");return function(or){return new We(ir,Object.assign({},or,{eval:!0}))}}function Ge(tr,er,rr){var nr=er===void 0?null:er,ar=function(cr,lr){var dr=atob(cr);if(lr){for(var pr=new Uint8Array(dr.length),hr=0,fr=dr.length;hr<fr;++hr)pr[hr]=dr.charCodeAt(hr);return String.fromCharCode.apply(null,new Uint16Array(pr.buffer))}return dr}(tr,rr!==void 0&&rr),sr=ar.indexOf(`
|
|
925
912
|
`,10)+1,ir=ar.substring(sr)+(nr?"//# sourceMappingURL="+nr:""),or=new Blob([ir],{type:"application/javascript"});return URL.createObjectURL(or)}var Ve=Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]",Ue,Ke,Ye,_e=(Ue="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Ke=null,Ye=!1,Ve?Be(Ue,Ke,Ye):function(tr,er,rr){var nr;return function(ar){return nr=nr||Ge(tr,er,rr),new Worker(nr,ar)}}(Ue,Ke,Ye));class Je{constructor(er){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(cr,lr)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(cr)||this.pendingCanvasMutations.set(cr,[]),this.pendingCanvasMutations.get(cr).push(lr)};const{sampling:rr="all",win:nr,blockClass:ar,blockSelector:sr,recordCanvas:ir,dataURLOptions:or}=er;this.mutationCb=er.mutationCb,this.mirror=er.mirror,ir&&rr==="all"&&this.initCanvasMutationObserver(nr,ar,sr),ir&&typeof rr=="number"&&this.initCanvasFPSObserver(rr,nr,ar,sr,{dataURLOptions:or})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(er,rr,nr,ar,sr){const ir=Le(rr,nr,ar),or=new Map,cr=new _e;cr.onmessage=fr=>{const{id:mr}=fr.data;if(or.set(mr,!1),!("base64"in fr.data))return;const{base64:gr,type:vr,width:yr,height:Ir}=fr.data;this.mutationCb({id:mr,type:j["2D"],commands:[{property:"clearRect",args:[0,0,yr,Ir]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:gr}],type:vr}]},0,0]}]})};const lr=1e3/er;let dr,pr=0;const hr=fr=>{pr&&fr-pr<lr||(pr=fr,(()=>{const mr=[];return rr.document.querySelectorAll("canvas").forEach(gr=>{G(gr,nr,ar,!0)||mr.push(gr)}),mr})().forEach(mr=>we(this,void 0,void 0,function*(){var gr;const vr=this.mirror.getId(mr);if(or.get(vr))return;if(or.set(vr,!0),["webgl","webgl2"].includes(mr.__context)){const Ir=mr.getContext(mr.__context);((gr=Ir==null?void 0:Ir.getContextAttributes())===null||gr===void 0?void 0:gr.preserveDrawingBuffer)===!1&&(Ir==null||Ir.clear(Ir.COLOR_BUFFER_BIT))}const yr=yield createImageBitmap(mr);cr.postMessage({id:vr,bitmap:yr,width:mr.width,height:mr.height,dataURLOptions:sr.dataURLOptions},[yr])}))),dr=requestAnimationFrame(hr)};dr=requestAnimationFrame(hr),this.resetObservers=()=>{ir(),cancelAnimationFrame(dr)}}initCanvasMutationObserver(er,rr,nr){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const ar=Le(er,rr,nr),sr=function(or,cr,lr,dr){const pr=[],hr=Object.getOwnPropertyNames(cr.CanvasRenderingContext2D.prototype);for(const fr of hr)try{if(typeof cr.CanvasRenderingContext2D.prototype[fr]!="function")continue;const mr=W(cr.CanvasRenderingContext2D.prototype,fr,function(gr){return function(){for(var vr=arguments.length,yr=new Array(vr),Ir=0;Ir<vr;Ir++)yr[Ir]=arguments[Ir];return G(this.canvas,lr,dr,!0)||setTimeout(()=>{const Pr=Fe([...yr],cr,this);or(this.canvas,{type:j["2D"],property:fr,args:Pr})},0),gr.apply(this,yr)}});pr.push(mr)}catch(mr){const gr=D(cr.CanvasRenderingContext2D.prototype,fr,{set(vr){or(this.canvas,{type:j["2D"],property:fr,args:[vr],setter:!0})}});pr.push(gr)}return()=>{pr.forEach(fr=>fr())}}(this.processMutation.bind(this),er,rr,nr),ir=function(or,cr,lr,dr,pr){const hr=[];return hr.push(...De(cr.WebGLRenderingContext.prototype,j.WebGL,or,lr,dr,0,cr)),cr.WebGL2RenderingContext!==void 0&&hr.push(...De(cr.WebGL2RenderingContext.prototype,j.WebGL2,or,lr,dr,0,cr)),()=>{hr.forEach(fr=>fr())}}(this.processMutation.bind(this),er,rr,nr,this.mirror);this.resetObservers=()=>{ar(),sr(),ir()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const er=rr=>{this.rafStamps.latestId=rr,requestAnimationFrame(er)};requestAnimationFrame(er)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((er,rr)=>{const nr=this.mirror.getId(rr);this.flushPendingCanvasMutationFor(rr,nr)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(er,rr){if(this.frozen||this.locked)return;const nr=this.pendingCanvasMutations.get(er);if(!nr||rr===-1)return;const ar=nr.map(ir=>function(cr,lr){var dr={};for(var pr in cr)Object.prototype.hasOwnProperty.call(cr,pr)&&lr.indexOf(pr)<0&&(dr[pr]=cr[pr]);if(cr!=null&&typeof Object.getOwnPropertySymbols=="function"){var hr=0;for(pr=Object.getOwnPropertySymbols(cr);hr<pr.length;hr++)lr.indexOf(pr[hr])<0&&Object.prototype.propertyIsEnumerable.call(cr,pr[hr])&&(dr[pr[hr]]=cr[pr[hr]])}return dr}(ir,["type"])),{type:sr}=nr[0];this.mutationCb({id:rr,type:sr,commands:ar}),this.pendingCanvasMutations.delete(er)}}class ze{constructor(er){this.trackedLinkElements=new WeakSet,this.styleMirror=new z,this.mutationCb=er.mutationCb,this.adoptedStyleSheetCb=er.adoptedStyleSheetCb}attachLinkElement(er,rr){"_cssText"in rr.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:rr.id,attributes:rr.attributes}]}),this.trackLinkElement(er)}trackLinkElement(er){this.trackedLinkElements.has(er)||(this.trackedLinkElements.add(er),this.trackStylesheetInLinkElement(er))}adoptStyleSheets(er,rr){if(er.length===0)return;const nr={id:rr,styleIds:[]},ar=[];for(const sr of er){let ir;if(this.styleMirror.has(sr))ir=this.styleMirror.getId(sr);else{ir=this.styleMirror.add(sr);const or=Array.from(sr.rules||CSSRule);ar.push({styleId:ir,rules:or.map((cr,lr)=>({rule:a(cr),index:lr}))})}nr.styleIds.push(ir)}ar.length>0&&(nr.styles=ar),this.adoptedStyleSheetCb(nr)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(er){}}function Qe(tr){return Object.assign(Object.assign({},tr),{timestamp:Date.now()})}let He,Pe,je,Xe=!1;const qe=new s;function $e(){let tr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{emit:er,checkoutEveryNms:rr,checkoutEveryNth:nr,blockClass:ar="rr-block",blockSelector:sr=null,ignoreClass:ir="rr-ignore",maskTextClass:or="rr-mask",maskTextSelector:cr=null,inlineStylesheet:lr=!0,maskAllInputs:dr,maskInputOptions:pr,slimDOMOptions:hr,maskInputFn:fr,maskTextFn:mr,hooks:gr,packFn:vr,sampling:yr={},dataURLOptions:Ir={},mousemoveWait:Pr,recordCanvas:Rr=!1,recordCrossOriginIframes:$r=!1,userTriggeredOnInput:_r=!1,collectFonts:kr=!1,inlineImages:wr=!1,plugins:Lr,keepIframeSrcFn:xr=()=>!1,ignoreCSSAttributes:Sr=new Set([])}=tr,Tr=!$r||window.parent===window;let Cr=!1;if(!Tr)try{window.parent.document,Cr=!1}catch(Or){Cr=!0}if(Tr&&!er)throw new Error("emit function is required");Pr!==void 0&&yr.mousemove===void 0&&(yr.mousemove=Pr),qe.reset();const Ar=dr===!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}:pr!==void 0?pr:{password:!0},Zr=hr===!0||hr==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:hr==="all",headMetaDescKeywords:hr==="all"}:hr||{};let Mr;(function(){var Or=this;let zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;"NodeList"in zr&&!zr.NodeList.prototype.forEach&&(zr.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in zr&&!zr.DOMTokenList.prototype.forEach&&(zr.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var Aa=arguments.length,Vr=new Array(Aa),Qr=0;Qr<Aa;Qr++)Vr[Qr]=arguments[Qr];let Ur=Vr[0];if(!(0 in Vr))throw new TypeError("1 argument is required");do if(Or===Ur)return!0;while(Ur=Ur&&Ur.parentNode);return!1})})();let jr=0;const Fr=Or=>{for(const zr of Lr||[])zr.eventProcessor&&(Or=zr.eventProcessor(Or));return vr&&(Or=vr(Or)),Or};He=(Or,zr)=>{var Aa;if(!(!((Aa=ae[0])===null||Aa===void 0)&&Aa.isFrozen())||Or.type===Q.FullSnapshot||Or.type===Q.IncrementalSnapshot&&Or.data.source===H.Mutation||ae.forEach(Vr=>Vr.unfreeze()),Tr)er==null||er(Fr(Or),zr);else if(Cr){const Vr={type:"rrweb",event:Fr(Or),isCheckout:zr};window.parent.postMessage(Vr,"*")}if(Or.type===Q.FullSnapshot)Mr=Or,jr=0;else if(Or.type===Q.IncrementalSnapshot){if(Or.data.source===H.Mutation&&Or.data.isAttachIframe)return;jr++;const Vr=nr&&jr>=nr,Qr=rr&&Or.timestamp-Mr.timestamp>rr;(Vr||Qr)&&Pe(!0)}};const Kr=Or=>{He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Mutation},Or)}))},Xr=Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Scroll},Or)})),Jr=Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.CanvasMutation},Or)})),Br=new ze({mutationCb:Kr,adoptedStyleSheetCb:Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.AdoptedStyleSheet},Or)}))}),Hr=new Ae({mirror:qe,mutationCb:Kr,stylesheetManager:Br,recordCrossOriginIframes:$r,wrappedEmit:He});for(const Or of Lr||[])Or.getMirror&&Or.getMirror({nodeMirror:qe,crossOriginIframeMirror:Hr.crossOriginIframeMirror,crossOriginIframeStyleMirror:Hr.crossOriginIframeStyleMirror});je=new Je({recordCanvas:Rr,mutationCb:Jr,win:window,blockClass:ar,blockSelector:sr,mirror:qe,sampling:yr.canvas,dataURLOptions:Ir});const Nr=new ke({mutationCb:Kr,scrollCb:Xr,bypassOptions:{blockClass:ar,blockSelector:sr,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:lr,maskInputOptions:Ar,dataURLOptions:Ir,maskTextFn:mr,maskInputFn:fr,recordCanvas:Rr,inlineImages:wr,sampling:yr,slimDOMOptions:Zr,iframeManager:Hr,stylesheetManager:Br,canvasManager:je,keepIframeSrcFn:xr},mirror:qe});Pe=function(){let Or=arguments.length>0&&arguments[0]!==void 0&&arguments[0];var zr,Aa,Vr,Qr,Ur,Er;He(Qe({type:Q.Meta,data:{href:window.location.href,width:B(),height:Z()}}),Or),Br.reset(),ae.forEach(Gr=>Gr.lock());const qr=function(Gr,Yr){var Wr=Yr||{},Pa=Wr.mirror,Na=Pa===void 0?new s:Pa,Ma=Wr.blockClass,Za=Ma===void 0?"rr-block":Ma,$a=Wr.blockSelector,Ra=$a===void 0?null:$a,La=Wr.maskTextClass,Da=La===void 0?"rr-mask":La,ja=Wr.maskTextSelector,za=ja===void 0?null:ja,Ua=Wr.inlineStylesheet,ao=Ua===void 0||Ua,Wa=Wr.inlineImages,oo=Wa!==void 0&&Wa,Ga=Wr.recordCanvas,so=Ga!==void 0&&Ga,Ka=Wr.maskAllInputs,Va=Ka!==void 0&&Ka,io=Wr.maskTextFn,co=Wr.maskInputFn,Ya=Wr.slimDOM,Ba=Ya!==void 0&&Ya,lo=Wr.dataURLOptions,uo=Wr.preserveWhiteSpace,po=Wr.onSerialize,ho=Wr.onIframeLoad,fo=Wr.iframeLoadTimeout,mo=Wr.onStylesheetLoad,go=Wr.stylesheetLoadTimeout,Qa=Wr.keepIframeSrcFn;return O(Gr,{doc:Gr,mirror:Na,blockClass:Za,blockSelector:Ra,maskTextClass:Da,maskTextSelector:za,skipChild:!1,inlineStylesheet:ao,maskInputOptions:Va===!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}:Va===!1?{password:!0}:Va,maskTextFn:io,maskInputFn:co,slimDOMOptions:Ba===!0||Ba==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:Ba==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:Ba===!1?{}:Ba,dataURLOptions:lo,inlineImages:oo,recordCanvas:so,preserveWhiteSpace:uo,onSerialize:po,onIframeLoad:ho,iframeLoadTimeout:fo,onStylesheetLoad:mo,stylesheetLoadTimeout:go,keepIframeSrcFn:Qa===void 0?function(){return!1}:Qa,newlyAddedElement:!1})}(document,{mirror:qe,blockClass:ar,blockSelector:sr,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:lr,maskAllInputs:Ar,maskTextFn:mr,slimDOM:Zr,dataURLOptions:Ir,recordCanvas:Rr,inlineImages:wr,onSerialize:Gr=>{Y(Gr,qe)&&Hr.addIframe(Gr),_(Gr,qe)&&Br.trackLinkElement(Gr),J(Gr)&&Nr.addShadowRoot(Gr.shadowRoot,document)},onIframeLoad:(Gr,Yr)=>{Hr.attachIframe(Gr,Yr),Nr.observeAttachShadow(Gr)},onStylesheetLoad:(Gr,Yr)=>{Br.attachLinkElement(Gr,Yr)},keepIframeSrcFn:xr});if(!qr)return console.warn("Failed to snapshot the document");He(Qe({type:Q.FullSnapshot,data:{node:qr,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:(document==null?void 0:document.documentElement.scrollLeft)||((Aa=(zr=document==null?void 0:document.body)===null||zr===void 0?void 0:zr.parentElement)===null||Aa===void 0?void 0:Aa.scrollLeft)||((Vr=document==null?void 0:document.body)===null||Vr===void 0?void 0:Vr.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:(document==null?void 0:document.documentElement.scrollTop)||((Ur=(Qr=document==null?void 0:document.body)===null||Qr===void 0?void 0:Qr.parentElement)===null||Ur===void 0?void 0:Ur.scrollTop)||((Er=document==null?void 0:document.body)===null||Er===void 0?void 0:Er.scrollTop)||0}}})),ae.forEach(Gr=>Gr.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Br.adoptStyleSheets(document.adoptedStyleSheets,qe.getId(document))};try{const Or=[];Or.push(E("DOMContentLoaded",()=>{He(Qe({type:Q.DomContentLoaded,data:{}}))}));const zr=Vr=>{var Qr;return Se({mutationCb:Kr,mousemoveCb:(Ur,Er)=>He(Qe({type:Q.IncrementalSnapshot,data:{source:Er,positions:Ur}})),mouseInteractionCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.MouseInteraction},Ur)})),scrollCb:Xr,viewportResizeCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.ViewportResize},Ur)})),inputCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Input},Ur)})),mediaInteractionCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.MediaInteraction},Ur)})),styleSheetRuleCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.StyleSheetRule},Ur)})),styleDeclarationCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.StyleDeclaration},Ur)})),canvasMutationCb:Jr,fontCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Font},Ur)})),selectionCb:Ur=>{He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Selection},Ur)}))},blockClass:ar,ignoreClass:ir,maskTextClass:or,maskTextSelector:cr,maskInputOptions:Ar,inlineStylesheet:lr,sampling:yr,recordCanvas:Rr,inlineImages:wr,userTriggeredOnInput:_r,collectFonts:kr,doc:Vr,maskInputFn:fr,maskTextFn:mr,keepIframeSrcFn:xr,blockSelector:sr,slimDOMOptions:Zr,dataURLOptions:Ir,mirror:qe,iframeManager:Hr,stylesheetManager:Br,shadowDomManager:Nr,canvasManager:je,ignoreCSSAttributes:Sr,plugins:((Qr=Lr==null?void 0:Lr.filter(Ur=>Ur.observer))===null||Qr===void 0?void 0:Qr.map(Ur=>({observer:Ur.observer,options:Ur.options,callback:Er=>He(Qe({type:Q.Plugin,data:{plugin:Ur.name,payload:Er}}))})))||[]},gr)};Hr.addLoadListener(Vr=>{Or.push(zr(Vr.contentDocument))});const Aa=()=>{Pe(),Or.push(zr(document)),Xe=!0};return document.readyState==="interactive"||document.readyState==="complete"?Aa():Or.push(E("load",()=>{He(Qe({type:Q.Load,data:{}})),Aa()},window)),()=>{Or.forEach(Vr=>Vr()),Xe=!1}}catch(Or){console.warn(Or)}}$e.addCustomEvent=(tr,er)=>{if(!Xe)throw new Error("please add custom event after start recording");He(Qe({type:Q.Custom,data:{tag:tr,payload:er}}))},$e.freezePage=()=>{ae.forEach(tr=>tr.freeze())},$e.takeFullSnapshot=tr=>{if(!Xe)throw new Error("please take full snapshot after start recording");Pe(tr)},$e.mirror=qe;const et=ur({},console),tt=["log","info","error","warn","debug"].reduce((tr,er)=>(tr[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];console[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr.unproxy[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];et[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr),{unproxy:{}});class nt{constructor(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t(this,"name","RRWebPlugin"),t(this,"stopListener",null),this.options=er}onInit(er){let{socketStore:rr}=er;if(typeof window!="object"||typeof document!="object"||Object.prototype.toString.call(document)!=="[object HTMLDocument]")return void tt.warn("".concat(this.name," can only used in browser environment"));if(!MutationObserver)return void tt.warn("".concat(this.name," built on the MutationObserver API and it's not detected in the current browser"));if(nt.hasInited)return;nt.hasInited=!0;const ir=this.options,{allowOnline:nr=!1}=ir,ar=to(ir,["allowOnline"]),sr=$e(br(ur({},ar),{emit(or){const cr=function(lr,dr){return{role:"client",type:lr,data:ur(ur({},(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])&&{id:Math.random().toString(36).slice(2)}),dr)}}("rrweb-event",or);rr.dispatchEvent("public-data",cr)}}));rr.addListener("harbor-clear",()=>{$e.takeFullSnapshot()}),sr&&(this.stopListener=sr)}onReset(){var er;(er=this.stopListener)===null||er===void 0||er.call(this),nt.hasInited=!1}}t(nt,"hasInited",!1);const useStyles=client.createStyles(({css:tr})=>({container:tr`
|
|
926
913
|
position: relative;
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "1.
|
|
3
|
-
"@ant-design/icons": "
|
|
2
|
+
"@tachybase/client": "1.6.1",
|
|
3
|
+
"@ant-design/icons": "6.1.0",
|
|
4
4
|
"antd": "5.22.5",
|
|
5
|
-
"@tachybase/schema": "1.
|
|
5
|
+
"@tachybase/schema": "1.6.0-alpha.9",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
7
|
"react": "18.3.1",
|
|
8
8
|
"react-dom": "18.3.1",
|
|
9
|
-
"@tego/server": "1.
|
|
9
|
+
"@tego/server": "1.6.0-alpha.9"
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-pagespy",
|
|
3
3
|
"displayName": "PageSpy",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"description": "PageSpy plugin for low-code platform, capturing user behavior and analytics",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Others"
|
|
8
8
|
],
|
|
9
9
|
"main": "dist/server/index.js",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@ant-design/icons": "^
|
|
11
|
+
"@ant-design/icons": "^6.1.0",
|
|
12
12
|
"@huolala-tech/page-spy-browser": "^2.2.5",
|
|
13
13
|
"@huolala-tech/page-spy-plugin-data-harbor": "^2.2.5",
|
|
14
14
|
"@huolala-tech/page-spy-plugin-rrweb": "^2.2.3",
|
|
15
|
-
"@tachybase/schema": "1.
|
|
16
|
-
"@tachybase/test": "1.
|
|
17
|
-
"@tego/client": "1.
|
|
18
|
-
"@tego/server": "1.
|
|
15
|
+
"@tachybase/schema": "1.6.0-alpha.9",
|
|
16
|
+
"@tachybase/test": "1.6.0-alpha.9",
|
|
17
|
+
"@tego/client": "1.6.0-alpha.9",
|
|
18
|
+
"@tego/server": "1.6.0-alpha.9",
|
|
19
19
|
"antd": "5.22.5",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
|
-
"@tachybase/client": "1.
|
|
21
|
+
"@tachybase/client": "1.6.1"
|
|
22
22
|
},
|
|
23
23
|
"description.zh-CN": "PageSpy 插件, 方便前端测试和记录",
|
|
24
24
|
"displayName.zh-CN": "页面监控"
|