@posthog/rrweb-snapshot 0.0.52 → 0.0.54
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/css.d.cts +5 -0
- package/dist/css.d.ts +5 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/rebuild.d.cts +23 -0
- package/dist/rebuild.d.ts +23 -0
- package/dist/record.cjs +1013 -14
- package/dist/record.cjs.map +1 -1
- package/dist/record.d.cts +5 -273
- package/dist/record.d.ts +5 -273
- package/dist/record.js +1029 -29
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +967 -985
- package/dist/record.umd.cjs.map +3 -3
- package/dist/record.umd.min.cjs +1 -1
- package/dist/record.umd.min.cjs.map +4 -4
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.cts +5 -219
- package/dist/replay.d.ts +5 -219
- package/dist/replay.js +2 -2
- package/dist/replay.umd.cjs +13 -10
- package/dist/replay.umd.cjs.map +2 -2
- package/dist/replay.umd.min.cjs +19 -19
- package/dist/replay.umd.min.cjs.map +2 -2
- package/dist/rrweb-snapshot.cjs +2 -2
- package/dist/rrweb-snapshot.d.cts +1 -299
- package/dist/rrweb-snapshot.d.ts +1 -299
- package/dist/rrweb-snapshot.js +26 -26
- package/dist/rrweb-snapshot.umd.cjs +41 -16
- package/dist/rrweb-snapshot.umd.cjs.map +2 -2
- package/dist/rrweb-snapshot.umd.min.cjs +11 -11
- package/dist/rrweb-snapshot.umd.min.cjs.map +2 -2
- package/dist/snapshot.d.cts +71 -0
- package/dist/snapshot.d.ts +71 -0
- package/dist/{types-B7TTv7Jc.cjs → types-BjupQhwp.cjs} +10 -7
- package/dist/types-BjupQhwp.cjs.map +1 -0
- package/dist/{types-B7TTv7Jc.umd.cjs → types-BjupQhwp.umd.cjs} +11 -8
- package/dist/types-BjupQhwp.umd.cjs.map +7 -0
- package/dist/types-BjupQhwp.umd.min.cjs +20 -0
- package/dist/types-BjupQhwp.umd.min.cjs.map +7 -0
- package/dist/{types-OLXvwyjP.js → types-D1TQIdgp.js} +10 -7
- package/dist/types-D1TQIdgp.js.map +1 -0
- package/dist/types.d.cts +103 -0
- package/dist/types.d.ts +103 -0
- package/dist/utils.d.cts +51 -0
- package/dist/utils.d.ts +51 -0
- package/package.json +3 -3
- package/dist/record-BUfdSR_C.cjs +0 -1015
- package/dist/record-BUfdSR_C.cjs.map +0 -1
- package/dist/record-BUfdSR_C.umd.cjs +0 -1590
- package/dist/record-BUfdSR_C.umd.cjs.map +0 -7
- package/dist/record-BUfdSR_C.umd.min.cjs +0 -20
- package/dist/record-BUfdSR_C.umd.min.cjs.map +0 -7
- package/dist/record-CbT7EKn4.js +0 -1016
- package/dist/record-CbT7EKn4.js.map +0 -1
- package/dist/types-B7TTv7Jc.cjs.map +0 -1
- package/dist/types-B7TTv7Jc.umd.cjs.map +0 -7
- package/dist/types-B7TTv7Jc.umd.min.cjs +0 -20
- package/dist/types-B7TTv7Jc.umd.min.cjs.map +0 -7
- package/dist/types-OLXvwyjP.js.map +0 -1
package/dist/record.umd.min.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebSnapshotRecord", [], f);} else if ("object" == typeof exports) {exports["rrwebSnapshotRecord"] = f();} else {g["rrwebSnapshotRecord"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var oe=le(y=>{"use strict";var Le=Object.defineProperty,$e=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ce=(e,t,r)=>$e(e,typeof t!="symbol"?t+"":t,r),$=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{}),ue={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},de={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},G={};function Oe(e){var t,r;let o=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function te(e){if(G[e])return G[e];let t=Oe(e)||globalThis[e],r=t.prototype,o=e in ue?ue[e]:void 0,i=!!(o&&o.every(u=>{var l,f;return!!((f=(l=Object.getOwnPropertyDescriptor(r,u))==null?void 0:l.get)!=null&&f.toString().includes("[native code]"))})),n=e in de?de[e]:void 0,c=!!(n&&n.every(u=>{var l;return typeof r[u]=="function"&&((l=r[u])==null?void 0:l.toString().includes("[native code]"))}));if(i&&c)return G[e]=t.prototype,t.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let l=u.contentWindow;if(!l)return t.prototype;let f=l[e].prototype;return document.body.removeChild(u),f?G[e]=f:r}catch(u){return r}}var K={};function O(e,t,r){var o;let i=`${e}.${String(r)}`;if(K[i])return K[i].call(t);let n=te(e),c=(o=Object.getOwnPropertyDescriptor(n,r))==null?void 0:o.get;return c?(K[i]=c,c.call(t)):t[r]}var Q={};function pe(e,t,r){let o=`${e}.${String(r)}`;if(Q[o])return Q[o].bind(t);let n=te(e)[r];return typeof n!="function"?t[r]:(Q[o]=n,n.bind(t))}function Pe(e){return O("Node",e,"childNodes")}function Be(e){return O("Node",e,"parentNode")}function We(e){return O("Node",e,"parentElement")}function Fe(e){return O("Node",e,"textContent")}function ze(e,t){return pe("Node",e,"contains")(t)}function Ue(e){return pe("Node",e,"getRootNode")()}function He(e){return!e||!("host"in e)?null:O("ShadowRoot",e,"host")}function Ze(e){return e.styleSheets}function Ge(e){return!e||!("shadowRoot"in e)?null:O("Element",e,"shadowRoot")}function je(e,t){return O("Element",e,"querySelector")(t)}function Ve(e,t){return O("Element",e,"querySelectorAll")(t)}function qe(){return te("MutationObserver").constructor}function Xe(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}var j={childNodes:Pe,parentNode:Be,parentElement:We,textContent:Fe,contains:ze,getRootNode:Ue,host:He,styleSheets:Ze,shadowRoot:Ge,querySelector:je,querySelectorAll:Ve,mutationObserver:qe,patch:Xe};function me(e){return e.nodeType===e.ELEMENT_NODE}function Ye(e){let t=e&&"host"in e&&"mode"in e&&j.host(e)||null;return!!(t&&"shadowRoot"in t&&j.shadowRoot(t)===e)}function Je(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ke(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ge(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function ye(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>Se(i,r)).join("");return Ke(o)}catch(t){return null}}function Se(e,t){var r;if(xe(e)){let o;try{o=ye(e.styleSheet)||ge(e)}catch(i){o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return ee(o,e.styleSheet.href)}catch(i){}return o}else{let o=e.cssText;return Ie(e)&&e.selectorText.includes(":")&&(o=Ne(o)),t?ee(o,t):o}}function Ne(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function xe(e){return"styleSheet"in e}function Ie(e){return"selectorText"in e}var V=class{constructor(){ce(this,"idNodeMap",new Map),ce(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let o=(r=this.getMeta(t))==null?void 0:r.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);if(this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o)),me(t)){let o=j.shadowRoot(t);o&&this.removeNodeFromMap(o),t.nodeName==="IFRAME"&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Qe(){return new V}function et({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:n}){let c=i||"",u=o&&re(o);return(t[r.toLowerCase()]||u&&t[u])&&(n?c=n(c,e):c="*".repeat(c.length)),c}function re(e){return e.toLowerCase()}var fe="__rrweb_original__";function tt(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let n=t.getImageData,c=fe in n?n[fe]:n;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function rt(e,t){return!e||!t||e.type!==t.type?!1:e.type===$.Document?e.compatMode===t.compatMode:e.type===$.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===$.Comment||e.type===$.Text||e.type===$.CDATA?e.textContent===t.textContent:e.type===$.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function ot(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?re(t):null}function it(e,t){var n;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return(n=i==null?void 0:i[1])!=null?n:null}function nt(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var at=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,st=/^(?:[a-z+]+:)?\/\//i,lt=/^www\..*/i,ct=/^(data:)([^,]*),(.*)/i;function ee(e,t){return(e||"").replace(at,(r,o,i,n,c,u)=>{let l=i||c||u,f=o||n||"";if(!l)return r;if(st.test(l)||lt.test(l))return`url(${f}${l}${f})`;if(ct.test(l))return`url(${f}${l}${f})`;if(l[0]==="/")return`url(${f}${nt(t)+l}${f})`;let h=t.split("/"),E=l.split("/");h.pop();for(let b of E)b!=="."&&(b===".."?h.pop():h.push(b));return`url(${f}${h.join("/")}${f})`})}var ut="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",he=4096;function dt(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>he||e.naturalHeight>he)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let n=i.getContext("2d");return n?(n.drawImage(e,0,0),i.toDataURL(r||"image/webp",o!=null?o:.4)):t}catch(i){return t}}function ft(e,t){return!t||e.length<=t?e:ut}var Ee=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ee||{});y.Mirror=V;y.NodeType=Ee;y.NodeType$1=$;y.absolutifyURLs=ee;y.checkDataURLSize=ft;y.createMirror=Qe;y.escapeImportStatement=ge;y.extractFileExtension=it;y.fixSafariColons=Ne;y.getInputType=ot;y.index=j;y.is2DCanvasBlank=tt;y.isCSSImportRule=xe;y.isCSSStyleRule=Ie;y.isElement=me;y.isNativeShadowDom=Je;y.isNodeMetaEqual=rt;y.isShadowRoot=Ye;y.maskInputValue=et;y.recompressBase64Image=dt;y.stringifyRule=Se;y.stringifyStylesheet=ye;y.toLowerCase=re});var ke=le(I=>{"use strict";var a=oe(),Me=1,ht=new RegExp("[^a-z0-9-_:]"),ie=-2;function ve(){return Me++}function pt(e){if(e instanceof HTMLFormElement)return"form";let t=a.toLowerCase(e.tagName);return ht.test(t)?"div":t}var F,be,mt=/^[^ \t\n\r\u000c]+/,gt=/^[, \t\n\r\u000c]+/;function yt(e,t){if(t.trim()==="")return t;let r=0;function o(n){let c,u=n.exec(t.substring(r));return u?(c=u[0],r+=c.length,c):""}let i=[];for(;o(gt),!(r>=t.length);){let n=o(mt);if(n.slice(-1)===",")n=z(e,n.substring(0,n.length-1)),i.push(n);else{let c="";n=z(e,n);let u=!1;for(;;){let l=t.charAt(r);if(l===""){i.push((n+c).trim());break}else if(u)l===")"&&(u=!1);else if(l===","){r+=1,i.push((n+c).trim());break}else l==="("&&(u=!0);c+=l,r+=1}}}return i.join(", ")}var we=new WeakMap;function z(e,t){return!t||t.trim()===""?t:ae(e,t)}function St(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ae(e,t){let r=we.get(e);if(r||(r=e.createElement("a"),we.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function _e(e,t,r,o,i,n){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=z(e,o);if(t==="img"&&c.startsWith("data:")&&i){let u=i,l=c;return(n!=null&&n.type||(n==null?void 0:n.quality)!==void 0)&&(l=a.recompressBase64Image(u,c,n.type,n.quality)),n!=null&&n.maxBase64ImageLength&&(l=a.checkDataURLSize(l,n.maxBase64ImageLength)),l}return c}else{if(r==="xlink:href"&&o[0]!=="#")return z(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return z(e,o);if(r==="srcset")return yt(e,o);if(r==="style")return a.absolutifyURLs(o,ae(e));if(t==="object"&&r==="data")return z(e,o)}return o}function De(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Nt(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch(o){}return!1}function q(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?q(a.index.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?q(a.index.parentNode(e),t,r):!1}function Te(e,t,r,o){let i;if(a.isElement(e)){if(i=e,!a.index.childNodes(i).length)return!1}else{if(a.index.parentElement(e)===null)return!1;i=a.index.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(q(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(n){}return!1}function xt(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,n;try{n=o.document.readyState}catch(u){return}if(n!=="complete"){let u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function It(e,t,r){let o=!1,i;try{i=e.sheet}catch(c){return}if(i)return;let n=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),o=!0,t()})}function Et(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:n,needsMask:c,inlineStylesheet:u,maskInputOptions:l={},maskTextFn:f,maskInputFn:h,dataURLOptions:E={},inlineImages:b,recordCanvas:_,keepIframeSrcFn:D,newlyAddedElement:T=!1}=t,x=bt(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:a.NodeType$1.Document,childNodes:[],compatMode:e.compatMode}:{type:a.NodeType$1.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:a.NodeType$1.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return Mt(e,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:u,maskInputOptions:l,maskInputFn:h,dataURLOptions:E,inlineImages:b,recordCanvas:_,keepIframeSrcFn:D,newlyAddedElement:T,rootId:x});case e.TEXT_NODE:return wt(e,{doc:r,needsMask:c,maskTextFn:f,rootId:x});case e.CDATA_SECTION_NODE:return{type:a.NodeType$1.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:a.NodeType$1.Comment,textContent:a.index.textContent(e)||"",rootId:x};default:return!1}}function bt(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function wt(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:n}=t,c=a.index.parentNode(e),u=c&&c.tagName,l=a.index.textContent(e),f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0;if(f&&l){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(l=a.stringifyStylesheet(c.sheet))}catch(E){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${E}`,e)}l=a.absolutifyURLs(l,ae(t.doc))}return h&&(l="SCRIPT_PLACEHOLDER"),!f&&!h&&l&&o&&(l=i?i(l,a.index.parentElement(e)):l.replace(/[\S]/g,"*")),{type:a.NodeType$1.Text,textContent:l||"",isStyle:f,rootId:n}}function Ce(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function Ct(e){return e.href}function Mt(e,t){var r,o;let{doc:i,blockClass:n,blockSelector:c,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:f,dataURLOptions:h={},inlineImages:E,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:D=!1,rootId:T}=t,x=Nt(e,n,c),m=pt(e),d={},L=e.attributes.length;for(let s=0;s<L;s++){let p=e.attributes[s];De(m,p.name,p.value)||(d[p.name]=_e(i,m,a.toLowerCase(p.name),p.value,e,h))}if(m==="link"&&u){let s=Ct(e);if(s){let p=Ce(i,s);if(!p&&s.includes(".css")){let N=window.location.origin,A=s.replace(window.location.href,""),k=N+"/"+A;p=Ce(i,k)}let w=null;p&&(w=a.stringifyStylesheet(p)),w&&(delete d.rel,delete d.href,d._cssText=w)}}if(m==="style"&&e.sheet&&!(e.innerText||a.index.textContent(e)||"").trim().length){let s=a.stringifyStylesheet(e.sheet);s&&(d._cssText=s)}if(m==="input"||m==="textarea"||m==="select"){let s=e.value,p=e.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&s?d.value=a.maskInputValue({element:e,type:a.getInputType(e),tagName:m,value:s,maskInputOptions:l,maskInputFn:f}):p&&(d.checked=p)}if(m==="option"&&(e.selected&&!l.select?d.selected=!0:delete d.selected),m==="dialog"&&e.open)try{d.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(s){d.rr_open_mode="modal",d.ph_rr_could_not_detect_modal=!0}if(m==="canvas"&&b){if(e.__context==="2d")a.is2DCanvasBlank(e)||(d.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let s=e.toDataURL(h.type,h.quality),p=i.createElement("canvas");p.width=e.width,p.height=e.height;let w=p.toDataURL(h.type,h.quality);s!==w&&(d.rr_dataURL=s)}}if(m==="img"&&E){F||(F=i.createElement("canvas"),be=F.getContext("2d"));let s=e,p=s.currentSrc||s.getAttribute("src")||"<unknown-src>",w=s.crossOrigin,N=()=>{s.removeEventListener("load",N);try{F.width=s.naturalWidth,F.height=s.naturalHeight,be.drawImage(s,0,0),d.rr_dataURL=F.toDataURL(h.type,h.quality)}catch(A){if(s.crossOrigin!=="anonymous"){s.crossOrigin="anonymous",s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${p}! Error: ${A}`)}s.crossOrigin==="anonymous"&&(w?d.crossOrigin=w:s.removeAttribute("crossorigin"))};s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N)}if(m==="audio"||m==="video"){let s=d;s.rr_mediaState=e.paused?"paused":"played",s.rr_mediaCurrentTime=e.currentTime,s.rr_mediaPlaybackRate=e.playbackRate,s.rr_mediaMuted=e.muted,s.rr_mediaLoop=e.loop,s.rr_mediaVolume=e.volume}if(D||(e.scrollLeft&&(d.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(d.rr_scrollTop=e.scrollTop)),x){let{width:s,height:p,left:w,top:N}=e.getBoundingClientRect();d={class:d.class,rr_width:`${s}px`,rr_height:`${p}px`,rr_left:`${Math.floor(w+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(N+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}m==="iframe"&&!_(d.src)&&(e.contentDocument||(d.rr_src=d.src),delete d.src);let R;try{customElements.get(m)&&(R=!0)}catch(s){}return{type:a.NodeType$1.Element,tagName:m,attributes:d,childNodes:[],isSVG:St(e)||void 0,needBlock:x,rootId:T,isCustom:R}}function M(e){return e==null?"":e.toLowerCase()}function vt(e,t){if(t.comment&&e.type===a.NodeType$1.Comment)return!0;if(e.type===a.NodeType$1.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&a.extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(M(e.attributes.name).match(/^msapplication-tile(image|color)$/)||M(e.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(M(e.attributes.rel)))))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&M(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(M(e.attributes.property).match(/^(og|twitter|fb):/)||M(e.attributes.name).match(/^(og|twitter):/)||M(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(M(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(M(e.attributes.name))||M(e.attributes.property).match(/^article:/)||M(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(M(e.attributes.name)))return!0}}return!1}var Re=50,ne=!1,se=!1;function _t(){return se}function Dt(){se=!1,ne=!1}function U(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:u,skipChild:l=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:E,maskInputFn:b,slimDOMOptions:_,dataURLOptions:D={},inlineImages:T=!1,recordCanvas:x=!1,onSerialize:m,onIframeLoad:d,iframeLoadTimeout:L=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:s=5e3,keepIframeSrcFn:p=()=>!1,newlyAddedElement:w=!1,depth:N=0,maxDepth:A=Re}=t,{needsMask:k}=t,{preserveWhiteSpace:H=!0}=t;if(N>=A)return se=!0,ne||(ne=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${A}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;k||(k=Te(e,c,u,k===void 0));let P=Et(e,{doc:r,mirror:o,blockClass:i,blockSelector:n,needsMask:k,inlineStylesheet:f,maskInputOptions:h,maskTextFn:E,maskInputFn:b,dataURLOptions:D,inlineImages:T,recordCanvas:x,keepIframeSrcFn:p,newlyAddedElement:w});if(!P)return console.warn(e,"not serialized"),null;let Z;o.hasNode(e)?Z=o.getId(e):vt(P,_)||!H&&P.type===a.NodeType$1.Text&&!P.isStyle&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?Z=ie:Z=ve();let g=Object.assign(P,{id:Z});if(o.add(e,g),Z===ie)return null;m&&m(e);let X=!l;if(g.type===a.NodeType$1.Element){X=X&&!g.needBlock,delete g.needBlock;let C=a.index.shadowRoot(e);C&&a.isNativeShadowDom(C)&&(g.isShadowHost=!0)}if((g.type===a.NodeType$1.Document||g.type===a.NodeType$1.Element)&&X){_.headWhitespace&&g.type===a.NodeType$1.Element&&g.tagName==="head"&&(H=!1);let C={doc:r,mirror:o,blockClass:i,blockSelector:n,needsMask:k,maskTextClass:c,maskTextSelector:u,skipChild:l,inlineStylesheet:f,maskInputOptions:h,maskTextFn:E,maskInputFn:b,slimDOMOptions:_,dataURLOptions:D,inlineImages:T,recordCanvas:x,preserveWhiteSpace:H,onSerialize:m,onIframeLoad:d,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:N+1,maxDepth:A};if(!(g.type===a.NodeType$1.Element&&g.tagName==="textarea"&&g.attributes.value!==void 0))for(let J of Array.from(a.index.childNodes(e))){let W=U(J,C);W&&g.childNodes.push(W)}let B=null;if(a.isElement(e)&&(B=a.index.shadowRoot(e)))for(let J of Array.from(a.index.childNodes(B))){let W=U(J,C);W&&(a.isNativeShadowDom(B)&&(W.isShadow=!0),g.childNodes.push(W))}}let Y=a.index.parentNode(e);return Y&&a.isShadowRoot(Y)&&a.isNativeShadowDom(Y)&&(g.isShadow=!0),g.type===a.NodeType$1.Element&&g.tagName==="iframe"&&xt(e,()=>{let C=e.contentDocument;if(C&&d){let B=U(C,{doc:C,mirror:o,blockClass:i,blockSelector:n,needsMask:k,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:E,maskInputFn:b,slimDOMOptions:_,dataURLOptions:D,inlineImages:T,recordCanvas:x,preserveWhiteSpace:H,onSerialize:m,onIframeLoad:d,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:N+1,maxDepth:A});B&&d(e,B)}},L),g.type===a.NodeType$1.Element&&g.tagName==="link"&&typeof g.attributes.rel=="string"&&(g.attributes.rel==="stylesheet"||g.attributes.rel==="preload"&&typeof g.attributes.href=="string"&&a.extractFileExtension(g.attributes.href)==="css")&&It(e,()=>{if(R){let C=U(e,{doc:r,mirror:o,blockClass:i,blockSelector:n,needsMask:k,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:E,maskInputFn:b,slimDOMOptions:_,dataURLOptions:D,inlineImages:T,recordCanvas:x,preserveWhiteSpace:H,onSerialize:m,onIframeLoad:d,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:N,maxDepth:A});C&&R(e,C)}},s),g}function Ae(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e===!1?{}:e}function Tt(e,t){let{mirror:r=new a.Mirror,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,inlineImages:l=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:E,maskInputFn:b,slimDOM:_=!1,dataURLOptions:D,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:m,iframeLoadTimeout:d,onStylesheetLoad:L,stylesheetLoadTimeout:R,keepIframeSrcFn:s=()=>!1,maxDepth:p}=t||{},w=h===!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}:h===!1?{password:!0}:h,N=Ae(_);return U(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:n,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:w,maskTextFn:E,maskInputFn:b,slimDOMOptions:N,dataURLOptions:D,inlineImages:l,recordCanvas:f,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:m,iframeLoadTimeout:d,onStylesheetLoad:L,stylesheetLoadTimeout:R,keepIframeSrcFn:s,newlyAddedElement:!1,maxDepth:p})}function Rt(e,t){function r(o){t(o),(o.type===a.NodeType$1.Document||o.type===a.NodeType$1.Element)&&o.childNodes.forEach(r)}r(e)}function At(){Me=1}I.DEFAULT_MAX_DEPTH=Re;I.IGNORED_NODE=ie;I.classMatchesRegex=q;I.cleanupSnapshot=At;I.genId=ve;I.ignoreAttribute=De;I.needMaskingText=Te;I.resetMaxDepthState=Dt;I.serializeNodeWithId=U;I.slimDOMDefaults=Ae;I.snapshot=Tt;I.transformAttribute=_e;I.visitSnapshot=Rt;I.wasMaxDepthReached=_t});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var v=ke(),S=oe();exports.DEFAULT_MAX_DEPTH=v.DEFAULT_MAX_DEPTH;exports.IGNORED_NODE=v.IGNORED_NODE;exports.classMatchesRegex=v.classMatchesRegex;exports.cleanupSnapshot=v.cleanupSnapshot;exports.genId=v.genId;exports.ignoreAttribute=v.ignoreAttribute;exports.needMaskingText=v.needMaskingText;exports.serializeNodeWithId=v.serializeNodeWithId;exports.snapshot=v.snapshot;exports.transformAttribute=v.transformAttribute;exports.visitSnapshot=v.visitSnapshot;exports.wasMaxDepthReached=v.wasMaxDepthReached;exports.Mirror=S.Mirror;exports.NodeType=S.NodeType;exports.absolutifyURLs=S.absolutifyURLs;exports.checkDataURLSize=S.checkDataURLSize;exports.createMirror=S.createMirror;exports.escapeImportStatement=S.escapeImportStatement;exports.extractFileExtension=S.extractFileExtension;exports.fixSafariColons=S.fixSafariColons;exports.getInputType=S.getInputType;exports.is2DCanvasBlank=S.is2DCanvasBlank;exports.isCSSImportRule=S.isCSSImportRule;exports.isCSSStyleRule=S.isCSSStyleRule;exports.isElement=S.isElement;exports.isNativeShadowDom=S.isNativeShadowDom;exports.isNodeMetaEqual=S.isNodeMetaEqual;exports.isShadowRoot=S.isShadowRoot;exports.maskInputValue=S.maskInputValue;exports.recompressBase64Image=S.recompressBase64Image;exports.stringifyRule=S.stringifyRule;exports.stringifyStylesheet=S.stringifyStylesheet;exports.toLowerCase=S.toLowerCase;
|
|
2
|
+
"use strict";var Te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Se=Te(y=>{"use strict";var De=Object.defineProperty,Re=(e,t,r)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t,r)=>Re(e,typeof t!="symbol"?t+"":t,r),k=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(k||{}),ae={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},se={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},U={};function ke(e){var t,r;let o=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Q(e){if(U[e])return U[e];let t=ke(e)||globalThis[e],r=t.prototype,o=e in ae?ae[e]:void 0,i=!!(o&&o.every(l=>{var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(r,l))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),a=e in se?se[e]:void 0,c=!!(a&&a.every(l=>{var f;return typeof r[l]=="function"&&((f=r[l])==null?void 0:f.toString().includes("[native code]"))}));if(i&&c)return U[e]=t.prototype,t.prototype;let d=document.createElement("iframe");try{document.body.appendChild(d);let l=d.contentWindow;if(!l)return t.prototype;let f=l[e].prototype;return f?U[e]=f:r}catch(l){return r}finally{d.parentNode&&document.body.removeChild(d)}}var Y={};function P(e,t,r){var o;let i=`${e}.${String(r)}`;if(Y[i])return Y[i].call(t);let a=Q(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(Y[i]=c,c.call(t)):t[r]}var J={};function j(e,t,r){let o=`${e}.${String(r)}`;if(J[o])return J[o].bind(t);let a=Q(e)[r];return typeof a!="function"?t[r]:(J[o]=a,a.bind(t))}function Ae(e){return P("Node",e,"childNodes")}function Le(e){return P("Node",e,"parentNode")}function $e(e){return P("Node",e,"parentElement")}function Pe(e){return P("Node",e,"textContent")}function Oe(e,t){return j("Node",e,"contains")(t)}function Be(e){return j("Node",e,"getRootNode")()}function We(e){return!e||!("host"in e)?null:P("ShadowRoot",e,"host")}function Fe(e){return e.styleSheets}function ze(e){return!e||!("shadowRoot"in e)?null:P("Element",e,"shadowRoot")}function Ue(e,t){return j("Element",e,"querySelector")(t)}function He(e,t){return j("Element",e,"querySelectorAll")(t)}function Ze(){return Q("MutationObserver").constructor}function je(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}var H={childNodes:Ae,parentNode:Le,parentElement:$e,textContent:Pe,contains:Oe,getRootNode:Be,host:We,styleSheets:Fe,shadowRoot:ze,querySelector:Ue,querySelectorAll:He,mutationObserver:Ze,patch:je};function ue(e){return e.nodeType===e.ELEMENT_NODE}function Ve(e){let t=e&&"host"in e&&"mode"in e&&H.host(e)||null;return!!(t&&"shadowRoot"in t&&H.shadowRoot(t)===e)}function Ge(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function qe(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function de(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function fe(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>he(i,r)).join("");return qe(o)}catch(t){return null}}function he(e,t){var r;if(me(e)){let o;try{o=fe(e.styleSheet)||de(e)}catch(i){o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return K(o,e.styleSheet.href)}catch(i){}return o}else{let o=e.cssText;return ge(e)&&e.selectorText.includes(":")&&(o=pe(o)),t?K(o,t):o}}function pe(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function me(e){return"styleSheet"in e}function ge(e){return"selectorText"in e}var Z=class{constructor(){ne(this,"idNodeMap",new Map),ne(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let o=(r=this.getMeta(t))==null?void 0:r.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);if(this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o)),ue(t)){let o=H.shadowRoot(t);o&&this.removeNodeFromMap(o),t.nodeName==="IFRAME"&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xe(){return new Z}function Ye({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:a}){let c=i||"",d=o&&ee(o);return(t[r.toLowerCase()]||d&&t[d])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function ee(e){return e.toLowerCase()}var le="__rrweb_original__";function Je(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let a=t.getImageData,c=le in a?a[le]:a;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Ke(e,t){return!e||!t||e.type!==t.type?!1:e.type===k.Document?e.compatMode===t.compatMode:e.type===k.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===k.Comment||e.type===k.Text||e.type===k.CDATA?e.textContent===t.textContent:e.type===k.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Qe(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ee(t):null}function et(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return(a=i==null?void 0:i[1])!=null?a:null}function tt(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var rt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ot=/^(?:[a-z+]+:)?\/\//i,it=/^www\..*/i,nt=/^(data:)([^,]*),(.*)/i;function K(e,t){return(e||"").replace(rt,(r,o,i,a,c,d)=>{let l=i||c||d,f=o||a||"";if(!l)return r;if(ot.test(l)||it.test(l))return`url(${f}${l}${f})`;if(nt.test(l))return`url(${f}${l}${f})`;if(l[0]==="/")return`url(${f}${tt(t)+l}${f})`;let h=t.split("/"),x=l.split("/");h.pop();for(let I of x)I!=="."&&(I===".."?h.pop():h.push(I));return`url(${f}${h.join("/")}${f})`})}var at="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ce=4096;function st(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ce||e.naturalHeight>ce)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let a=i.getContext("2d");return a?(a.drawImage(e,0,0),i.toDataURL(r||"image/webp",o!=null?o:.4)):t}catch(i){return t}}function lt(e,t){return!t||e.length<=t?e:at}var ye=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ye||{});y.Mirror=Z;y.NodeType=ye;y.NodeType$1=k;y.absolutifyURLs=K;y.checkDataURLSize=lt;y.createMirror=Xe;y.escapeImportStatement=de;y.extractFileExtension=et;y.fixSafariColons=pe;y.getInputType=Qe;y.index=H;y.is2DCanvasBlank=Je;y.isCSSImportRule=me;y.isCSSStyleRule=ge;y.isElement=ue;y.isNativeShadowDom=Ge;y.isNodeMetaEqual=Ke;y.isShadowRoot=Ve;y.maskInputValue=Ye;y.recompressBase64Image=st;y.stringifyRule=he;y.stringifyStylesheet=fe;y.toLowerCase=ee});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=Se(),we=1,ct=new RegExp("[^a-z0-9-_:]"),te=-2;function Ee(){return we++}function ut(e){if(e instanceof HTMLFormElement)return"form";let t=n.toLowerCase(e.tagName);return ct.test(t)?"div":t}var O,Ne,dt=/^[^ \t\n\r\u000c]+/,ft=/^[, \t\n\r\u000c]+/;function ht(e,t){if(t.trim()==="")return t;let r=0;function o(a){let c,d=a.exec(t.substring(r));return d?(c=d[0],r+=c.length,c):""}let i=[];for(;o(ft),!(r>=t.length);){let a=o(dt);if(a.slice(-1)===",")a=B(e,a.substring(0,a.length-1)),i.push(a);else{let c="";a=B(e,a);let d=!1;for(;;){let l=t.charAt(r);if(l===""){i.push((a+c).trim());break}else if(d)l===")"&&(d=!1);else if(l===","){r+=1,i.push((a+c).trim());break}else l==="("&&(d=!0);c+=l,r+=1}}}return i.join(", ")}var xe=new WeakMap;function B(e,t){return!t||t.trim()===""?t:oe(e,t)}function pt(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function oe(e,t){let r=xe.get(e);if(r||(r=e.createElement("a"),xe.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function be(e,t,r,o,i,a){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=B(e,o);if(t==="img"&&c.startsWith("data:")&&i){let d=i,l=c;return(a!=null&&a.type||(a==null?void 0:a.quality)!==void 0)&&(l=n.recompressBase64Image(d,c,a.type,a.quality)),a!=null&&a.maxBase64ImageLength&&(l=n.checkDataURLSize(l,a.maxBase64ImageLength)),l}return c}else{if(r==="xlink:href"&&o[0]!=="#")return B(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return B(e,o);if(r==="srcset")return ht(e,o);if(r==="style")return n.absolutifyURLs(o,oe(e));if(t==="object"&&r==="data")return B(e,o)}return o}function Ce(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function mt(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch(o){}return!1}function V(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?V(n.index.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?V(n.index.parentNode(e),t,r):!1}function Me(e,t,r,o){let i;if(n.isElement(e)){if(i=e,!n.index.childNodes(i).length)return!1}else{if(n.index.parentElement(e)===null)return!1;i=n.index.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(V(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function gt(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,a;try{a=o.document.readyState}catch(d){return}if(a!=="complete"){let d=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(d),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function yt(e,t,r){let o=!1,i;try{i=e.sheet}catch(c){return}if(i)return;let a=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()})}function St(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:c,inlineStylesheet:d,maskInputOptions:l={},maskTextFn:f,maskInputFn:h,dataURLOptions:x={},inlineImages:I,recordCanvas:C,keepIframeSrcFn:M,newlyAddedElement:v=!1}=t,N=Nt(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:n.NodeType$1.Document,childNodes:[],compatMode:e.compatMode}:{type:n.NodeType$1.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:n.NodeType$1.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:N};case e.ELEMENT_NODE:return wt(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:d,maskInputOptions:l,maskInputFn:h,dataURLOptions:x,inlineImages:I,recordCanvas:C,keepIframeSrcFn:M,newlyAddedElement:v,rootId:N});case e.TEXT_NODE:return xt(e,{doc:r,needsMask:c,maskTextFn:f,rootId:N});case e.CDATA_SECTION_NODE:return{type:n.NodeType$1.CDATA,textContent:"",rootId:N};case e.COMMENT_NODE:return{type:n.NodeType$1.Comment,textContent:n.index.textContent(e)||"",rootId:N};default:return!1}}function Nt(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function xt(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:a}=t,c=n.index.parentNode(e),d=c&&c.tagName,l=n.index.textContent(e),f=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0;if(f&&l){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(l=n.stringifyStylesheet(c.sheet))}catch(x){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${x}`,e)}l=n.absolutifyURLs(l,oe(t.doc))}return h&&(l="SCRIPT_PLACEHOLDER"),!f&&!h&&l&&o&&(l=i?i(l,n.index.parentElement(e)):l.replace(/[\S]/g,"*")),{type:n.NodeType$1.Text,textContent:l||"",isStyle:f,rootId:a}}function Ie(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function It(e){return e.href}function wt(e,t){var r,o;let{doc:i,blockClass:a,blockSelector:c,inlineStylesheet:d,maskInputOptions:l={},maskInputFn:f,dataURLOptions:h={},inlineImages:x,recordCanvas:I,keepIframeSrcFn:C,newlyAddedElement:M=!1,rootId:v}=t,N=mt(e,a,c),m=ut(e),u={},R=e.attributes.length;for(let s=0;s<R;s++){let p=e.attributes[s];Ce(m,p.name,p.value)||(u[p.name]=be(i,m,n.toLowerCase(p.name),p.value,e,h))}if(m==="link"&&d){let s=It(e);if(s){let p=Ie(i,s);if(!p&&s.includes(".css")){let S=window.location.origin,T=s.replace(window.location.href,""),D=S+"/"+T;p=Ie(i,D)}let w=null;p&&(w=n.stringifyStylesheet(p)),w&&(delete u.rel,delete u.href,u._cssText=w)}}if(m==="style"&&e.sheet&&!(e.innerText||n.index.textContent(e)||"").trim().length){let s=n.stringifyStylesheet(e.sheet);s&&(u._cssText=s)}if(m==="input"||m==="textarea"||m==="select"){let s=e.value,p=e.checked;u.type!=="radio"&&u.type!=="checkbox"&&u.type!=="submit"&&u.type!=="button"&&s?u.value=n.maskInputValue({element:e,type:n.getInputType(e),tagName:m,value:s,maskInputOptions:l,maskInputFn:f}):p&&(u.checked=p)}if(m==="option"&&(e.selected&&!l.select?u.selected=!0:delete u.selected),m==="dialog"&&e.open)try{u.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(s){u.rr_open_mode="modal",u.ph_rr_could_not_detect_modal=!0}if(m==="canvas"&&I){if(e.__context==="2d")n.is2DCanvasBlank(e)||(u.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let s=e.toDataURL(h.type,h.quality),p=i.createElement("canvas");p.width=e.width,p.height=e.height;let w=p.toDataURL(h.type,h.quality);s!==w&&(u.rr_dataURL=s)}}if(m==="img"&&x){O||(O=i.createElement("canvas"),Ne=O.getContext("2d"));let s=e,p=s.currentSrc||s.getAttribute("src")||"<unknown-src>",w=s.crossOrigin,S=()=>{s.removeEventListener("load",S);try{O.width=s.naturalWidth,O.height=s.naturalHeight,Ne.drawImage(s,0,0),u.rr_dataURL=O.toDataURL(h.type,h.quality)}catch(T){if(s.crossOrigin!=="anonymous"){s.crossOrigin="anonymous",s.complete&&s.naturalWidth!==0?S():s.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${p}! Error: ${T}`)}s.crossOrigin==="anonymous"&&(w?u.crossOrigin=w:s.removeAttribute("crossorigin"))};s.complete&&s.naturalWidth!==0?S():s.addEventListener("load",S)}if(m==="audio"||m==="video"){let s=u;s.rr_mediaState=e.paused?"paused":"played",s.rr_mediaCurrentTime=e.currentTime,s.rr_mediaPlaybackRate=e.playbackRate,s.rr_mediaMuted=e.muted,s.rr_mediaLoop=e.loop,s.rr_mediaVolume=e.volume}if(M||(e.scrollLeft&&(u.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(u.rr_scrollTop=e.scrollTop)),N){let{width:s,height:p,left:w,top:S}=e.getBoundingClientRect();u={class:u.class,rr_width:`${s}px`,rr_height:`${p}px`,rr_left:`${Math.floor(w+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(S+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}m==="iframe"&&!C(u.src)&&(e.contentDocument||(u.rr_src=u.src),delete u.src);let _;try{customElements.get(m)&&(_=!0)}catch(s){}return{type:n.NodeType$1.Element,tagName:m,attributes:u,childNodes:[],isSVG:pt(e)||void 0,needBlock:N,rootId:v,isCustom:_}}function b(e){return e==null?"":e.toLowerCase()}function Et(e,t){if(t.comment&&e.type===n.NodeType$1.Comment)return!0;if(e.type===n.NodeType$1.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&n.extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(b(e.attributes.name).match(/^msapplication-tile(image|color)$/)||b(e.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(b(e.attributes.rel)))))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&b(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(b(e.attributes.property).match(/^(og|twitter|fb):/)||b(e.attributes.name).match(/^(og|twitter):/)||b(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(b(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(b(e.attributes.name))||b(e.attributes.property).match(/^article:/)||b(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(b(e.attributes.name)))return!0}}return!1}var ve=50,re=!1,ie=!1;function bt(){return ie}function Ct(){ie=!1,re=!1}function W(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:d,skipChild:l=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:x,maskInputFn:I,slimDOMOptions:C,dataURLOptions:M={},inlineImages:v=!1,recordCanvas:N=!1,onSerialize:m,onIframeLoad:u,iframeLoadTimeout:R=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:s=5e3,keepIframeSrcFn:p=()=>!1,newlyAddedElement:w=!1,depth:S=0,maxDepth:T=ve}=t,{needsMask:D}=t,{preserveWhiteSpace:F=!0}=t;if(S>=T)return ie=!0,re||(re=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${T}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;D||(D=Me(e,c,d,D===void 0));let A=St(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:D,inlineStylesheet:f,maskInputOptions:h,maskTextFn:x,maskInputFn:I,dataURLOptions:M,inlineImages:v,recordCanvas:N,keepIframeSrcFn:p,newlyAddedElement:w});if(!A)return console.warn(e,"not serialized"),null;let z;o.hasNode(e)?z=o.getId(e):Et(A,C)||!F&&A.type===n.NodeType$1.Text&&!A.isStyle&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?z=te:z=Ee();let g=Object.assign(A,{id:z});if(o.add(e,g),z===te)return null;m&&m(e);let G=!l;if(g.type===n.NodeType$1.Element){G=G&&!g.needBlock,delete g.needBlock;let E=n.index.shadowRoot(e);E&&n.isNativeShadowDom(E)&&(g.isShadowHost=!0)}if((g.type===n.NodeType$1.Document||g.type===n.NodeType$1.Element)&&G){C.headWhitespace&&g.type===n.NodeType$1.Element&&g.tagName==="head"&&(F=!1);let E={doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:D,maskTextClass:c,maskTextSelector:d,skipChild:l,inlineStylesheet:f,maskInputOptions:h,maskTextFn:x,maskInputFn:I,slimDOMOptions:C,dataURLOptions:M,inlineImages:v,recordCanvas:N,preserveWhiteSpace:F,onSerialize:m,onIframeLoad:u,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:S+1,maxDepth:T};if(!(g.type===n.NodeType$1.Element&&g.tagName==="textarea"&&g.attributes.value!==void 0))for(let X of Array.from(n.index.childNodes(e))){let $=W(X,E);$&&g.childNodes.push($)}let L=null;if(n.isElement(e)&&(L=n.index.shadowRoot(e)))for(let X of Array.from(n.index.childNodes(L))){let $=W(X,E);$&&(n.isNativeShadowDom(L)&&($.isShadow=!0),g.childNodes.push($))}}let q=n.index.parentNode(e);return q&&n.isShadowRoot(q)&&n.isNativeShadowDom(q)&&(g.isShadow=!0),g.type===n.NodeType$1.Element&&g.tagName==="iframe"&>(e,()=>{let E=e.contentDocument;if(E&&u){let L=W(E,{doc:E,mirror:o,blockClass:i,blockSelector:a,needsMask:D,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:x,maskInputFn:I,slimDOMOptions:C,dataURLOptions:M,inlineImages:v,recordCanvas:N,preserveWhiteSpace:F,onSerialize:m,onIframeLoad:u,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:S+1,maxDepth:T});L&&u(e,L)}},R),g.type===n.NodeType$1.Element&&g.tagName==="link"&&typeof g.attributes.rel=="string"&&(g.attributes.rel==="stylesheet"||g.attributes.rel==="preload"&&typeof g.attributes.href=="string"&&n.extractFileExtension(g.attributes.href)==="css")&&yt(e,()=>{if(_){let E=W(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:D,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:x,maskInputFn:I,slimDOMOptions:C,dataURLOptions:M,inlineImages:v,recordCanvas:N,preserveWhiteSpace:F,onSerialize:m,onIframeLoad:u,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:p,depth:S,maxDepth:T});E&&_(e,E)}},s),g}function _e(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e===!1?{}:e}function Mt(e,t){let{mirror:r=new n.Mirror,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:l=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:x,maskInputFn:I,slimDOM:C=!1,dataURLOptions:M,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:m,iframeLoadTimeout:u,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s=()=>!1,maxDepth:p}=t||{},w=h===!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}:h===!1?{password:!0}:h,S=_e(C);return W(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:w,maskTextFn:x,maskInputFn:I,slimDOMOptions:S,dataURLOptions:M,inlineImages:l,recordCanvas:f,preserveWhiteSpace:v,onSerialize:N,onIframeLoad:m,iframeLoadTimeout:u,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s,newlyAddedElement:!1,maxDepth:p})}function vt(e,t){function r(o){t(o),(o.type===n.NodeType$1.Document||o.type===n.NodeType$1.Element)&&o.childNodes.forEach(r)}r(e)}function _t(){we=1}exports.Mirror=n.Mirror;exports.NodeType=n.NodeType;exports.absolutifyURLs=n.absolutifyURLs;exports.checkDataURLSize=n.checkDataURLSize;exports.createMirror=n.createMirror;exports.escapeImportStatement=n.escapeImportStatement;exports.extractFileExtension=n.extractFileExtension;exports.fixSafariColons=n.fixSafariColons;exports.getInputType=n.getInputType;exports.is2DCanvasBlank=n.is2DCanvasBlank;exports.isCSSImportRule=n.isCSSImportRule;exports.isCSSStyleRule=n.isCSSStyleRule;exports.isElement=n.isElement;exports.isNativeShadowDom=n.isNativeShadowDom;exports.isNodeMetaEqual=n.isNodeMetaEqual;exports.isShadowRoot=n.isShadowRoot;exports.maskInputValue=n.maskInputValue;exports.recompressBase64Image=n.recompressBase64Image;exports.stringifyRule=n.stringifyRule;exports.stringifyStylesheet=n.stringifyStylesheet;exports.toLowerCase=n.toLowerCase;exports.DEFAULT_MAX_DEPTH=ve;exports.IGNORED_NODE=te;exports.classMatchesRegex=V;exports.cleanupSnapshot=_t;exports.genId=Ee;exports.ignoreAttribute=Ce;exports.needMaskingText=Me;exports.resetMaxDepthState=Ct;exports.serializeNodeWithId=W;exports.slimDOMDefaults=_e;exports.snapshot=Mt;exports.transformAttribute=be;exports.visitSnapshot=vt;exports.wasMaxDepthReached=bt;
|
|
3
3
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
4
4
|
var __cp = (to, from, except, desc) => {
|
|
5
5
|
if ((from && typeof from === "object") || typeof from === "function") {
|