@highlight-run/rrweb 1.2.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/plugins/console-record.js +655 -0
  2. package/dist/plugins/console-record.min.js +1 -1
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +293 -0
  5. package/dist/plugins/console-replay.min.js +16 -0
  6. package/dist/plugins/console-replay.min.js.map +1 -0
  7. package/dist/plugins/sequential-id-record.js +33 -0
  8. package/dist/plugins/sequential-id-record.min.js +2 -0
  9. package/dist/plugins/sequential-id-record.min.js.map +1 -0
  10. package/dist/plugins/sequential-id-replay.js +37 -0
  11. package/dist/plugins/sequential-id-replay.min.js +2 -0
  12. package/dist/plugins/sequential-id-replay.min.js.map +1 -0
  13. package/dist/record/rrweb-record-pack.js +747 -0
  14. package/dist/record/rrweb-record-pack.min.js +16 -0
  15. package/dist/record/rrweb-record-pack.min.js.map +1 -0
  16. package/dist/record/rrweb-record.js +3318 -0
  17. package/dist/record/rrweb-record.min.js +16 -0
  18. package/dist/record/rrweb-record.min.js.map +1 -0
  19. package/dist/replay/rrweb-replay-unpack.js +4626 -0
  20. package/dist/replay/rrweb-replay-unpack.min.css +2 -0
  21. package/dist/replay/rrweb-replay-unpack.min.css.map +1 -0
  22. package/dist/replay/rrweb-replay-unpack.min.js +30 -0
  23. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -0
  24. package/dist/replay/rrweb-replay.js +4216 -0
  25. package/dist/replay/rrweb-replay.min.css +2 -0
  26. package/dist/replay/rrweb-replay.min.css.map +1 -0
  27. package/dist/replay/rrweb-replay.min.js +30 -0
  28. package/dist/replay/rrweb-replay.min.js.map +1 -0
  29. package/dist/rrweb-all.js +8708 -0
  30. package/dist/rrweb-all.min.css +2 -0
  31. package/dist/rrweb-all.min.css.map +1 -0
  32. package/dist/rrweb-all.min.js +30 -0
  33. package/dist/rrweb-all.min.js.map +1 -0
  34. package/dist/rrweb.js +7294 -0
  35. package/dist/rrweb.min.css +2 -0
  36. package/dist/rrweb.min.css.map +1 -0
  37. package/dist/rrweb.min.js +2 -2
  38. package/dist/rrweb.min.js.map +1 -1
  39. package/es/rrweb/ext/@xstate/fsm/es/index.js +17 -0
  40. package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +49 -0
  41. package/es/rrweb/ext/fflate/esm/browser.js +777 -0
  42. package/es/rrweb/ext/mitt/dist/mitt.es.js +63 -0
  43. package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +78 -0
  44. package/es/rrweb/packages/rrweb/src/entries/all.js +13 -0
  45. package/es/rrweb/packages/rrweb/src/index.js +12 -0
  46. package/es/rrweb/packages/rrweb/src/packer/base.js +3 -0
  47. package/es/rrweb/packages/rrweb/src/packer/pack.js +10 -0
  48. package/es/rrweb/packages/rrweb/src/packer/unpack.js +29 -0
  49. package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +179 -0
  50. package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +134 -0
  51. package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +141 -0
  52. package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +111 -0
  53. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +23 -0
  54. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +28 -0
  55. package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +32 -0
  56. package/es/rrweb/packages/rrweb/src/record/index.js +381 -0
  57. package/es/rrweb/packages/rrweb/src/record/mutation.js +532 -0
  58. package/es/rrweb/packages/rrweb/src/record/observer.js +665 -0
  59. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +78 -0
  60. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +93 -0
  61. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +30 -0
  62. package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +116 -0
  63. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +78 -0
  64. package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +45 -0
  65. package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +25 -0
  66. package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +35 -0
  67. package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +124 -0
  68. package/es/rrweb/packages/rrweb/src/replay/index.js +1864 -0
  69. package/es/rrweb/packages/rrweb/src/replay/machine.js +321 -0
  70. package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +221 -0
  71. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +8 -0
  72. package/es/rrweb/packages/rrweb/src/replay/timer.js +96 -0
  73. package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +121 -0
  74. package/es/rrweb/packages/rrweb/src/types.js +75 -0
  75. package/es/rrweb/packages/rrweb/src/utils.js +509 -0
  76. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1697 -0
  77. package/lib/plugins/console-record.js +650 -0
  78. package/lib/plugins/console-replay.js +288 -0
  79. package/lib/plugins/sequential-id-record.js +28 -0
  80. package/lib/plugins/sequential-id-replay.js +32 -0
  81. package/lib/record/rrweb-record-pack.js +742 -0
  82. package/lib/record/rrweb-record.js +3315 -0
  83. package/lib/replay/rrweb-replay-unpack.js +4621 -0
  84. package/lib/replay/rrweb-replay.js +4211 -0
  85. package/lib/rrweb-all.js +8703 -0
  86. package/lib/rrweb.js +7289 -0
  87. package/package.json +41 -43
  88. package/typings/entries/all.d.ts +6 -0
  89. package/{dist → typings}/entries/record-pack.d.ts +0 -0
  90. package/{dist → typings}/entries/replay-unpack.d.ts +0 -0
  91. package/{dist → typings}/index.d.ts +1 -2
  92. package/{dist → typings}/packer/base.d.ts +0 -0
  93. package/{dist → typings}/packer/index.d.ts +0 -0
  94. package/{dist → typings}/packer/pack.d.ts +0 -0
  95. package/{dist → typings}/packer/unpack.d.ts +0 -0
  96. package/{dist → typings}/plugins/console/record/error-stack-parser.d.ts +0 -0
  97. package/{dist → typings}/plugins/console/record/index.d.ts +3 -2
  98. package/{dist → typings}/plugins/console/record/stringify.d.ts +0 -0
  99. package/{dist → typings}/plugins/console/replay/index.d.ts +2 -2
  100. package/{dist → typings}/plugins/sequential-id/record/index.d.ts +0 -0
  101. package/{dist → typings}/plugins/sequential-id/replay/index.d.ts +0 -0
  102. package/{dist → typings}/record/iframe-manager.d.ts +1 -1
  103. package/{dist → typings}/record/index.d.ts +0 -0
  104. package/{dist → typings}/record/mutation.d.ts +5 -8
  105. package/typings/record/observer.d.ts +7 -0
  106. package/{dist → typings}/record/observers/canvas/2d.d.ts +0 -0
  107. package/{dist → typings}/record/observers/canvas/canvas-manager.d.ts +0 -0
  108. package/{dist → typings}/record/observers/canvas/canvas.d.ts +0 -0
  109. package/{dist → typings}/record/observers/canvas/serialize-args.d.ts +1 -1
  110. package/{dist → typings}/record/observers/canvas/webgl.d.ts +0 -0
  111. package/typings/record/observers/canvas/webgl2.d.ts +2 -0
  112. package/typings/record/shadow-dom-manager.d.ts +21 -0
  113. package/{dist → typings}/replay/canvas/2d.d.ts +0 -0
  114. package/{dist → typings}/replay/canvas/index.d.ts +0 -0
  115. package/{dist → typings}/replay/canvas/webgl.d.ts +0 -0
  116. package/{dist → typings}/replay/index.d.ts +1 -0
  117. package/{dist → typings}/replay/machine.d.ts +0 -0
  118. package/{dist → typings}/replay/smoothscroll.d.ts +0 -0
  119. package/{dist → typings}/replay/styles/inject-style.d.ts +0 -0
  120. package/{dist → typings}/replay/timer.d.ts +0 -0
  121. package/{dist → typings}/replay/virtual-styles.d.ts +1 -1
  122. package/{dist → typings}/rrdom/index.d.ts +0 -0
  123. package/{dist → typings}/rrdom/tree-node.d.ts +0 -0
  124. package/{dist → typings}/types.d.ts +7 -8
  125. package/{dist → typings}/utils.d.ts +3 -4
  126. package/CHANGELOG.md +0 -26
  127. package/README.md +0 -124
  128. package/README.zh_CN.md +0 -122
  129. package/dist/entries/all.d.ts +0 -4
  130. package/dist/index.css +0 -82
  131. package/dist/index.css.map +0 -1
  132. package/dist/index.js +0 -3
  133. package/dist/index.js.LICENSE.txt +0 -14
  134. package/dist/index.js.map +0 -1
  135. package/dist/plugins/entries/all.d.ts +0 -4
  136. package/dist/plugins/entries/record-pack.d.ts +0 -2
  137. package/dist/plugins/entries/replay-unpack.d.ts +0 -2
  138. package/dist/plugins/index.d.ts +0 -9
  139. package/dist/plugins/packer/base.d.ts +0 -7
  140. package/dist/plugins/packer/index.d.ts +0 -2
  141. package/dist/plugins/packer/pack.d.ts +0 -2
  142. package/dist/plugins/packer/unpack.d.ts +0 -2
  143. package/dist/plugins/plugins/console/record/error-stack-parser.d.ts +0 -37
  144. package/dist/plugins/plugins/console/record/index.d.ts +0 -41
  145. package/dist/plugins/plugins/console/record/stringify.d.ts +0 -2
  146. package/dist/plugins/plugins/console/replay/index.d.ts +0 -9
  147. package/dist/plugins/plugins/sequential-id/record/index.d.ts +0 -6
  148. package/dist/plugins/plugins/sequential-id/replay/index.d.ts +0 -7
  149. package/dist/plugins/record/iframe-manager.d.ts +0 -13
  150. package/dist/plugins/record/index.d.ts +0 -9
  151. package/dist/plugins/record/mutation.d.ts +0 -45
  152. package/dist/plugins/record/observer.d.ts +0 -11
  153. package/dist/plugins/record/observers/canvas/2d.d.ts +0 -2
  154. package/dist/plugins/record/observers/canvas/canvas-manager.d.ts +0 -32
  155. package/dist/plugins/record/observers/canvas/canvas.d.ts +0 -2
  156. package/dist/plugins/record/observers/canvas/serialize-args.d.ts +0 -6
  157. package/dist/plugins/record/observers/canvas/webgl.d.ts +0 -2
  158. package/dist/plugins/record/shadow-dom-manager.d.ts +0 -34
  159. package/dist/plugins/replay/canvas/2d.d.ts +0 -9
  160. package/dist/plugins/replay/canvas/index.d.ts +0 -9
  161. package/dist/plugins/replay/canvas/webgl.d.ts +0 -11
  162. package/dist/plugins/replay/index.d.ts +0 -82
  163. package/dist/plugins/replay/machine.d.ts +0 -85
  164. package/dist/plugins/replay/smoothscroll.d.ts +0 -1
  165. package/dist/plugins/replay/styles/inject-style.d.ts +0 -2
  166. package/dist/plugins/replay/timer.d.ts +0 -19
  167. package/dist/plugins/replay/virtual-styles.d.ts +0 -43
  168. package/dist/plugins/rrdom/index.d.ts +0 -1
  169. package/dist/plugins/rrdom/tree-node.d.ts +0 -20
  170. package/dist/plugins/snapshot/css.d.ts +0 -92
  171. package/dist/plugins/snapshot/index.d.ts +0 -5
  172. package/dist/plugins/snapshot/rebuild.d.ts +0 -19
  173. package/dist/plugins/snapshot/snapshot.d.ts +0 -49
  174. package/dist/plugins/snapshot/types.d.ts +0 -99
  175. package/dist/plugins/snapshot/utils.d.ts +0 -11
  176. package/dist/plugins/types.d.ts +0 -509
  177. package/dist/plugins/utils.d.ts +0 -71
  178. package/dist/record/observer.d.ts +0 -11
  179. package/dist/record/shadow-dom-manager.d.ts +0 -34
  180. package/dist/snapshot/css.d.ts +0 -92
  181. package/dist/snapshot/index.d.ts +0 -5
  182. package/dist/snapshot/rebuild.d.ts +0 -19
  183. package/dist/snapshot/snapshot.d.ts +0 -49
  184. package/dist/snapshot/types.d.ts +0 -99
  185. package/dist/snapshot/utils.d.ts +0 -11
@@ -0,0 +1,2 @@
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
2
+ /*# sourceMappingURL=rrweb-all.min.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA,kBACE,iBACF,CACA,gBACE,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,2CAA+C,CAC/C,uBAAwB,CACxB,uBAAkC,CAClC,2BAA4B,CAC5B,0cAAuzB,CACvzB,wBACF,CAEA,sBACE,sBACF,CAEA,6BACE,iCACF,CACA,6BACE,qBAAsB,CACtB,UAAW,CACX,WAAY,CAGZ,kBAAmB,CACnB,iBAAkB,CAClB,gBAAiB,CACjB,kCAAkC,CAClC,oEACF,CACA,0CACE,oBAAkC,CAClC,wEACF,CACA,mCACE,SACF,CACA,0CACE,uCACF,CACA,qBACE,iBAAkB,CAClB,mBACF,CAEA,iBACE,GACE,UAAY,CACZ,UAAW,CACX,WAAY,CACZ,sBACF,CACA,IACE,UAAW,CACX,WAAY,CACZ,UAAY,CACZ,kBACF,CACA,GACE,sBACF,CACF,CAEA,uBACE,GACE,SAAU,CACV,UAAW,CACX,WACF,CACA,IACE,UAAY,CACZ,UAAW,CACX,WACF,CACF","file":"rrweb-all.min.css","sourcesContent":[".replayer-wrapper {\n position: relative;\n}\n.replayer-mouse {\n position: absolute;\n width: 20px;\n height: 20px;\n transition: left 0.05s linear, top 0.05s linear;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iNyA1IDE4IDE4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyOCAyOCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaGVpZ2h0PSIzMDBweCIgd2lkdGg9IjMwMHB4Ij4NCjxwb2x5Z29uIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iOC4yLDIwLjkgOC4yLDQuOSAxOS44LDE2LjUgMTMsMTYuNSAxMi42LDE2LjYgIi8+DQo8cG9seWdvbiBmaWxsPSIjRkZGRkZGIiBwb2ludHM9IjE3LjMsMjEuNiAxMy43LDIzLjEgOSwxMiAxMi43LDEwLjUgIi8+DQo8cmVjdCB4PSIxMi41IiB5PSIxMy42IiB0cmFuc2Zvcm09Im1hdHJpeCgwLjkyMjEgLTAuMzg3MSAwLjM4NzEgMC45MjIxIC01Ljc2MDUgNi41OTA5KSIgd2lkdGg9IjIiIGhlaWdodD0iOCIvPg0KPHBvbHlnb24gcG9pbnRzPSI5LjIsNy4zIDkuMiwxOC41IDEyLjIsMTUuNiAxMi42LDE1LjUgMTcuNCwxNS41ICIvPg0KPC9zdmc+DQo=');\n border-color: transparent; /* otherwise we transition from black when .touch-device class is added */\n}\n\n.replayer-mouse::after {\n background: transparent;\n}\n\n.replayer-mouse.active::after {\n animation: click 0.2s ease-in-out 1;\n}\n.replayer-mouse.touch-device {\n background-image: none; /* there's no passive cursor on touch-only screens */\n width: 70px;\n height: 70px;\n border-width: 4px;\n border-style: solid;\n border-radius: 100%;\n margin-left: -37px;\n margin-top: -37px;\n border-color: rgba(73, 80, 246, 0);\n transition: left 0s linear, top 0s linear, border-color 0.2s ease-in-out;\n}\n.replayer-mouse.touch-device.touch-active {\n border-color: rgba(73, 80, 246, 1);\n transition: left 0.25s linear, top 0.25s linear, border-color 0.2s ease-in-out;\n}\n.replayer-mouse.touch-device::after {\n opacity: 0; /* there's no passive cursor on touch-only screens */\n}\n.replayer-mouse.touch-device.active::after {\n animation: touch-click 0.2s ease-in-out 1;\n}\n.replayer-mouse-tail {\n position: absolute;\n pointer-events: none;\n}\n\n@keyframes click {\n 0% {\n opacity: 0.3;\n width: 20px;\n height: 20px;\n background: transparent;\n }\n 75% {\n width: 24px;\n height: 24px;\n opacity: 0.8;\n background: #dc2626;\n }\n 100% {\n background: transparent;\n }\n}\n\n@keyframes touch-click {\n 0% {\n opacity: 0;\n width: 20px;\n height: 20px;\n }\n 50% {\n opacity: 0.5;\n width: 10px;\n height: 10px;\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ var rrweb=function(e){"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 t,r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])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,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function i(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function a(e){return e.nodeType===e.ELEMENT_NODE}function s(e){var t,r=null===(t=e)||void 0===t?void 0:t.host;return Boolean(r&&r.shadowRoot&&r.shadowRoot===e)}function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[r.toLowerCase()]||t[n])&&(a=i?i(a):"*".repeat(a.length)),a}!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"}(t||(t={}));var c="__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 d,f,p=1,h=new RegExp("[^a-z0-9-_:]");function m(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(v).join(""):null}catch(e){return null}}function v(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=m(e.styleSheet)||t}catch(e){}return t}var y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,g=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,b=/^(data:)([^,]*),(.*)/i;function S(e,t){return(e||"").replace(y,(function(e,r,n,o,i,a){var s,l=n||i||a,c=r||o||"";if(!l)return e;if(!g.test(l))return"url("+c+l+c+")";if(b.test(l))return"url("+c+l+c+")";if("/"===l[0])return"url("+c+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)+c+")";var u=t.split("/"),d=l.split("/");u.pop();for(var f=0,p=d;f<p.length;f++){var h=p[f];"."!==h&&(".."===h?u.pop():u.push(h))}return"url("+c+u.join("/")+c+")"}))}var w=/^[^ \t\n\r\u000c]+/,x=/^[, \t\n\r\u000c]+/;function T(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function E(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return"src"===r||"href"===r&&n||"xlink:href"===r&&n&&"#"!==n[0]?T(e,n):"background"!==r||!n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r&&n?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(x),!(r>=t.length);){var i=n(w);if(","===i.slice(-1))i=T(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=T(e,i);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r&&n?S(n,E()):"object"===t&&"data"===r&&n?T(e,n):n:T(e,n)}function C(e,t,r){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;n<e.classList.length;n++){var o=e.classList[n];if(t.test(o))return!0}return!(!r||!e.matches(r))||C(e.parentNode,t,r)}return e.nodeType,e.TEXT_NODE,C(e.parentNode,t,r)}function M(e,r){var n,o,i,a,s=r.doc,p=r.blockClass,v=r.blockSelector,y=r.maskTextClass,g=r.maskTextSelector,b=r.inlineStylesheet,w=r.maskInputOptions,x=void 0===w?{}:w,T=r.maskTextFn,M=r.maskInputFn,k=r.dataURLOptions,N=void 0===k?{}:k,R=r.inlineImages,_=r.recordCanvas,O=r.keepIframeSrcFn,L=r.enableStrictPrivacy;if(s.__sn){var A=s.__sn.id;o=1===A?void 0:A}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:t.Document,childNodes:[],compatMode:e.compatMode,rootId:o}:{type:t.Document,childNodes:[],rootId:o};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:o};case e.ELEMENT_NODE:for(var D=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;n<e.classList.length;n++){var o=e.classList[n];if(t.test(o))return!0}return!!r&&e.matches(r)}(e,p,v),F=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return h.test(t)?"div":t}(e),P={},W=0,j=Array.from(e.attributes);W<j.length;W++){var U=j[W],z=U.name,H=U.value;P[z]=I(s,F,z,H)}if("link"===F&&b){var V=Array.from(s.styleSheets).find((function(t){return t.href===e.href})),B=null;V&&(B=m(V)),B&&(delete P.rel,delete P.href,P._cssText=S(B,V.href))}if("style"===F&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(B=m(e.sheet))&&(P._cssText=S(B,E()));if("input"===F||"textarea"===F||"select"===F){H=e.value;"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&H?P.value=l({type:P.type,tagName:F,value:H,maskInputOptions:x,maskInputFn:M}):e.checked&&(P.checked=e.checked)}if("option"===F&&(e.selected&&!x.select?P.selected=!0:delete P.selected),"canvas"===F&&_)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,i=c in o?o.__rrweb_original__:o;if(new Uint32Array(i.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(P.rr_dataURL=e.toDataURL(N.type,N.quality));else if(!("__context"in e)){var G=e.toDataURL(N.type,N.quality),q=document.createElement("canvas");q.width=e.width,q.height=e.height,G!==q.toDataURL(N.type,N.quality)&&(P.rr_dataURL=G)}if("img"===F&&R){d||(d=s.createElement("canvas"),f=d.getContext("2d"));var Y=e,X=Y.crossOrigin;Y.crossOrigin="anonymous";var Q=function(){try{d.width=Y.naturalWidth,d.height=Y.naturalHeight,f.drawImage(Y,0,0),P.rr_dataURL=d.toDataURL(N.type,N.quality)}catch(e){console.warn("Cannot inline img src="+Y.currentSrc+"! Error: "+e)}X?P.crossOrigin=X:delete P.crossOrigin};Y.complete&&0!==Y.naturalWidth?Q():Y.onload=Q}if("audio"!==F&&"video"!==F||(P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(P.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(P.rr_scrollTop=e.scrollTop),D||"img"===F&&L){var $=e.getBoundingClientRect(),J=$.width,K=$.height;P={class:P.class,rr_width:J+"px",rr_height:K+"px"},D=!0}return"iframe"!==F||O(P.src)||(e.contentDocument||(P.rr_src=P.src),delete P.src),{type:t.Element,tagName:F,attributes:P,childNodes:[],isSVG:(a=e,Boolean("svg"===a.tagName||a.ownerSVGElement)||void 0),needBlock:D,rootId:o};case e.TEXT_NODE:var Z=e.parentNode&&e.parentNode.tagName,ee=e.textContent,te="STYLE"===Z||void 0,re="SCRIPT"===Z||void 0,ne=!1;if(te&&ee){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(ee=(i=e.parentNode.sheet).cssRules?Array.from(i.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}ee=S(ee,E()),ne=!0}if(re?(ee="SCRIPT_PLACEHOLDER",ne=!0):"NOSCRIPT"===Z&&(ee="",ne=!0),!te&&!re&&C(e,y,g)&&ee&&(ee=T?T(ee):ee.replace(/[\S]/g,"*")),L&&!ne&&Z)!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(Z)&&ee&&(ee=u(ee));return{type:t.Text,textContent:ee||"",isStyle:te,rootId:o};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:"",rootId:o};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||"",rootId:o};default:return!1}}function k(e){return void 0===e?"":e.toLowerCase()}function N(e,r){var n,o=r.doc,i=r.map,l=r.blockClass,c=r.blockSelector,u=r.maskTextClass,d=r.maskTextSelector,f=r.skipChild,h=void 0!==f&&f,m=r.inlineStylesheet,v=void 0===m||m,y=r.maskInputOptions,g=void 0===y?{}:y,b=r.maskTextFn,S=r.maskInputFn,w=r.slimDOMOptions,x=r.dataURLOptions,T=void 0===x?{}:x,E=r.inlineImages,I=void 0!==E&&E,C=r.recordCanvas,R=void 0!==C&&C,_=r.onSerialize,O=r.onIframeLoad,L=r.iframeLoadTimeout,A=void 0===L?5e3:L,D=r.keepIframeSrcFn,F=void 0===D?function(){return!1}:D,P=r.enableStrictPrivacy,W=r.preserveWhiteSpace,j=void 0===W||W,U=M(e,{doc:o,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,dataURLOptions:T,inlineImages:I,recordCanvas:R,keepIframeSrcFn:F,enableStrictPrivacy:P});if(!U)return console.warn(e,"not serialized"),null;n="__sn"in e?e.__sn.id:!function(e,r){if(r.comment&&e.type===t.Comment)return!0;if(e.type===t.Element){if(r.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(k(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===k(e.attributes.name)||"icon"===k(e.attributes.rel)||"apple-touch-icon"===k(e.attributes.rel)||"shortcut icon"===k(e.attributes.rel))))return!0;if("meta"===e.tagName){if(r.headMetaDescKeywords&&k(e.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(k(e.attributes.property).match(/^(og|twitter|fb):/)||k(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===k(e.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===k(e.attributes.name)||"googlebot"===k(e.attributes.name)||"bingbot"===k(e.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===k(e.attributes.name)||"generator"===k(e.attributes.name)||"framework"===k(e.attributes.name)||"publisher"===k(e.attributes.name)||"progid"===k(e.attributes.name)||k(e.attributes.property).match(/^article:/)||k(e.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===k(e.attributes.name)||"yandex-verification"===k(e.attributes.name)||"csrf-token"===k(e.attributes.name)||"p:domain_verify"===k(e.attributes.name)||"verify-v1"===k(e.attributes.name)||"verification"===k(e.attributes.name)||"shopify-checkout-api-token"===k(e.attributes.name)))return!0}}return!1}(U,w)&&(j||U.type!==t.Text||U.isStyle||U.textContent.replace(/^\s+|\s+$/gm,"").length)?p++:-2;var z=Object.assign(U,{id:n});if(e.__sn=z,-2===n)return null;i[n]=e,_&&_(e);var H=!h;if(z.type===t.Element){if(H=H&&!z.needBlock,z.needBlock&&"img"===z.tagName){var V=e.cloneNode();V.src="",i[n]=V}delete z.needBlock,e.shadowRoot&&(z.isShadowHost=!0)}if((z.type===t.Document||z.type===t.Element)&&H){w.headWhitespace&&U.type===t.Element&&"head"===U.tagName&&(j=!1);for(var B={doc:o,map:i,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:h,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:T,inlineImages:I,recordCanvas:R,preserveWhiteSpace:j,onSerialize:_,onIframeLoad:O,iframeLoadTimeout:A,keepIframeSrcFn:F,enableStrictPrivacy:P},G=0,q=Array.from(e.childNodes);G<q.length;G++){(Q=N(q[G],B))&&z.childNodes.push(Q)}if(a(e)&&e.shadowRoot)for(var Y=0,X=Array.from(e.shadowRoot.childNodes);Y<X.length;Y++){var Q;(Q=N(X[Y],B))&&(Q.isShadow=!0,z.childNodes.push(Q))}}return e.parentNode&&s(e.parentNode)&&(z.isShadow=!0),z.type===t.Element&&"iframe"===z.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,i=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";n.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&O){var r=N(t,{doc:t,map:i,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:T,inlineImages:I,recordCanvas:R,preserveWhiteSpace:j,onSerialize:_,onIframeLoad:O,iframeLoadTimeout:A,keepIframeSrcFn:F,enableStrictPrivacy:P});r&&O(e,r)}}),A),z}var R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function _(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),p(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function c(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,r=[];for(p(),h(r);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(r.push(t),h(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function p(){f(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return l("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function v(){var e=f(/^([^{]+)/);if(e)return O(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=O(t[0]);if(!f(/^:\s*/))return l("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(R,""),value:n?O(n[0]).replace(R,""):""});return f(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(h(t);e=y();)!1!==e&&(t.push(e),h(t)),e=y();return u()?t:l("missing '}'")}function b(){for(var e,t=[],r=i();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var S,w=E("import"),x=E("charset"),T=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=f(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function I(){if("@"===e[0])return function(){var e=i(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=h();n=b();)a.push(n),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var r=O(t[1]);if(!c())return l("@media missing '{'");var n=h().concat(d());return u()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var e=i(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:O(t[1]),media:O(t[2])})}()||function(){var e=i(),t=f(/^@supports *([^{]+)/);if(t){var r=O(t[1]);if(!c())return l("@supports missing '{'");var n=h().concat(d());return u()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||w()||x()||T()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=O(t[1]),n=O(t[2]);if(!c())return l("@document missing '{'");var o=h().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var r,n=h();r=y();)n.push(r),n=n.concat(h());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=h().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,r=h();t=y();)r.push(t),r=r.concat(h());return u()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function C(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return L((S=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:s}}))}function O(e){return e?e.replace(/^\s+|\s+$/g,""):""}function L(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach((function(e){L(e,n)})):a&&"object"==typeof a&&L(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var A={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var D,F,P,W,j,U,z=/([^\\]):hover/,H=new RegExp(z.source,"g");function V(e,t){var r;if(!(null===(r=window.HIG_CONFIGURATION)||void 0===r?void 0:r.enableOnHoverClass))return e;var n=null==t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var o=_(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){z.test(e)&&i.push(e)}))})),0===i.length)return e;var a=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),s=e.replace(a,(function(e){var t=e.replace(H,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,s),s}function B(){return{stylesWithHoverClass:new Map}}function G(e,r){var n=r.doc,o=r.hackCss,i=r.cache;switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var a,s=function(e){var t=A[e.tagName]?A[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var l=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var r=e.attributes[t];if("option"===s&&"selected"===t&&!1===r)return"continue";if(r="boolean"==typeof r||"number"==typeof r?"":r,t.startsWith("rr_")){if("canvas"===s&&"rr_dataURL"===t){var l=document.createElement("img");l.src=r,l.onload=function(){var e=a.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)}}else if("img"===s&&"rr_dataURL"===t){var c=a;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=r)}if("rr_width"===t)a.style.width=r;else if("rr_height"===t)a.style.height=r;else if("rr_mediaCurrentTime"===t)a.currentTime=e.attributes.rr_mediaCurrentTime;else if("rr_mediaState"===t)switch(r){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var u="textarea"===s&&"value"===t,d="style"===s&&"_cssText"===t;if(d&&o&&"string"==typeof(r=V(r,i))){for(var f=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,p=void 0,h=[];null!==(p=f.exec(r));)p.index===f.lastIndex&&f.lastIndex++,p.forEach((function(e,t){if(0===t){var r=e.slice(5,e.length-2);h.push({originalUrl:r,proxyUrl:r.replace(r,"https://replay-cors-proxy.highlightrun.workers.dev?url="+r)})}}));h.forEach((function(e){r=r.replace(e.originalUrl,e.proxyUrl)}))}if(u||d){for(var m=n.createTextNode(r),v=0,y=Array.from(a.childNodes);v<y.length;v++){var g=y[v];g.nodeType===a.TEXT_NODE&&a.removeChild(g)}return a.appendChild(m),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,r);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,r);else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return a.setAttribute("csp-content",r),"continue";"link"===s&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(t,r))}}catch(e){}}};for(var c in e.attributes)l(c);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case t.Text:return n.createTextNode(e.isStyle&&o?V(e.textContent,i):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function q(e,r){var n=r.doc,o=r.map,i=r.skipChild,s=void 0!==i&&i,l=r.hackCss,c=void 0===l||l,u=r.afterAppend,d=r.cache,f=G(e,{doc:n,hackCss:c,cache:d});if(!f)return null;if(e.rootId&&console.assert(o[e.rootId]===n,"Target document should has the same root id."),e.type===t.Document&&(n.close(),n.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==t.DocumentType&&(e.childNodes[0].type===t.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=n),f.__sn=e,o[e.id]=f,(e.type===t.Document||e.type===t.Element)&&!s)for(var p=0,h=e.childNodes;p<h.length;p++){var m=h[p],v=q(m,{doc:n,map:o,skipChild:!1,hackCss:c,afterAppend:u,cache:d});v?(m.isShadow&&a(f)&&f.shadowRoot?f.shadowRoot.appendChild(v):f.appendChild(v),u&&u(v)):console.warn("Failed to rebuild",m)}return f}function Y(e,r){var n=r.doc,o=r.onVisit,i=r.hackCss,a={},s=q(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===i||i,afterAppend:r.afterAppend,cache:r.cache});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(a,(function(e){o&&o(e),function(e){var r=e.__sn;if(r.type===t.Element){var n=e;for(var o in r.attributes)if(r.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=r.attributes[o];"rr_scrollLeft"===o&&(n.scrollLeft=i),"rr_scrollTop"===o&&(n.scrollTop=i)}}}(e)})),[s,a]}function X(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}function Q(){return{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,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}}e.EventType=void 0,(D=e.EventType||(e.EventType={}))[D.DomContentLoaded=0]="DomContentLoaded",D[D.Load=1]="Load",D[D.FullSnapshot=2]="FullSnapshot",D[D.IncrementalSnapshot=3]="IncrementalSnapshot",D[D.Meta=4]="Meta",D[D.Custom=5]="Custom",D[D.Plugin=6]="Plugin",e.IncrementalSource=void 0,(F=e.IncrementalSource||(e.IncrementalSource={}))[F.Mutation=0]="Mutation",F[F.MouseMove=1]="MouseMove",F[F.MouseInteraction=2]="MouseInteraction",F[F.Scroll=3]="Scroll",F[F.ViewportResize=4]="ViewportResize",F[F.Input=5]="Input",F[F.TouchMove=6]="TouchMove",F[F.MediaInteraction=7]="MediaInteraction",F[F.StyleSheetRule=8]="StyleSheetRule",F[F.CanvasMutation=9]="CanvasMutation",F[F.Font=10]="Font",F[F.Log=11]="Log",F[F.Drag=12]="Drag",F[F.StyleDeclaration=13]="StyleDeclaration",e.MouseInteractions=void 0,(P=e.MouseInteractions||(e.MouseInteractions={}))[P.MouseUp=0]="MouseUp",P[P.MouseDown=1]="MouseDown",P[P.Click=2]="Click",P[P.ContextMenu=3]="ContextMenu",P[P.DblClick=4]="DblClick",P[P.Focus=5]="Focus",P[P.Blur=6]="Blur",P[P.TouchStart=7]="TouchStart",P[P.TouchMove_Departed=8]="TouchMove_Departed",P[P.TouchEnd=9]="TouchEnd",P[P.TouchCancel=10]="TouchCancel",function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(W||(W={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(j||(j={})),e.ReplayerEvents=void 0,(U=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",U.Pause="pause",U.Resume="resume",U.Resize="resize",U.Finish="finish",U.FullsnapshotRebuilded="fullsnapshot-rebuilded",U.LoadStylesheetStart="load-stylesheet-start",U.LoadStylesheetEnd="load-stylesheet-end",U.SkipStart="skip-start",U.SkipEnd="skip-end",U.MouseInteraction="mouse-interaction",U.EventCast="event-cast",U.CustomEvent="custom-event",U.Flush="flush",U.StateChange="state-change",U.PlayBack="play-back";var $="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.";function J(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=setTimeout((function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)}),s))}}function K(e,t,r,n,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return K(e,t,i||{},!0)}}function Z(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch(e){return function(){}}}function ee(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function te(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}e.mirror={map:{},getId:function(){return console.error($),-1},getNode:function(){return console.error($),null},removeNodeFromMap:function(){console.error($)},has:function(){return console.error($),!1},reset:function(){console.error($)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(e.mirror=new Proxy(e.mirror,{get:function(e,t,r){return"map"===t&&console.error($),Reflect.get(e,t,r)}}));var re=function(e){try{if(e instanceof HTMLElement)return"CANVAS"===e.tagName}catch(e){return!1}return!1};function ne(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);r=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(r=!0)}));return r||ne(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,ne(e.parentNode,t)}function oe(e){return"__sn"in e&&-2===e.__sn.id}function ie(e,t){if(s(e))return!1;var r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||ie(e.parentNode,t))}function ae(e){return Boolean(e.changedTouches)}function se(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=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 le=function(){function t(){this.reset()}return t.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},t.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var o=n.parent;o&&(delete n.parent,delete o.children[n.id],r.indexes.delete(e.id))}};o?n?(delete o.parent,delete n.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,r,o,i,a=this,s=this,l=s.tree,c=s.removeNodeMutations,u=s.textMutations,d=s.attributeMutations,f={source:e.IncrementalSource.Mutation,removes:c,texts:u,attributes:d,adds:[]},p=function(e,t){t&&a.removeIdSet.add(e.id),f.texts=f.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),f.attributes=f.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return p(e,!0)})):(f.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return p(e,!1)})))};Object.values(l).forEach((function(e){return p(e,!1)}));try{for(var h=n(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(r=h.return)&&r.call(h)}finally{if(t)throw t.error}}try{for(var y=n(this.inputMap.keys()),g=y.next();!g.done;g=y.next()){v=g.value;this.removeIdSet.has(v)&&this.inputMap.delete(v)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}var b=new Map(this.scrollMap),S=new Map(this.inputMap);return this.reset(),{mutationData:f,scrollMap:b,inputMap:S}},t.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},t.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},t}();function ce(e){var t,r,o={},i=function(e,t){var r={value:e,parent:t,children:[]};return o[e.node.id]=r,r},a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in o){var f=o[u];if(f.parent){var p=f.parent.children.indexOf(f);f.parent.children.splice(p,0,i(c,f.parent))}else{p=a.indexOf(f);a.splice(p,0,i(c,null))}}else if(d in o){var h=o[d];h.children.push(i(c,h))}else a.push(i(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a}function ue(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)ue(e.children[r],t)}function de(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function fe(e,t){var r,n,o=null===(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===n?void 0:n.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=o.getBoundingClientRect(),a=fe(o,t),s=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function pe(e){return Boolean(null==e?void 0:e.shadowRoot)}var he=Object.freeze({__proto__:null,on:X,createMirror:Q,get _mirror(){return e.mirror},throttle:J,hookSetter:K,patch:Z,getWindowHeight:ee,getWindowWidth:te,isCanvasNode:re,isBlocked:ne,isIgnored:oe,isAncestorRemoved:ie,isTouchEvent:ae,polyfill:se,TreeIndex:le,queueToResolveTrees:ce,iterateResolveTree:ue,isIframeINode:de,getBaseDimension:fe,hasShadowRoot:pe});function me(e){return"__ln"in e}var ve=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,r=0;r<e;r++)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&&me(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&me(e.nextSibling)&&e.nextSibling.__ln.previous){r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;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}(),ye=function(e,t){return"".concat(e,"@").concat(t)};function ge(e){return"__sn"in e}var be=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 a=[],l=new ve,c=function(t){for(var r=t,n=-2;-2===n;)n=(r=r&&r.nextSibling)&&e.mirror.getId(r);return n},d=function(t){for(var r,n,o,i,u,d=t.getRootNode?null===(r=t.getRootNode())||void 0===r?void 0:r.host:null,f=d;null===(o=null===(n=null==f?void 0:f.getRootNode)||void 0===n?void 0:n.call(f))||void 0===o?void 0:o.host;)f=(null===(u=null===(i=null==f?void 0:f.getRootNode)||void 0===i?void 0:i.call(f))||void 0===u?void 0:u.host)||null;var p=!(e.doc.contains(t)||null!==f&&e.doc.contains(f));if(t.parentNode&&!p){var h=s(t.parentNode)?e.mirror.getId(d):e.mirror.getId(t.parentNode),m=c(t);if(-1===h||-1===m)return l.addNode(t);var v=N(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(r){de(r)&&e.iframeManager.addIframe(r),pe(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,r){e.iframeManager.attachIframe(t,r),e.shadowDomManager.observeAttachShadow(t)}});v&&a.push({parentId:h,nextId:m,node:v})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var f=n(e.movedSet),p=f.next();!p.done;p=f.next()){var h=p.value;we(e.removes,h,e.mirror)&&!e.movedSet.has(h.parentNode)||d(h)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}try{for(var m=n(e.addedSet),v=m.next();!v.done;v=m.next()){h=v.value;xe(e.droppedSet,h)||we(e.removes,h,e.mirror)?xe(e.movedSet,h)?d(h):e.droppedSet.add(h):d(h)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}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 w=l.length-1;w>=0;w--){var x=l.get(w);if(x){b=e.mirror.getId(x.value.parentNode),S=c(x.value);if(-1!==b&&-1!==S){g=x;break}}}if(!g){for(;l.head;)l.removeNode(l.head.value);break}y=g.previous,l.removeNode(g.value),d(g.value)}var T={texts:e.texts.map((function(t){var r=t.value;return e.enableStrictPrivacy&&r&&(r=u(r)),{id:e.mirror.getId(t.node),value:r}})).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:a};(T.texts.length||T.attributes.length||T.removes.length||T.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(T))}},this.processMutation=function(t){var r,o,i,a;if(!oe(t.target))switch(t.type){case"characterData":var c=t.target.textContent;ne(t.target,e.blockClass)||c===t.oldValue||e.texts.push({value:C(t.target,e.maskTextClass,e.maskTextSelector)&&c?e.maskTextFn?e.maskTextFn(c):c.replace(/[\S]/g,"*"):c,node:t.target});break;case"attributes":var u=t.target;c=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(c=l({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:c,maskInputFn:e.maskInputFn})),ne(t.target,e.blockClass)||c===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 f=e.doc.createElement("span");t.oldValue&&f.setAttribute("style",t.oldValue),void 0!==d.attributes.style&&null!==d.attributes.style||(d.attributes.style={});var p=d.attributes.style;try{for(var h=n(Array.from(u.style)),m=h.next();!m.done;m=h.next()){var v=m.value,y=u.style.getPropertyValue(v),g=u.style.getPropertyPriority(v);y===f.style.getPropertyValue(v)&&g===f.style.getPropertyPriority(v)||(p[v]=""===g?y:[y,g])}}catch(e){r={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}try{for(var b=n(Array.from(f.style)),S=b.next();!S.done;S=b.next()){v=S.value;""===u.style.getPropertyValue(v)&&(p[v]=!1)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}}else{if("INPUT"===t.target.tagName){var w=t.target;if("password"===w.type){d.attributes.value="*".repeat(w.value.length);break}}d.attributes[t.attributeName]=I(e.doc,t.target.tagName,t.attributeName,c)}break;case"childList":t.addedNodes.forEach((function(r){return e.genAdds(r,t.target)})),t.removedNodes.forEach((function(r){var n=e.mirror.getId(r),o=s(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);ne(t.target,e.blockClass)||oe(r)||(e.addedSet.has(r)?(Se(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||ie(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[ye(n,o)]?Se(e.movedSet,r):e.removes.push({parentId:o,id:n,isShadow:!!s(t.target)||void 0})),e.mapRemoves.push(r))}))}},this.genAdds=function(t,r){if(!r||!ne(r,e.blockClass)){if(ge(t)){if(oe(t))return;e.movedSet.add(t);var n=null;r&&ge(r)&&(n=r.__sn.id),n&&(e.movedMap[ye(t.__sn.id,n)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);ne(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(r){t[r]=e[r]}))},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 Se(e,t){e.delete(t),t.childNodes.forEach((function(t){return Se(e,t)}))}function we(e,t,r){var n=t.parentNode;if(!n)return!1;var o=r.getId(n);return!!e.some((function(e){return e.id===o}))||we(e,n,r)}function xe(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||xe(e,r))}var Te=[],Ee="undefined"!=typeof CSSGroupingRule,Ie="undefined"!=typeof CSSMediaRule,Ce="undefined"!=typeof CSSSupportsRule,Me="undefined"!=typeof CSSConditionRule;function ke(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 Ne(e,t){var r,n,o=new be;Te.push(o),o.init(e);var i=window.MutationObserver||window.__rrMutationObserver,a=null===(n=null===(r=null===window||void 0===window?void 0:window.Zone)||void 0===r?void 0:r.__symbol__)||void 0===n?void 0:n.call(r,"MutationObserver");a&&window[a]&&(i=window[a]);var s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Re(t){var r=t.mouseInteractionCb,n=t.doc,o=t.mirror,i=t.blockClass,a=t.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(t){var a=t.toLowerCase(),s=function(t){return function(n){var a=ke(n);if(!ne(a,i)&&!re(a)){var s=ae(n)?n.changedTouches[0]:n;if(s){var l=o.getId(a),c=s.clientX,u=s.clientY;r({type:e.MouseInteractions[t],id:l,x:c,y:u})}}}}(t);l.push(X(a,s,n))})),function(){l.forEach((function(e){return e()}))}}function _e(e){var t=e.scrollCb,r=e.doc,n=e.mirror,o=e.blockClass;return X("scroll",J((function(e){var i=ke(e);if(i&&!ne(i,o)){var a=n.getId(i);if(i===r){var s=r.scrollingElement||r.documentElement;t({id:a,x:s.scrollLeft,y:s.scrollTop})}else t({id:a,x:i.scrollLeft,y:i.scrollTop})}}),e.sampling.scroll||100),r)}function Oe(e,t){var n=r({},e);return t||delete n.userTriggered,n}var Le=["INPUT","TEXTAREA","SELECT"],Ae=new WeakMap;function De(e){return function(e,t){if(Ee&&e.parentRule instanceof CSSGroupingRule||Ie&&e.parentRule instanceof CSSMediaRule||Ce&&e.parentRule instanceof CSSSupportsRule||Me&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else{r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Fe(t,a){var s,c;void 0===a&&(a={});var u=t.doc.defaultView;if(!u)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,a=e.mouseInteractionCb,s=e.scrollCb,l=e.viewportResizeCb,c=e.inputCb,u=e.mediaInteractionCb,d=e.styleSheetRuleCb,f=e.styleDeclarationCb,p=e.canvasMutationCb,h=e.fontCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,i([],o(e),!1)),r.apply(void 0,i([],o(e),!1))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,i([],o(e),!1)),n.apply(void 0,i([],o(e),!1))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,i([],o(e),!1)),a.apply(void 0,i([],o(e),!1))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,i([],o(e),!1)),s.apply(void 0,i([],o(e),!1))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,i([],o(e),!1)),l.apply(void 0,i([],o(e),!1))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,i([],o(e),!1)),c.apply(void 0,i([],o(e),!1))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,i([],o(e),!1)),u.apply(void 0,i([],o(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,i([],o(e),!1)),d.apply(void 0,i([],o(e),!1))},e.styleDeclarationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleDeclaration&&t.styleDeclaration.apply(t,i([],o(e),!1)),f.apply(void 0,i([],o(e),!1))},e.canvasMutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.canvasMutation&&t.canvasMutation.apply(t,i([],o(e),!1)),p.apply(void 0,i([],o(e),!1))},e.fontCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.font&&t.font.apply(t,i([],o(e),!1)),h.apply(void 0,i([],o(e),!1))}}(t,a);var d=Ne(t,t.doc),f=function(t){var r=t.mousemoveCb,n=t.sampling,o=t.doc,i=t.mirror;if(!1===n.mousemove)return function(){};var a,s="number"==typeof n.mousemove?n.mousemove:50,l="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=J((function(e){var t=Date.now()-a;r(c.map((function(e){return e.timeOffset-=t,e})),e),c=[],a=null}),l),d=J((function(t){var r=ke(t),n=ae(t)?t.changedTouches[0]:t,o=n.clientX,s=n.clientY;a||(a=Date.now()),c.push({x:o,y:s,id:i.getId(r),timeOffset:Date.now()-a}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?e.IncrementalSource.Drag:t instanceof MouseEvent?e.IncrementalSource.MouseMove:e.IncrementalSource.TouchMove)}),s,{trailing:!1}),f=[X("mousemove",d,o),X("touchmove",d,o),X("drag",d,o)];return function(){f.forEach((function(e){return e()}))}}(t),p=Re(t),h=_e(t),m=function(e){var t=e.viewportResizeCb,r=-1,n=-1;return X("resize",J((function(){var e=ee(),o=te();r===e&&n===o||(t({width:Number(o),height:Number(e)}),r=e,n=o)}),200),window)}(t),v=function(e){var t=e.inputCb,n=e.doc,a=e.mirror,s=e.blockClass,c=e.ignoreClass,u=e.maskInputOptions,d=e.maskInputFn,f=e.sampling,p=e.userTriggeredOnInput;function h(e){var t=ke(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Le.indexOf(t.tagName)<0)&&!ne(t,s)){var o=t.type;if(!t.classList.contains(c)){var i=t.value,a=!1;"radio"===o||"checkbox"===o?a=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(i=l({maskInputOptions:u,tagName:t.tagName,type:o,value:i,maskInputFn:d})),m(t,Oe({text:i,isChecked:a,userTriggered:r},p));var f=t.name;"radio"===o&&f&&a&&n.querySelectorAll('input[type="radio"][name="'.concat(f,'"]')).forEach((function(e){e!==t&&m(e,Oe({text:e.value,isChecked:!a,userTriggered:!1},p))}))}}}function m(e,n){var o=Ae.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Ae.set(e,n);var i=a.getId(e);t(r(r({},n),{id:i}))}}var v=("last"===f.input?["change"]:["input","change"]).map((function(e){return X(e,h,n)})),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,i([],o(g.map((function(e){return K(e[0],e[1],{set:function(){h({target:this})}})}))),!1)),function(){v.forEach((function(e){return e()}))}}(t),y=function(e){var t=e.mediaInteractionCb,r=e.blockClass,n=e.mirror,o=e.sampling,i=function(e){return J((function(o){var i=ke(o);if(i&&!ne(i,r)){var a=i,s=a.currentTime,l=a.volume,c=a.muted;t({type:e,id:n.getId(i),currentTime:s,volume:l,muted:c})}}),o.media||500)},a=[X("play",i(0)),X("pause",i(1)),X("seeked",i(2)),X("volumechange",i(3))];return function(){a.forEach((function(e){return e()}))}}(t),g=function(e,t){var r=e.styleSheetRuleCb,n=e.mirror,a=t.win,s=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=function(e,t){var o=n.getId(this.ownerNode);return-1!==o&&r({id:o,adds:[{rule:e,index:t}]}),s.apply(this,arguments)};var l=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=function(e){var t=n.getId(this.ownerNode);return-1!==t&&r({id:t,removes:[{index:e}]}),l.apply(this,arguments)};var c={};Ee?c.CSSGroupingRule=a.CSSGroupingRule:(Ie&&(c.CSSMediaRule=a.CSSMediaRule),Me&&(c.CSSConditionRule=a.CSSConditionRule),Ce&&(c.CSSSupportsRule=a.CSSSupportsRule));var u={};return Object.entries(c).forEach((function(e){var t=o(e,2),a=t[0],s=t[1];u[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(e,t){var s=n.getId(this.parentStyleSheet.ownerNode);return-1!==s&&r({id:s,adds:[{rule:e,index:i(i([],o(De(this)),!1),[t||0],!1)}]}),u[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(e){var t=n.getId(this.parentStyleSheet.ownerNode);return-1!==t&&r({id:t,removes:[{index:i(i([],o(De(this)),!1),[e],!1)}]}),u[a].deleteRule.apply(this,arguments)}})),function(){a.CSSStyleSheet.prototype.insertRule=s,a.CSSStyleSheet.prototype.deleteRule=l,Object.entries(c).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];n.prototype.insertRule=u[r].insertRule,n.prototype.deleteRule=u[r].deleteRule}))}}(t,{win:u}),b=function(e,t){var r=e.styleDeclarationCb,n=e.mirror,o=t.win,i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(e,t,o){var a,s,l=n.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&r({id:l,set:{property:e,value:t,priority:o},index:De(this.parentRule)}),i.apply(this,arguments)};var a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,o,i=n.getId(null===(o=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===o?void 0:o.ownerNode);return-1!==i&&r({id:i,remove:{property:e},index:De(this.parentRule)}),a.apply(this,arguments)},function(){o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}(t,{win:u}),S=t.collectFonts?function(e){var t=e.fontCb,r=e.doc,n=r.defaultView;if(!n)return function(){};var o=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=Z(r.fonts,"add",(function(e){return function(r){return setTimeout((function(){var e=i.get(r);e&&(t(e),i.delete(r))}),0),e.apply(this,[r])}}));return o.push((function(){n.FontFace=a})),o.push(s),function(){o.forEach((function(e){return e()}))}}(t):function(){},w=[];try{for(var x=n(t.plugins),T=x.next();!T.done;T=x.next()){var E=T.value;w.push(E.observer(E.callback,u,E.options))}}catch(e){s={error:e}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(s)throw s.error}}return function(){Te.forEach((function(e){return e.reset()})),d.disconnect(),f(),p(),h(),m(),v(),y(),g(),b(),S(),w.forEach((function(e){return e()}))}}var Pe=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 r;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e)},e}(),We=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(Z(HTMLElement.prototype,"attachShadow",(function(e){return function(){var r=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),r}})))}return e.prototype.addShadowRoot=function(e,t){Ne(r(r({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),_e(r(r({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(Z(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(r){return function(){var n=r.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),n}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}();for(var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ue="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ze=0;ze<je.length;ze++)Ue[je.charCodeAt(ze)]=ze;var He=new Map;var Ve=function(e,t,r){if(e&&(qe(e,t)||"object"==typeof e)){var n=function(e,t){var r=He.get(e);return r||(r=new Map,He.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function Be(e,t,r){return e instanceof Array?e.map((function(e){return Be(e,t,r)})):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,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=je[r[t]>>2],o+=je[(3&r[t])<<4|r[t+1]>>4],o+=je[(15&r[t+1])<<2|r[t+2]>>6],o+=je[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[Be(e.buffer,t,r),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[Be(e.data,t,r),e.width,e.height]}:qe(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Ve(e,t,r)}:e}var Ge=function(e,t,r){return i([],o(e),!1).map((function(e){return Be(e,t,r)}))},qe=function(e,t){var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(r.find((function(r){return e instanceof t[r]})))};function Ye(e,t,r,a,s,l){var c,u,d=[],f=Object.getOwnPropertyNames(e),p=function(n){try{if("function"!=typeof e[n])return"continue";var c=Z(e,n,(function(c){return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var f=c.apply(this,u);if(Ve(f,l,e),!ne(this.canvas,a)){s.getId(this.canvas);var p=Ge(i([],o(u),!1),l,e),h={type:t,property:n,args:p};r(this.canvas,h)}return f}}));d.push(c)}catch(o){var u=K(e,n,{set:function(e){r(this.canvas,{type:t,property:n,args:[e],setter:!0})}});d.push(u)}};try{for(var h=n(f),m=h.next();!m.done;m=h.next()){p(m.value)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(u=h.return)&&u.call(h)}finally{if(c)throw c.error}}return d}var Xe,Qe,$e=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 r=function(e,t){var r=[];try{var n=Z(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return ne(this,t)||"__context"in this||(this.__context=r),e.apply(this,i([r],o(n),!1))}}));r.push(n)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}(e,t),a=function(e,t,r,a){var s,l,c=[],u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),d=function(n){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[n])return"continue";var a=Z(t.CanvasRenderingContext2D.prototype,n,(function(t){return function(){for(var a=this,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return ne(this.canvas,r)||setTimeout((function(){var t=i([],o(s),!1);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var r=t[0],l=r.getContext("2d"),c=null==l?void 0:l.getImageData(0,0,r.width,r.height),u=null==c?void 0:c.data;t[0]=JSON.stringify(u)}e(a.canvas,{type:W["2D"],property:n,args:t})}),0),t.apply(this,s)}}));c.push(a)}catch(r){var s=K(t.CanvasRenderingContext2D.prototype,n,{set:function(t){e(this.canvas,{type:W["2D"],property:n,args:[t],setter:!0})}});c.push(s)}};try{for(var f=n(u),p=f.next();!p.done;p=f.next())d(p.value)}catch(e){s={error:e}}finally{try{p&&!p.done&&(l=f.return)&&l.call(f)}finally{if(s)throw s.error}}return function(){c.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),s=function(e,t,r,n){var a=[];return a.push.apply(a,i([],o(Ye(t.WebGLRenderingContext.prototype,W.WebGL,e,r,n,t)),!1)),void 0!==t.WebGL2RenderingContext&&a.push.apply(a,i([],o(Ye(t.WebGL2RenderingContext.prototype,W.WebGL2,e,r,n,t)),!1)),function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){r(),a(),s()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(r){e.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,r){var n=e.mirror.getId(r);e.flushPendingCanvasMutationFor(r,n)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((function(e){return e.type,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["type"])})),o=r[0].type;this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}},e}();function Je(e){return r(r({},e),{timestamp:Date.now()})}var Ke={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,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function Ze(t){void 0===t&&(t={});var i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,l=t.blockClass,c=void 0===l?"highlight-block":l,u=t.blockSelector,d=void 0===u?null:u,f=t.ignoreClass,p=void 0===f?"highlight-ignore":f,h=t.maskTextClass,m=void 0===h?"highlight-mask":h,v=t.maskTextSelector,y=void 0===v?null:v,g=t.inlineStylesheet,b=void 0===g||g,S=t.maskAllInputs,w=t.maskInputOptions,x=t.slimDOMOptions,T=t.maskInputFn,E=t.maskTextFn,I=t.hooks,C=t.packFn,M=t.sampling,k=void 0===M?{}:M,R=t.mousemoveWait,_=t.recordCanvas,O=void 0!==_&&_,L=t.userTriggeredOnInput,A=void 0!==L&&L,D=t.collectFonts,F=void 0!==D&&D,P=t.inlineImages,W=void 0!==P&&P,j=t.plugins,U=t.keepIframeSrcFn,z=void 0===U?function(){return!1}:U,H=t.enableStrictPrivacy,V=void 0!==H&&H;if(!i)throw new Error("emit function is required");void 0!==R&&void 0===k.mousemove&&(k.mousemove=R);var B,G=!0===S?{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!==w?w:{password:!0},q=!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===x,headMetaDescKeywords:"all"===x}:x||{};se();var Y=0;Xe=function(t,r){var o;if(!(null===(o=Te[0])||void 0===o?void 0:o.isFrozen())||t.type===e.EventType.FullSnapshot||t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.Mutation||Te.forEach((function(e){return e.unfreeze()})),i(function(e){var t,r;try{for(var o=n(j||[]),i=o.next();!i.done;i=o.next()){var a=i.value;a.eventProcessor&&(e=a.eventProcessor(e))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return C&&(e=C(e)),e}(t),r),t.type===e.EventType.FullSnapshot)B=t,Y=0;else if(t.type===e.EventType.IncrementalSnapshot){if(t.data.source===e.IncrementalSource.Mutation&&t.data.isAttachIframe)return;Y++;var l=s&&Y>=s,c=a&&t.timestamp-B.timestamp>a;(l||c)&&Qe(!0)}};var Q=function(t){Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Mutation},t)}))},$=function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Scroll},t)}))},J=function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.CanvasMutation},t)}))},K=new Pe({mutationCb:Q}),Z=new $e({recordCanvas:O,mutationCb:J,win:window,blockClass:c,mirror:Ke}),re=new We({mutationCb:Q,scrollCb:$,bypassOptions:{blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskInputOptions:G,maskTextFn:E,maskInputFn:T,recordCanvas:O,inlineImages:W,sampling:k,slimDOMOptions:q,iframeManager:K,canvasManager:Z,enableStrictPrivacy:V},mirror:Ke});Qe=function(t){var r,n,i,a;void 0===t&&(t=!1),Xe(Je({type:e.EventType.Meta,data:{href:window.location.href,width:te(),height:ee()}}),t),Te.forEach((function(e){return e.lock()}));var s=o(function(e,t){var r=t||{},n=r.blockClass,o=void 0===n?"highlight-block":n,i=r.blockSelector,a=void 0===i?null:i,s=r.maskTextClass,l=void 0===s?"highlight-mask":s,c=r.maskTextSelector,u=void 0===c?null:c,d=r.inlineStylesheet,f=void 0===d||d,p=r.inlineImages,h=void 0!==p&&p,m=r.recordCanvas,v=void 0!==m&&m,y=r.maskAllInputs,g=void 0!==y&&y,b=r.maskTextFn,S=r.maskInputFn,w=r.slimDOM,x=void 0!==w&&w,T=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,C=r.onIframeLoad,M=r.iframeLoadTimeout,k=r.keepIframeSrcFn,R=void 0===k?function(){return!1}:k,_=r.enableStrictPrivacy,O={};return[N(e,{doc:e,map:O,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,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===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:T,inlineImages:h,recordCanvas:v,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:M,keepIframeSrcFn:R,enableStrictPrivacy:void 0!==_&&_}),O]}(document,{blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskAllInputs:G,maskTextFn:E,slimDOM:q,recordCanvas:O,inlineImages:W,enableStrictPrivacy:V,onSerialize:function(e){de(e)&&K.addIframe(e),pe(e)&&re.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){K.attachIframe(e,t),re.observeAttachShadow(e)},keepIframeSrcFn:z}),2),l=s[0],u=s[1];if(!l)return console.warn("Failed to snapshot the document");Ke.map=u,Xe(Je({type:e.EventType.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.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===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Te.forEach((function(e){return e.unlock()}))};try{var ne=[];ne.push(X("DOMContentLoaded",(function(){Xe(Je({type:e.EventType.DomContentLoaded,data:{}}))})));var oe=function(t){var n;return Fe({mutationCb:Q,mousemoveCb:function(t,r){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:{source:r,positions:t}}))},mouseInteractionCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:$,viewportResizeCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.StyleSheetRule},t)}))},styleDeclarationCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.StyleDeclaration},t)}))},canvasMutationCb:J,fontCb:function(t){return Xe(Je({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Font},t)}))},blockClass:c,ignoreClass:p,maskTextClass:m,maskTextSelector:y,maskInputOptions:G,inlineStylesheet:b,sampling:k,recordCanvas:O,inlineImages:W,userTriggeredOnInput:A,collectFonts:F,doc:t,maskInputFn:T,maskTextFn:E,blockSelector:d,slimDOMOptions:q,mirror:Ke,iframeManager:K,shadowDomManager:re,canvasManager:Z,enableStrictPrivacy:V,plugins:(null===(n=null==j?void 0:j.filter((function(e){return e.observer})))||void 0===n?void 0:n.map((function(t){return{observer:t.observer,options:t.options,callback:function(r){return Xe(Je({type:e.EventType.Plugin,data:{plugin:t.name,payload:r}}))}}})))||[]},I)};K.addLoadListener((function(e){ne.push(oe(e.contentDocument))}));var ie=function(){Qe(),ne.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():ne.push(X("load",(function(){Xe(Je({type:e.EventType.Load,data:{}})),ie()}),window)),function(){ne.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function et(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}Ze.addCustomEvent=function(t,r){Xe&&Xe(Je({type:e.EventType.Custom,data:{tag:t,payload:r}}))},Ze.freezePage=function(){Te.forEach((function(e){return e.freeze()}))},Ze.takeFullSnapshot=function(e){if(!Qe)throw new Error("please take full snapshot after start recording");Qe(e)},Ze.mirror=Ke;var tt=Object.freeze({__proto__:null,default:et});function rt(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=f(this),n=r.getBoundingClientRect(),i=this.getBoundingClientRect();r!==t.body?(h.call(this,r,r.scrollLeft+i.left-n.left,r.scrollTop+i.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function d(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var r,n,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,r=.5*(1-Math.cos(Math.PI*a)),n=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,o),n===t.x&&o===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(r,n,a){var l,c,u,d,f=i();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:n,y:a})}}var nt,ot=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.replaceActions=function(e){var t;this.actions.length=0,(t=this.actions).splice.apply(t,i([0,0],o(e),!1))},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var o=performance.now();for(r.timeOffset+=(o-e)*r.speed,e=o;t.length;){var i=t[0];if(!(r.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n+1;r=n-1}}return t},e}();function it(t,r){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,o=t.timestamp+n;return t.delay=o-r,o-r}return t.delay=t.timestamp-r,t.delay}
16
+ /*! *****************************************************************************
17
+ Copyright (c) Microsoft Corporation.
18
+
19
+ Permission to use, copy, modify, and/or distribute this software for any
20
+ purpose with or without fee is hereby granted.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
23
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
25
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
+ PERFORMANCE OF THIS SOFTWARE.
29
+ ***************************************************************************** */function at(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(nt||(nt={}));var st={type:"xstate.init"};function lt(e){return void 0===e?[]:[].concat(e)}function ct(e){return{type:"xstate.assign",assignment:e}}function ut(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function dt(e){return function(t){return e===t}}function ft(e){return"string"==typeof e?{type:e}:e}function pt(e,t){return{value:e,context:t,actions:[],changed:!1,matches:dt(e)}}function ht(e,t,r){var n=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](n,r):e.assignment[o]})),n=t,!1}return!0})),n,o]}function mt(e,t){void 0===t&&(t={});var r=at(ht(lt(e.states[e.initial].entry).map((function(e){return ut(e,t.actions)})),e.context,st),2),n=r[0],o=r[1],i={config:e,_options:t,initialState:{value:e.initial,actions:n,context:o,matches:dt(e.initial)},transition:function(t,r){var n,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=ft(r),u=e.states[s];if(u.on){var d=lt(u.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),p=f.next();!p.done;p=f.next()){var h=p.value;if(void 0===h)return pt(s,l);var m="string"==typeof h?{target:h}:h,v=m.target,y=m.actions,g=void 0===y?[]:y,b=m.cond,S=void 0===b?function(){return!0}:b,w=void 0===v,x=null!=v?v:s,T=e.states[x];if(S(l,c)){var E=at(ht((w?lt(g):[].concat(u.exit,g,T.entry).filter((function(e){return e}))).map((function(e){return ut(e,i._options.actions)})),l,c),3),I=E[0],C=E[1],M=E[2],k=null!=v?v:s;return{value:k,context:C,actions:I,changed:v!==s||I.length>0||M,matches:dt(k)}}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}}return pt(s,l)}};return i}var vt=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function yt(e){var t=e.initialState,r=nt.NotStarted,n=new Set,o={_machine:e,send:function(o){r===nt.Running&&(t=e.transition(t,o),vt(t,ft(o)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var i="object"==typeof n?n:{context:e.config.context,value:n};t={value:i.value,actions:[],context:i.context,matches:dt(i.value)}}return r=nt.Running,vt(t,st),o},stop:function(){return r=nt.Stopped,n.clear(),o},get state(){return t},get status(){return r}};return o}function gt(t,o){var i=o.getCastFn,a=o.applyEventsSynchronously,s=o.emitter;return yt(mt({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ct({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:ct((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(t){var r,o,l,c,u,d=t.timer,f=t.events,p=t.baselineTime,h=t.lastPlayedEvent;d.clear();try{for(var m=n(f),v=m.next();!v.done;v=m.next()){it(v.value,p)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}var y=function(t,r){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o.type===e.EventType.Meta&&o.timestamp<=r)return t.slice(n)}return t}(f,p),g=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===e.EventType.IncrementalSnapshot&&h.data.source===e.IncrementalSource.MouseMove&&(g=h.timestamp+(null===(u=h.data.positions[0])||void 0===u?void 0:u.timeOffset)),p<(g||0)&&s.emit(e.ReplayerEvents.PlayBack);var b=new Array,S=new Array,w=function(e){if(g&&g<p&&(e.timestamp<=g||e===h))return"continue";if(e.timestamp<p)b.push(e);else{var t=i(e,!1);S.push({doAction:function(){t()},delay:e.delay})}};try{for(var x=n(y),T=x.next();!T.done;T=x.next()){w(T.value)}}catch(e){l={error:e}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}a(b),s.emit(e.ReplayerEvents.Flush),d.addActions(S),d.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:ct((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:ct({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),replaceEvents:ct((function(e,t){var o,a,s=e.events,l=e.timer,c=e.baselineTime;if("REPLACE_EVENTS"===t.type){var u=t.payload.events;s.length=0;var d=[],f=function(e){if(it(e,c),s.push(e),e.timestamp>=l.timeOffset+c){var t=i(e,!1);d.push({doAction:function(){t()},delay:e.delay})}};try{for(var p=n(u),h=p.next();!h.done;h=p.next()){f(h.value)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}l.isActive()&&l.replaceActions(d)}return r(r({},e),{events:s})})),addEvent:ct((function(e,t){var n=e.baselineTime,o=e.timer,a=e.events;if("ADD_EVENT"===t.type){var s=t.payload.event;it(s,n);var l=a.length-1;if(!a[l]||a[l].timestamp<=s.timestamp)a.push(s);else{for(var c=-1,u=0;u<=l;){var d=Math.floor((u+l)/2);a[d].timestamp<=s.timestamp?u=d+1:l=d-1}-1===c&&(c=u),a.splice(c,0,s)}var f=s.timestamp<n,p=i(s,f);f?p():o.isActive()&&o.addAction({doAction:function(){p()},delay:s.delay})}return r(r({},e),{events:a})}))}}))}var bt;function St(e,t){var r=e[t[0]];return 1===t.length?r:St(r.cssRules[t[1]].cssRules,t.slice(2))}function wt(e){var t=i([],o(e),!1),r=t.pop();return{positions:t,index:r}}function xt(e,t){var r=t.sheet;r&&e.forEach((function(e){if(e.type===bt.Insert)try{if(Array.isArray(e.index)){var n=wt(e.index),i=n.positions,a=n.index;St(r.cssRules,i).insertRule(e.cssText,a)}else r.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===bt.Remove)try{if(Array.isArray(e.index)){var s=wt(e.index);i=s.positions,a=s.index;St(r.cssRules,i).deleteRule(a||0)}else r.deleteRule(e.index)}catch(e){}else if(e.type===bt.Snapshot)!function(e,t){var r;try{var n=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(n).reverse(),a=n.length;i.forEach((function(r){var n,i=o(r,2),s=i[0],l=i[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(n=t.sheet)||void 0===n||n.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,r){var n,o,i;try{(null===(o=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===bt.SetProperty){St(r.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===bt.RemoveProperty){St(r.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(bt||(bt={}));var Tt=new Map;function Et(e,t){var r=Tt.get(e);return r||(r=new Map,Tt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var It=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ct(e,t){return function(r){if(r&&"object"==typeof r&&"rr_type"in r){if("index"in r){var n=r.rr_type,a=r.index;return Et(t,n)[a]}if("args"in r){var s=r.rr_type,l=r.args,c=window[s];return new(c.bind.apply(c,i([void 0],o(l.map(Ct(e,t))),!1)))}if("base64"in r)return function(e){var t,r,n,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)r=Ue[e.charCodeAt(t)],n=Ue[e.charCodeAt(t+1)],o=Ue[e.charCodeAt(t+2)],i=Ue[e.charCodeAt(t+3)],u[l++]=r<<2|n>>4,u[l++]=(15&n)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c}(r.base64);if("src"in r){var u=e.get(r.src);if(u)return u;var d=new Image;return d.src=r.src,e.set(r.src,d),d}}else if(Array.isArray(r))return r.map(Ct(e,t));return r}}function Mt(e){var t=e.mutation,r=e.target,n=e.type,o=e.imageMap,i=e.errorHandler;try{var a=function(e,t){try{return t===W.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(r,n);if(!a)return;if(t.setter)return void(a[t.property]=t.args[0]);var s=a[t.property],l=t.args.map(Ct(o,a));!function(e,t){if(null==t?void 0:t.constructor){var r=t.constructor.name;if(It.includes(r)){var n=Et(e,r);n.includes(t)||n.push(t)}}}(a,s.apply(a,l))}catch(e){i(t,e)}}var kt=36e5,Nt=et||tt,Rt="[replayer]",_t={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ot(t){return t.type==e.EventType.IncrementalSnapshot&&(t.data.source==e.IncrementalSource.TouchMove||t.data.source==e.IncrementalSource.MouseInteraction&&t.data.type==e.MouseInteractions.TouchStart)}var Lt=function(){function a(t,r){var o=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Nt(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=B(),this.imageMap=new Map,this.mirror={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,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==r?void 0:r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:_t,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},i,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new le,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,t,r,i,a,s,l,c,u=o.treeIndex.flush(),d=u.scrollMap,f=u.inputMap,p=u.mutationData;o.fragmentParentMap.forEach((function(e,t){return o.restoreRealParent(t,e)}));try{for(var h=n(p.texts),m=h.next();!m.done;m=h.next()){var v=m.value;o.applyText(v,p)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=n(o.virtualStyleRulesMap.keys()),g=y.next();!g.done;g=y.next()){var b=g.value;o.restoreNodeSheet(b)}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}o.fragmentParentMap.clear(),o.elementStateMap.clear(),o.virtualStyleRulesMap.clear();try{for(var S=n(d.values()),w=S.next();!w.done;w=S.next()){v=w.value;o.applyScroll(v,!0)}}catch(e){a={error:e}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var x=n(f.values()),T=x.next();!T.done;T=x.next()){v=T.value;o.applyInput(v)}}catch(e){l={error:e}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}})),this.emitter.on(e.ReplayerEvents.PlayBack,(function(){o.firstFullSnapshot=null,o.mirror.reset()}));var a=new ot([],(null==r?void 0:r.speed)||i.speed);this.service=gt({events:t.map((function(e){return r&&r.unpackFn?r.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(t){o.emitter.emit(e.ReplayerEvents.StateChange,{player:t})})),this.speedService=yt(mt({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:ct({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(t){o.emitter.emit(e.ReplayerEvents.StateChange,{speed:t})}));var s=this.service.state.context.events.find((function(t){return t.type===e.EventType.Meta})),l=this.service.state.context.events.find((function(t){return t.type===e.EventType.FullSnapshot}));if(s){var c=s.data,u=c.width,d=c.height;setTimeout((function(){o.emitter.emit(e.ReplayerEvents.Resize,{width:u,height:d})}),0)}l&&setTimeout((function(){o.firstFullSnapshot||(o.firstFullSnapshot=l,o.rebuildFullSnapshot(l),o.iframe.contentWindow.scrollTo(l.data.initialOffset))}),1),this.service.state.context.events.find(Ot)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(a.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),a.prototype.on=function(e,t){return this.emitter.on(e,t),this},a.prototype.off=function(e,t){return this.emitter.off(e,t),this},a.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},a.prototype.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],r=this.getMetaData(),n=i(i([{timestamp:r.startTime}],o(this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)}))),!1),[{timestamp:r.endTime}],!1),a=1;a<n.length;a++){var s=n[a-1],l=n[a];l.timestamp-s.timestamp>1e4?t.push({startTime:s.timestamp,endTime:l.timestamp,duration:l.timestamp-s.timestamp,active:!1}):t.push({startTime:s.timestamp,endTime:l.timestamp,duration:l.timestamp-s.timestamp,active:!0})}var c=[],u=t[0];for(a=1;a<t.length;a++)t[a].active!=t[a-1].active&&(c.push({startTime:u.startTime,endTime:t[a-1].endTime,duration:t[a-1].endTime-u.startTime,active:t[a-1].active}),u=t[a]);u&&t.length>0&&c.push({startTime:u.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-u.startTime,active:t[t.length-1].active}),u=c[0];for(a=1;a<c.length;a++)(!c[a].active&&c[a].duration>this.config.inactiveThreshold*r.totalTime||!c[a-1].active&&c[a-1].duration>this.config.inactiveThreshold*r.totalTime)&&(this.activityIntervals.push({startTime:u.startTime,endTime:c[a-1].endTime,duration:c[a-1].endTime-u.startTime,active:c[a-1].active}),u=c[a]);u&&c.length>0&&this.activityIntervals.push({startTime:u.startTime,endTime:c[c.length-1].endTime,duration:c[c.length-1].endTime-u.startTime,active:c[c.length-1].active})}return this.activityIntervals},a.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},a.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},a.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},a.prototype.getMirror=function(){return this.mirror},a.prototype.play=function(t){var r;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(r=this.iframe.contentDocument)||void 0===r||r.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+t,!0)},a.prototype.pause=function(t){var r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(r=this.iframe.contentDocument)||void 0===r||r.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Pause)},a.prototype.resume=function(t){void 0===t&&(t=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(e.ReplayerEvents.Resume)},a.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},a.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;Ot(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},a.prototype.replaceEvents=function(e){var t,r;try{for(var o=n(e),i=o.next();!i.done;i=o.next()){if(Ot(i.value)){this.mouse.classList.add("touch-device");break}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.service.send({type:"REPLACE_EVENTS",payload:{events:e}})},a.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},a.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},a.prototype.resetCache=function(){this.cache=B()},a.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(rt(this.iframe.contentWindow,this.iframe.contentDocument),se(this.iframe.contentWindow))},a.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var o=n([this.mouseTail,this.iframe]),i=o.next();!i.done;i=o.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},a.prototype.applyEventsSynchronously=function(t){var r,o;try{for(var i=n(t),a=i.next();!a.done;a=i.next()){var s=a.value;switch(s.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.Custom:continue;case e.EventType.FullSnapshot:case e.EventType.Meta:case e.EventType.Plugin:break;case e.EventType.IncrementalSnapshot:switch(s.data.source){case e.IncrementalSource.MediaInteraction:continue}}this.getCastFn(s,!0)()}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},a.prototype.getCastFn=function(t,r){var o,i=this;switch(void 0===r&&(r=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:o=function(){i.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(t,r),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,r),!r&&(i.handleInactivity(t.timestamp),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var s=n(i.service.state.context.events),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=t.timestamp)&&i.isUserInteraction(c)){c.delay-t.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/2e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:d}),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){var a,s;o&&o();try{for(var l=n(i.config.plugins||[]),c=l.next();!c.done;c=l.next()){c.value.handler(t,r,{replayer:i})}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}i.service.send({type:"CAST_EVENT",payload:{event:t}});var u=i.service.state.context.events.length-1;if(t===i.service.state.context.events[u]){var d=function(){u<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(e.ReplayerEvents.Finish))};t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove&&t.data.positions.length?setTimeout((function(){d()}),Math.max(0,50-t.data.positions[0].timeOffset)):d()}i.emitter.emit(e.ReplayerEvents.EventCast,t)}},a.prototype.handleInactivity=function(t,r){var o,i;if((t===this.inactiveEndTimestamp||r)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var a=n(this.getActivityIntervals()),s=a.next();!s.done;s=a.next()){var l=s.value;if(t>=l.startTime&&t<l.endTime&&!l.active){this.inactiveEndTimestamp=l.endTime;break}}}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}if(this.inactiveEndTimestamp){var c=this.inactiveEndTimestamp-t,u={speed:c/kt*this.config.inactiveSkipTime<1e3?c/1e3:Math.round(Math.max(c,kt)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(e.ReplayerEvents.SkipStart,u)}}},a.prototype.rebuildFullSnapshot=function(t,r){var o,i,a=this;if(void 0===r&&(r=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var s=[];this.mirror.map=Y(t.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){a.collectIframeAndAttachDocument(s,e)},cache:this.cache})[1];var l=function(e,t){c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e}))},c=this;try{for(var u=n(s),d=u.next();!d.done;d=u.next()){var f=d.value;l(f.mutationInQueue,f.builtNode)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}var p=this.iframe.contentDocument,h=p.documentElement,m=p.head;this.insertStyleRules(h,m),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},a.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,o=(n=this.config.blockClass,[".".concat(n," { background: currentColor }"),"noscript { display: none !important; }",".".concat(n," { background: currentColor; border-radius: 5px; }"),".".concat(n,":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}")]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&o.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var i=0;i<o.length;i++)r.sheet.insertRule(o[i],i)},a.prototype.attachDocumentToIframe=function(e,r){var o,i,a=this,s=[];if(!r.contentDocument)for(var l=r.parentNode;l;){if(this.fragmentParentMap.has(l)){var c=l,u=this.fragmentParentMap.get(c);this.restoreRealParent(c,u);break}l=l.parentNode}q(e.node,{doc:r.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){if(a.collectIframeAndAttachDocument(s,e),e.__sn.type===t.Element&&"HTML"===e.__sn.tagName.toUpperCase()){var n=r.contentDocument,o=n.documentElement,i=n.head;a.insertStyleRules(o,i)}},cache:this.cache});var d=function(e,t){f.attachDocumentToIframe(e,t),f.newDocumentQueue=f.newDocumentQueue.filter((function(t){return t!==e}))},f=this;try{for(var p=n(s),h=p.next();!h.done;h=p.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},a.prototype.collectIframeAndAttachDocument=function(e,t){if(de(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},a.prototype.waitForStylesheetLoad=function(){var t,r=this,n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(n){var o,i=new Set,a=this.service.state,s=function(){a=r.service.state};this.emitter.on(e.ReplayerEvents.Start,s),this.emitter.on(e.ReplayerEvents.Pause,s);var l=function(){r.emitter.off(e.ReplayerEvents.Start,s),r.emitter.off(e.ReplayerEvents.Pause,s)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(i.add(t),t.addEventListener("load",(function(){i.delete(t),0===i.size&&-1!==o&&(a.matches("playing")&&r.play(r.getCurrentTime()),r.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),o&&clearTimeout(o),l())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),o=setTimeout((function(){a.matches("playing")&&r.play(r.getCurrentTime()),o=-1,l()}),this.config.loadTimeout))}},a.prototype.hasImageArg=function(e){var t,r;try{for(var o=n(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a&&"object"==typeof a)if("rr_type"in a&&"args"in a){if(this.hasImageArg(a.args))return!0}else{if("rr_type"in a&&"HTMLImageElement"===a.rr_type)return!0;if(a instanceof Array&&this.hasImageArg(a))return!0}else;}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return!1},a.prototype.getImageArgs=function(e){var t,r,a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value;c&&"object"==typeof c&&("rr_type"in c&&"args"in c?a.push.apply(a,i([],o(this.getImageArgs(c.args)),!1)):"rr_type"in c&&"HTMLImageElement"===c.rr_type?a.push(c.src):c instanceof Array&&a.push.apply(a,i([],o(this.getImageArgs(c)),!1)))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a},a.prototype.preloadAllImages=function(){var t,r,o=this;this.service.state;var i=function(){o.service.state};this.emitter.on(e.ReplayerEvents.Start,i),this.emitter.on(e.ReplayerEvents.Pause,i);var a=function(t){t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.CanvasMutation&&("commands"in t.data?t.data.commands.forEach((function(e){return o.preloadImages(e,t)})):s.preloadImages(t.data,t))},s=this;try{for(var l=n(this.service.state.context.events),c=l.next();!c.done;c=l.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}},a.prototype.preloadImages=function(e,t){var r=this;if("drawImage"!==e.property||"string"!=typeof e.args[0]||this.imageMap.has(t))this.hasImageArg(e.args)&&this.getImageArgs(e.args).forEach((function(e){var t=new Image;t.src=e,r.imageMap.set(e,t)}));else{var n=document.createElement("canvas"),o=n.getContext("2d"),i=null==o?void 0:o.createImageData(n.width,n.height);null==i||i.data,JSON.parse(e.args[0]),null==o||o.putImageData(i,0,0)}},a.prototype.applyIncremental=function(t,n){var o,i,a=this,s=t.data;switch(s.source){case e.IncrementalSource.Mutation:n&&(s.adds.forEach((function(e){return a.treeIndex.add(e)})),s.texts.forEach((function(e){var t=a.mirror.getNode(e.id),r=null==t?void 0:t.parentNode;r&&a.virtualStyleRulesMap.has(r)&&a.virtualStyleRulesMap.delete(r),a.treeIndex.text(e)})),s.attributes.forEach((function(e){return a.treeIndex.attribute(e)})),s.removes.forEach((function(e){return a.treeIndex.remove(e,a.mirror)})));try{this.applyMutation(s,n)}catch(e){this.warn("Exception in mutation ".concat(e.message||e),s)}break;case e.IncrementalSource.Drag:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MouseMove:if(n){var l=s.positions[s.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:s}}else s.positions.forEach((function(e){var r={doAction:function(){a.moveAndHover(e.x,e.y,e.id,n,s)},delay:e.timeOffset+t.timestamp-a.service.state.context.baselineTime};a.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:t.delay-(null===(o=s.positions[0])||void 0===o?void 0:o.timeOffset)});break;case e.IncrementalSource.MouseInteraction:if(-1===s.id)break;var c=new Event(e.MouseInteractions[s.type].toLowerCase());if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:s.type,target:S});var u=this.config.triggerFocus;switch(s.type){case e.MouseInteractions.Blur:"blur"in S&&S.blur();break;case e.MouseInteractions.Focus:u&&S.focus&&S.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:n?(s.type===e.MouseInteractions.TouchStart?this.touchActive=!0:s.type===e.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===e.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,n,s),s.type===e.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===e.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===e.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case e.MouseInteractions.TouchCancel:n?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:S.dispatchEvent(c)}break;case e.IncrementalSource.Scroll:if(-1===s.id)break;if(n){this.treeIndex.scroll(s);break}this.applyScroll(s,!1);break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:s.width,height:s.height});break;case e.IncrementalSource.Input:if(-1===s.id)break;if(n){this.treeIndex.input(s);break}this.applyInput(s);break;case e.IncrementalSource.MediaInteraction:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var d=S;try{s.currentTime&&(d.currentTime=s.currentTime),s.volume&&(d.volume=s.volume),s.muted&&(d.muted=s.muted),1===s.type&&d.pause(),0===s.type&&d.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: ".concat(e.message||e))}break;case e.IncrementalSource.StyleSheetRule:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var f,p=S,h=S.parentNode,m=this.fragmentParentMap.has(h),v=m?null:p.sheet;v||(this.virtualStyleRulesMap.has(S)?f=this.virtualStyleRulesMap.get(S):(f=[],this.virtualStyleRulesMap.set(S,f))),s.adds&&s.adds.forEach((function(e){var t=e.rule,r=e.index;if(v)try{if(Array.isArray(r)){var n=wt(r),o=n.positions,i=n.index;St(v.cssRules,o).insertRule(t,i)}else{i=void 0===r?void 0:Math.min(r,v.cssRules.length);v.insertRule(t,i)}}catch(e){}else null==f||f.push({cssText:t,index:r,type:bt.Insert})})),s.removes&&s.removes.forEach((function(e){var t=e.index;if(m)null==f||f.push({index:t,type:bt.Remove});else try{if(Array.isArray(t)){var r=wt(t),n=r.positions,o=r.index;St(v.cssRules,n).deleteRule(o||0)}else null==v||v.deleteRule(t)}catch(e){}}));break;case e.IncrementalSource.StyleDeclaration:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);p=S;var y=S.parentNode,g=this.fragmentParentMap.has(y)?null:p.sheet,b=[];if(g||(this.virtualStyleRulesMap.has(S)?b=this.virtualStyleRulesMap.get(S):(b=[],this.virtualStyleRulesMap.set(S,b))),s.set)if(g)St(g.rules,s.index).style.setProperty(s.set.property,s.set.value,s.set.priority);else b.push(r({type:bt.SetProperty,index:s.index},s.set));if(s.remove)if(g)St(g.rules,s.index).style.removeProperty(s.remove.property);else b.push(r({type:bt.RemoveProperty,index:s.index},s.remove));break;case e.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var S;if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);!function(e){var t=e.event,r=e.mutation,n=e.target,o=e.imageMap,i=e.errorHandler;try{var a="commands"in r?r.commands:[r];[W.WebGL,W.WebGL2].includes(r.type)?a.forEach((function(e){Mt({mutation:e,type:r.type,target:n,imageMap:o,errorHandler:i})})):a.forEach((function(e){!function(e){var t=e.event,r=e.mutation,n=e.target,o=e.imageMap,i=e.errorHandler;try{var a=n.getContext("2d");if(r.setter)return void(a[r.property]=r.args[0]);var s=a[r.property];if("drawImage"===r.property&&"string"==typeof r.args[0]){var l=o.get(t);r.args[0]=l,s.apply(a,r.args)}else s.apply(a,r.args)}catch(e){i(r,e)}}({event:t,mutation:e,target:n,imageMap:o,errorHandler:i})}))}catch(e){i(r,e)}}({event:t,mutation:s,target:S,imageMap:this.imageMap,errorHandler:this.warnCanvasMutationFailed.bind(this)});break;case e.IncrementalSource.Font:try{var w=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},a.prototype.applyMutation=function(e,o){var i,a,s=this;e.removes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}s.virtualStyleRulesMap.has(r)&&s.virtualStyleRulesMap.delete(r);var n=s.mirror.getNode(t.parentId);if(!n)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&pe(n)&&(n=n.shadowRoot),s.mirror.removeNodeFromMap(r),n){var o=null,i="__sn"in n?s.fragmentParentMap.get(n):void 0;i&&i.contains(r)?n=i:s.fragmentParentMap.has(r)&&(o=s.fragmentParentMap.get(r),s.fragmentParentMap.delete(r),r=o);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",n,i,r,o,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,i,a,u;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var d=s.mirror.getNode(e.parentId);if(!d)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var f=null;s.iframe.contentDocument.contains?f=s.iframe.contentDocument.contains(d):s.iframe.contentDocument.body.contains&&(f=s.iframe.contentDocument.body.contains(d));var p=(null===(u=(a=d).getElementsByTagName)||void 0===u?void 0:u.call(a,"iframe").length)>0;if(o&&f&&!de(d)&&!p){var h=document.createDocumentFragment();for(s.mirror.map[e.parentId]=h,s.fragmentParentMap.set(h,d),s.storeState(d);d.firstChild;)h.appendChild(d.firstChild);d=h}e.node.isShadow&&(pe(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);var m=null,v=null;if(e.previousId&&(m=s.mirror.getNode(e.previousId)),e.nextId&&(v=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var y=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(de(d))s.attachDocumentToIframe(e,d);else{var g=q(e.node,{doc:y,map:s.mirror.map,skipChild:!0,hackCss:!0,cache:s.cache});if(-1!==e.previousId&&-1!==e.nextId){if("__sn"in d&&d.__sn.type===t.Element&&"textarea"===d.__sn.tagName&&e.node.type===t.Text)try{for(var b=n(Array.from(d.childNodes)),S=b.next();!S.done;S=b.next()){var w=S.value;w.nodeType===d.TEXT_NODE&&d.removeChild(w)}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=b.return)&&i.call(b)}finally{if(r)throw r.error}}if(m&&m.nextSibling&&m.nextSibling.parentNode)d.insertBefore(g,m.nextSibling);else if(v&&v.parentNode)d.contains(v)?d.insertBefore(g,v):d.insertBefore(g,null);else{if(d===y)for(;y.firstChild;)y.removeChild(y.firstChild);d.appendChild(g)}if(de(g)){var x=s.newDocumentQueue.find((function(e){return e.parentId===g.__sn.id}));x&&(s.attachDocumentToIframe(x,g),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==x})))}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,d,g,e)}else l[e.node.id]={node:g,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=ce(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}try{for(var p=(i=void 0,n(f)),h=p.next();!h.done;h=p.next()){var m=h.value;this.mirror.getNode(m.value.parentId)?ue(m,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var n in s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var o=t.attributes[n];if(null===o)r.removeAttribute(n);else if("string"==typeof o)try{r.setAttribute(n,o)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var i=o,a=r;for(var l in i)if(!1===i[l])a.style.removeProperty(l);else if(i[l]instanceof Array){var c=i[l];a.style.setProperty(l,c[0],c[1])}else{var u=i[l];a.style.setProperty(l,u)}}}}))},a.prototype.applyScroll=function(e,r){var n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);if(n===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else if(n.__sn.type===t.Document)n.defaultView.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else try{n.scrollTop=e.y,n.scrollLeft=e.x}catch(e){}},a.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},a.prototype.applyText=function(e,t){var r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(t,e.id);try{r.textContent=e.value}catch(e){}},a.prototype.legacy_resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},a.prototype.moveAndHover=function(e,t,r,n,o){var i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(o,r);var a=fe(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(l,"px"),n||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},a.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?_t:Object.assign({},_t,this.config.mouseTail),n=r.lineCap,o=r.lineWidth,i=r.strokeStyle,a=r.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=o,e.lineCap=n,e.strokeStyle=i,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},a.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},a.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},a.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(e.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},a.prototype.restoreRealParent=function(e,r){this.mirror.map[r.__sn.id]=r,r.__sn.type===t.Element&&"textarea"===r.__sn.tagName&&e.textContent&&(r.value=e.textContent),r.appendChild(e),this.restoreState(r)},a.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var o=e;(o.scrollLeft||o.scrollTop)&&this.elementStateMap.set(e,{scroll:[o.scrollLeft,o.scrollTop]}),"STYLE"===o.tagName&&function(e,t){var r;try{var n=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:bt.Snapshot,cssTexts:n}])}catch(e){}}(o,this.virtualStyleRulesMap);var i=o.children;try{for(var a=n(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},a.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var o=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(o.scrollLeft=i.scroll[0],o.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=o.children;try{for(var s=n(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},a.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&xt(t,e))},a.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '".concat(t,"' was previously removed. "),e):this.warn("Node with id '".concat(t,"' not found. "),e)},a.prototype.warnCanvasMutationFailed=function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)},a.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(Rt,"Node with id '".concat(t,"' was previously removed. "),e):this.debug(Rt,"Node with id '".concat(t,"' not found. "),e)},a.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,i([Rt],o(e),!1))},a.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,i([Rt],o(e),!1))},a}(),At=Ze.addCustomEvent,Dt=Ze.freezePage,Ft=Uint8Array,Pt=Uint16Array,Wt=Uint32Array,jt=new Ft([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ut=new Ft([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),zt=new Ft([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ht=function(e,t){for(var r=new Pt(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new Wt(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return[r,o]},Vt=Ht(jt,2),Bt=Vt[0],Gt=Vt[1];Bt[28]=258,Gt[258]=28;for(var qt=Ht(Ut,0),Yt=qt[0],Xt=qt[1],Qt=new Pt(32768),$t=0;$t<32768;++$t){var Jt=(43690&$t)>>>1|(21845&$t)<<1;Jt=(61680&(Jt=(52428&Jt)>>>2|(13107&Jt)<<2))>>>4|(3855&Jt)<<4,Qt[$t]=((65280&Jt)>>>8|(255&Jt)<<8)>>>1}var Kt=function(e,t,r){for(var n=e.length,o=0,i=new Pt(t);o<n;++o)++i[e[o]-1];var a,s=new Pt(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(r){a=new Pt(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],u=t-e[o],d=s[e[o]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)a[Qt[d]>>>l]=c}else for(a=new Pt(n),o=0;o<n;++o)a[o]=Qt[s[e[o]-1]++]>>>15-e[o];return a},Zt=new Ft(288);for($t=0;$t<144;++$t)Zt[$t]=8;for($t=144;$t<256;++$t)Zt[$t]=9;for($t=256;$t<280;++$t)Zt[$t]=7;for($t=280;$t<288;++$t)Zt[$t]=8;var er=new Ft(32);for($t=0;$t<32;++$t)er[$t]=5;var tr=Kt(Zt,9,0),rr=Kt(Zt,9,1),nr=Kt(er,5,0),or=Kt(er,5,1),ir=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},ar=function(e,t,r){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(7&t)&r},sr=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(7&t)},lr=function(e){return(e/8>>0)+(7&e&&1)},cr=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof Pt?Pt:e instanceof Wt?Wt:Ft)(r-t);return n.set(e.subarray(t,r)),n},ur=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8},dr=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},fr=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return[new Ft(0),0];if(1==o){var a=new Ft(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var s=r[0],l=r[1],c=0,u=1,d=2;for(r[0]={s:-1,f:s.f+l.f,l:s,r:l};u!=o-1;)s=r[r[c].f<r[d].f?c++:d++],l=r[c!=u&&r[c].f<r[d].f?c++:d++],r[u++]={s:-1,f:s.f+l.f,l:s,r:l};var f=i[0].s;for(n=1;n<o;++n)i[n].s>f&&(f=i[n].s);var p=new Pt(f+1),h=pr(r[u-1],p,0);if(h>t){n=0;var m=0,v=h-t,y=1<<v;for(i.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));n<o;++n){var g=i[n].s;if(!(p[g]>t))break;m+=y-(1<<h-p[g]),p[g]=t}for(m>>>=v;m>0;){var b=i[n].s;p[b]<t?m-=1<<t-p[b]++-1:++n}for(;n>=0&&m;--n){var S=i[n].s;p[S]==t&&(--p[S],++m)}h=t}return[new Ft(p),h]},pr=function(e,t,r){return-1==e.s?Math.max(pr(e.l,t,r+1),pr(e.r,t,r+1)):t[e.s]=r},hr=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Pt(++t),n=0,o=e[0],i=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return[r.subarray(0,n),t]},mr=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},vr=function(e,t,r){var n=r.length,o=lr(t+2);e[o]=255&n,e[o+1]=n>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<n;++i)e[o+i+4]=r[i];return 8*(o+4+n)},yr=function(e,t,r,n,o,i,a,s,l,c,u){ur(t,u++,r),++o[256];for(var d=fr(o,15),f=d[0],p=d[1],h=fr(i,15),m=h[0],v=h[1],y=hr(f),g=y[0],b=y[1],S=hr(m),w=S[0],x=S[1],T=new Pt(19),E=0;E<g.length;++E)T[31&g[E]]++;for(E=0;E<w.length;++E)T[31&w[E]]++;for(var I=fr(T,7),C=I[0],M=I[1],k=19;k>4&&!C[zt[k-1]];--k);var N,R,_,O,L=c+5<<3,A=mr(o,Zt)+mr(i,er)+a,D=mr(o,f)+mr(i,m)+a+14+3*k+mr(T,C)+(2*T[16]+3*T[17]+7*T[18]);if(L<=A&&L<=D)return vr(t,u,e.subarray(l,l+c));if(ur(t,u,1+(D<A)),u+=2,D<A){N=Kt(f,p,0),R=f,_=Kt(m,v,0),O=m;var F=Kt(C,M,0);ur(t,u,b-257),ur(t,u+5,x-1),ur(t,u+10,k-4),u+=14;for(E=0;E<k;++E)ur(t,u+3*E,C[zt[E]]);u+=3*k;for(var P=[g,w],W=0;W<2;++W){var j=P[W];for(E=0;E<j.length;++E){var U=31&j[E];ur(t,u,F[U]),u+=C[U],U>15&&(ur(t,u,j[E]>>>5&127),u+=j[E]>>>12)}}}else N=tr,R=Zt,_=nr,O=er;for(E=0;E<s;++E)if(n[E]>255){U=n[E]>>>18&31;dr(t,u,N[U+257]),u+=R[U+257],U>7&&(ur(t,u,n[E]>>>23&31),u+=jt[U]);var z=31&n[E];dr(t,u,_[z]),u+=O[z],z>3&&(dr(t,u,n[E]>>>5&8191),u+=Ut[z])}else dr(t,u,N[n[E]]),u+=R[n[E]];return dr(t,u,N[256]),u+R[256]},gr=new Wt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),br=new Ft(0),Sr=function(e,t,r,n,o){return function(e,t,r,n,o,i){var a=e.length,s=new Ft(n+a+5*(1+Math.floor(a/7e3))+o),l=s.subarray(n,s.length-o),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var d=u+65535;d<a?c=vr(l,c,e.subarray(u,d)):(l[u]=i,c=vr(l,c,e.subarray(u,a)))}else{for(var f=gr[t-1],p=f>>>13,h=8191&f,m=(1<<r)-1,v=new Pt(32768),y=new Pt(m+1),g=Math.ceil(r/3),b=2*g,S=function(t){return(e[t]^e[t+1]<<g^e[t+2]<<b)&m},w=new Wt(25e3),x=new Pt(288),T=new Pt(32),E=0,I=0,C=(u=0,0),M=0,k=0;u<a;++u){var N=S(u),R=32767&u,_=y[N];if(v[R]=_,y[N]=R,M<=u){var O=a-u;if((E>7e3||C>24576)&&O>423){c=yr(e,l,0,w,x,T,I,C,k,u-k,c),C=E=I=0,k=u;for(var L=0;L<286;++L)x[L]=0;for(L=0;L<30;++L)T[L]=0}var A=2,D=0,F=h,P=R-_&32767;if(O>2&&N==S(u-P))for(var W=Math.min(p,O)-1,j=Math.min(32767,u),U=Math.min(258,O);P<=j&&--F&&R!=_;){if(e[u+A]==e[u+A-P]){for(var z=0;z<U&&e[u+z]==e[u+z-P];++z);if(z>A){if(A=z,D=P,z>W)break;var H=Math.min(P,z-2),V=0;for(L=0;L<H;++L){var B=u-P+L+32768&32767,G=B-v[B]+32768&32767;G>V&&(V=G,_=B)}}}P+=(R=_)-(_=v[R])+32768&32767}if(D){w[C++]=268435456|Gt[A]<<18|Xt[D];var q=31&Gt[A],Y=31&Xt[D];I+=jt[q]+Ut[Y],++x[257+q],++T[Y],M=u+A,++E}else w[C++]=e[u],++x[e[u]]}}c=yr(e,l,i,w,x,T,I,C,k,u-k,c),i||(c=vr(l,c,br))}return cr(s,0,n+lr(c)+o)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,n,!o)};function wr(e,t){void 0===t&&(t={});var r=function(){var e=1,t=0;return{p:function(r){for(var n=e,o=t,i=r.length,a=0;a!=i;){for(var s=Math.min(a+5552,i);a<s;++a)o+=n+=r[a];n%=65521,o%=65521}e=n,t=o},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();r.p(e);var n=Sr(e,t,2,4);return function(e,t){var r=t.level,n=0==r?0:r<6?1:9==r?3:2;e[0]=120,e[1]=n<<6|(n?32-2*n:1)}(n,t),function(e,t,r){for(;r;++t)e[t]=r,r>>>=8}(n,n.length-4,r.d()),n}function xr(e,t){return function(e,t,r){var n=e.length,o=!t||r,i=!r||r.i;r||(r={}),t||(t=new Ft(3*n));var a=function(e){var r=t.length;if(e>r){var n=new Ft(Math.max(2*r,e));n.set(t),t=n}},s=r.f||0,l=r.p||0,c=r.b||0,u=r.l,d=r.d,f=r.m,p=r.n,h=8*n;do{if(!u){r.f=s=ar(e,l,1);var m=ar(e,l+1,3);if(l+=3,!m){var v=e[(M=lr(l)+4)-4]|e[M-3]<<8,y=M+v;if(y>n){if(i)throw"unexpected EOF";break}o&&a(c+v),t.set(e.subarray(M,y),c),r.b=c+=v,r.p=l=8*y;continue}if(1==m)u=rr,d=or,f=9,p=5;else{if(2!=m)throw"invalid block type";var g=ar(e,l,31)+257,b=ar(e,l+10,15)+4,S=g+ar(e,l+5,31)+1;l+=14;for(var w=new Ft(S),x=new Ft(19),T=0;T<b;++T)x[zt[T]]=ar(e,l+3*T,7);l+=3*b;var E=ir(x),I=(1<<E)-1;if(!i&&l+S*(E+7)>h)break;var C=Kt(x,E,1);for(T=0;T<S;){var M,k=C[ar(e,l,I)];if(l+=15&k,(M=k>>>4)<16)w[T++]=M;else{var N=0,R=0;for(16==M?(R=3+ar(e,l,3),l+=2,N=w[T-1]):17==M?(R=3+ar(e,l,7),l+=3):18==M&&(R=11+ar(e,l,127),l+=7);R--;)w[T++]=N}}var _=w.subarray(0,g),O=w.subarray(g);f=ir(_),p=ir(O),u=Kt(_,f,1),d=Kt(O,p,1)}if(l>h)throw"unexpected EOF"}o&&a(c+131072);for(var L=(1<<f)-1,A=(1<<p)-1,D=f+p+18;i||l+D<h;){var F=(N=u[sr(e,l)&L])>>>4;if((l+=15&N)>h)throw"unexpected EOF";if(!N)throw"invalid length/literal";if(F<256)t[c++]=F;else{if(256==F){u=null;break}var P=F-254;if(F>264){var W=jt[T=F-257];P=ar(e,l,(1<<W)-1)+Bt[T],l+=W}var j=d[sr(e,l)&A],U=j>>>4;if(!j)throw"invalid distance";if(l+=15&j,O=Yt[U],U>3&&(W=Ut[U],O+=sr(e,l)&(1<<W)-1,l+=W),l>h)throw"unexpected EOF";o&&a(c+131072);for(var z=c+P;c<z;c+=4)t[c]=t[c-O],t[c+1]=t[c+1-O],t[c+2]=t[c+2-O],t[c+3]=t[c+3-O];c=z}}r.l=u,r.p=l,r.b=c,u&&(s=1,r.m=f,r.d=d,r.n=p)}while(!s);return c==t.length?t:cr(t,0,c)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}function Tr(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new Ft(e.length+(e.length>>>1)),o=0,i=function(e){n[o++]=e},a=0;a<r;++a){if(o+5>n.length){var s=new Ft(o+8+(r-a<<1));s.set(n),n=s}var l=e.charCodeAt(a);l<128||t?i(l):l<2048?(i(192|l>>>6),i(128|63&l)):l>55295&&l<57344?(i(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),i(128|l>>>12&63),i(128|l>>>6&63),i(128|63&l)):(i(224|l>>>12),i(128|l>>>6&63),i(128|63&l))}return cr(n,0,o)}function Er(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var n=0;n<e.length;){var o=e[n++];o<128||t?r+=String.fromCharCode(o):o<224?r+=String.fromCharCode((31&o)<<6|63&e[n++]):o<240?r+=String.fromCharCode((15&o)<<12|(63&e[n++])<<6|63&e[n++]):(o=((15&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,r+=String.fromCharCode(55296|o>>10,56320|1023&o))}return r}var Ir="v1",Cr=function(){function e(e){this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),Mr=/(^|@)\S+:\d+/,kr=/^\s*at .*(\S+:\d+|\(native\))/m,Nr=/^(eval@)?(\[native code])?$/,Rr={parse:function(e){if(!e)return[];if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(kr))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(kr)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:n.pop()),i=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new Cr({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Nr)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Cr({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Cr({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,i=r.length;o<i;o+=2){var a=t.exec(r[o]);a&&n.push(new Cr({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],o=0,i=r.length;o<i;o+=2){var a=t.exec(r[o]);a&&n.push(new Cr({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Mr)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Cr({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function _r(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var i=0;i<n.children.length;i++){var a=n.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&o.push(a)}o.length>1&&(r+=":eq("+o.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function Or(e){return"[object Object]"===Object.prototype.toString.call(e)}function Lr(e,t){var r,o;if(0===t)return!0;var i=Object.keys(e);try{for(var a=n(i),s=a.next();!s.done;s=a.next()){var l=s.value;if(Or(e[l])&&Lr(e[l],t-1))return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return!1}function Ar(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],o=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?o.splice(i,1/0,e):o.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null==t)return t;if(function(e){if(Or(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Or(e)&&Lr(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t="".concat(t.slice(0,r.stringLengthLimit),"..."));return t}(t);if(t instanceof Event){var a={};for(var s in t){var l=t[s];Array.isArray(l)?a[s]=_r(l.length?l[0]:null):a[s]=l}return a}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Dr={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Fr(e,t,r){var a,s,l,c=r.logger;if(!c)return function(){};l="string"==typeof c?t[c]:c;var u=0,d=[];if(r.level.includes("error")&&window){var f=function(t){var n=t.message,o=t.error,i=Rr.parse(o).map((function(e){return e.toString()})),a=[Ar(n,r.stringifyOptions)];e({level:"error",trace:i,payload:a})};window.addEventListener("error",f),d.push((function(){window&&window.removeEventListener("error",f)}))}try{for(var p=n(r.level),h=p.next();!h.done;h=p.next()){var m=h.value;d.push(v(l,m))}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}return function(){d.forEach((function(e){return e()}))};function v(t,n){var a=this;return t[n]?Z(t,n,(function(t){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];t.apply(a,s);try{var c=Rr.parse(new Error).map((function(e){return e.toString()})).splice(1),d=s.map((function(e){return Ar(e,r.stringifyOptions)}));++u<r.lengthThreshold?e({level:n,trace:c,payload:d}):u===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Ar("The number of log records reached the threshold.")]})}catch(e){t.apply(void 0,i(["rrweb logger error:",e],o(s),!1))}}})):function(){}}}var Pr="rrweb/console@1",Wr={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0},jr=function(){function e(e){this.config=Object.assign(Wr,e)}return e.prototype.getConsoleLogger=function(){var e,t,r=this,a={},s=function(e){a[e]="trace"===e?function(e){(console.log.__rrweb_original__?console.log.__rrweb_original__:console.log).apply(void 0,i(i([],o(e.payload.map((function(e){return JSON.parse(e)}))),!1),[r.formatMessage(e)],!1))}:function(t){(console[e].__rrweb_original__?console[e].__rrweb_original__:console[e]).apply(void 0,i(i([],o(t.payload.map((function(e){return JSON.parse(e)}))),!1),[r.formatMessage(t)],!1))}};try{for(var l=n(this.config.level),c=l.next();!c.done;c=l.next()){s(c.value)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return a},e.prototype.formatMessage=function(e){if(0===e.trace.length)return"";var t="\n\tat ",r=t;return r+=e.trace.join(t)},e}(),Ur={key:"_sid"},zr={key:"_sid",warnOnMissingId:!0};return e.PLUGIN_NAME=Pr,e.Replayer=Lt,e.addCustomEvent=At,e.freezePage=Dt,e.getRecordConsolePlugin=function(e){return{name:Pr,observer:Fr,options:e?Object.assign({},Dr,e):Dr}},e.getRecordSequentialIdPlugin=function(e){var t=e?Object.assign({},Ur,e):Ur,r=0;return{name:"rrweb/sequential-id@1",eventProcessor:function(e){var n;return Object.assign(e,((n={})[t.key]=++r,n)),e},options:t}},e.getReplayConsolePlugin=function(t){var r=(null==t?void 0:t.replayLogger)||new jr(t).getConsoleLogger();return{handler:function(t,n,o){var i=null;if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.Log?i=t.data:t.type===e.EventType.Plugin&&t.data.plugin===Pr&&(i=t.data.payload),i)try{"function"==typeof r[i.level]&&r[i.level](i)}catch(e){o.replayer.config.showWarning&&console.warn(e)}}}},e.getReplaySequentialIdPlugin=function(e){var t=e?Object.assign({},zr,e):zr,r=t.key,n=t.warnOnMissingId,o=1;return{handler:function(e){if(r in e){var t=e[r];t!==o?console.error('[sequential-id-plugin]: expect to get an id with value "'.concat(o,'", but got "').concat(t,'"')):o++}else n&&console.warn('[sequential-id-plugin]: failed to get id in key: "'.concat(r,'"'))}}},e.pack=function(e){var t=r(r({},e),{v:Ir});return Er(wr(Tr(JSON.stringify(t))),!0)},e.record=Ze,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if((t=JSON.parse(Er(xr(Tr(e,!0))))).v===Ir)return t;throw new Error("These events were packed with packer ".concat(t.v," which is incompatible with current packer ").concat(Ir,"."))}catch(e){throw console.error(e),new Error("Unknown data format.")}},e.utils=he,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
30
+ //# sourceMappingURL=rrweb-all.min.js.map