@highlight-run/rrweb 2.0.1 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/plugins/console-record.js +408 -609
  2. package/dist/plugins/console-record.min.js +12 -15
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +142 -271
  5. package/dist/plugins/console-replay.min.js +4 -15
  6. package/dist/plugins/console-replay.min.js.map +1 -1
  7. package/dist/plugins/sequential-id-record.js +23 -26
  8. package/dist/plugins/sequential-id-record.min.js +1 -1
  9. package/dist/plugins/sequential-id-record.min.js.map +1 -1
  10. package/dist/plugins/sequential-id-replay.js +26 -30
  11. package/dist/plugins/sequential-id-replay.min.js +1 -1
  12. package/dist/plugins/sequential-id-replay.min.js.map +1 -1
  13. package/dist/record/rrweb-record-pack.js +63 -146
  14. package/dist/record/rrweb-record-pack.min.js +3 -15
  15. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  16. package/dist/record/rrweb-record.js +3002 -3118
  17. package/dist/record/rrweb-record.min.js +4 -15
  18. package/dist/record/rrweb-record.min.js.map +1 -1
  19. package/dist/replay/rrweb-replay-unpack.js +4354 -4054
  20. package/dist/replay/rrweb-replay-unpack.min.js +5 -17
  21. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  22. package/dist/replay/rrweb-replay.js +4286 -3984
  23. package/dist/replay/rrweb-replay.min.js +5 -17
  24. package/dist/replay/rrweb-replay.min.js.map +1 -1
  25. package/dist/rrweb-all.js +7634 -7453
  26. package/dist/rrweb-all.min.js +16 -17
  27. package/dist/rrweb-all.min.js.map +1 -1
  28. package/dist/rrweb.js +7339 -7075
  29. package/dist/rrweb.min.js +6 -17
  30. package/dist/rrweb.min.js.map +1 -1
  31. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +12 -0
  32. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +7 -0
  33. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +31 -0
  34. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +11 -0
  35. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +18 -0
  36. package/es/rrweb/_virtual/image-bitmap-data-url-worker.js +6 -0
  37. package/es/rrweb/ext/mitt/dist/mitt.es.js +1 -1
  38. package/es/rrweb/ext/tslib/tslib.es6.js +38 -0
  39. package/es/rrweb/packages/rrdom/es/virtual-dom.js +1099 -0
  40. package/es/rrweb/packages/rrweb/src/index.js +6 -4
  41. package/es/rrweb/packages/rrweb/src/packer/base.js +1 -1
  42. package/es/rrweb/packages/rrweb/src/packer/pack.js +4 -5
  43. package/es/rrweb/packages/rrweb/src/packer/unpack.js +24 -24
  44. package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +175 -176
  45. package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +109 -128
  46. package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +125 -138
  47. package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +88 -105
  48. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +19 -20
  49. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +25 -25
  50. package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +29 -30
  51. package/es/rrweb/packages/rrweb/src/record/index.js +348 -373
  52. package/es/rrweb/packages/rrweb/src/record/mutation.js +487 -528
  53. package/es/rrweb/packages/rrweb/src/record/observer.js +584 -659
  54. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +44 -73
  55. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +166 -87
  56. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +21 -26
  57. package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +119 -112
  58. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +53 -72
  59. package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +38 -40
  60. package/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js +31 -0
  61. package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +27 -23
  62. package/es/rrweb/packages/rrweb/src/replay/canvas/deserialize-args.js +67 -0
  63. package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +37 -29
  64. package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +58 -120
  65. package/es/rrweb/packages/rrweb/src/replay/index.js +1545 -1854
  66. package/es/rrweb/packages/rrweb/src/replay/machine.js +275 -315
  67. package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +216 -218
  68. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +7 -7
  69. package/es/rrweb/packages/rrweb/src/replay/timer.js +87 -91
  70. package/es/rrweb/packages/rrweb/src/types.js +72 -72
  71. package/es/rrweb/packages/rrweb/src/utils.js +312 -506
  72. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +195 -71
  73. package/lib/plugins/console-record.js +469 -627
  74. package/lib/plugins/console-replay.js +198 -268
  75. package/lib/plugins/sequential-id-record.js +19 -20
  76. package/lib/plugins/sequential-id-replay.js +25 -25
  77. package/lib/record/rrweb-record-pack.js +184 -139
  78. package/lib/record/rrweb-record.js +2473 -2425
  79. package/lib/replay/rrweb-replay-unpack.js +3797 -3343
  80. package/lib/replay/rrweb-replay.js +3742 -3288
  81. package/lib/rrweb-all.js +6725 -6247
  82. package/lib/rrweb.js +6157 -5632
  83. package/package.json +14 -13
  84. package/typings/packer/base.d.ts +1 -1
  85. package/typings/plugins/console/record/index.d.ts +1 -1
  86. package/typings/plugins/console/record/stringify.d.ts +1 -1
  87. package/typings/plugins/sequential-id/record/index.d.ts +1 -1
  88. package/typings/plugins/sequential-id/replay/index.d.ts +1 -1
  89. package/typings/record/iframe-manager.d.ts +3 -3
  90. package/typings/record/index.d.ts +1 -1
  91. package/typings/record/mutation.d.ts +2 -1
  92. package/typings/record/observers/canvas/2d.d.ts +2 -1
  93. package/typings/record/observers/canvas/canvas-manager.d.ts +5 -2
  94. package/typings/record/observers/canvas/canvas.d.ts +1 -1
  95. package/typings/record/observers/canvas/serialize-args.d.ts +5 -5
  96. package/typings/record/observers/canvas/webgl.d.ts +2 -1
  97. package/typings/record/shadow-dom-manager.d.ts +2 -1
  98. package/typings/record/stylesheet-manager.d.ts +12 -0
  99. package/typings/record/workers/image-bitmap-data-url-worker.d.ts +5 -0
  100. package/typings/replay/canvas/2d.d.ts +3 -3
  101. package/typings/replay/canvas/deserialize-args.d.ts +7 -0
  102. package/typings/replay/canvas/index.d.ts +4 -3
  103. package/typings/replay/canvas/webgl.d.ts +3 -5
  104. package/typings/replay/index.d.ts +7 -10
  105. package/typings/types.d.ts +45 -17
  106. package/typings/utils.d.ts +17 -44
  107. package/dist/replay/rrweb-replay-unpack.min.css +0 -2
  108. package/dist/replay/rrweb-replay-unpack.min.css.map +0 -1
  109. package/dist/replay/rrweb-replay.min.css +0 -2
  110. package/dist/replay/rrweb-replay.min.css.map +0 -1
  111. package/dist/rrweb-all.min.css +0 -2
  112. package/dist/rrweb-all.min.css.map +0 -1
  113. package/dist/rrweb.min.css +0 -2
  114. package/dist/rrweb.min.css.map +0 -1
  115. package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +0 -78
  116. package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +0 -121
  117. package/typings/replay/virtual-styles.d.ts +0 -43
@@ -1,16 +1,5 @@
1
- var rrwebRecord=function(){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function a(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function i(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,a=e.maskInputFn,i=o||"";return(t[n.toLowerCase()]||t[r])&&(i=a?a(i):"*".repeat(i.length)),i}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var s="__rrweb_original__";function u(e){return e=(null==(e=e.replace(/[^ -~]+/g,""))?void 0:e.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""}var l,c,d=1,p=new RegExp("[^a-z0-9-_:]");function f(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(m).join(""):null}catch(e){return null}}function m(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=f(e.styleSheet)||t}catch(e){}return t}var h=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,v=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,y=/^(data:)([^,]*),(.*)/i;function g(e,t){return(e||"").replace(h,(function(e,n,r,o,a,i){var s,u=r||a||i,l=n||o||"";if(!u)return e;if(!v.test(u))return"url("+l+u+l+")";if(y.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?c.pop():c.push(m))}return"url("+l+c.join("/")+l+")"}))}var b,S,C,k,w,I,x=/^[^ \t\n\r\u000c]+/,M=/^[, \t\n\r\u000c]+/;function T(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function E(){var e=document.createElement("a");return e.href="",e.href}function O(e,t,n,r){return"src"===n||"href"===n&&r||"xlink:href"===n&&r&&"#"!==r[0]?T(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(M),!(n>=t.length);){var a=r(x);if(","===a.slice(-1))a=T(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=T(e,a);for(var s=!1;;){var u=t.charAt(n);if(""===u){o.push((a+i).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,o.push((a+i).trim());break}"("===u&&(s=!0)}i+=u,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?g(r,E()):"object"===t&&"data"===n&&r?T(e,r):r:T(e,r)}function N(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!(!n||!e.matches(n))||N(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,N(e.parentNode,t,n)}function R(t,n){var r,o,a,d,m=n.doc,h=n.blockClass,v=n.blockSelector,y=n.maskTextClass,b=n.maskTextSelector,S=n.inlineStylesheet,C=n.maskInputOptions,k=void 0===C?{}:C,w=n.maskTextFn,I=n.maskInputFn,x=n.dataURLOptions,M=void 0===x?{}:x,T=n.inlineImages,R=n.recordCanvas,_=n.keepIframeSrcFn,L=n.enableStrictPrivacy;if(m.__sn){var D=m.__sn.id;o=1===D?void 0:D}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode,rootId:o}:{type:e.Document,childNodes:[],rootId:o};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:o};case t.ELEMENT_NODE:for(var F=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(t,h,v),P=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return p.test(t)?"div":t}(t),A={},z=0,W=Array.from(t.attributes);z<W.length;z++){var U=W[z],j=U.name,G=U.value;A[j]=O(m,P,j,G)}if("link"===P&&S){var H=Array.from(m.styleSheets).find((function(e){return e.href===t.href})),V=null;H&&(V=f(H)),V&&(delete A.rel,delete A.href,A._cssText=g(V,H.href))}if("style"===P&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(V=f(t.sheet))&&(A._cssText=g(V,E()));if("input"===P||"textarea"===P||"select"===P){G=t.value;"radio"!==A.type&&"checkbox"!==A.type&&"submit"!==A.type&&"button"!==A.type&&G?A.value=i({type:A.type,tagName:P,value:G,maskInputOptions:k,maskInputFn:I}):t.checked&&(A.checked=t.checked)}if("option"===P&&(t.selected&&!k.select?A.selected=!0:delete A.selected),"canvas"===P&&R)if("2d"===t.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,a=s in o?o.__rrweb_original__:o;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(t)||(A.rr_dataURL=t.toDataURL(M.type,M.quality));else if(!("__context"in t)){var B=t.toDataURL(M.type,M.quality),q=document.createElement("canvas");q.width=t.width,q.height=t.height,B!==q.toDataURL(M.type,M.quality)&&(A.rr_dataURL=B)}if("img"===P&&T){l||(l=m.createElement("canvas"),c=l.getContext("2d"));var X=t,Y=X.crossOrigin;X.crossOrigin="anonymous";var K=function(){try{l.width=X.naturalWidth,l.height=X.naturalHeight,c.drawImage(X,0,0),A.rr_dataURL=l.toDataURL(M.type,M.quality)}catch(e){console.warn("Cannot inline img src="+X.currentSrc+"! Error: "+e)}Y?A.crossOrigin=Y:delete A.crossOrigin};X.complete&&0!==X.naturalWidth?K():X.onload=K}if("audio"!==P&&"video"!==P||(A.rr_mediaState=t.paused?"paused":"played",A.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(A.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(A.rr_scrollTop=t.scrollTop),F||"img"===P&&L){var J=t.getBoundingClientRect(),Z=J.width,$=J.height;A={class:A.class,rr_width:Z+"px",rr_height:$+"px"},F=!0}return"iframe"!==P||_(A.src)||(t.contentDocument||(A.rr_src=A.src),delete A.src),{type:e.Element,tagName:P,attributes:A,childNodes:[],isSVG:(d=t,Boolean("svg"===d.tagName||d.ownerSVGElement)||void 0),needBlock:F,rootId:o};case t.TEXT_NODE:var Q=t.parentNode&&t.parentNode.tagName,ee=t.textContent,te="STYLE"===Q||void 0,ne="SCRIPT"===Q||void 0,re=!1;if(te&&ee){try{t.nextSibling||t.previousSibling||(null===(r=t.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(ee=(a=t.parentNode.sheet).cssRules?Array.from(a.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}ee=g(ee,E()),re=!0}if(ne?(ee="SCRIPT_PLACEHOLDER",re=!0):"NOSCRIPT"===Q&&(ee="",re=!0),!te&&!ne&&N(t,y,b)&&ee&&(ee=w?w(ee):ee.replace(/[\S]/g,"*")),L&&!re&&Q)!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(Q)&&ee&&(ee=u(ee));return{type:e.Text,textContent:ee||"",isStyle:te,rootId:o};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:o};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:o};default:return!1}}function _(e){return void 0===e?"":e.toLowerCase()}function L(t,n){var r,o=n.doc,i=n.map,s=n.blockClass,u=n.blockSelector,l=n.maskTextClass,c=n.maskTextSelector,p=n.skipChild,f=void 0!==p&&p,m=n.inlineStylesheet,h=void 0===m||m,v=n.maskInputOptions,y=void 0===v?{}:v,g=n.maskTextFn,b=n.maskInputFn,S=n.slimDOMOptions,C=n.dataURLOptions,k=void 0===C?{}:C,w=n.inlineImages,I=void 0!==w&&w,x=n.recordCanvas,M=void 0!==x&&x,T=n.onSerialize,E=n.onIframeLoad,O=n.iframeLoadTimeout,N=void 0===O?5e3:O,D=n.keepIframeSrcFn,F=void 0===D?function(){return!1}:D,P=n.enableStrictPrivacy,A=n.preserveWhiteSpace,z=void 0===A||A,W=R(t,{doc:o,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,dataURLOptions:k,inlineImages:I,recordCanvas:M,keepIframeSrcFn:F,enableStrictPrivacy:P});if(!W)return console.warn(t,"not serialized"),null;r="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(_(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(t.attributes.name)||"icon"===_(t.attributes.rel)||"apple-touch-icon"===_(t.attributes.rel)||"shortcut icon"===_(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&_(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(_(t.attributes.property).match(/^(og|twitter|fb):/)||_(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===_(t.attributes.name)||"googlebot"===_(t.attributes.name)||"bingbot"===_(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===_(t.attributes.name)||"generator"===_(t.attributes.name)||"framework"===_(t.attributes.name)||"publisher"===_(t.attributes.name)||"progid"===_(t.attributes.name)||_(t.attributes.property).match(/^article:/)||_(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===_(t.attributes.name)||"yandex-verification"===_(t.attributes.name)||"csrf-token"===_(t.attributes.name)||"p:domain_verify"===_(t.attributes.name)||"verify-v1"===_(t.attributes.name)||"verification"===_(t.attributes.name)||"shopify-checkout-api-token"===_(t.attributes.name)))return!0}}return!1}(W,S)&&(z||W.type!==e.Text||W.isStyle||W.textContent.replace(/^\s+|\s+$/gm,"").length)?d++:-2;var U=Object.assign(W,{id:r});if(t.__sn=U,-2===r)return null;i[r]=t,T&&T(t);var j=!f;if(U.type===e.Element){if(j=j&&!U.needBlock,U.needBlock&&"img"===U.tagName){var G=t.cloneNode();G.src="",i[r]=G}delete U.needBlock,t.shadowRoot&&(U.isShadowHost=!0)}if((U.type===e.Document||U.type===e.Element)&&j){S.headWhitespace&&W.type===e.Element&&"head"===W.tagName&&(z=!1);for(var H={doc:o,map:i,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:c,skipChild:f,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:S,dataURLOptions:k,inlineImages:I,recordCanvas:M,preserveWhiteSpace:z,onSerialize:T,onIframeLoad:E,iframeLoadTimeout:N,keepIframeSrcFn:F,enableStrictPrivacy:P},V=0,B=Array.from(t.childNodes);V<B.length;V++){(Y=L(B[V],H))&&U.childNodes.push(Y)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(var q=0,X=Array.from(t.shadowRoot.childNodes);q<X.length;q++){var Y;(Y=L(X[q],H))&&(Y.isShadow=!0,U.childNodes.push(Y))}}return t.parentNode&&a(t.parentNode)&&(U.isShadow=!0),U.type===e.Element&&"iframe"===U.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,a=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";r.location.href===i&&e.src!==i&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){a||(t(),a=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&E){var n=L(e,{doc:e,map:i,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:S,dataURLOptions:k,inlineImages:I,recordCanvas:M,preserveWhiteSpace:z,onSerialize:T,onIframeLoad:E,iframeLoadTimeout:N,keepIframeSrcFn:F,enableStrictPrivacy:P});n&&E(t,n)}}),N),U}function D(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(b||(b={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(S||(S={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(C||(C={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(k||(k={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(I||(I={}));var F="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",P={map:{},getId:function(){return console.error(F),-1},getNode:function(){return console.error(F),null},removeNodeFromMap:function(){console.error(F)},has:function(){return console.error(F),!1},reset:function(){console.error(F)}};function A(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var s=t-(i-o),u=this,l=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=i,e.apply(u,l)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,l)}),s))}}function z(e,t,n,r,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return z(e,t,a||{},!0)}}function W(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function U(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function j(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(P=new Proxy(P,{get:function(e,t,n){return"map"===t&&console.error(F),Reflect.get(e,t,n)}}));function G(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);n=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(n=!0)}));return n||G(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,G(e.parentNode,t)}function H(e){return"__sn"in e&&-2===e.__sn.id}function V(e,t){if(a(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||V(e.parentNode,t))}function B(e){return Boolean(e.changedTouches)}function q(t){return"__sn"in t&&(t.__sn.type===e.Element&&"iframe"===t.__sn.tagName)}function X(e){return Boolean(null==e?void 0:e.shadowRoot)}function Y(e){return"__ln"in e}var K=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Y(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Y(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),J=function(e,t){return"".concat(e,"@").concat(t)};function Z(e){return"__sn"in e}var $=function(){function e(){var e=this;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=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,r,o,i;if(!e.frozen&&!e.locked){for(var s=[],l=new K,c=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},d=function(t){for(var n,r,o,i,u,d=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,p=d;null===(o=null===(r=null==p?void 0:p.getRootNode)||void 0===r?void 0:r.call(p))||void 0===o?void 0:o.host;)p=(null===(u=null===(i=null==p?void 0:p.getRootNode)||void 0===i?void 0:i.call(p))||void 0===u?void 0:u.host)||null;var f=!(e.doc.contains(t)||null!==p&&e.doc.contains(p));if(t.parentNode&&!f){var m=a(t.parentNode)?e.mirror.getId(d):e.mirror.getId(t.parentNode),h=c(t);if(-1===m||-1===h)return l.addNode(t);var v=L(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(n){q(n)&&e.iframeManager.addIframe(n),X(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)}});v&&s.push({parentId:m,nextId:h,node:v})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var p=n(e.movedSet),f=p.next();!f.done;f=p.next()){var m=f.value;ee(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||d(m)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}try{for(var h=n(e.addedSet),v=h.next();!v.done;v=h.next()){m=v.value;te(e.droppedSet,m)||ee(e.removes,m,e.mirror)?te(e.movedSet,m)?d(m):e.droppedSet.add(m):d(m)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}for(var y=null;l.length;){var g=null;if(y){var b=e.mirror.getId(y.value.parentNode),S=c(y.value);-1!==b&&-1!==S&&(g=y)}if(!g)for(var C=l.length-1;C>=0;C--){var k=l.get(C);if(k){b=e.mirror.getId(k.value.parentNode),S=c(k.value);if(-1!==b&&-1!==S){g=k;break}}}if(!g){for(;l.head;)l.removeNode(l.head.value);break}y=g.previous,l.removeNode(g.value),d(g.value)}var w={texts:e.texts.map((function(t){var n=t.value;return e.enableStrictPrivacy&&n&&(n=u(n)),{id:e.mirror.getId(t.node),value:n}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:s};(w.texts.length||w.attributes.length||w.removes.length||w.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(w))}},this.processMutation=function(t){var r,o,s,u;if(!H(t.target))switch(t.type){case"characterData":var l=t.target.textContent;G(t.target,e.blockClass)||l===t.oldValue||e.texts.push({value:N(t.target,e.maskTextClass,e.maskTextSelector)&&l?e.maskTextFn?e.maskTextFn(l):l.replace(/[\S]/g,"*"):l,node:t.target});break;case"attributes":var c=t.target;l=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(l=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:l,maskInputFn:e.maskInputFn})),G(t.target,e.blockClass)||l===t.oldValue)return;var d=e.attributes.find((function(e){return e.node===t.target}));if(d||(d={node:t.target,attributes:{}},e.attributes.push(d)),"style"===t.attributeName){var p=e.doc.createElement("span");t.oldValue&&p.setAttribute("style",t.oldValue),void 0!==d.attributes.style&&null!==d.attributes.style||(d.attributes.style={});var f=d.attributes.style;try{for(var m=n(Array.from(c.style)),h=m.next();!h.done;h=m.next()){var v=h.value,y=c.style.getPropertyValue(v),g=c.style.getPropertyPriority(v);y===p.style.getPropertyValue(v)&&g===p.style.getPropertyPriority(v)||(f[v]=""===g?y:[y,g])}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}try{for(var b=n(Array.from(p.style)),S=b.next();!S.done;S=b.next()){v=S.value;""===c.style.getPropertyValue(v)&&(f[v]=!1)}}catch(e){s={error:e}}finally{try{S&&!S.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}}else{if("INPUT"===t.target.tagName){var C=t.target;if("password"===C.type){d.attributes.value="*".repeat(C.value.length);break}}d.attributes[t.attributeName]=O(e.doc,t.target.tagName,t.attributeName,l)}break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);G(t.target,e.blockClass)||H(n)||(e.addedSet.has(n)?(Q(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||V(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[J(r,o)]?Q(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!G(n,e.blockClass)){if(Z(t)){if(H(t))return;e.movedSet.add(t);var r=null;n&&Z(n)&&(r=n.__sn.id),r&&(e.movedMap[J(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);G(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach((function(n){t[n]=e[n]}))},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function Q(e,t){e.delete(t),t.childNodes.forEach((function(t){return Q(e,t)}))}function ee(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||ee(e,r,n)}function te(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||te(e,n))}var ne=[],re="undefined"!=typeof CSSGroupingRule,oe="undefined"!=typeof CSSMediaRule,ae="undefined"!=typeof CSSSupportsRule,ie="undefined"!=typeof CSSConditionRule;function se(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function ue(e,t){var n,r,o=new $;ne.push(o),o.init(e);var a=window.MutationObserver||window.__rrMutationObserver,i=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");i&&window[i]&&(a=window[i]);var s=new a(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function le(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,o=e.blockClass,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var i=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,s=[],u=function(e){return function(n){var a=se(n);if(!G(a,o)&&!function(e){try{if(e instanceof HTMLElement)return"CANVAS"===e.tagName}catch(e){return!1}return!1}(a)){var i=B(n)?n.changedTouches[0]:n;if(i){var s=r.getId(a),u=i.clientX,l=i.clientY;t({type:C[e],id:s,x:u,y:l})}}}};return Object.keys(C).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]})).forEach((function(e){var t=e.toLowerCase(),r=u(e);s.push(D(t,r,n))})),function(){s.forEach((function(e){return e()}))}}function ce(e){var t=e.scrollCb,n=e.doc,r=e.mirror,o=e.blockClass;return D("scroll",A((function(e){var a=se(e);if(a&&!G(a,o)){var i=r.getId(a);if(a===n){var s=n.scrollingElement||n.documentElement;t({id:i,x:s.scrollLeft,y:s.scrollTop})}else t({id:i,x:a.scrollLeft,y:a.scrollTop})}}),e.sampling.scroll||100),n)}function de(e,n){var r=t({},e);return n||delete r.userTriggered,r}var pe=["INPUT","TEXTAREA","SELECT"],fe=new WeakMap;function me(e){return function(e,t){if(re&&e.parentRule instanceof CSSGroupingRule||oe&&e.parentRule instanceof CSSMediaRule||ae&&e.parentRule instanceof CSSSupportsRule||ie&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function he(e,a){var s,u;void 0===a&&(a={});var l=e.doc.defaultView;if(!l)return function(){};!function(e,t){var n=e.mutationCb,a=e.mousemoveCb,i=e.mouseInteractionCb,s=e.scrollCb,u=e.viewportResizeCb,l=e.inputCb,c=e.mediaInteractionCb,d=e.styleSheetRuleCb,p=e.styleDeclarationCb,f=e.canvasMutationCb,m=e.fontCb;e.mutationCb=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t.mutation&&t.mutation.apply(t,o([],r(e),!1)),n.apply(void 0,o([],r(e),!1))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o([],r(e),!1)),a.apply(void 0,o([],r(e),!1))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o([],r(e),!1)),i.apply(void 0,o([],r(e),!1))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o([],r(e),!1)),s.apply(void 0,o([],r(e),!1))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o([],r(e),!1)),u.apply(void 0,o([],r(e),!1))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o([],r(e),!1)),l.apply(void 0,o([],r(e),!1))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o([],r(e),!1)),c.apply(void 0,o([],r(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o([],r(e),!1)),d.apply(void 0,o([],r(e),!1))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,o([],r(e),!1)),p.apply(void 0,o([],r(e),!1))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,o([],r(e),!1)),f.apply(void 0,o([],r(e),!1))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,o([],r(e),!1)),m.apply(void 0,o([],r(e),!1))}}(e,a);var c=ue(e,e.doc),d=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,o=e.mirror;if(!1===n.mousemove)return function(){};var a,i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=A((function(e){var n=Date.now()-a;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],a=null}),s),c=A((function(e){var t=se(e),n=B(e)?e.changedTouches[0]:e,r=n.clientX,i=n.clientY;a||(a=Date.now()),u.push({x:r,y:i,id:o.getId(t),timeOffset:Date.now()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?S.Drag:e instanceof MouseEvent?S.MouseMove:S.TouchMove)}),i,{trailing:!1}),d=[D("mousemove",c,r),D("touchmove",c,r),D("drag",c,r)];return function(){d.forEach((function(e){return e()}))}}(e),p=le(e),f=ce(e),m=function(e){var t=e.viewportResizeCb,n=-1,r=-1;return D("resize",A((function(){var e=U(),o=j();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)}),200),window)}(e),h=function(e){var n=e.inputCb,a=e.doc,s=e.mirror,u=e.blockClass,l=e.ignoreClass,c=e.maskInputOptions,d=e.maskInputFn,p=e.sampling,f=e.userTriggeredOnInput;function m(e){var t=se(e),n=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(pe.indexOf(t.tagName)<0)&&!G(t,u)){var r=t.type;if(!t.classList.contains(l)){var o=t.value,s=!1;"radio"===r||"checkbox"===r?s=t.checked:(c[t.tagName.toLowerCase()]||c[r])&&(o=i({maskInputOptions:c,tagName:t.tagName,type:r,value:o,maskInputFn:d})),h(t,de({text:o,isChecked:s,userTriggered:n},f));var p=t.name;"radio"===r&&p&&s&&a.querySelectorAll('input[type="radio"][name="'.concat(p,'"]')).forEach((function(e){e!==t&&h(e,de({text:e.value,isChecked:!s,userTriggered:!1},f))}))}}}function h(e,r){var o=fe.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){fe.set(e,r);var a=s.getId(e);n(t(t({},r),{id:a}))}}var v=("last"===p.input?["change"]:["input","change"]).map((function(e){return D(e,m,a)})),y=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),g=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return y&&y.set&&v.push.apply(v,o([],r(g.map((function(e){return z(e[0],e[1],{set:function(){m({target:this})}})}))),!1)),function(){v.forEach((function(e){return e()}))}}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.mirror,o=e.sampling,a=function(e){return A((function(o){var a=se(o);if(a&&!G(a,n)){var i=a,s=i.currentTime,u=i.volume,l=i.muted;t({type:e,id:r.getId(a),currentTime:s,volume:u,muted:l})}}),o.media||500)},i=[D("play",a(0)),D("pause",a(1)),D("seeked",a(2)),D("volumechange",a(3))];return function(){i.forEach((function(e){return e()}))}}(e),y=function(e,t){var n=e.styleSheetRuleCb,a=e.mirror,i=t.win,s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(e,t){var r=a.getId(this.ownerNode);return-1!==r&&n({id:r,adds:[{rule:e,index:t}]}),s.apply(this,arguments)};var u=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(e){var t=a.getId(this.ownerNode);return-1!==t&&n({id:t,removes:[{index:e}]}),u.apply(this,arguments)};var l={};re?l.CSSGroupingRule=i.CSSGroupingRule:(oe&&(l.CSSMediaRule=i.CSSMediaRule),ie&&(l.CSSConditionRule=i.CSSConditionRule),ae&&(l.CSSSupportsRule=i.CSSSupportsRule));var c={};return Object.entries(l).forEach((function(e){var t=r(e,2),i=t[0],s=t[1];c[i]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(e,t){var s=a.getId(this.parentStyleSheet.ownerNode);return-1!==s&&n({id:s,adds:[{rule:e,index:o(o([],r(me(this)),!1),[t||0],!1)}]}),c[i].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(e){var t=a.getId(this.parentStyleSheet.ownerNode);return-1!==t&&n({id:t,removes:[{index:o(o([],r(me(this)),!1),[e],!1)}]}),c[i].deleteRule.apply(this,arguments)}})),function(){i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=u,Object.entries(l).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];o.prototype.insertRule=c[n].insertRule,o.prototype.deleteRule=c[n].deleteRule}))}}(e,{win:l}),g=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=t.win,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(e,t,o){var i,s,u=r.getId(null===(s=null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==u&&n({id:u,set:{property:e,value:t,priority:o},index:me(this.parentRule)}),a.apply(this,arguments)};var i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,o,a=r.getId(null===(o=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===o?void 0:o.ownerNode);return-1!==a&&n({id:a,remove:{property:e},index:me(this.parentRule)}),i.apply(this,arguments)},function(){o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=i}}(e,{win:l}),b=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],a=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,n){var r=new i(e,t,n);return a.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=W(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=a.get(n);e&&(t(e),a.delete(n))}),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=i})),o.push(s),function(){o.forEach((function(e){return e()}))}}(e):function(){},C=[];try{for(var k=n(e.plugins),w=k.next();!w.done;w=k.next()){var I=w.value;C.push(I.observer(I.callback,l,I.options))}}catch(e){s={error:e}}finally{try{w&&!w.done&&(u=k.return)&&u.call(k)}finally{if(s)throw s.error}}return function(){ne.forEach((function(e){return e.reset()})),c.disconnect(),d(),p(),f(),m(),h(),v(),y(),g(),b(),C.forEach((function(e){return e()}))}}var ve=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),ye=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(W(HTMLElement.prototype,"attachShadow",(function(e){return function(){var n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}return e.prototype.addShadowRoot=function(e,n){ue(t(t({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ce(t(t({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(W(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){var r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}();for(var ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Se=0;Se<ge.length;Se++)be[ge.charCodeAt(Se)]=Se;var Ce=new Map;var ke=function(e,t,n){if(e&&(xe(e,t)||"object"==typeof e)){var r=function(e,t){var n=Ce.get(e);return n||(n=new Map,Ce.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function we(e,t,n){return e instanceof Array?e.map((function(e){return we(e,t,n)})):null===e?e:e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray?{rr_type:e.constructor.name,args:[Object.values(e)]}:e instanceof ArrayBuffer?{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=ge[n[t]>>2],o+=ge[(3&n[t])<<4|n[t+1]>>4],o+=ge[(15&n[t+1])<<2|n[t+2]>>6],o+=ge[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[we(e.buffer,t,n),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[we(e.data,t,n),e.width,e.height]}:xe(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:ke(e,t,n)}:e}var Ie=function(e,t,n){return o([],r(e),!1).map((function(e){return we(e,t,n)}))},xe=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function Me(e,t,a,i,s,u){var l,c,d=[],p=Object.getOwnPropertyNames(e),f=function(n){try{if("function"!=typeof e[n])return"continue";var l=W(e,n,(function(l){return function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var p=l.apply(this,c);if(ke(p,u,e),!G(this.canvas,i)){s.getId(this.canvas);var f=Ie(o([],r(c),!1),u,e),m={type:t,property:n,args:f};a(this.canvas,m)}return p}}));d.push(l)}catch(r){var c=z(e,n,{set:function(e){a(this.canvas,{type:t,property:n,args:[e],setter:!0})}});d.push(c)}};try{for(var m=n(p),h=m.next();!h.done;h=m.next()){f(h.value)}}catch(e){l={error:e}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}return d}var Te,Ee,Oe=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var a=function(e,t){var n=[];try{var a=W(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return G(this,t)||"__context"in this||(this.__context=n),e.apply(this,o([n],r(a),!1))}}));n.push(a)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach((function(e){return e()}))}}(e,t),i=function(e,t,a,i){var s,u,l=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),d=function(n){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[n])return"continue";var i=W(t.CanvasRenderingContext2D.prototype,n,(function(t){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return G(this.canvas,a)||setTimeout((function(){var t=o([],r(s),!1);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var a=t[0],u=a.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,a.width,a.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e(i.canvas,{type:k["2D"],property:n,args:t})}),0),t.apply(this,s)}}));l.push(i)}catch(r){var s=z(t.CanvasRenderingContext2D.prototype,n,{set:function(t){e(this.canvas,{type:k["2D"],property:n,args:[t],setter:!0})}});l.push(s)}};try{for(var p=n(c),f=p.next();!f.done;f=p.next())d(f.value)}catch(e){s={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(s)throw s.error}}return function(){l.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),s=function(e,t,n,a){var i=[];return i.push.apply(i,o([],r(Me(t.WebGLRenderingContext.prototype,k.WebGL,e,n,a,t)),!1)),void 0!==t.WebGL2RenderingContext&&i.push.apply(i,o([],r(Me(t.WebGL2RenderingContext.prototype,k.WebGL2,e,n,a,t)),!1)),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){a(),i(),s()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return e.type,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"])})),o=n[0].type;this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function Ne(e){return t(t({},e),{timestamp:Date.now()})}var Re={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function _e(e){void 0===e&&(e={});var o=e.emit,a=e.checkoutEveryNms,i=e.checkoutEveryNth,s=e.blockClass,u=void 0===s?"highlight-block":s,l=e.blockSelector,c=void 0===l?null:l,d=e.ignoreClass,p=void 0===d?"highlight-ignore":d,f=e.maskTextClass,m=void 0===f?"highlight-mask":f,h=e.maskTextSelector,v=void 0===h?null:h,y=e.inlineStylesheet,g=void 0===y||y,C=e.maskAllInputs,k=e.maskInputOptions,w=e.slimDOMOptions,I=e.maskInputFn,x=e.maskTextFn,M=e.hooks,T=e.packFn,E=e.sampling,O=void 0===E?{}:E,N=e.mousemoveWait,R=e.recordCanvas,_=void 0!==R&&R,F=e.userTriggeredOnInput,P=void 0!==F&&F,A=e.collectFonts,z=void 0!==A&&A,W=e.inlineImages,G=void 0!==W&&W,H=e.plugins,V=e.keepIframeSrcFn,B=void 0===V?function(){return!1}:V,Y=e.enableStrictPrivacy,K=void 0!==Y&&Y;if(!o)throw new Error("emit function is required");void 0!==N&&void 0===O.mousemove&&(O.mousemove=N);var J,Z,$=!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==k?k:{password:!0},Q=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w}:w||{};void 0===J&&(J=window),"NodeList"in J&&!J.NodeList.prototype.forEach&&(J.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in J&&!J.DOMTokenList.prototype.forEach&&(J.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var ee=0;Te=function(e,t){var r;if(!(null===(r=ne[0])||void 0===r?void 0:r.isFrozen())||e.type===b.FullSnapshot||e.type===b.IncrementalSnapshot&&e.data.source===S.Mutation||ne.forEach((function(e){return e.unfreeze()})),o(function(e){var t,r;try{for(var o=n(H||[]),a=o.next();!a.done;a=o.next()){var i=a.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return T&&(e=T(e)),e}(e),t),e.type===b.FullSnapshot)Z=e,ee=0;else if(e.type===b.IncrementalSnapshot){if(e.data.source===S.Mutation&&e.data.isAttachIframe)return;ee++;var s=i&&ee>=i,u=a&&e.timestamp-Z.timestamp>a;(s||u)&&Ee(!0)}};var te=function(e){Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.Mutation},e)}))},re=function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.Scroll},e)}))},oe=function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.CanvasMutation},e)}))},ae=new ve({mutationCb:te}),ie=new Oe({recordCanvas:_,mutationCb:oe,win:window,blockClass:u,mirror:Re}),se=new ye({mutationCb:te,scrollCb:re,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:m,maskTextSelector:v,inlineStylesheet:g,maskInputOptions:$,maskTextFn:x,maskInputFn:I,recordCanvas:_,inlineImages:G,sampling:O,slimDOMOptions:Q,iframeManager:ae,canvasManager:ie,enableStrictPrivacy:K},mirror:Re});Ee=function(e){var t,n,o,a;void 0===e&&(e=!1),Te(Ne({type:b.Meta,data:{href:window.location.href,width:j(),height:U()}}),e),ne.forEach((function(e){return e.lock()}));var i=r(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"highlight-block":r,a=n.blockSelector,i=void 0===a?null:a,s=n.maskTextClass,u=void 0===s?"highlight-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,p=void 0===d||d,f=n.inlineImages,m=void 0!==f&&f,h=n.recordCanvas,v=void 0!==h&&h,y=n.maskAllInputs,g=void 0!==y&&y,b=n.maskTextFn,S=n.maskInputFn,C=n.slimDOM,k=void 0!==C&&C,w=n.dataURLOptions,I=n.preserveWhiteSpace,x=n.onSerialize,M=n.onIframeLoad,T=n.iframeLoadTimeout,E=n.keepIframeSrcFn,O=void 0===E?function(){return!1}:E,N=n.enableStrictPrivacy,R={};return[L(e,{doc:e,map:R,blockClass:o,blockSelector:i,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===g?{password:!0}:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,dataURLOptions:w,inlineImages:m,recordCanvas:v,preserveWhiteSpace:I,onSerialize:x,onIframeLoad:M,iframeLoadTimeout:T,keepIframeSrcFn:O,enableStrictPrivacy:void 0!==N&&N}),R]}(document,{blockClass:u,blockSelector:c,maskTextClass:m,maskTextSelector:v,inlineStylesheet:g,maskAllInputs:$,maskTextFn:x,slimDOM:Q,recordCanvas:_,inlineImages:G,enableStrictPrivacy:K,onSerialize:function(e){q(e)&&ae.addIframe(e),X(e)&&se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){ae.attachIframe(e,t),se.observeAttachShadow(e)},keepIframeSrcFn:B}),2),s=i[0],l=i[1];if(!s)return console.warn("Failed to snapshot the document");Re.map=l,Te(Ne({type:b.FullSnapshot,data:{node:s,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),ne.forEach((function(e){return e.unlock()}))};try{var ue=[];ue.push(D("DOMContentLoaded",(function(){Te(Ne({type:b.DomContentLoaded,data:{}}))})));var le=function(e){var n;return he({mutationCb:te,mousemoveCb:function(e,t){return Te(Ne({type:b.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.MouseInteraction},e)}))},scrollCb:re,viewportResizeCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.ViewportResize},e)}))},inputCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.Input},e)}))},mediaInteractionCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.StyleDeclaration},e)}))},canvasMutationCb:oe,fontCb:function(e){return Te(Ne({type:b.IncrementalSnapshot,data:t({source:S.Font},e)}))},blockClass:u,ignoreClass:p,maskTextClass:m,maskTextSelector:v,maskInputOptions:$,inlineStylesheet:g,sampling:O,recordCanvas:_,inlineImages:G,userTriggeredOnInput:P,collectFonts:z,doc:e,maskInputFn:I,maskTextFn:x,blockSelector:c,slimDOMOptions:Q,mirror:Re,iframeManager:ae,shadowDomManager:se,canvasManager:ie,enableStrictPrivacy:K,plugins:(null===(n=null==H?void 0:H.filter((function(e){return e.observer})))||void 0===n?void 0:n.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return Te(Ne({type:b.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},M)};ae.addLoadListener((function(e){ue.push(le(e.contentDocument))}));var ce=function(){Ee(),ue.push(le(document))};return"interactive"===document.readyState||"complete"===document.readyState?ce():ue.push(D("load",(function(){Te(Ne({type:b.Load,data:{}})),ce()}),window)),function(){ue.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return _e.addCustomEvent=function(e,t){Te&&Te(Ne({type:b.Custom,data:{tag:e,payload:t}}))},_e.freezePage=function(){ne.forEach((function(e){return e.freeze()}))},_e.takeFullSnapshot=function(e){if(!Ee)throw new Error("please take full snapshot after start recording");Ee(e)},_e.mirror=Re,_e}();
1
+ var rrwebRecord=function(){"use strict";var R;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(R||(R={}));function ge(t){return t.nodeType===t.ELEMENT_NODE}function dt(t){var e,n=(e=t)===null||e===void 0?void 0:e.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===t)}var Dt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var n;if(!e)return-1;var r=(n=this.getMeta(e))===null||n===void 0?void 0:n.id;return r??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var n=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,n){var r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)},t.prototype.replace=function(e,n){this.idNodeMap.set(e,n)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function be(){return new Dt}function Mt(t){var e=t.maskInputOptions,n=t.tagName,r=t.type,o=t.value,s=t.maskInputFn,l=o||"";return(e[n.toLowerCase()]||e[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ft="__rrweb_original__";function Se(t){var e=t.getContext("2d");if(!e)return!0;for(var n=50,r=0;r<t.width;r+=n)for(var o=0;o<t.height;o+=n){var s=e.getImageData,l=Ft in s?s[Ft]:s,a=new Uint32Array(l.call(e,r,o,Math.min(n,t.width-r),Math.min(n,t.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Pt(t){return t=t.replace(/[^ -~]+/g,""),t=t?.split(" ").map(function(e){return Math.random().toString(20).substr(2,e.length)}).join(" ")||"",t}var Ce=1,ke=new RegExp("[^a-z0-9-_:]"),pt=-2;function Ie(){return Ce++}function we(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return ke.test(e)?"div":e}function Tt(t){try{var e=t.rules||t.cssRules;return e?Array.from(e).map(Me).join(""):null}catch{return null}}function Me(t){var e=t.cssText;if(Te(t))try{e=Tt(t.styleSheet)||e}catch{}return e}function Te(t){return"styleSheet"in t}function Ne(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Oe(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var ot,At,xe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ee=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Le=/^(data:)([^,]*),(.*)/i;function gt(t,e){return(t||"").replace(xe,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!Ee.test(i)||Le.test(i))return"url("+c+i+c+")";if(i[0]==="/")return"url("+c+(Oe(e)+i)+c+")";var d=e.split("/"),p=i.split("/");d.pop();for(var f=0,u=p;f<u.length;f++){var h=u[f];h!=="."&&(h===".."?d.pop():d.push(h))}return"url("+c+d.join("/")+c+")"})}var Re=/^[^ \t\n\r\u000c]+/,De=/^[, \t\n\r\u000c]+/;function Fe(t,e){if(e.trim()==="")return e;var n=0;function r(c){var d,p=c.exec(e.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(De),!(n>=e.length);){var s=r(Re);if(s.slice(-1)===",")s=bt(t,s.substring(0,s.length-1)),o.push(s);else{var l="";s=bt(t,s);for(var a=!1;;){var i=e.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function bt(t,e){if(!e||e.trim()==="")return e;var n=t.createElement("a");return n.href=e,n.href}function Pe(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Nt(){var t=document.createElement("a");return t.href="",t.href}function _t(t,e,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(e==="table"||e==="td"||e==="th")?bt(t,r):n==="srcset"&&r?Fe(t,r):n==="style"&&r?gt(r,Nt()):e==="object"&&n==="data"&&r?bt(t,r):r}function Ae(t,e,n){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n?t.matches(n):!1}function St(t,e,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n&&t.matches(n)?!0:St(t.parentNode,e,n)}return t.nodeType,t.TEXT_NODE,St(t.parentNode,e,n)}function _e(t,e,n){var r=t.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(e(),o=!0)},n);t.addEventListener("load",function(){clearTimeout(l),o=!0,e()});return}var a="about:blank";if(r.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}}function We(t){return t.getAttribute("href")?t.sheet!==null:!0}function Ge(t,e,n){var r=!1,o;try{o=t.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(e(),r=!0)},n);t.addEventListener("load",function(){clearTimeout(s),r=!0,e()})}}function Ve(t,e){var n,r=e.doc,o=e.mirror,s=e.blockClass,l=e.blockSelector,a=e.maskTextClass,i=e.maskTextSelector,c=e.inlineStylesheet,d=e.maskInputOptions,p=d===void 0?{}:d,f=e.maskTextFn,u=e.maskInputFn,h=e.dataURLOptions,m=h===void 0?{}:h,C=e.inlineImages,O=e.recordCanvas,D=e.keepIframeSrcFn,I=e.enableStrictPrivacy,T;if(o.getMeta(r)){var B=o.getId(r);T=B===1?void 0:B}switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:R.Document,childNodes:[],compatMode:t.compatMode,rootId:T}:{type:R.Document,childNodes:[],rootId:T};case t.DOCUMENT_TYPE_NODE:return{type:R.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:T};case t.ELEMENT_NODE:for(var G=Ae(t,s,l),w=we(t),y={},J=t.attributes.length,V=0;V<J;V++){var j=t.attributes[V];y[j.name]=_t(r,w,j.name,j.value)}if(w==="link"&&c){var K=Array.from(r.styleSheets).find(function(nt){return nt.href===t.href}),_=null;K&&(_=Tt(K)),_&&(delete y.rel,delete y.href,y._cssText=gt(_,K.href))}if(w==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var _=Tt(t.sheet);_&&(y._cssText=gt(_,Nt()))}if(w==="input"||w==="textarea"||w==="select"){var Q=t.value;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&Q?y.value=Mt({type:y.type,tagName:w,value:Q,maskInputOptions:p,maskInputFn:u}):t.checked&&(y.checked=t.checked)}if(w==="option"&&(t.selected&&!p.select?y.selected=!0:delete y.selected),w==="canvas"&&O){if(t.__context==="2d")Se(t)||(y.rr_dataURL=t.toDataURL(m.type,m.quality));else if(!("__context"in t)){var z=t.toDataURL(m.type,m.quality),Z=document.createElement("canvas");Z.width=t.width,Z.height=t.height;var q=Z.toDataURL(m.type,m.quality);z!==q&&(y.rr_dataURL=z)}}if(w==="img"&&C){ot||(ot=r.createElement("canvas"),At=ot.getContext("2d"));var N=t,U=N.crossOrigin;N.crossOrigin="anonymous";var X=function(){try{ot.width=N.naturalWidth,ot.height=N.naturalHeight,At.drawImage(N,0,0),y.rr_dataURL=ot.toDataURL(m.type,m.quality)}catch(nt){console.warn("Cannot inline img src="+N.currentSrc+"! Error: "+nt)}U?y.crossOrigin=U:N.removeAttribute("crossorigin")};N.complete&&N.naturalWidth!==0?X():N.onload=X}if((w==="audio"||w==="video")&&(y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop),G||w==="img"&&I){var g=t.getBoundingClientRect(),v=g.width,L=g.height;y={class:y.class,rr_width:v+"px",rr_height:L+"px"},G=!0}return w==="iframe"&&!D(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src),{type:R.Element,tagName:w,attributes:y,childNodes:[],isSVG:Pe(t)||void 0,needBlock:G,rootId:T};case t.TEXT_NODE:var P=t.parentNode&&t.parentNode.tagName,b=t.textContent,H=P==="STYLE"?!0:void 0,S=P==="SCRIPT"?!0:void 0,k=!1;if(H&&b){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(b=Ne(t.parentNode.sheet))}catch(nt){console.warn("Cannot get CSS styles from text's parentNode. Error: "+nt,t)}b=gt(b,Nt()),k=!0}if(S?(b="SCRIPT_PLACEHOLDER",k=!0):P==="NOSCRIPT"&&(b="",k=!0),!H&&!S&&St(t,a,i)&&b&&(b=f?f(b):b.replace(/[\S]/g,"*")),I&&!k&&P){var tt=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!tt.has(P)&&b&&(b=Pt(b))}return{type:R.Text,textContent:b||"",isStyle:H,rootId:T};case t.CDATA_SECTION_NODE:return{type:R.CDATA,textContent:"",rootId:T};case t.COMMENT_NODE:return{type:R.Comment,textContent:t.textContent||"",rootId:T};default:return!1}}function M(t){return t===void 0?"":t.toLowerCase()}function je(t,e){return!!(e.comment&&t.type===R.Comment||t.type===R.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||M(t.attributes.name)==="application-name"||M(t.attributes.rel)==="icon"||M(t.attributes.rel)==="apple-touch-icon"||M(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||M(t.attributes.name)==="pinterest")||e.headMetaRobots&&(M(t.attributes.name)==="robots"||M(t.attributes.name)==="googlebot"||M(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(M(t.attributes.name)==="author"||M(t.attributes.name)==="generator"||M(t.attributes.name)==="framework"||M(t.attributes.name)==="publisher"||M(t.attributes.name)==="progid"||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(M(t.attributes.name)==="google-site-verification"||M(t.attributes.name)==="yandex-verification"||M(t.attributes.name)==="csrf-token"||M(t.attributes.name)==="p:domain_verify"||M(t.attributes.name)==="verify-v1"||M(t.attributes.name)==="verification"||M(t.attributes.name)==="shopify-checkout-api-token"))))}function at(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,s=e.blockSelector,l=e.maskTextClass,a=e.maskTextSelector,i=e.skipChild,c=i===void 0?!1:i,d=e.inlineStylesheet,p=d===void 0?!0:d,f=e.maskInputOptions,u=f===void 0?{}:f,h=e.maskTextFn,m=e.maskInputFn,C=e.slimDOMOptions,O=e.dataURLOptions,D=O===void 0?{}:O,I=e.inlineImages,T=I===void 0?!1:I,B=e.recordCanvas,G=B===void 0?!1:B,w=e.onSerialize,y=e.onIframeLoad,J=e.iframeLoadTimeout,V=J===void 0?5e3:J,j=e.onStylesheetLoad,K=e.stylesheetLoadTimeout,_=K===void 0?5e3:K,Q=e.keepIframeSrcFn,z=Q===void 0?function(){return!1}:Q,Z=e.enableStrictPrivacy,q=e.preserveWhiteSpace,N=q===void 0?!0:q,U=Ve(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:D,inlineImages:T,recordCanvas:G,keepIframeSrcFn:z,enableStrictPrivacy:Z});if(!U)return console.warn(t,"not serialized"),null;var X;if(r.hasNode(t)?X=r.getId(t):je(U,C)||!N&&U.type===R.Text&&!U.isStyle&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?X=pt:X=Ie(),X===pt)return null;var g=Object.assign(U,{id:X});r.add(t,g),w&&w(t);var v=!c;if(g.type===R.Element){if(v=v&&!g.needBlock,g.needBlock&&g.tagName==="img"){var L=t.cloneNode();L.src="",r.add(L,g)}if(g.tagName==="link"){var L=t.cloneNode();L.href="",L.innerText=g.attributes._cssText,r.add(L,g)}delete g.needBlock,t.shadowRoot&&(g.isShadowHost=!0)}if((g.type===R.Document||g.type===R.Element)&&v){C.headWhitespace&&g.type===R.Element&&g.tagName==="head"&&(N=!1);for(var P={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:D,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,onStylesheetLoad:j,stylesheetLoadTimeout:_,keepIframeSrcFn:z,enableStrictPrivacy:Z},b=0,H=Array.from(t.childNodes);b<H.length;b++){var S=H[b],k=at(S,P);k&&g.childNodes.push(k)}if(ge(t)&&t.shadowRoot)for(var tt=0,nt=Array.from(t.shadowRoot.childNodes);tt<nt.length;tt++){var S=nt[tt],k=at(S,P);k&&(k.isShadow=!0,g.childNodes.push(k))}}return t.parentNode&&dt(t.parentNode)&&(g.isShadow=!0),g.type===R.Element&&g.tagName==="iframe"&&_e(t,function(){var ut=t.contentDocument;if(ut&&y){var ve=at(ut,{doc:ut,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:D,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ve&&y(t,ve)}},V),g.type===R.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(Ge(t,function(){if(j){var ut=at(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:D,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,onStylesheetLoad:j,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ut&&j(t,ut)}},_),We(t)===!1)?null:g}function ze(t,e){var n=e||{},r=n.mirror,o=r===void 0?new Dt:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,d=c===void 0?"highlight-mask":c,p=n.maskTextSelector,f=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,m=n.inlineImages,C=m===void 0?!1:m,O=n.recordCanvas,D=O===void 0?!1:O,I=n.maskAllInputs,T=I===void 0?!1:I,B=n.maskTextFn,G=n.maskInputFn,w=n.slimDOM,y=w===void 0?!1:w,J=n.dataURLOptions,V=n.preserveWhiteSpace,j=n.onSerialize,K=n.onIframeLoad,_=n.iframeLoadTimeout,Q=n.onStylesheetLoad,z=n.stylesheetLoadTimeout,Z=n.keepIframeSrcFn,q=Z===void 0?function(){return!1}:Z,N=n.enableStrictPrivacy,U=N===void 0?!1:N,X=T===!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}:T===!1?{password:!0}:T,g=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y;return at(t,{doc:t,mirror:o,blockClass:l,blockSelector:i,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:X,maskTextFn:B,maskInputFn:G,slimDOMOptions:g,dataURLOptions:J,inlineImages:C,recordCanvas:D,preserveWhiteSpace:V,onSerialize:j,onIframeLoad:K,iframeLoadTimeout:_,onStylesheetLoad:Q,stylesheetLoadTimeout:z,keepIframeSrcFn:q,enableStrictPrivacy:U})}function Y(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const st=`Please stop import mirror directly. Instead of that,\r
2
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
+ or you can use record.mirror to access the mirror instance during recording.`;let Wt={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wt=new Proxy(Wt,{get(t,e,n){return e==="map"&&console.error(st),Reflect.get(t,e,n)}}));function ht(t,e,n={}){let r=null,o=0;return function(s){const l=Date.now();!o&&n.leading===!1&&(o=l);const a=e-(l-o),i=this,c=arguments;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=l,t.apply(i,c)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(i,c)},a))}}function Ct(t,e,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>Ct(t,e,s||{},!0)}function it(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function Gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Ze=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch{return!1}return!1};function W(t,e){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let n=!1;if(typeof e=="string"){if(t.closest!==void 0)return t.closest("."+e)!==null;n=t.classList.contains(e)}else t.classList.forEach(r=>{e.test(r)&&(n=!0)});return n||W(t.parentNode,e)}return t.nodeType,t.TEXT_NODE,W(t.parentNode,e)}function Ue(t,e){return e.getId(t)!==-1}function Ot(t,e){return e.getId(t)===pt}function jt(t,e){if(dt(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?jt(t.parentNode,e):!0:!0}function zt(t){return Boolean(t.changedTouches)}function He(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1})}function Zt(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ye(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ut(t){return Boolean(t?.shadowRoot)}var x=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(x||{}),A=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t))(A||{}),xt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(xt||{}),lt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(lt||{}),mt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t))(mt||{}),Be=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t))(Be||{});function Ht(t){return"__ln"in t}class Xe{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Ht(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Ht(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Yt=(t,e)=>`${t}@${e}`;class $e{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=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Xe,r=a=>{let i=a,c=pt;for(;c===pt;)i=i&&i.nextSibling,c=i&&this.mirror.getId(i);return c},o=a=>{var i,c,d,p,f;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(c=h?.getRootNode)==null?void 0:c.call(h))!=null&&d.host;)h=((f=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:f.host)||null;const m=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||m)return;const C=dt(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),O=r(a);if(C===-1||O===-1)return n.addNode(a);const D=at(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:I=>{Zt(I,this.mirror)&&this.iframeManager.addIframe(I),Ye(I,this.mirror)&&this.stylesheetManager.addStylesheet(I),Ut(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(I,T)=>{this.iframeManager.attachIframe(I,T,this.mirror),this.shadowDomManager.observeAttachShadow(I)},onStylesheetLoad:(I,T)=>{this.stylesheetManager.attachStylesheet(I,T,this.mirror)}});D&&e.push({parentId:C,nextId:O,node:D})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Lt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!Rt(this.droppedSet,a)&&!Lt(this.removes,a,this.mirror)||Rt(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),c=r(s.value);i!==-1&&c!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const c=n.get(i);if(c){const d=this.mirror.getId(c.value.parentNode),p=r(c.value);if(d!==-1&&p!==-1){a=c;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Pt(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=e=>{if(!Ot(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!W(e.target,this.blockClass)&&n!==e.oldValue&&this.texts.push({value:St(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(r=Mt({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),W(e.target,this.blockClass)||r===e.oldValue)return;let o=this.attributes.find(s=>s.node===e.target);if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){const s=this.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const l=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a))&&(c===""?l[a]=i:l[a]=[i,c])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(l[a]=!1)}else{if(e.target.tagName==="INPUT"){const s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[e.attributeName]=_t(this.doc,e.target.tagName,e.attributeName,r)}break}case"childList":{e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dt(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);W(e.target,this.blockClass)||Ot(n,this.mirror)||!Ue(n,this.mirror)||(this.addedSet.has(n)?(Et(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||jt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Yt(r,o)]?Et(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dt(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!(n&&W(n,this.blockClass))){if(this.mirror.getMeta(e)){if(Ot(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.getMeta(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Yt(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);W(e,this.blockClass)||e.childNodes.forEach(r=>this.genAdds(r))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=e[n]})}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 Et(t,e){t.delete(e),e.childNodes.forEach(n=>Et(t,n))}function Lt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return t.some(s=>s.id===o)?!0:Lt(t,r,n)}function Rt(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Rt(t,n):!1}var Ke=Object.defineProperty,Je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Xt=(t,e,n)=>e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$t=(t,e)=>{for(var n in e||(e={}))qe.call(e,n)&&Xt(t,n,e[n]);if(Bt)for(var n of Bt(e))tn.call(e,n)&&Xt(t,n,e[n]);return t},en=(t,e)=>Je(t,Qe(e));const rt=[],Kt=typeof CSSGroupingRule<"u",Jt=typeof CSSMediaRule<"u",Qt=typeof CSSSupportsRule<"u",qt=typeof CSSConditionRule<"u";function ft(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function te(t,e){var n,r;const o=new $e;rt.push(o),o.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const l=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");l&&window[l]&&(s=window[l]);const a=new s(o.processMutations.bind(o));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function nn({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let l=[],a;const i=ht(p=>{const f=Date.now()-a;t(l.map(u=>(u.timeOffset-=f,u)),p),l=[],a=null},s),c=ht(p=>{const f=ft(p),{clientX:u,clientY:h}=zt(p)?p.changedTouches[0]:p;a||(a=Date.now()),l.push({x:u,y:h,id:r.getId(f),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?A.Drag:p instanceof MouseEvent?A.MouseMove:A.TouchMove)},o,{trailing:!1}),d=[Y("mousemove",c,n),Y("touchmove",c,n),Y("drag",c,n)];return()=>{d.forEach(p=>p())}}function rn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],a=i=>c=>{const d=ft(c);if(W(d,r)||Ze(d))return;const p=zt(c)?c.changedTouches[0]:c;if(!p)return;const f=n.getId(d),{clientX:u,clientY:h}=p;t({type:xt[i],id:f,x:u,y:h})};return Object.keys(xt).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const c=i.toLowerCase(),d=a(i);l.push(Y(c,d,e))}),()=>{l.forEach(i=>i())}}function ee({scrollCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){const s=ht(l=>{const a=ft(l);if(!a||W(a,r))return;const i=n.getId(a);if(a===e){const c=e.scrollingElement||e.documentElement;t({id:i,x:c.scrollLeft,y:c.scrollTop})}else t({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return Y("scroll",s,e)}function on({viewportResizeCb:t}){let e=-1,n=-1;const r=ht(()=>{const o=Gt(),s=Vt();(e!==o||n!==s)&&(t({width:Number(s),height:Number(o)}),e=o,n=s)},200);return Y("resize",r,window)}function ne(t,e){const n=$t({},t);return e||delete n.userTriggered,n}const an=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function sn({inputCb:t,doc:e,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:l,sampling:a,userTriggeredOnInput:i}){function c(h){let m=ft(h);const C=h.isTrusted;if(m&&m.tagName==="OPTION"&&(m=m.parentElement),!m||!m.tagName||an.indexOf(m.tagName)<0||W(m,r))return;const O=m.type;if(m.classList.contains(o))return;let D=m.value,I=!1;O==="radio"||O==="checkbox"?I=m.checked:(s[m.tagName.toLowerCase()]||s[O])&&(D=Mt({maskInputOptions:s,tagName:m.tagName,type:O,value:D,maskInputFn:l})),d(m,ne({text:D,isChecked:I,userTriggered:C},i));const T=m.name;O==="radio"&&T&&I&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(B=>{B!==m&&d(B,ne({text:B.value,isChecked:!I,userTriggered:!1},i))})}function d(h,m){const C=re.get(h);if(!C||C.text!==m.text||C.isChecked!==m.isChecked){re.set(h,m);const O=n.getId(h);t(en($t({},m),{id:O}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>Y(h,c,e)),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return f&&f.set&&p.push(...u.map(h=>Ct(h[0],h[1],{set(){c({target:this})}}))),()=>{p.forEach(h=>h())}}function kt(t){const e=[];function n(r,o){if(Kt&&r.parentRule instanceof CSSGroupingRule||Jt&&r.parentRule instanceof CSSMediaRule||Qt&&r.parentRule instanceof CSSSupportsRule||qt&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(t,e)}function ln({styleSheetRuleCb:t,mirror:e},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const c=e.getId(this.ownerNode);return c!==-1&&t({id:c,adds:[{rule:a,index:i}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=e.getId(this.ownerNode);return i!==-1&&t({id:i,removes:[{index:a}]}),o.apply(this,arguments)};const s={};Kt?s.CSSGroupingRule=n.CSSGroupingRule:(Jt&&(s.CSSMediaRule=n.CSSMediaRule),qt&&(s.CSSConditionRule=n.CSSConditionRule),Qt&&(s.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(s).forEach(([a,i])=>{l[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(c,d){const p=e.getId(this.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:c,index:[...kt(this),d||0]}]}),l[a].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(c){const d=e.getId(this.parentStyleSheet.ownerNode);return d!==-1&&t({id:d,removes:[{index:[...kt(this),c]}]}),l[a].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=l[a].insertRule,i.prototype.deleteRule=l[a].deleteRule})}}function cn({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,l,a){var i,c;const d=e.getId((c=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:c.ownerNode);return d!==-1&&t({id:d,set:{property:s,value:l,priority:a},index:kt(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var l,a;const i=e.getId((a=(l=this.parentRule)==null?void 0:l.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&t({id:i,remove:{property:s},index:kt(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function un({mediaInteractionCb:t,blockClass:e,mirror:n,sampling:r}){const o=l=>ht(a=>{const i=ft(a);if(!i||W(i,e))return;const{currentTime:c,volume:d,muted:p}=i;t({type:l,id:n.getId(i),currentTime:c,volume:d,muted:p})},r.media||500),s=[Y("play",o(mt.Play)),Y("pause",o(mt.Pause)),Y("seeked",o(mt.Seeked)),Y("volumechange",o(mt.VolumeChange))];return()=>{s.forEach(l=>l())}}function dn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,c){const d=new s(a,i,c);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:c,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const l=it(e.fonts,"add",function(a){return function(i){return setTimeout(()=>{const c=o.get(i);c&&(t(c),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(l),()=>{r.forEach(a=>a())}}function pn(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:l,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:p,fontCb:f}=t;t.mutationCb=(...u)=>{e.mutation&&e.mutation(...u),n(...u)},t.mousemoveCb=(...u)=>{e.mousemove&&e.mousemove(...u),r(...u)},t.mouseInteractionCb=(...u)=>{e.mouseInteraction&&e.mouseInteraction(...u),o(...u)},t.scrollCb=(...u)=>{e.scroll&&e.scroll(...u),s(...u)},t.viewportResizeCb=(...u)=>{e.viewportResize&&e.viewportResize(...u),l(...u)},t.inputCb=(...u)=>{e.input&&e.input(...u),a(...u)},t.mediaInteractionCb=(...u)=>{e.mediaInteaction&&e.mediaInteaction(...u),i(...u)},t.styleSheetRuleCb=(...u)=>{e.styleSheetRule&&e.styleSheetRule(...u),c(...u)},t.styleDeclarationCb=(...u)=>{e.styleDeclaration&&e.styleDeclaration(...u),d(...u)},t.canvasMutationCb=(...u)=>{e.canvasMutation&&e.canvasMutation(...u),p(...u)},t.fontCb=(...u)=>{e.font&&e.font(...u),f(...u)}}function hn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};pn(t,e);const r=te(t,t.doc),o=nn(t),s=rn(t),l=ee(t),a=on(t),i=sn(t),c=un(t),d=ln(t,{win:n}),p=cn(t,{win:n}),f=t.collectFonts?dn(t):()=>{},u=[];for(const h of t.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{rt.forEach(h=>h.reset()),r.disconnect(),o(),s(),l(),a(),i(),c(),d(),p(),f(),u.forEach(h=>h())}}class mn{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,e)}}var fn=Object.defineProperty,yn=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,ae=(t,e,n)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,se=(t,e)=>{for(var n in e||(e={}))gn.call(e,n)&&ae(t,n,e[n]);if(oe)for(var n of oe(e))bn.call(e,n)&&ae(t,n,e[n]);return t},ie=(t,e)=>yn(t,vn(e));class Sn{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(it(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,n){te(ie(se({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ee(ie(se({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(it(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e())}}for(var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=typeof Uint8Array>"u"?[]:new Uint8Array(256),It=0;It<ct.length;It++)Cn[ct.charCodeAt(It)]=It;var kn=function(t){var e=new Uint8Array(t),n,r=e.length,o="";for(n=0;n<r;n+=3)o+=ct[e[n]>>2],o+=ct[(e[n]&3)<<4|e[n+1]>>4],o+=ct[(e[n+1]&15)<<2|e[n+2]>>6],o+=ct[e[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const le=new Map;function In(t,e){let n=le.get(t);return n||(n=new Map,le.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const ce=(t,e,n)=>{if(!t||!(de(t,e)||typeof t=="object"))return;const r=t.constructor.name,o=In(n,r);let s=o.indexOf(t);return s===-1&&(s=o.length,o.push(t)),s};function wt(t,e,n){if(t instanceof Array)return t.map(r=>wt(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,o=kn(t);return{rr_type:r,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[wt(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",o=t.toDataURL();return{rr_type:r,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[wt(t.data,e,n),t.width,t.height]};if(de(t,e)||typeof t=="object"){const r=t.constructor.name,o=ce(t,e,n);return{rr_type:r,index:o}}}}return t}const ue=(t,e,n)=>[...t].map(r=>wt(r,e,n)),de=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function");return Boolean(n.find(r=>t instanceof e[r]))};function wn(t,e,n,r){const o=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=it(e.CanvasRenderingContext2D.prototype,l,function(i){return function(...c){return W(this.canvas,n)||setTimeout(()=>{const d=ue([...c],e,this);t(this.canvas,{type:lt["2D"],property:l,args:d})},0),i.apply(this,c)}});o.push(a)}catch{const i=Ct(e.CanvasRenderingContext2D.prototype,l,{set(c){t(this.canvas,{type:lt["2D"],property:l,args:[c],setter:!0})}});o.push(i)}return()=>{o.forEach(l=>l())}}function pe(t,e){const n=[];try{const r=it(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...l){return W(this,e)||"__context"in this||(this.__context=s),o.apply(this,[s,...l])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function he(t,e,n,r,o,s){const l=[],a=Object.getOwnPropertyNames(t);for(const i of a)try{if(typeof t[i]!="function")continue;const c=it(t,i,function(d){return function(...p){const f=d.apply(this,p);if(ce(f,s,t),!W(this.canvas,r)){const u=o.getId(this.canvas),h=ue([...p],s,t),m={type:e,property:i,args:h};n(this.canvas,m)}return f}});l.push(c)}catch{const d=Ct(t,i,{set(p){n(this.canvas,{type:e,property:i,args:[p],setter:!0})}});l.push(d)}return l}function Mn(t,e,n,r){const o=[];return o.push(...he(e.WebGLRenderingContext.prototype,lt.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...he(e.WebGL2RenderingContext.prototype,lt.WebGL2,t,n,r,e)),()=>{o.forEach(s=>s())}}function Tn(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Nn(t,e,n){var r=e===void 0?null:e,o=n===void 0?!1:n,s=Tn(t,o),l=s.indexOf(`
4
+ `,10)+1,a=s.substring(l)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function On(t,e,n){var r;return function(s){return r=r||Nn(t,e,n),new Worker(r,s)}}var xn=On("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),me=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,Rn=(t,e)=>{var n={};for(var r in t)En.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&me)for(var r of me(t))e.indexOf(r)<0&&Ln.call(t,r)&&(n[r]=t[r]);return n},Dn=(t,e,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(c){o(c)}},l=i=>{try{a(n.throw(i))}catch(c){o(c)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,l);a((n=n.apply(t,e)).next())});class Fn{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(l,a){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r){const o=pe(n,r),s=new Map,l=new xn;l.onmessage=p=>{const{id:f}=p.data;if(s.set(f,!1),!("base64"in p.data))return;const{base64:u,type:h,width:m,height:C}=p.data;this.mutationCb({id:f,type:lt["2D"],commands:[{property:"clearRect",args:[0,0,m,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/e;let i=0,c;const d=p=>{if(i&&p-i<a){c=requestAnimationFrame(d);return}i=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(f=>Dn(this,null,function*(){var u;const h=this.mirror.getId(f);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(f.__context)){const C=f.getContext(f.__context);((u=C?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&C?.clear(C.COLOR_BUFFER_BIT)}const m=yield createImageBitmap(f);l.postMessage({id:h,bitmap:m,width:f.width,height:f.height},[m])})),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=pe(e,n),o=wn(this.processMutation.bind(this),e,n,this.mirror),s=Mn(this.processMutation.bind(this),e,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(l=>Rn(l,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(e)}}class Pn{constructor(e){this.trackedStylesheets=new WeakSet,this.mutationCb=e.mutationCb}addStylesheet(e){this.trackedStylesheets.has(e)||(this.trackedStylesheets.add(e),this.trackStylesheet(e))}trackStylesheet(e){}attachStylesheet(e,n,r){this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(e)}}var An=Object.defineProperty,_n=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,ye=(t,e,n)=>e in t?An(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Gn.call(e,n)&&ye(t,n,e[n]);if(fe)for(var n of fe(e))Vn.call(e,n)&&ye(t,n,e[n]);return t},jn=(t,e)=>_n(t,Wn(e));function F(t){return jn($({},t),{timestamp:Date.now()})}let E,yt;const et=be();function vt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:l="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:f,maskInputFn:u,maskTextFn:h,hooks:m,packFn:C,sampling:O={},mousemoveWait:D,recordCanvas:I=!1,userTriggeredOnInput:T=!1,collectFonts:B=!1,inlineImages:G=!1,plugins:w,keepIframeSrcFn:y=()=>!1,enableStrictPrivacy:J=!1}=t;if(!e)throw new Error("emit function is required");D!==void 0&&O.mousemove===void 0&&(O.mousemove=D),et.reset();const V=d===!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}:p!==void 0?p:{password:!0},j=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};He();let K,_=0;const Q=v=>{for(const L of w||[])L.eventProcessor&&(v=L.eventProcessor(v));return C&&(v=C(v)),v};E=(v,L)=>{var P;if(((P=rt[0])==null?void 0:P.isFrozen())&&v.type!==x.FullSnapshot&&!(v.type===x.IncrementalSnapshot&&v.data.source===A.Mutation)&&rt.forEach(b=>b.unfreeze()),e(Q(v),L),v.type===x.FullSnapshot)K=v,_=0;else if(v.type===x.IncrementalSnapshot){if(v.data.source===A.Mutation&&v.data.isAttachIframe)return;_++;const b=r&&_>=r,H=n&&v.timestamp-K.timestamp>n;(b||H)&&yt(!0)}};const z=v=>{E(F({type:x.IncrementalSnapshot,data:$({source:A.Mutation},v)}))},Z=v=>E(F({type:x.IncrementalSnapshot,data:$({source:A.Scroll},v)})),q=v=>E(F({type:x.IncrementalSnapshot,data:$({source:A.CanvasMutation},v)})),N=new mn({mutationCb:z}),U=new Pn({mutationCb:z}),X=new Fn({recordCanvas:I,mutationCb:q,win:window,blockClass:o,mirror:et,sampling:O.canvas}),g=new Sn({mutationCb:z,scrollCb:Z,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskInputOptions:V,maskTextFn:h,maskInputFn:u,recordCanvas:I,inlineImages:G,sampling:O,slimDOMOptions:j,iframeManager:N,stylesheetManager:U,canvasManager:X,enableStrictPrivacy:J},mirror:et});yt=(v=!1)=>{var L,P,b,H;E(F({type:x.Meta,data:{href:window.location.href,width:Vt(),height:Gt()}}),v),rt.forEach(k=>k.lock());const S=ze(document,{mirror:et,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskAllInputs:V,maskTextFn:h,slimDOM:j,recordCanvas:I,inlineImages:G,enableStrictPrivacy:J,onSerialize:k=>{Zt(k,et)&&N.addIframe(k),Ut(k)&&g.addShadowRoot(k.shadowRoot,document)},onIframeLoad:(k,tt)=>{N.attachIframe(k,tt,et),g.observeAttachShadow(k)},onStylesheetLoad:(k,tt)=>{this.stylesheetManager.attachStylesheet(k,tt,this.mirror)},keepIframeSrcFn:y});if(!S)return console.warn("Failed to snapshot the document");E(F({type:x.FullSnapshot,data:{node:S,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((P=(L=document?.body)==null?void 0:L.parentElement)==null?void 0:P.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:H.scrollTop)||document?.body.scrollTop||0}}})),rt.forEach(k=>k.unlock())};try{const v=[];v.push(Y("DOMContentLoaded",()=>{E(F({type:x.DomContentLoaded,data:{}}))}));const L=b=>{var H;return hn({mutationCb:z,mousemoveCb:(S,k)=>E(F({type:x.IncrementalSnapshot,data:{source:k,positions:S}})),mouseInteractionCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.MouseInteraction},S)})),scrollCb:Z,viewportResizeCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.ViewportResize},S)})),inputCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.Input},S)})),mediaInteractionCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.MediaInteraction},S)})),styleSheetRuleCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.StyleSheetRule},S)})),styleDeclarationCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.StyleDeclaration},S)})),canvasMutationCb:q,fontCb:S=>E(F({type:x.IncrementalSnapshot,data:$({source:A.Font},S)})),blockClass:o,ignoreClass:l,maskTextClass:a,maskTextSelector:i,maskInputOptions:V,inlineStylesheet:c,sampling:O,recordCanvas:I,inlineImages:G,userTriggeredOnInput:T,collectFonts:B,doc:b,maskInputFn:u,maskTextFn:h,blockSelector:s,slimDOMOptions:j,mirror:et,iframeManager:N,stylesheetManager:U,shadowDomManager:g,canvasManager:X,enableStrictPrivacy:J,plugins:((H=w?.filter(S=>S.observer))==null?void 0:H.map(S=>({observer:S.observer,options:S.options,callback:k=>E(F({type:x.Plugin,data:{plugin:S.name,payload:k}}))})))||[]},m)};N.addLoadListener(b=>{v.push(L(b.contentDocument))});const P=()=>{yt(),v.push(L(document))};return document.readyState==="interactive"||document.readyState==="complete"?P():v.push(Y("load",()=>{E(F({type:x.Load,data:{}})),P()},window)),()=>{v.forEach(b=>b())}}catch(v){console.warn(v)}}return vt.addCustomEvent=(t,e)=>{!E||E(F({type:x.Custom,data:{tag:t,payload:e}}))},vt.freezePage=()=>{rt.forEach(t=>t.freeze())},vt.takeFullSnapshot=t=>{if(!yt)throw new Error("please take full snapshot after start recording");yt(t)},vt.mirror=et,vt}();
16
5
  //# sourceMappingURL=rrweb-record.min.js.map