@cloudcare/browser-rum 3.1.0 → 3.1.2

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 (73) hide show
  1. package/bundle/dataflux-rum.js +1 -1
  2. package/cjs/boot/buildEnv.js +1 -1
  3. package/cjs/boot/recorderApi.js +25 -21
  4. package/cjs/boot/recorderApi.js.map +1 -1
  5. package/cjs/boot/rumPublicApi.js +49 -13
  6. package/cjs/boot/rumPublicApi.js.map +1 -1
  7. package/cjs/boot/startRecording.js +5 -2
  8. package/cjs/boot/startRecording.js.map +1 -1
  9. package/cjs/domain/contexts/pageStateHistory.js +0 -1
  10. package/cjs/domain/contexts/pageStateHistory.js.map +1 -1
  11. package/cjs/domain/replay/deflate/deflateEncoder.js +82 -0
  12. package/cjs/domain/replay/deflate/deflateEncoder.js.map +1 -0
  13. package/cjs/domain/replay/deflate/deflateWorker.js +142 -0
  14. package/cjs/domain/replay/deflate/deflateWorker.js.map +1 -0
  15. package/cjs/domain/replay/deflate/index.js +44 -0
  16. package/cjs/domain/replay/deflate/index.js.map +1 -0
  17. package/cjs/domain/replay/record/mutationObserver.js +5 -5
  18. package/cjs/domain/replay/record/mutationObserver.js.map +1 -1
  19. package/cjs/domain/replay/record/serializationUtils.js +14 -19
  20. package/cjs/domain/replay/record/serializationUtils.js.map +1 -1
  21. package/cjs/domain/replay/segmentCollection/buildReplayPayload.js +1 -1
  22. package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
  23. package/cjs/domain/replay/segmentCollection/index.js +0 -7
  24. package/cjs/domain/replay/segmentCollection/index.js.map +1 -1
  25. package/cjs/domain/replay/segmentCollection/segment.js +19 -67
  26. package/cjs/domain/replay/segmentCollection/segment.js.map +1 -1
  27. package/cjs/domain/replay/segmentCollection/segmentCollection.js +36 -40
  28. package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
  29. package/esm/boot/buildEnv.js +1 -1
  30. package/esm/boot/recorderApi.js +27 -23
  31. package/esm/boot/recorderApi.js.map +1 -1
  32. package/esm/boot/rumPublicApi.js +50 -14
  33. package/esm/boot/rumPublicApi.js.map +1 -1
  34. package/esm/boot/startRecording.js +6 -3
  35. package/esm/boot/startRecording.js.map +1 -1
  36. package/esm/domain/contexts/pageStateHistory.js +0 -1
  37. package/esm/domain/contexts/pageStateHistory.js.map +1 -1
  38. package/esm/domain/replay/deflate/deflateEncoder.js +74 -0
  39. package/esm/domain/replay/deflate/deflateEncoder.js.map +1 -0
  40. package/esm/domain/replay/deflate/deflateWorker.js +129 -0
  41. package/esm/domain/replay/deflate/deflateWorker.js.map +1 -0
  42. package/esm/domain/replay/deflate/index.js +3 -0
  43. package/esm/domain/replay/deflate/index.js.map +1 -0
  44. package/esm/domain/replay/record/mutationObserver.js +6 -6
  45. package/esm/domain/replay/record/mutationObserver.js.map +1 -1
  46. package/esm/domain/replay/record/serializationUtils.js +15 -19
  47. package/esm/domain/replay/record/serializationUtils.js.map +1 -1
  48. package/esm/domain/replay/segmentCollection/buildReplayPayload.js +1 -1
  49. package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
  50. package/esm/domain/replay/segmentCollection/index.js +0 -1
  51. package/esm/domain/replay/segmentCollection/index.js.map +1 -1
  52. package/esm/domain/replay/segmentCollection/segment.js +20 -68
  53. package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
  54. package/esm/domain/replay/segmentCollection/segmentCollection.js +36 -40
  55. package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
  56. package/package.json +4 -4
  57. package/src/boot/recorderApi.js +43 -32
  58. package/src/boot/rumPublicApi.js +63 -16
  59. package/src/boot/startRecording.js +7 -3
  60. package/src/domain/contexts/pageStateHistory.js +0 -1
  61. package/src/domain/replay/deflate/deflateEncoder.js +88 -0
  62. package/src/domain/replay/{segmentCollection/startDeflateWorker.js → deflate/deflateWorker.js} +55 -32
  63. package/src/domain/replay/deflate/index.js +7 -0
  64. package/src/domain/replay/record/mutationObserver.js +7 -10
  65. package/src/domain/replay/record/serializationUtils.js +23 -19
  66. package/src/domain/replay/segmentCollection/buildReplayPayload.js +1 -1
  67. package/src/domain/replay/segmentCollection/index.js +0 -1
  68. package/src/domain/replay/segmentCollection/segment.js +28 -83
  69. package/src/domain/replay/segmentCollection/segmentCollection.js +49 -55
  70. package/cjs/domain/replay/segmentCollection/startDeflateWorker.js +0 -126
  71. package/cjs/domain/replay/segmentCollection/startDeflateWorker.js.map +0 -1
  72. package/esm/domain/replay/segmentCollection/startDeflateWorker.js +0 -117
  73. package/esm/domain/replay/segmentCollection/startDeflateWorker.js.map +0 -1
@@ -1 +1 @@
1
- !function(){"use strict";var t,e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},n=function t(n){var r=[].slice.call(arguments,1);Object.prototype.hasOwnProperty.call(e,n)||(n=e.log),t[n].apply(t,r)};function r(t,e){var n,r=window;return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=t[r.Zone.__symbol__(e)]),n||(n=t[e]),n}n.debug=console.debug.bind(console),n.log=console.log.bind(console),n.info=console.info.bind(console),n.warn=console.warn.bind(console),n.error=console.error.bind(console);var i=!1;function o(t){i=t}function a(t){return function(){return s(t,this,arguments)}}function s(n,r,i){try{return n.apply(r,i)}catch(n){if(u(e.error,n),t)try{t(n)}catch(t){u(e.error,t)}}}function u(t){var e=[].slice.call(arguments,1);i&&n.apply(null,[t,"[MONITOR]"].concat(e))}function c(t,e){return function(){var r=[].slice.call(arguments);try{return t.apply(this,r)}catch(t){n.error(e,t)}}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(){if("object"===("undefined"==typeof globalThis?"undefined":l(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var t=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==l(t)&&(t="object"===("undefined"==typeof self?"undefined":l(self))?self:"object"===("undefined"==typeof window?"undefined":l(window))?window:{}),t}function d(t,e){return r(f(),"setTimeout")(a(t),e)}function p(t){r(f(),"clearTimeout")(t)}function h(t,e){return r(window,"setInterval")(a(t),e)}function v(t){r(window,"clearInterval")(t)}function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}var m=Array.prototype,g=(Function.prototype,Object.prototype),y=m.slice,E=g.toString,b=g.hasOwnProperty,w=m.forEach,S=Array.isArray,T=function(t,e,n){if(null===t)return!1;if(w&&t.forEach===w)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&false===e.call(n,t[r],r,t))return!1}else for(var o in t)if(b.call(t,o)&&false===e.call(n,t[o],o,t))return!1};function C(t){return T(y.call(arguments,1),(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})),t}function O(t){return C({},t)}var I=function(t){return T(y.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},A=function(t){return T(y.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(V(e[n])&&V(t[n])?I(t[n],e[n]):t[n]=e[n])})),t},R=S||function(t){return"[object Array]"===E.call(t)},x=function(t){if(!t)return!1;try{return/^\s*\bfunction\b/.test(t)}catch(t){return!1}},N=function(t){return t?t.toArray?t.toArray():R(t)?y.call(t):(e=t)&&b.call(e,"callee")?y.call(t):k(t):[];var e},k=function(t){var e=[];return null===t||T(t,(function(t){e[e.length]=t})),e},L=function(t){var e=[];return null===t||T(t,(function(t,n){e[e.length]=n})),e},D=function(t,e,n){if(t.filter)return t.filter(e);for(var r=[],i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];e.call(n,o,i,t)&&r.push(o)}return r},M=function(t,e,n){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];r.push(e.call(n,o,i,t))}return r},P=function(t,e,n){if(t.some)return t.some(e);for(var r=!1,i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];if(e.call(n,o,i,t)){r=!0;break}}return r},U=function(t,e,n){if(t.every)return t.every(e);for(var r=!0,i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];if(!e.call(n,o,i,t)){r=!1;break}}return r},B=function(t,e,r){return void 0===r&&(r=!1),P(t,(function(t){try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return r?Mt(e,t):t===e}catch(t){n.error(t)}}))},F=function(t){return t+="",window.CSS&&window.CSS.escape?window.CSS.escape(t):t.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}))},V=function(t){return null!==t&&"[object Object]"===E.call(t)},H=function(t){if(V(t)){for(var e in t)if(b.call(t,e))return!1;return!0}return!1},z=function(t){var e=[];return T(t,(function(t,n){e.push([n,t])})),e},W=function(t){return"[object String]"===E.call(t)},$=function(t){return"[object Boolean]"===E.call(t)},j=function(t){return"[object Number]"===E.call(t)&&/[\d\.]+/.test(String(t))},G=function t(e){var n=e;try{n=t(e)}catch(t){n=e}return n},K=(Date.now,function(t,e,n){var r,i,o=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1,u=this;return{throttled:function(){s?r=arguments:(o?t.apply(u,arguments):r=arguments,s=!0,i=d((function(){a&&r&&t.apply(u,r),s=!1,r=void 0}),e))},cancel:function(){p(i),s=!1,r=void 0}}}),Z=function(t){if("function"==typeof btoa)return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode("0x"+e)})));var e,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,u=0,c="",l=[];if(!(t=String(t)))return t;t=function(t){var e,n,r,i,o="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=t.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>e&&(o+=t.substring(e,n)),o+=s,e=n=i+1)}return n>e&&(o+=t.substring(e,t.length)),o}(t);do{e=(o=t.charCodeAt(s++)<<16|t.charCodeAt(s++)<<8|t.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[u++]=a.charAt(e)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<t.length);switch(c=l.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c};function q(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,q)}function Y(t){var e="";return t&&(e=t.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),e||"/"}var Q=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!==_(t))return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];this._values.QueryString=e},e.prototype.getParse=function(){return this._values},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);if(!e)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==e[this._fields[n]]&&(this._values[n]=e[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new e(t)};var X=function(t){var e={},n=t.split("?")[1]||"";return n&&(e=J("?"+n)),e},J=function(t){for(var e=function(t){return G(t)},n={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(-1!==o){var a=r[i].substring(0,o),s=r[i].substring(o+1);a=e(a),s=e(s),n[a]=s}}return n};function tt(t){return null===t?"null":Array.isArray(t)?"array":_(t)}function et(t,e,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var t=new WeakSet;return{hasAlreadyBeenSeen:function(e){var n=t.has(e);return n||t.add(e),n}}}var e=[];return{hasAlreadyBeenSeen:function(t){var n=e.indexOf(t)>=0;return n||e.push(t),n}}}()),void 0===e)return t;if("object"!==_(e)||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var r=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,r)}if(!n.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var i=Array.isArray(t)?t:[],o=0;o<e.length;++o)i[o]=et(i[o],e[o],n);return i}i="object"===tt(t)?t:{};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=et(i[a],e[a],n));return i}}function nt(t){return et(void 0,t)}function rt(t){return t?String(t).substr(0,1)+String(t).substr(1).replace(/\d*/g,"x"):t}function it(){}var ot,at=1e3,st=60*at,ut=60*st,ct=365*(24*ut);function lt(t){return 0!==t&&100*Math.random()<=t}function ft(t,e){return+t.toFixed(e)}function dt(t){return"number"!=typeof t?t:ft(1e6*t,0)}function pt(t){return j(t)?ft(1e6*t,0):t}function ht(t){return t-Tt()}function vt(t){return Math.round(Tt()+t)}function _t(){return performance.now()}function mt(){return{relative:_t(),timeStamp:gt()}}function gt(){return yt()}function yt(){return(new Date).getTime()}function Et(t,e){return e-t}function bt(){return{relative:0,timeStamp:Tt()}}function wt(t){return{relative:t,timeStamp:St(t)}}function St(t){var e=yt()-performance.now();return e>Tt()?Math.round(e+t):vt(t)}function Tt(){return void 0===ot&&(ot=performance.timing.navigationStart),ot}function Ct(t,e){for(var n=e.split(".");n.length;){var r=n.shift();if(!(t&&r in t&&b.call(t,r)))return;t=t[r]}return t}function Ot(t,e){var n=t.charCodeAt(e-1);return n>=55296&&n<=56319?t.slice(0,e+1):t.slice(0,e)}function It(t){var e=tt(t);return"string"===e||"function"===e||t instanceof RegExp}function At(t,e){return-1!==t.indexOf(e)}function Rt(t,e){for(var n=0;n<t.length;n+=1){var r=t[n];if(e(r,n,t))return r}}function xt(t){return j(t)&&t>=0&&t<=100}function Nt(t){if(t.origin&&"null"!==t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}function kt(t){var e={};return T(t,(function(t,n){var r;e[(r=n,r.replace(/[A-Z]/g,(function(t,e){return(0!==e?"_":"")+t.toLowerCase()})).replace(/-/g,"_"))]=Lt(t)})),e}function Lt(t){return R(t)?M(t,(function(t){return Lt(t)})):"object"===_(t)&&null!==t?kt(t):t}function Dt(t,e){return null!=t?t:e}function Mt(t,e){return t.slice(0,e.length)===e}function Pt(t){var e=t.substr(1);return!!e&&!!document.getElementById(e)}function Ut(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var Bt=function(){this.buffer=[]};Bt.prototype={add:function(t){this.buffer.push(t)>500&&this.buffer.splice(0,1)},drain:function(){T(this.buffer,(function(t){t()})),this.buffer.length=0}};var Ft=Bt;function Vt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ht(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var zt=1/0,Wt=st;function $t(t,e){this.expireDelay=t,this.entries=[],this.maxEntries=e;var n=this;this.clearOldContextsInterval=h((function(){n.clearOldContexts()}),Wt)}$t.prototype.add=function(t,e){var n=this,r={context:t,startTime:e,endTime:zt,remove:function(){var t=n.entries.indexOf(r);t>=0&&n.entries.splice(t,1)},close:function(t){r.endTime=t}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},$t.prototype.find=function(t){void 0===t&&(t=zt);var e,n=Vt(this.entries);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.startTime<=t){if(t<=r.endTime)return r.context;break}}}catch(t){n.e(t)}finally{n.f()}},$t.prototype.closeActive=function(t){var e=this.entries[0];e&&e.endTime===zt&&e.close(t)},$t.prototype.findAll=function(t,e){void 0===e&&(e=0),void 0===t&&(t=zt);var n=t+e,r=D(this.entries,(function(e){return e.startTime<=n&&t<=e.endTime}));return M(r,(function(t){return t.context}))},$t.prototype.reset=function(){this.entries=[]},$t.prototype.stop=function(){v(this.clearOldContextsInterval)},$t.prototype.clearOldContexts=function(){for(var t=_t()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<t;)this.entries.pop()};var jt={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Gt={getMatchMap:function(t){return{Trident:t.indexOf("Trident")>-1||t.indexOf("NET CLR")>-1,Presto:t.indexOf("Presto")>-1,WebKit:t.indexOf("AppleWebKit")>-1,Gecko:t.indexOf("Gecko/")>-1,Safari:t.indexOf("Safari")>-1,Chrome:t.indexOf("Chrome")>-1||t.indexOf("CriOS")>-1,IE:t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1,Edge:t.indexOf("Edge")>-1||t.indexOf("Edg")>-1,Firefox:t.indexOf("Firefox")>-1||t.indexOf("FxiOS")>-1,"Firefox Focus":t.indexOf("Focus")>-1,Chromium:t.indexOf("Chromium")>-1,Opera:t.indexOf("Opera")>-1||t.indexOf("OPR")>-1,Vivaldi:t.indexOf("Vivaldi")>-1,Yandex:t.indexOf("YaBrowser")>-1,Arora:t.indexOf("Arora")>-1,Lunascape:t.indexOf("Lunascape")>-1,QupZilla:t.indexOf("QupZilla")>-1,"Coc Coc":t.indexOf("coc_coc_browser")>-1,Kindle:t.indexOf("Kindle")>-1||t.indexOf("Silk/")>-1,Iceweasel:t.indexOf("Iceweasel")>-1,Konqueror:t.indexOf("Konqueror")>-1,Iceape:t.indexOf("Iceape")>-1,SeaMonkey:t.indexOf("SeaMonkey")>-1,Epiphany:t.indexOf("Epiphany")>-1,360:t.indexOf("QihooBrowser")>-1||t.indexOf("QHBrowser")>-1,"360EE":t.indexOf("360EE")>-1,"360SE":t.indexOf("360SE")>-1,UC:t.indexOf("UC")>-1||t.indexOf(" UBrowser")>-1,QQBrowser:t.indexOf("QQBrowser")>-1,QQ:t.indexOf("QQ/")>-1,Baidu:t.indexOf("Baidu")>-1||t.indexOf("BIDUBrowser")>-1,Maxthon:t.indexOf("Maxthon")>-1,Sogou:t.indexOf("MetaSr")>-1||t.indexOf("Sogou")>-1,LBBROWSER:t.indexOf("LBBROWSER")>-1,"2345Explorer":t.indexOf("2345Explorer")>-1,TheWorld:t.indexOf("TheWorld")>-1,XiaoMi:t.indexOf("MiuiBrowser")>-1,Quark:t.indexOf("Quark")>-1,Qiyu:t.indexOf("Qiyu")>-1,Wechat:t.indexOf("MicroMessenger")>-1,Taobao:t.indexOf("AliApp(TB")>-1,Alipay:t.indexOf("AliApp(AP")>-1,Weibo:t.indexOf("Weibo")>-1,Douban:t.indexOf("com.douban.frodo")>-1,Suning:t.indexOf("SNEBUY-APP")>-1,iQiYi:t.indexOf("IqiyiApp")>-1,Windows:t.indexOf("Windows")>-1,Linux:t.indexOf("Linux")>-1||t.indexOf("X11")>-1,"Mac OS":t.indexOf("Macintosh")>-1,Android:t.indexOf("Android")>-1||t.indexOf("Adr")>-1,Ubuntu:t.indexOf("Ubuntu")>-1,FreeBSD:t.indexOf("FreeBSD")>-1,Debian:t.indexOf("Debian")>-1,"Windows Phone":t.indexOf("IEMobile")>-1||t.indexOf("Windows Phone")>-1,BlackBerry:t.indexOf("BlackBerry")>-1||t.indexOf("RIM")>-1,MeeGo:t.indexOf("MeeGo")>-1,Symbian:t.indexOf("Symbian")>-1,iOS:t.indexOf("like Mac OS X")>-1,"Chrome OS":t.indexOf("CrOS")>-1,WebOS:t.indexOf("hpwOS")>-1,Mobile:t.indexOf("Mobi")>-1||t.indexOf("iPh")>-1||t.indexOf("480")>-1,Tablet:t.indexOf("Tablet")>-1||t.indexOf("Nexus 7")>-1,iPad:t.indexOf("iPad")>-1}},matchInfoMap:function(t){var e=jt.navigator.userAgent||"",n=Gt.getMatchMap(e);for(var r in jt.infoMap)for(var i=0;i<jt.infoMap[r].length;i++){var o=jt.infoMap[r][i];n[o]&&(t[r]=o)}},getOS:function(){return Gt.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var t=this,e=jt.navigator.userAgent||"";t.osVersion="",t.osMajor="";var n={Windows:function(){var t=e.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[t]||t},Android:function(){return e.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return e.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return e.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return e.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return e.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return e.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[t.os]&&(t.osVersion=n[t.os](),t.osVersion===e&&(t.osVersion="")),t.osVersion&&(t.osMajor=t.osVersion.split(".").length&&t.osVersion.split(".")[0]),{version:t.osVersion,osMajor:t.osMajor}},getOrientationStatu:function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"},getDeviceType:function(){var t=this;return t.device="PC",Gt.matchInfoMap(t),t.device},getNetwork:function(){var t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,e="unknown",n=t?t.type||t.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":e="cellular";break;case"none":e="none";break;case"ethernet":case"wifi":case"wimax":case"4g":e="wifi";break;case"other":case"unknown":e="unknown"}return e},getLanguage:function(){var t;return this.language=((t=(jt.navigator.browserLanguage||jt.navigator.language||"").split("-"))[1]&&(t[1]=t[1].toUpperCase()),t.join("_")),this.language},getBrowserInfo:function(){var t=this;Gt.matchInfoMap(t);var e=jt.navigator.userAgent||"",n=function(t,e){var n=jt.navigator.mimeTypes;for(var r in n)if(n[r][t]==e)return!0;return!1},r=Gt.getMatchMap(e),i=!1;if("undefined"!=typeof window&&window.chrome){var o=e.replace(/^.*Chrome\/([\d]+).*$/,"$1");o>36&&window.showModalDialog?i=!0:o>45&&(i=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(e.indexOf("iPad")>-1)),i&&(n("type","application/gameplugin")||jt.navigator&&void 0===jt.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var a={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge?\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return e.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return e.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return e.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return e.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return e.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return e.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return e.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return e.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return e.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return e.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var t="";e.indexOf("LieBaoFast")>-1&&(t=e.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=e.replace(/^.*Chrome\/([\d]+).*$/,"$1");return t||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return e.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return t.browserVersion="",t.browserMajor="",a[t.browser]&&(t.browserVersion=a[t.browser](),t.browserVersion==e&&(t.browserVersion="")),"Chrome"==t.browser&&e.match(/\S+Browser/)&&(t.browser=e.match(/\S+Browser/)[0],t.version=e.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==t.browser&&(t.version>"75"?t.engine="Blink":t.engine="EdgeHTML"),("Chrome"==t.browser&&parseInt(t.browserVersion)>27||r.Chrome&&"WebKit"==t.engine&&parseInt(t.browserVersion)>27||"Opera"==t.browser&&parseInt(t.version)>12||"Yandex"==t.browser)&&(t.engine="Blink"),t.browserVersion&&(t.browserMajor=t.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:t.browser,browserVersion:t.browserVersion,engine:t.engine,browserMajor:t.browserMajor}},getGeoPostion:function(t){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){t(e)}),(function(t){n.warn(t)}))}},Kt={};"undefined"!=typeof window&&(Kt={os:Gt.getOS(),osVersion:Gt.getOSVersion().version,osVersionMajor:Gt.getOSVersion().osMajor,browser:Gt.getBrowserInfo().browser,browserVersion:Gt.getBrowserInfo().browserVersion,browserVersionMajor:Gt.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Gt.getNetwork(),divice:Gt.getDeviceType()});var Zt=Kt,qt={BEFORE_UNLOAD:"beforeunload",CLICK:"click",DBL_CLICK:"dblclick",KEY_DOWN:"keydown",LOAD:"load",POP_STATE:"popstate",SCROLL:"scroll",TOUCH_START:"touchstart",TOUCH_END:"touchend",TOUCH_MOVE:"touchmove",VISIBILITY_CHANGE:"visibilitychange",PAGE_SHOW:"pageshow",FREEZE:"freeze",RESUME:"resume",DOM_CONTENT_LOADED:"DOMContentLoaded",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",HASH_CHANGE:"hashchange",PAGE_HIDE:"pagehide",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",FOCUS:"focus",BLUR:"blur",CONTEXT_MENU:"contextmenu",RESIZE:"resize",CHANGE:"change",INPUT:"input",PLAY:"play",PAUSE:"pause",SECURITY_POLICY_VIOLATION:"securitypolicyviolation",SELECTION_CHANGE:"selectionchange"},Yt={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},Qt={CLICK:"click",CUSTOM:"custom"},Xt={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},Jt={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},te={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change"},ee={FETCH:Yt.FETCH,XHR:Yt.XHR},ne={DDTRACE:"ddtrace",ZIPKIN_MULTI_HEADER:"zipkin",ZIPKIN_SINGLE_HEADER:"zipkin_single_header",W3C_TRACEPARENT:"w3c_traceparent",W3C_TRACEPARENT_64:"w3c_traceparent_64bit",SKYWALKING_V3:"skywalking_v3",JAEGER:"jaeger"},re={HANDLED:"handled",UNHANDLED:"unhandled"},ie={UNCAUGHT:"Uncaught",PROVIDED:"Provided"};function oe(t,e,n){var r=t[e],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return t[e]=o,{stop:function(){t[e]===o?t[e]=r:i=r}}}function ae(t,e,n){return oe(t,e,(function(t){return function(){var e;return n&&n.before&&s(n.before,this,arguments),"function"==typeof t&&(e=t.apply(this,arguments)),n&&n.after&&s(n.after,this,arguments),e}}))}function se(t,e,n){var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:it};var i=function(t,e){d((function(){n(t,e)}),0)},o=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:o}),{stop:function(){Object.getOwnPropertyDescriptor(t,e)&&Object.getOwnPropertyDescriptor(t,e).set===o?Object.defineProperty(t,e,r):i=it}}}function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function ce(t,e,n){if("object"!==ue(t)||null===t)return JSON.stringify(t);var r=le(Object.prototype),i=le(Array.prototype),o=le(Object.getPrototypeOf(t)),a=le(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),i(),o(),a()}}function le(t){var e=t,n=e.toJSON;return n?(delete e.toJSON,function(){e.toJSON=n}):it}function fe(t){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(t)}var de="?";function pe(t){var e=[],n=we(t,"stack");return n&&T(n.split("\n"),(function(t){var n=function(t){var e=_e.exec(t);if(!e)return;var n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),i=me.exec(e[2]);r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||de,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){var e=ge.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:de,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){var e=ye.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||de,line:+e[3],url:e[2]}}(t)||function(t){var e=Ee.exec(t);if(!e)return;var n=e[3]&&e[3].indexOf(" > eval")>-1,r=be.exec(e[3]);n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0);return{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||de,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=de),e.push(n))})),{message:we(t,"message"),name:we(t,"name"),stack:e}}var he="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",ve="(?::(\\d+))",_e=new RegExp("^\\s*at (.*?) ?\\("+he+ve+"?"+ve+"?\\)?\\s*$","i"),me=new RegExp("\\((\\S*)"+ve+ve+"\\)");var ge=new RegExp("^\\s*at ?"+he+ve+"?"+ve+"??\\s*$","i");var ye=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Ee=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,be=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function we(t,e){if("object"===fe(t)&&t&&e in t){var n=t[e];return"string"==typeof n?n:void 0}}var Se=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Te(t){var e=function(t){return ae(window,"onerror",{before:function(e,n,r,i,o){var a;if(o instanceof Error)a=pe(o);else{var s={url:n,column:i,line:r},u=function(t){var e,n;if("[object String]"==={}.toString.call(t)){var r=Se.exec(t);r&&(e=r[1],n=r[2])}return{name:e,message:n}}(e);a={name:u.name,message:u.message,stack:[s]}}t(a,Dt(o,e))}})}(t),n=function(t){return ae(window,"onunhandledrejection",{before:function(e){var n=e.reason||"Empty reason",r=pe(n);t(r,n)}})}(t);return{stop:function(){e.stop(),n.stop()}}}var Ce="No stack, consider using an instance of Error",Oe={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function Ie(t){var e=t.stackTrace,n=t.originalError,r=t.handlingStack,i=t.startClocks,o=t.nonErrorPrefix,a=t.source,s=t.handling,u=n instanceof Error,c=function(t,e,n,r){return t&&t.message&&t&&t.name?t.message:e?"Empty message":n+" "+ce(sanitize(r))}(e,u,o,n),l=function(t,e){if(void 0===e)return!1;if(t)return!0;return e.stack.length>0&&(e.stack.length>1||void 0!==e.stack[0].url)}(u,e)?Re(e):Ce,f=u?function(t,e){var n=t,r=[];for(;n&&n.cause instanceof Error&&r.length<10;){var i=pe(n.cause);r.push({message:n.cause.message,source:e,type:i&&i.name,stack:i&&Re(i)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:i,source:a,handling:s,originalError:n,message:c,stack:l,handlingStack:r,type:e&&e.name,causes:f}}function Ae(){var t,e=new Error;if(!e.stack)try{throw e}catch(t){}return s((function(){var n=pe(e);n.stack=n.stack.slice(2),t=Re(n)})),t}function Re(t){var e=xe(t);return T(t.stack,(function(t){var n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?"("+t.args.join(", ")+")":"",i=t.line?":"+t.line:"",o=t.line&&t.column?":"+t.column:"";e+="\n at "+n+r+" @ "+t.url+i+o})),e}function xe(t){return(t.name||"Error")+": "+t.message}function Ne(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ke(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ke(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Le=1024,De=1024*Le,Me=/[^\u0000-\u007F]/;function Pe(t){return Me.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}var Ue=function(t){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=t};Ue.prototype={subscribe:function(t){!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t);var e=this;return{unsubscribe:function(){e.observers=D(e.observers,(function(e){return t!==e})),!e.observers.length&&e.onLastUnsubscribe&&e.onLastUnsubscribe()}}},notify:function(t){T(this.observers,(function(e){e(t)}))}};var Be=Ue;function Fe(){var t=[].slice.call(arguments),e=new Be((function(){var n=M(t,(function(t){return t.subscribe((function(t){return e.notify(t)}))}));return function(){return T(n,(function(t){return t.unsubscribe()}))}}));return e}var Ve={};function He(t){var n=M(t,(function(t){return Ve[t]||(Ve[t]=function(t){var n=new Be((function(){var r=console[t];return console[t]=function(){var i=[].slice.call(arguments);r.apply(console,arguments);var o=Ae();s((function(){n.notify(function(t,n,r){var i,o=M(t,(function(t){return function(t){if("string"==typeof t)return t;if(t instanceof Error)return xe(pe(t));return ce(t,void 0,2)}(t)})).join(" ");if(n===e.error){var a=Rt(t,(function(t){return t instanceof Error}));i=a?Re(pe(a)):void 0,o="console error: "+o}return{api:n,message:o,stack:i,handlingStack:r}}(i,t,o))}))},function(){console[t]=r}}));return n}(t)),Ve[t]}));return Fe.apply(this,n)}function ze(t,e,n,r){return We(t,[e],n,r)}function We(t,e,n,i){var o=a(i&&i.once?function(t){u(),n(t)}:n);i=i&&i.passive?{capture:i.capture,passive:i.passive}:i&&i.capture;var s=r(t,"addEventListener");T(e,(function(e){s.call(t,e,o,i)}));var u=function(){var n=r(t,"removeEventListener");T(e,(function(e){n.call(t,e,o,i)}))};return{stop:u}}var $e={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function je(t,e){var n,r=[];At(e,$e.cspViolation)&&r.push(n=new Be((function(){var t=function(t){n.notify(function(t){var e=$e.cspViolation,n="'"+t.blockedURI+"' blocked by '"+t.effectiveDirective+"' directive";return{type:$e.cspViolation,subtype:t.effectiveDirective,message:e+": "+n,stack:Ge(t.effectiveDirective,n+' of the policy "'+Ot(t.originalPolicy,100)+'"',t.sourceFile,t.lineNumber,t.columnNumber)}}(t))};return ze(document,qt.SECURITY_POLICY_VIOLATION,t).stop})));var i=D(e,(function(t){return t!==$e.cspViolation}));return i.length&&r.push(function(t){var e=new Be((function(){if(window.ReportingObserver){var n=a((function(t){T(t,(function(t){e.notify(function(t){var e=t.body,n=t.type;return{type:n,subtype:e.id,message:n+": "+e.message,stack:Ge(e.id,e.message,e.sourceFile,e.lineNumber,e.columnNumber)}}(t))}))})),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return e}(i)),Fe.apply(this,r)}function Ge(t,e,n,r,i){return n&&Re({name:t,message:e,stack:[{func:"?",url:n,line:r,column:i}]})}function Ke(t){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(t)}var Ze=220*Le,qe="$",Ye=3;function Qe(t,e,n,r,i){var o=function(t){var e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!o||"object"!==Ke(o))return function(t){if("bigint"==typeof t)return"[BigInt] "+t.toString();if("function"==typeof t)return"[Function] "+t.name||0;if("symbol"===Ke(t))return"[Symbol] "+t.description||0;return t}(o);var a=function(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(e&&e[1])return"["+e[1]+"]"}catch(t){}return"[Unserializable]"}(o);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=t;if(i.has(s))return"[Reference seen at "+i.get(s)+"]";var u=void 0!==n?e+"."+n:e,c=Array.isArray(o)?[]:{};return i.set(s,u),r.push({source:o,target:c,path:u}),c}function Xe(t,e,r){n.warn("The data provided has been "+e+" as it is over the limit of "+t+" characters:",r)}var Je=function(){this._events=[],this.pendingEvents=[]};Je.prototype={emit:function(t){var e=[].slice.call(arguments,1);T(this._events,(function(n){if(n.type!==t)return!1;n.callback.apply(n.context,e)}))},on:function(t,e,n){"function"==typeof e&&this._events.push({type:t,callback:e,context:n||this})}};new Je;var tn,en={PERFORMANCE_ENTRIES_COLLECTED:"PERFORMANCE_ENTRIES_COLLECTED",AUTO_ACTION_COMPLETED:"AUTO_ACTION_COMPLETED",VIEW_CREATED:"VIEW_CREATED",VIEW_UPDATED:"VIEW_UPDATED",VIEW_ENDED:"VIEW_ENDED",SESSION_RENEWED:"SESSION_RENEWED",SESSION_EXPIRED:"SESSION_EXPIRED",PAGE_EXITED:"PAGE_EXITED",REQUEST_STARTED:"REQUEST_STARTED",REQUEST_COMPLETED:"REQUEST_COMPLETED",RAW_RUM_EVENT_COLLECTED:"RAW_RUM_EVENT_COLLECTED",RUM_EVENT_COLLECTED:"RUM_EVENT_COLLECTED",RAW_ERROR_COLLECTED:"RAW_ERROR_COLLECTED",RAW_LOG_COLLECTED:"RAW_LOG_COLLECTED",LOG_COLLECTED:"LOG_COLLECTED"};function nn(){this.callbacks={}}function rn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return on(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return on(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function on(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function an(t,e,n){var r=nt(t),i=n(r);return T(z(e),(function(e){var n=e[0],i=e[1],o=function(t,e){var n,r=t,i=rn(e.split("."));try{for(i.s();!(n=i.n()).done;){var o=n.value;if(!cn(r,o))return;r=r[o]}}catch(t){i.e(t)}finally{i.f()}return r}(r,n),a=tt(o);a===i?sn(t,n,function(t,e){void 0===e&&(e=Ze);var n=le(Object.prototype),r=le(Array.prototype),i=[],o=new WeakMap,a=Qe(t,qe,void 0,i,o),s=JSON.stringify(a)&&JSON.stringify(a).length||0;if(!(s>e)){for(;i.length>0&&s<e;){var u=i.shift(),c=0;if(Array.isArray(u.source))for(var l=0;l<u.source.length;l++){if(s+=void 0!==(f=Qe(u.source[l],u.path,l,i,o))?JSON.stringify(f).length:4,s+=c,c=1,s>e){Xe(e,"truncated",t);break}u.target[l]=f}else for(var l in u.source)if(Object.prototype.hasOwnProperty.call(u.source,l)){var f;if(void 0!==(f=Qe(u.source[l],u.path,l,i,o))&&(s+=JSON.stringify(f).length+c+l.length+Ye,c=1),s>e){Xe(e,"truncated",t);break}u.target[l]=f}}return n(),r(),a}Xe(e,"discarded",t)}(o)):"object"!==i||"undefined"!==a&&"null"!==a||sn(t,n,{})})),i}function sn(t,e,n){for(var r=t,i=e.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!un(r))return;o!==i.length-1?r=r[a]:r[a]=n}}function un(t){return"object"===tt(t)}function cn(t,e){return un(t)&&Object.prototype.hasOwnProperty.call(t,e)}function ln(t,e,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&d((function(){r=0}),st),(r+=1)<=e||i)return i=!1,!1;if(r===e+1){i=!0;try{n({message:"Reached max number of "+t+"s by minute: "+e,source:Oe.AGENT,startClocks:mt()})}finally{i=!1}}return!0}}}function fn(t){return pn(t,Nt(window.location)).href}function dn(t){return Nt(pn(t))}function pn(t,e){if(function(){if(void 0!==tn)return tn;try{var t=new URL("http://test/path");return tn="http://test/path"===t.href}catch(t){tn=!1}return tn}())return void 0!==e?new URL(t,e):new URL(t);if(void 0===e&&!/:/.test(t))throw new Error("Invalid URL: "+t);var n=document,r=n.createElement("a");if(void 0!==e){var i=(n=document.implementation.createHTMLDocument("")).createElement("base");i.href=e,n.head.appendChild(i),n.body.appendChild(r)}return r.href=t,r}nn.prototype={notify:function(t,e){var n=this.callbacks[t];n&&T(n,(function(t){t(e)}))},subscribe:function(t,e){this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e);var n=this;return{unsubscribe:function(){n.callbacks[t]=D(n.callbacks[t],(function(t){return t!==e}))}}}};var hn=navigator.userAgent.toLowerCase(),vn=function(){return/iphone os/.test(hn)};var _n,mn=at;function gn(t,e,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"";document.cookie=t+"="+e+";"+o+";path=/;samesite="+a+s+u}function yn(t){return function(t,e){var n=t.match("(?:^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,t)}var En=/^\s+|\s+$/g,bn={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function wn(t,e){var n=bn[e];return n?(0===t.indexOf("/")&&(t=location.origin+Sn(t)),t.lastIndexOf("/")===t.length-1?Sn(t)+"v1/write"+n:Sn(t)+"/v1/write"+n):""}function Sn(t){return t.replace(En,"")}var Tn,Cn,On={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function In(t){if(void 0===t.sampleRate||xt(t.sampleRate))if(void 0===t.sessionSampleRate||xt(t.sessionSampleRate)){if(void 0===t.telemetrySampleRate||xt(t.telemetrySampleRate)){var e=t.sessionSampleRate||t.sampleRate;return C({beforeSend:t.beforeSend&&c(t.beforeSend,"beforeSend threw an error:"),cookieOptions:An(t),sessionSampleRate:Dt(e,100),service:t.service,version:t.version,env:t.env,telemetrySampleRate:Dt(t.telemetrySampleRate,100),telemetryEnabled:Dt(t.telemetryEnabled,!1),silentMultipleInit:!!t.silentMultipleInit,batchBytesLimit:16*Le,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*at,batchMessagesLimit:50,messageBytesLimit:256*Le,resourceUrlLimit:5*Le},function(t){var e=function(t){return!1};"isIntakeUrl"in t&&x(t.isIntakeUrl)&&$(t.isIntakeUrl())&&(e=t.isIntakeUrl);var n=function(t){return!1};return"isServerError"in t&&x(t.isServerError)&&$(t.isServerError())&&(n=t.isServerError),{rumEndpoint:wn(t.datakitUrl||t.datakitOrigin,"rum"),logsEndpoint:wn(t.datakitOrigin,"log"),sessionReplayEndPoint:wn(t.datakitOrigin,"sessionReplay"),isIntakeUrl:e,isServerError:n}}(t))}n.error("Telemetry Sample Rate should be a number between 0 and 100")}else n.error("Sample Rate should be a number between 0 and 100");else n.error("Sample Rate should be a number between 0 and 100")}function An(t){var e={};return e.secure=function(t){return!!t.useSecureSessionCookie||!!t.useCrossSiteSessionCookie}(t),e.crossSite=!!t.useCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=function(){if(void 0===_n){for(var t="dd_site_test_".concat(q()),e=window.location.hostname.split("."),n=e.pop();e.length&&!yn(t);)n=e.pop()+"."+n,gn(t,"test",at,{domain:n});_n=n}return _n}()),e}function Rn(){var t;return Tn||(t=new Be((function(){if(window.fetch)return oe(window,"fetch",(function(e){return function(n,r){var i,o=s(xn,null,[t,n,r]);return o?(i=e.call(this,o.input,o.init),s(Nn,null,[t,i,o])):i=e.call(this,n,r),i}})).stop})),Tn=t),Tn}function xn(t,e,n){var r=n&&n.method||e instanceof Request&&e.method||"GET",i=e instanceof Request?e.url:fn(String(e)),o={state:"start",init:n,input:e,method:r,startClocks:mt(),url:i};return t.notify(o),o}function Nn(t,e,n){var r=function(e){var r=n;if(r.state="resolve","stack"in e||e instanceof Error)r.status=0,r.isAborted=e instanceof DOMException&&e.code===DOMException.ABORT_ERR,r.error=e;else if("status"in e){r.response=e;try{r.responseType=e.constructor===Response&&e.type||""}catch(t){r.responseType=""}r.status=e.status,r.isAborted=!1}t.notify(r)};e.then(a(r),a(r))}var kn={},Ln="_DATAFLUX_REQUEST_UUID";function Dn(){var t;return Cn||(t=new Be((function(){var e=ae(XMLHttpRequest.prototype,"open",{before:Mn}),n=ae(XMLHttpRequest.prototype,"send",{before:function(){Pn.call(this,t)}}),r=ae(XMLHttpRequest.prototype,"abort",{before:Bn});return function(){e.stop(),n.stop(),r.stop()}})),Cn=t),Cn}function Mn(t,e){var n=this[Ln]||q();this[Ln]=n,kn[n]={state:"open",method:t,url:fn(String(e))}}function Pn(t){var e=kn[this[Ln]];if(e){var n=e;n.state="start",n.startTime=_t(),n.startClocks=mt(),n.isAborted=!1,n.xhr=this;var r=!1,i=ae(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&o.call(this)}}).stop,o=function(){if(a(),i(),!r){r=!0;var o=e;o.state="complete",o.duration=Et(n.startClocks.timeStamp,gt()),o.status=this.status,t.notify(O(o)),Un.call(this)}},a=ze(this,"loadend",o).stop;t.notify(n)}}function Un(){delete kn[this[Ln]],delete this[Ln]}function Bn(){var t=kn[this[Ln]];t&&(t.isAborted=!0)}var Fn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Vn(t){return At(k(Fn),t)}function Hn(t){return t.nodeType===Node.ELEMENT_NODE}function zn(t){return Hn(t)&&Boolean(t.shadowRoot)}function Wn(t){var e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Hn(e.host)}function $n(t){return Wn(t)?t.host:t.parentNode}function jn(t,e){if(document.readyState===t||"complete"===document.readyState)e();else{var n="complete"===t?qt.LOAD:qt.DOM_CONTENT_LOADED;ze(window,n,e,{once:!0})}}function Gn(){var t,e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Kn(){var t,e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}var Zn,qn={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",session_has_replay:"session.has_replay",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.path",view_path_group:"view.path_group",view_url_query:"view.url_query"},Yn={action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display"},Qn={view:{type:Jt.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent",first_byte:"view.first_byte",page_states:"_gc.page_states",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:Jt.RESOURCE,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_encode_size:"resource.encode_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:Jt.ERROR,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"]}},long_task:{type:Jt.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration"}},action:{type:Jt.ACTION,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"]}},browser_log:{type:Jt.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}},Xn=4*ut,Jn=15*st,tr=/^([a-z]+)=([a-z0-9-]+)$/,er="&",nr="_dataflux_s",rr=10,ir=100,or=[];function ar(t,e){if(void 0===e&&(e=0),Zn||(Zn=t),t===Zn)if(e>=ir)cr();else{var n,r=fr();if(sr()){if(r.lock)return void ur(t,e);if(n=q(),r.lock=n,lr(r,t.options),(r=fr()).lock!==n)return void ur(t,e)}var i=t.process(r);if(sr()&&(r=fr()).lock!==n)ur(t,e);else{if(i&&function(t,e){if(dr(t))return void function(t){gn(nr,"",0,t)}(e);t.expire=String(yt()+Jn),lr(t,e)}(i,t.options),sr()&&(!i||!dr(i))){if((r=fr()).lock!==n)return void ur(t,e);delete r.lock,lr(r,t.options),i=r}t.after&&t.after(i||r),cr()}}else or.push(t)}function sr(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function ur(t,e){d((function(){ar(t,e+1)}),rr)}function cr(){Zn=void 0;var t=or.shift();t&&ar(t)}function lr(t,e){gn(nr,function(t){return M(z(t),(function(t){return t[0]+"="+t[1]})).join(er)}(t),Jn,e)}function fr(){var t=yn(nr),e={};return function(t){return void 0!==t&&(-1!==t.indexOf(er)||tr.test(t))}(t)&&T(t.split(er),(function(t){var n=tr.exec(t);if(null!==n){var r=n[1],i=n[2];e[r]=i}})),e}function dr(t){return H(t)}function pr(t,e,n){var r=new Be,i=new Be,o=h((function(){ar({options:t,process:function(t){return c(t)?void 0:{}},after:s})}),mn),a=function(){var t=fr();if(c(t))return t;return{}}();function s(t){return c(t)||(t={}),u()&&(!function(t){return a.id!==t.id||a[e]!==t[e]}(t)?a=t:(a={},i.notify())),t}function u(){return void 0!==a[e]}function c(t){return(void 0===t.created||yt()-Number(t.created)<Xn)&&(void 0===t.expire||yt()<Number(t.expire))}return{expandOrRenewSession:K((function(){var i;ar({options:t,process:function(t){var r=s(t);return i=function(t){var r=n(t[e]),i=r.trackingType,o=r.isTracked;t[e]=i,o&&!t.id&&(t.id=q(),t.created=String(yt()));return o}(r),r},after:function(t){i&&!u()&&function(t){a=t,r.notify()}(t),a=t}})}),mn).throttled,expandSession:function(){ar({options:t,process:function(t){return u()?s(t):void 0}})},getSession:function(){return a},renewObservable:r,expireObservable:i,expire:function(){deleteSessionCookie(t),s({})},stop:function(){v(o)}}}var hr=st,vr=Xn,_r=[],mr=function(t,e,n){var r=pr(t,e,n);_r.push((function(){return r.stop()}));var i,o,a=new $t(vr);function s(){return{id:r.getSession().id,trackingType:r.getSession()[e]}}return _r.push((function(){return a.stop()})),r.renewObservable.subscribe((function(){a.add(s(),_t())})),r.expireObservable.subscribe((function(){a.closeActive(_t())})),r.expandOrRenewSession(),a.add(s(),bt().relative),i=function(){return r.expandOrRenewSession()},o=We(window,[qt.CLICK,qt.TOUCH_START,qt.KEY_DOWN,qt.SCROLL],i,{capture:!0,passive:!0}),_r.push(o.stop),function(t){var e=function(){"visible"===document.visibilityState&&t()},n=ze(document,qt.VISIBILITY_CHANGE,e);_r.push(n.stop);var r=h(e,hr);_r.push((function(){v(r)}))}((function(){return r.expandSession()})),{findActiveSession:function(t){return a.find(t)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}};var gr=80*Le,yr=32,Er=3*De,br=256*at,wr=at,Sr={UP:0,FAILURE_DETECTED:1,DOWN:2},Tr={AFTER_SUCCESS:0,AFTER_RESUME:1};function Cr(t,e,n,r,i){e.transportStatus===Sr.UP&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?Ir(t,e,n,{onSuccess:function(){return Ar(Tr.AFTER_SUCCESS,e,n,r,i)},onFailure:function(){e.queuedPayloads.enqueue(t),Or(e,n,r,i)}}):e.queuedPayloads.enqueue(t)}function Or(t,e,n,r){t.transportStatus===Sr.DOWN&&d((function(){Ir(t.queuedPayloads.first(),t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=wr,Ar(Tr.AFTER_RESUME,t,e,n,r)},onFailure:function(){t.currentBackoffTime=Math.min(br,2*t.currentBackoffTime),Or(t,e,n,r)}})}),t.currentBackoffTime)}function Ir(t,e,n,r){var i=r.onSuccess,o=r.onFailure;e.bandwidthMonitor.add(t),n(t,(function(n){e.bandwidthMonitor.remove(t),!function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||t.status>=500)}(n)?(e.transportStatus=Sr.UP,i()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?Sr.FAILURE_DETECTED:Sr.DOWN,e.lastFailureStatus=n.status,o())}))}function Ar(t,e,n,r,i){t===Tr.AFTER_SUCCESS&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(i({message:"Reached max "+r+" events size queued for upload: "+Er/De+"MiB",source:Oe.AGENT,startClocks:mt()}),e.queueFullReported=!0);var o=e.queuedPayloads;for(e.queuedPayloads=Rr();o.size()>0;)Cr(o.dequeue(),e,n,r,i)}function Rr(){var t=[];return{bytesCount:0,enqueue:function(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:function(){return t[0]},dequeue:function(){var e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:function(){return t.length},isFull:function(){return this.bytesCount>=Er}}}function xr(t){return t?t+(-1===t.indexOf("?")?"?":"&")+"precision=ms":t}function Nr(t,e,n){var r={transportStatus:Sr.UP,lastFailureStatus:0,currentBackoffTime:wr,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=gr&&this.ongoingRequestCount<yr},add:function(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove:function(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount}},queuedPayloads:Rr(),queueFullReported:!1},i=function(n,r){return function(t,e,n,r){var i=n.data,o=n.bytesCount,s=xr(t),u=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&o<e;u?fetch(s,{method:"POST",body:i,keepalive:!0,mode:"cors"}).then(a((function(t){"function"==typeof r&&r({status:t.status,type:t.type})})),a((function(){kr(s,i,r)}))):kr(s,i,r)}(t,e,n,r)};return{send:function(e){Cr(e,r,i,t,n)},sendOnExit:function(n){!function(t,e,n){var r=n.data,i=n.bytesCount,o=xr(t),a=!!navigator.sendBeacon&&i<e;if(a)try{if(navigator.sendBeacon(o,r))return}catch(t){}kr(o,r)}(t,e,n)}}}function kr(t,e,n){var r=new XMLHttpRequest;r.open("POST",t,!0),ze(r,"loadend",(function(){"function"==typeof n&&n({status:r.status})}),{once:!0}),r.send(e)}function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Dr(t){if("object"===Lr(t)&&t)t=ce(t);else if(!W(t))return t;return String(t).replace(/[\s=,"]/g,(function(t){return"\\"+t}))}function Mr(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function Pr(t){return"object"===Lr(t)&&t?Mr(ce(t)):W(t)?Mr(t):t}var Ur="custom_keys",Br=function(t){if(!t||!t.type)return{rowStr:"",rowData:void 0};var e={tags:{},fields:{}},n=!1,r="";return T(Qn,(function(i,o){if(i.type===t.type){r+=o+",",e.measurement=o;var a=[],s=I({},qn,i.tags),u=["date","type",Ur];T(s,(function(n,r){var i=Ct(t,n);u.push(r),(i||j(i))&&(e.tags[r]=function(t){return W(t)?t:ce(t)}(i),a.push(Dr(r)+"="+Dr(i)))}));var c=[],l=I({},Yn,i.fields);if(T(l,(function(n,r){if(R(n)&&2===n.length){var i=n[1],o=Ct(t,i);u.push(r),null!=o&&(e.fields[r]=o,c.push(Dr(r)+"="+Pr(o)))}else if(W(n)){o=Ct(t,n);u.push(r),null!=o&&(e.fields[r]=o,c.push(Dr(r)+"="+Pr(o)))}})),t.context&&V(t.context)&&!H(t.context)){var f=[];T(t.context,(function(t,n){u.indexOf(n)>-1||(u.push(n),null!=t&&(f.push(n),e.fields[n]=t,c.push(Dr(n)+"="+Pr(t))))})),f.length&&(e.fields[Ur]=Pr(f),c.push(Dr(Ur)+"="+Pr(f)))}t.type===Jt.LOGGER&&T(t,(function(t,n){-1===u.indexOf(n)&&null!=t&&(e.fields[n]=t,c.push(Dr(n)+"="+Pr(t)))})),a.length&&(r+=a.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+t.date,e.time=pt(t.date)}})),{rowStr:n?r:"",rowData:n?e:void 0}},Fr=function(t,e,n){this.pushOnlyBuffer=[],this.upsertBuffer={},this.request=t,this.flushController=e,this.messageBytesLimit=n;var r=this;this.flushController.flushObservable.subscribe((function(t){r.flush(t)}))};Fr.prototype.add=function(t){this.addOrUpdate(t)},Fr.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},Fr.prototype.flush=function(t){var e=this.pushOnlyBuffer.concat(k(this.upsertBuffer));if(this.pushOnlyBuffer=[],this.upsertBuffer={},e.length>0){var n={data:e.join("\n"),bytesCount:t.bytesCount,flushReason:t.reason};Vn(t.reason)?this.request.sendOnExit(n):this.request.send(n)}},Fr.prototype.addOrUpdate=function(t,e){var r=this.process(t),i=r.processedMessage,o=r.messageBytesCount;o>=this.messageBytesLimit?n.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.messageBytesLimit+"KB."):(this.hasMessageFor(e)&&this.remove(e),this.push(i,o,e))},Fr.prototype.process=function(t){var e=Br(t).rowStr;return{processedMessage:e,messageBytesCount:Pe(e)}},Fr.prototype.push=function(t,e,n){var r=this.flushController.getMessagesCount()>0?1:0;this.flushController.notifyBeforeAddMessage(e+r),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.flushController.notifyAfterAddMessage()},Fr.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=Pe(e),r=this.flushController.getMessagesCount()>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},Fr.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]};var Vr=Fr;function Hr(t){var e=t.messagesLimit,n=t.bytesLimit,r=t.durationLimit,i=t.pageExitObservable,o=t.sessionExpireObservable,a=new Be;i.subscribe((function(t){return l(t.reason)})),o.subscribe((function(){return l("session_expire")}));var s,u=0,c=0;function l(t){if(0!==c){var e=c,n=u;c=0,u=0,f(),a.notify({reason:t,messagesCount:e,bytesCount:n})}}function f(){p(s),s=void 0}return{flushObservable:a,getMessagesCount:function(){return c},notifyBeforeAddMessage:function(t){u+t>=n&&l("bytes_limit"),c+=1,u+=t,void 0===s&&(s=d((function(){l("duration_limit")}),r))},notifyAfterAddMessage:function(){c>=e?l("messages_limit"):u>=n&&l("bytes_limit")},notifyAfterRemoveMessage:function(t){u-=t,0===(c-=1)&&f()}}}function zr(){var t=f().FTWebViewJavascriptBridge;if(t)return{send:function(e,n){t.sendEvent(JSON.stringify({name:e,data:n}))}}}function Wr(){return!!zr()}var $r=3*Le,jr="user",Gr="global context";var Kr=200;function Zr(t,e){void 0===e&&(e=Pe);var r,i={},o=!1,a=K((function(i){r=e(ce(i)),o||(o=function(t,e){return t>$r&&(n.warn("The "+e+"data is over "+$r/Le+" KiB. On low connectivity, the SDK has the potential to exhaust the user's upload bandwidth."),!0)}(r,t))}),Kr).throttled;return{getBytesCount:function(){return r},get:function(){return i},add:function(t,e){i[t]=e,a(i)},remove:function(t){delete i[t],a(i)},set:function(t){a(i=t)},getContext:function(){return nt(i)},setContext:function(t){i=nt(t),a(i)},setContextProperty:function(t,e){i[t]=nt(e),a(i)},removeContextProperty:function(t){delete i[t],a(i)},clearContext:function(){i={},r=0}}}function qr(t){var e=C({},t);return T(["id","name","email"],(function(t){t in e&&(e[t]=String(e[t]))})),e}var Yr,Qr={log:"log",configuration:"configuration"},Xr={debug:"debug",error:"error"},Jr=["https://static.guance.com","http://localhost","<anonymous>"],ti={LOGS:"browser-logs-sdk",RUM:"browser-rum-sdk"},ei={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1};function ni(e,n){var r,i=new Be;return ei.telemetryEnabled=n.telemetryEnabled&&lt(n.telemetrySampleRate),Yr=function(t){if(ei.telemetryEnabled){var n=function(t,e){return A({type:"telemetry",date:gt(),service:t,version:"3.1.0",source:"browser",telemetry:e},void 0!==r?r():{})}(e,t);i.notify(n)}},t=ri,C(ei,{maxEventsPerPage:n.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(t){r=t},observable:i,enabled:ei.telemetryEnabled}}function ri(t,e){ii(C({type:Qr.log,status:Xr.error},function(t){if(t instanceof Error){var e=pe(t);return{error:{kind:e.name,stack:Re(oi(e))},message:e.message}}return{error:{stack:Ce},message:ie.UNCAUGHT+" "+ce(t)}}(t),e))}function ii(t){Yr&&ei.sentEventCount<ei.maxEventsPerPage&&(ei.sentEventCount+=1,Yr(t))}function oi(t){return t.stack=t.stack.filter((function(t){return!t.url||Jr.some((function(e){return Mt(t.url,e)}))})),t}var ai="rum",si={WITHOUT_SESSION_REPLAY:1,WITH_SESSION_REPLAY:2},ui={NOT_TRACKED:"0",TRACKED_WITH_SESSION_REPLAY:"1",TRACKED_WITHOUT_SESSION_REPLAY:"2"};function ci(t,e){var n=mr(t.cookieOptions,ai,(function(e){return function(t,e){var n;n=function(t){return t===ui.NOT_TRACKED||t===ui.TRACKED_WITH_SESSION_REPLAY||t===ui.TRACKED_WITHOUT_SESSION_REPLAY}(e)?e:lt(t.sessionSampleRate)?lt(t.sessionReplaySampleRate)?ui.TRACKED_WITH_SESSION_REPLAY:ui.TRACKED_WITHOUT_SESSION_REPLAY:ui.NOT_TRACKED;return{trackingType:n,isTracked:li(n)}}(t,e)}));return n.expireObservable.subscribe((function(){e.notify(en.SESSION_EXPIRED)})),n.renewObservable.subscribe((function(){e.notify(en.SESSION_RENEWED)})),{findTrackedSession:function(t){var e=n.findActiveSession(t);if(e&&li(e.trackingType)){var r=e.trackingType===ui.TRACKED_WITH_SESSION_REPLAY?si.WITH_SESSION_REPLAY:si.WITHOUT_SESSION_REPLAY;return{id:e.id,plan:r,sessionReplayAllowed:r===si.WITH_SESSION_REPLAY}}},expire:n.expire,expireObservable:n.expireObservable}}function li(t){return t===ui.TRACKED_WITHOUT_SESSION_REPLAY||t===ui.TRACKED_WITH_SESSION_REPLAY}var fi="_dataflulx_usr_id",di=1440*ut,pi="initial_document",hi=[[Yt.DOCUMENT,function(t){return pi===t}],[Yt.XHR,function(t){return"xmlhttprequest"===t}],[Yt.FETCH,function(t){return"fetch"===t}],[Yt.BEACON,function(t){return"beacon"===t}],[Yt.CSS,function(t,e){return null!==e.match(/\.css$/i)}],[Yt.JS,function(t,e){return null!==e.match(/\.js$/i)}],[Yt.IMAGE,function(t,e){return At(["image","img","icon"],t)||null!==e.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Yt.FONT,function(t,e){return null!==e.match(/\.(woff|eot|woff2|ttf)$/i)}],[Yt.MEDIA,function(t,e){return At(["audio","video"],t)||null!==e.match(/\.(mp3|mp4)$/i)}]];function vi(t){var e=t.name;if(!function(t){try{return!!pn(t)}catch(t){return!1}}(e))return Yt.OTHER;var n=function(t){var e=pn(t).pathname;return"/"===e[0]?e:"/"+e}(e),r=Yt.OTHER;return T(hi,(function(e){var i=e[0];if((0,e[1])(t.initiatorType,n))return r=i,!1})),r}function _i(){for(var t=N(arguments),e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}var mi=/[^\u0000-\u007F]/;function gi(t,e){return n=t,(mi.test(n)?void 0!==window.TextEncoder?(new TextEncoder).encode(n).length:new Blob([n]).size:n.length)>e;var n}function yi(t){var e=Ei(t);if(e){var n=e.startTime,r=e.fetchStart,i=e.redirectStart,o=e.redirectEnd,a=e.domainLookupStart,s=e.domainLookupEnd,u=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,f=e.requestStart,d=e.responseStart,p=e.responseEnd,h={firstbyte:dt(d-a),trans:dt(p-d),downloadTime:wi(n,d,p),firstByteTime:wi(n,f,d)};return d>0&&d<=_t()&&(h.ttfb=dt(d-f)),l!==r&&(h.tcp=dt(l-u),h.connectTime=wi(n,u,l),_i(u,c,l)&&(h.ssl=dt(l-c),h.sslTime=wi(n,c,l))),s!==r&&(h.dns=dt(s-a),h.dnsTime=wi(n,a,s)),bi(t)&&(h.redirect=dt(o-i),h.redirectTime=wi(n,i,o)),t.renderBlockingStatus&&(h.renderBlockingStatus=t.renderBlockingStatus),h}}function Ei(t){if(_i(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!bi(t))return t;var e=t.redirectStart,n=t.redirectEnd;if(e<t.startTime&&(e=t.startTime),n<t.startTime&&(n=t.fetchStart),_i(t.startTime,e,n,t.fetchStart))return I({},t,{redirectEnd:n,redirectStart:e})}}function bi(t){return t.fetchStart!==t.startTime}function wi(t,e,n){return{duration:dt(n-e),start:dt(e-t)}}function Si(t){if(t.startTime<t.responseStart)return{size:t.decodedBodySize,encodeSize:Number.MAX_SAFE_INTEGER<t.encodedBodySize?0:t.encodedBodySize}}function Ti(t,e){return e&&!function(t,e){var n=[e.rumEndpoint];return e.logsEndpoint&&n.push(e.logsEndpoint),e.sessionReplayEndPoint&&n.push(e.sessionReplayEndPoint),P(n,(function(e){return 0===t.indexOf(e)}))||e.isIntakeUrl(t)}(e,t)}function Ci(){return void 0!==window.performance&&"getEntries"in performance}function Oi(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&At(PerformanceObserver.supportedEntryTypes,t)}function Ii(t,e){var n;if(n=function(n){Ri(t,e,[n])},jn("interactive",(function(){var t,e={entryType:"resource",initiatorType:pi,traceId:""};if(Oi("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];t=I(r.toJSON(),e)}else{var i=Ai();t=I(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},e)}n(t)})),Ci()){var r=performance.getEntries();d((function(){Ri(t,e,r)}))}if(window.PerformanceObserver){var i=a((function(n){Ri(t,e,n.getEntries())})),o=["resource","navigation","longtask","paint"],s=["largest-contentful-paint","first-input","layout-shift"];try{T(s,(function(t){new PerformanceObserver(i).observe({type:t,buffered:!0})}))}catch(t){T(s,(function(t){o.push(t)}))}new PerformanceObserver(i).observe({entryTypes:o}),Ci()&&"addEventListener"in performance&&ze(performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Oi("navigation")||function(t){function e(){t(I(Ai(),{entryType:"navigation"}))}jn("complete",(function(){d(e)}))}((function(n){Ri(t,e,[n])})),Oi("first-input")||function(t){var e=yt(),n=!1,r=We(window,[qt.CLICK,qt.MOUSE_DOWN,qt.KEY_DOWN,qt.TOUCH_START,qt.POINTER_DOWN],(function(t){if(t.cancelable){var e={entryType:"first-input",processingStart:_t(),startTime:t.timeStamp};t.type===qt.POINTER_DOWN?i(e):o(e)}}),{passive:!0,capture:!0}).stop;function i(t){We(window,[qt.POINTER_UP,qt.POINTER_CANCEL],(function(e){e.type===qt.POINTER_UP&&o(t)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<yt()-e&&t(i)}}}((function(n){return Ri(t,e,[n])}))}function Ai(){var t={},e=performance.timing;for(var n in e)j(e[n])&&(t[n]=0===e[n]?0:ht(e[n]));return t}function Ri(t,e,n){var r=D(n,(function(t){return"resource"===t.entryType||"navigation"===t.entryType||"paint"===t.entryType||"longtask"===t.entryType||"largest-contentful-paint"===t.entryType||"first-input"===t.entryType||"layout-shift"===t.entryType})),i=D(r,(function(t){return!function(t){return"navigation"===t.entryType&&t.loadEventEnd<=0}(t)&&!function(t,e){return"resource"===e.entryType&&!Ti(t,e.name)}(e,t)}));i.length&&t.notify(en.PERFORMANCE_ENTRIES_COLLECTED,i)}function xi(){var t,e=window;if(e.Zone&&(t=r(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){var n=r(new e.MutationObserver(it),"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}function Ni(t){var e=O(t),n=new Be((function(){var t,e,n,i,o,a=(t=r,e=ae(history,"pushState",{after:t}),n=ae(history,"replaceState",{after:t}),i=ze(window,qt.POP_STATE,t),{stop:function(){e.stop(),n.stop(),i.stop()}}),s=(o=r,ze(window,qt.HASH_CHANGE,o));return function(){a.stop(),s.stop()}}));function r(){if(e.href!==t.href){var r=O(t);n.notify({newLocation:r,oldLocation:e}),e=r}}return n}function ki(t){var e=t.lifeCycle,n=t.isChildEvent,r=t.onChange;void 0===r&&(r=it);var i={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(en.RUM_EVENT_COLLECTED,(function(t){if(t.type!==Jt.VIEW&&n(t))switch(t.type){case Jt.ERROR:i.errorCount+=1,r(i);break;case Jt.ACTION:t.action.frustration&&(i.frustrationCount+=t.action.frustration.type.length),i.actionCount+=1,r(i);break;case Jt.LONG_TASK:i.longTaskCount+=1,r(i);break;case Jt.RESOURCE:i.resourceCount+=1,r(i)}}));return{stop:function(){o.unsubscribe()},eventCounts:i}}var Li=100,Di=100;function Mi(t,e,n,r,i){var o=function(t,e,n){var r=new Be((function(){var i,o=[],a=0;o.push(e.subscribe(u),t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){P(t,(function(t){return"resource"===t.entryType&&!Pi(n,t.name)}))&&u()})),t.subscribe(en.REQUEST_STARTED,(function(t){Pi(n,t.url)||(void 0===i&&(i=t.requestIndex),a+=1,u())})),t.subscribe(en.REQUEST_COMPLETED,(function(t){Pi(n,t.url)||void 0===i||t.requestIndex<i||(a-=1,u())})));var s=ae(window,"open",{before:u}).stop;return function(){s(),T(o,(function(t){t.unsubscribe()}))};function u(){r.notify({isBusy:a>0})}}));return r}(t,e,n);return function(t,e,n){var r,i=!1,o=d((function(){c({hadActivity:!1})}),Li),a=void 0!==n?d((function(){return c({hadActivity:!0,end:gt()})}),n):void 0,s=t.subscribe((function(t){var e=t.isBusy;p(o),p(r);var n=gt();e||(r=d((function(){c({hadActivity:!0,end:n})}),Di))})),u=function(){i=!0,p(o),p(r),p(a),s.unsubscribe()};function c(t){i||(u(),e(t))}return{stop:u}}(o,r,i)}function Pi(t,e){return B(t.excludedActivityUrls,e)}var Ui=at,Bi=100,Fi={WaitingForMoreClicks:0,WaitingForClicksToStop:1,Finalized:2};function Vi(t,e){var n,r=[],i=Fi.WaitingForMoreClicks;function o(t){t.stopObservable.subscribe(a),r.push(t),p(n),n=d(s,Ui)}function a(){i===Fi.WaitingForClicksToStop&&U(r,(function(t){return t.isStopped()}))&&(i=Fi.Finalized,e(r))}function s(){p(n),i===Fi.WaitingForMoreClicks&&(i=Fi.WaitingForClicksToStop,a())}return o(t),{tryAppend:function(t){return i===Fi.WaitingForMoreClicks&&(r.length>0&&(e=r[r.length-1].event,n=t.event,!(e.target===n.target&&(a=e,u=n,Math.sqrt(Math.pow(a.clientX-u.clientX,2)+Math.pow(a.clientY-u.clientY,2))<=Bi)&&e.timeStamp-n.timeStamp<=Ui))?(s(),!1):(o(t),!0));var e,n,a,u},stop:function(){s()}}}var Hi="data-guance-action-name";function zi(t,e){return Wi(t,Hi)||e&&Wi(t,e)||qi(t,e,Gi)||qi(t,e,Ki)||""}function Wi(t,e){var n;if(function(){void 0===ji&&(ji="closest"in HTMLElement.prototype);return ji}())n=t.closest("["+e+"]");else for(var r=t;r;){if(r.hasAttribute(e)){n=r;break}r=r.parentElement}if(n)return Qi(Yi(n.getAttribute(e).trim()))}var $i,ji,Gi=[function(t,e){if(function(){void 0===$i&&($i="labels"in HTMLInputElement.prototype);return $i}()){if("labels"in t&&t.labels&&t.labels.length>0)return Xi(t.labels[0],e)}else if(t.id){var n=t.ownerDocument&&Rt(t.ownerDocument.querySelectorAll("label"),(function(e){return e.htmlFor===t.id}));return n&&Xi(n,e)}},function(t){if("INPUT"===t.nodeName){var e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return e.value}},function(t,e){if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Xi(t,e)},function(t){return t.getAttribute("aria-label")},function(t,e){var n=t.getAttribute("aria-labelledby");if(n)return n=n.split(/\s+/),n=M(n,(function(e){return function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)})),n=D(n,(function(t){return Boolean(t)})),(n=M(n,(function(t){return Xi(t,e)}))).join(" ")},function(t){return t.getAttribute("alt")},function(t){return t.getAttribute("name")},function(t){return t.getAttribute("title")},function(t){return t.getAttribute("placeholder")},function(t,e){if("options"in t&&t.options.length>0)return Xi(t.options[0],e)}],Ki=[function(t,e){return Xi(t,e)}],Zi=10;function qi(t,e,n){for(var r=t,i=0;i<=Zi&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o=0;o<n.length;o++){var a=(0,n[o])(r,e);if("string"==typeof a){var s=a.trim();if(s)return Qi(Yi(s))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function Yi(t){return t.replace(/\s+/g," ")}function Qi(t){return t.length>100?Ot(t,100)+" [...]":t}function Xi(t,e){if(!t.isContentEditable){if("innerText"in t){var n=t.innerText,r=function(e){for(var r=t.querySelectorAll(e),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return Boolean(document.documentMode)&&r("script, style"),r("["+Hi+"]"),e&&r("["+e+"]"),n}return t.textContent}}var Ji,to=[Hi,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],eo=[oo,function(t){if(t.id&&!io(t.id))return"#"+F(t.id)}],no=[oo,function(t){if("BODY"===t.tagName)return;if(t.classList.length>0)for(var e=0;e<t.classList.length;e+=1){var n=t.classList[e];if(!io(n))return F(t.tagName)+"."+F(n)}},function(t){return F(t.tagName)}];function ro(t,e){for(var n="",r=t;r&&"HTML"!==r.nodeName;){var i=so(r,eo,uo,e,n);if(i)return i;n=so(r,no,co,e,n)||lo(ao(r),n),r=r.parentElement}return n}function io(t){return/[0-9]/.test(t)}function oo(t,e){if(e&&(r=i(e)))return r;for(var n=0;n<to.length;n++){var r;if(r=i(to[n]))return r}function i(e){if(t.hasAttribute(e))return F(t.tagName)+"["+e+'="'+F(t.getAttribute(e))+'"]'}}function ao(t){for(var e=t.parentElement&&t.parentElement.firstElementChild,n=1;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;var r=F(t.tagName);return/^::/.test(r)?r:r+":nth-of-type("+n+")"}function so(t,e,n,r,i){for(var o=0;o<e.length;o++){var a=(0,e[o])(t,r);if(a){var s=lo(a,i);if(n(t,s))return s}}}function uo(t,e){return 1===t.ownerDocument.body.querySelectorAll(e).length}function co(t,e){return 1===t.parentElement.querySelectorAll(function(){if(void 0===Ji)try{document.querySelector(":scope"),Ji=!0}catch{Ji=!1}return Ji}()?lo(":scope",e):e).length}function lo(t,e){return e?t+">"+e:t}function fo(){var t=window.getSelection();return!t||t.isCollapsed}function po(t){return t.target instanceof Element&&!1!==t.isPrimary}var ho=3;function vo(t,e){if(function(t){if(P(t,(function(t){return t.getUserActivity().selection})))return!1;for(var e=0;e<t.length-(ho-1);e+=1)if(t[e+ho-1].event.timeStamp-t[e].event.timeStamp<=at)return!0;return!1}(t))return e.addFrustration(Xt.RAGE_CLICK),P(t,mo)&&e.addFrustration(Xt.DEAD_CLICK),e.hasError()&&e.addFrustration(Xt.ERROR_CLICK),{isRage:!0};var n=P(t,(function(t){return t.getUserActivity().selection}));return T(t,(function(t){t.hasError()&&t.addFrustration(Xt.ERROR_CLICK),mo(t)&&!n&&t.addFrustration(Xt.DEAD_CLICK)})),{isRage:!1}}var _o='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function mo(t){return!t.hasPageActivity()&&!t.getUserActivity().input&&(e=t.event.target,n=_o,!(e.matches?e.matches(n):e.msMatchesSelector&&e.msMatchesSelector(n)));var e,n}var go=10*at,yo=5*st;function Eo(t,e,n){var r,i=new $t(yo),o=new Be;t.subscribe(en.SESSION_RENEWED,(function(){i.reset()})),t.subscribe(en.VIEW_ENDED,p);var a,s,u,c,l,f=(a={onPointerDown:function(r){return function(t,e,n,r,i){if(t.trackFrustrations||!r.find()){var o,a,s,u=(o=i,a=t.actionNameAttribute,s=o.target.getBoundingClientRect(),{type:Qt.CLICK,target:{width:Math.round(s.width),height:Math.round(s.height),selector:ro(o.target,a)},position:{x:Math.round(o.clientX-s.left),y:Math.round(o.clientY-s.top)},name:zi(o.target,a)});if(t.trackFrustrations||u.name){var c=!1;return Mi(e,n,t,(function(t){c=t.hadActivity}),Li),{clickActionBase:u,hadActivityOnPointerDown:function(){return c}}}}}(n,t,e,i,r)},onPointerUp:function(r,a,s){!function(t,e,n,r,i,o,a,s,u,c){var l=To(e,r,u,a,s);t.trackFrustrations&&o(l);var f=Mi(e,n,t,(function(e){e.hadActivity&&e.end<l.startClocks.timeStamp?l.discard():(e.hadActivity?l.stop(e.end):c()?l.stop(l.startClocks.timeStamp):l.stop(),t.trackFrustrations||(e.hadActivity?l.validate():l.discard()))}),go),d=f.stop,p=e.subscribe(en.VIEW_ENDED,(function(t){l.stop(t.endClocks.timeStamp)})),h=i.subscribe((function(){l.stop()}));l.stopObservable.subscribe((function(){p.unsubscribe(),d(),h.unsubscribe()}))}(n,t,e,i,o,h,r.clickActionBase,a,s,r.hadActivityOnPointerDown)}},c={selection:!1,input:!1},l=[ze(window,qt.POINTER_DOWN,(function(t){po(t)&&(s=fo(),c={selection:!1,input:!1},u=a.onPointerDown(t))}),{capture:!0}),ze(window,qt.SELECTION_CHANGE,(function(){s&&fo()||(c.selection=!0)}),{capture:!0}),ze(window,qt.POINTER_UP,(function(t){if(po(t)&&u){var e=c;a.onPointerUp(u,t,(function(){return e})),u=void 0}}),{capture:!0}),ze(window,qt.INPUT,(function(){c.input=!0}),{capture:!0})],{stop:function(){T(l,(function(t){return t.stop()}))}}),d=f.stop;return{stop:function(){p(),o.notify(),d()},actionContexts:{findActionId:function(t){return i.find(t)},findAllActionId:function(t){return n.trackFrustrations?i.findAll(t):i.find(t)}}};function p(){r&&r.stop()}function h(t){if(!r||!r.tryAppend(t)){var e=t.clone();r=Vi(t,(function(t){!function(t,e){var n=vo(t,e),r=n.isRage;r?(T(t,(function(t){t.discard()})),e.stop(gt()),e.validate(M(t,(function(t){return t.event})))):(e.discard(),T(t,(function(t){t.validate()})))}(t,e)}))}}}var bo,wo,So={ONGOING:0,STOPPED:1,FINALIZED:2};function To(t,e,n,r,i){var o,a=q(),s=mt(),u=e.add(a,s.relative),c=ki({lifeCycle:t,isChildEvent:function(t){return void 0!==t.action&&(R(t.action.ids)?At(t.action.ids,a):t.action.ids===a)}}),l=So.ONGOING,f=[],d=new Be;function p(t){l===So.ONGOING&&(o=t,l=So.STOPPED,o?u.close(ht(o)):u.remove(),c.stop(),d.notify())}return{event:i,stop:p,stopObservable:d,hasError:function(){return c.eventCounts.errorCount>0},hasPageActivity:function(){return void 0!==o},getUserActivity:n,addFrustration:function(t){f.push(t)},startClocks:s,isStopped:function(){return l===So.STOPPED||l===So.FINALIZED},clone:function(){return To(t,e,n,r,i)},validate:function(e){if(p(),l===So.STOPPED){var n=c.eventCounts,u=n.resourceCount,d=n.errorCount,h=n.longTaskCount,v=C({type:Qt.CLICK,duration:o&&Et(s.timeStamp,o),startClocks:s,id:a,frustrationTypes:f,counts:{resourceCount:u,errorCount:d,longTaskCount:h},events:Dt(e,[i]),event:i},r);t.notify(en.AUTO_ACTION_COMPLETED,v),l=So.FINALIZED}},discard:function(){p(),l=So.FINALIZED}}}function Co(t,e){var n=Oo(t)?{action:{error:{count:t.counts.errorCount},id:t.id,loadingTime:pt(t.duration),frustration:{type:t.frustrationTypes},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_gc:{action:{target:t.target,position:t.position}}}:{action:{loadingTime:0}};return{customerContext:Oo(t)?void 0:t.context,rawRumEvent:A({action:{id:q(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:Jt.ACTION,view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},n),startTime:t.startClocks.relative,domainContext:Oo(t)?{event:t.event,events:t.events}:{}}}function Oo(t){return t.type!==Qt.CUSTOM}function Io(t,e,n,r,i,o){var a=function(t,e,n,r){var i=a(t.rumEndpoint),o=i.batch;function a(i){var o=Hr({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageExitObservable:n,sessionExpireObservable:r});return{batch:new Vr(Nr(i,t.batchBytesLimit,e),o,t.messageBytesLimit),flushController:o}}return{flushObservable:i.flushController.flushObservable,add:function(t){o.add(t)},upsert:function(t,e){o.upsert(t,e)}}}(t,r,i,o);e.subscribe(en.RUM_EVENT_COLLECTED,(function(t){t.type===Jt.VIEW?a.upsert(t,t.view.id):a.add(t)})),n.subscribe((function(t){a.add(t)}))}function Ao(){var t;return bo||(t=new Be((function(){var e=K((function(){t.notify(Ro())}),200).throttled;return ze(window,qt.RESIZE,e,{capture:!0,passive:!0}).stop})),bo=t),bo}function Ro(){var t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var xo={SYNTHETICS:"synthetics",USER:"user"},No={"view.url":"string","view.referrer":"string"},ko={context:"object"},Lo={};function Do(t,e,r,i,o,a,s,u,c){Lo[Jt.VIEW]=No,Lo[Jt.ERROR]=C({"error.message":"string","error.stack":"string","error.resource.url":"string"},ko,No),Lo[Jt.RESOURCE]=C({"resource.url":"string"},ko,No),Lo[Jt.ACTION]=C({"action.target.name":"string"},ko,No),Lo[Jt.LONG_TASK]=C({},ko,No);var l={};l[Jt.ERROR]=ln(Jt.ERROR,t.eventRateLimiterThreshold,c),l[Jt.ACTION]=ln(Jt.ACTION,t.eventRateLimiterThreshold,c),e.subscribe(en.RAW_RUM_EVENT_COLLECTED,(function(c){var f,d=c.startTime,p=c.rawRumEvent,h=c.savedCommonContext,v=c.customerContext,_=c.domainContext,m=o.findView(d),g=a.findUrl(d),y=r.findTrackedSession(p.type!==Jt.VIEW?d:void 0);if(y&&m&&g){var E=s.findActionId(d),b=s.findAllActionId(d),w=h||u(),S={_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion,drift:Math.round(yt()-(Tt()+performance.now()))},terminal:{type:"web"},application:{id:t.applicationId},device:Zt,env:t.env||"",service:m.service||t.service||"browser",version:m.version||t.version||"",source:"browser",date:gt(),user:{id:i.getId(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?xo.USER:xo.SYNTHETICS,id:y.id},view:{id:m.id,name:m.name,url:g.url,referrer:g.referrer,host:g.host,path:g.path,pathGroup:g.pathGroup,urlQuery:g.urlQuery},action:(f=p,-1!==[Jt.ERROR,Jt.RESOURCE,Jt.LONG_TASK].indexOf(f.type)&&E?{id:E,ids:b}:void 0),display:(wo||(wo=Ro(),Ao().subscribe((function(t){wo=t})).unsubscribe),{viewport:wo})},T=kt(A(S,m,p)),C=A({},w.context,v);H(C)||(T.context=C),"has_replay"in T.session||(T.session.has_replay=w.hasReplay),H(w.user)||(T.user=A({is_signin:"T"},w.user)),function(t,e,r,i){if(e){var o=an(t,Lo[t.type],(function(t){return e(t,r)}));if(!1===o&&t.type!==Jt.VIEW)return!1;!1===o&&n.warn("Can't dismiss view events using beforeSend!")}var a=!1;i[t.type]&&(a=i[t.type].isLimitReached());return!a}(T,t.beforeSend,_,l)&&(H(T.context)&&delete T.context,e.notify(en.RUM_EVENT_COLLECTED,T))}}))}var Mo=Xn;var Po=Xn;function Uo(t,e,n){return{context:t.getContext(),user:e.getContext(),hasReplay:!!n.isRecording()||void 0}}var Bo,Fo=4e3,Vo=500,Ho=Xn,zo={ACTIVE:"active",PASSIVE:"passive",HIDDEN:"hidden",FROZEN:"frozen",TERMINATED:"terminated"};function Wo(t){void 0===t&&(t=Vo);var e,n=new $t(Ho,Fo);i($o(),_t());var r=We(window,[qt.PAGE_SHOW,qt.FOCUS,qt.BLUR,qt.VISIBILITY_CHANGE,qt.RESUME,qt.FREEZE,qt.PAGE_HIDE],(function(t){t.isTrusted&&i(function(t){if(t.type===qt.FREEZE)return zo.FROZEN;if(t.type===qt.PAGE_HIDE)return t.persisted?zo.FROZEN:zo.TERMINATED;return $o()}(t),t.timeStamp)}),{capture:!0}).stop;function i(t,r){void 0===r&&(r=_t()),t!==e&&(e=t,n.closeActive(r),n.add({state:e,startTime:r},r))}return{findAll:function(e,r){var i=n.findAll(e,r);if(0!==i.length){for(var o=[],a=Math.max(0,i.length-t),s=i.length-1;s>=a;s--){var u=i[s],c=Et(e,u.startTime);o.push({state:u.state,start:pt(c)})}return o}},isInActivePageStateAt:function(t){var e=n.find(t);return void 0!==e&&e.state===zo.ACTIVE},addPageState:i,stop:function(){r(),n.stop()}}}function $o(){return"hidden"===document.visibilityState?zo.HIDDEN:document.hasFocus()?zo.ACTIVE:zo.PASSIVE}function jo(t,n,r){var i=new Be;return function(t){var n=He([e.error]).subscribe((function(e){t.notify({startClocks:mt(),message:e.message,stack:e.stack,source:Oe.CONSOLE,handling:re.HANDLED,handlingStack:e.handlingStack})}))}(i),function(t){Te((function(e,n){t.notify(Ie({stackTrace:e,originalError:n,startClocks:mt(),nonErrorPrefix:ie.UNCAUGHT,source:Oe.SOURCE,handling:re.UNHANDLED}))}))}(i),function(t,e){var n=je(0,[($e.cspViolation,$e.intervention)]).subscribe((function(t){e.notify({startClocks:mt(),message:t.message,stack:t.stack,type:t.subtype,source:Oe.REPORT,handling:re.UNHANDLED})}))}(0,i),i.subscribe((function(e){t.notify(en.RAW_ERROR_COLLECTED,{error:e})})),function(t,e){return t.subscribe(en.RAW_ERROR_COLLECTED,(function(n){t.notify(en.RAW_RUM_EVENT_COLLECTED,C({customerContext:n.customerContext,savedCommonContext:n.savedCommonContext},function(t,e){var n={date:t.startClocks.timeStamp,error:{id:q(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser"},type:Jt.ERROR,view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}};return{rawRumEvent:n,startTime:t.startClocks.relative,domainContext:{error:t.originalError}}}(n.error,e)))})),{addError:function(e,n){var r=e.error,i=Ie({stackTrace:r instanceof Error?pe(r):void 0,originalError:r,handlingStack:e.handlingStack,startClocks:e.startClocks,nonErrorPrefix:ie.PROVIDED,source:Oe.CUSTOM,handling:re.HANDLED});t.notify(en.RAW_ERROR_COLLECTED,{customerContext:e.context,savedCommonContext:n,error:i})}}}(t,r)}function Go(t){if(void 0===t&&(t=window),!Bo)if("hidden"===document.visibilityState)Bo={timeStamp:0};else{Bo={timeStamp:1/0};var e=We(t,[qt.PAGE_HIDE,qt.VISIBILITY_CHANGE],(function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||(Bo.timeStamp=t.timeStamp,e())}),{capture:!0}).stop}return Bo}var Ko=10*st;var Zo=10*st;var qo=5*st;function Yo(t,e,n){var r={};function i(t){C(r,t),n()}var o=function(t,e){return{stop:t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var n=0;n<t.length;n++){var r=t[n];"navigation"===r.entryType&&e({fetchStart:r.fetchStart,responseEnd:r.responseEnd,domComplete:r.domComplete,domContentLoaded:r.domContentLoadedEventEnd,domInteractive:r.domInteractive,loadEvent:r.loadEventEnd,loadEventEnd:r.loadEventEnd,loadEventStart:r.loadEventStart,domContentLoadedEventEnd:r.domContentLoadedEventEnd,domContentLoadedEventStart:r.domContentLoadedEventStart,firstByte:r.responseStart>=0&&r.responseStart<=_t()?r.responseStart:void 0})}})).unsubscribe}}(t,(function(t){e(t.loadEvent),i(t)})),a=o.stop,s=function(t,e){var n=Go();return{stop:t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var r=Rt(t,(function(t){return"paint"===t.entryType&&"first-contentful-paint"===t.name&&t.startTime<n.timeStamp&&t.startTime<Ko}));r&&e(r.startTime)})).unsubscribe}}(t,(function(t){i({firstContentfulPaint:t})})),u=s.stop,c=function(t,e,n){var r=Go(),i=1/0,o=We(e,[qt.POINTER_DOWN,qt.KEY_DOWN],(function(t){i=t.timeStamp}),{capture:!0,once:!0}).stop,a=t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var e=function(t,e){for(var n=t.length-1;n>=0;n-=1){var r=t[n];if(e(r,n,t))return r}}(t,(function(t){return"largest-contentful-paint"===t.entryType&&t.startTime<i&&t.startTime<r.timeStamp&&t.startTime<Zo}));e&&n(e.startTime,e.element)})).unsubscribe;return{stop:function(){o(),a()}}}(t,window,(function(t,e){i({largestContentfulPaint:t,largestContentfulPaintElement:e?ro(e):void 0})})),l=c.stop,f=function(t,e){var n=Go();return{stop:t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var r=Rt(t,(function(t){return"first-input"===t.entryType&&t.startTime<n.timeStamp}));if(r){var i=Et(r.startTime,r.processingStart);e({firstInputDelay:i>=0?i:0,firstInputTime:r.startTime,firstInputTarget:r.target})}})).unsubscribe}}(t,(function(t){i({firstInputDelay:t.firstInputDelay,firstInputTime:t.firstInputTime})})),p=f.stop;function h(){a(),u(),l(),p()}return{stop:h,initialViewMetrics:r,scheduleStop:function(){d(h,qo)}}}var Qo,Xo=at;function Jo(){var t=Kn(),e=Ro().height;return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}function ta(t,e){var n=0,r=function(){var t,e,n=0;return{update:function(r){void 0===t||r.startTime-e>=at||r.startTime-t>=5*at?(t=e=r.startTime,n=r.value):(n+=r.value,e=r.startTime)},value:function(){return n}}}();return{stop:t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var i=0;i<t.length;i++){var o=t[i];"layout-shift"!==o.entryType||o.hadRecentInput||(r.update(o),r.value()>n&&(n=r.value(),e(ft(n,4))))}})).unsubscribe}}var ea=0,na=1/0,ra=0;var ia=function(){return Qo?ea:window.performance.interactionCount||0},oa=10;function aa(t,e){if(!(Oi("event")&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:function(){},stop:it};var n=function(t){"interactionCount"in performance||Qo||(Qo=new window.PerformanceObserver(a((function(t){t.getEntries().forEach((function(t){const e=t;e.interactionId&&(na=Math.min(na,e.interactionId),ra=Math.max(ra,e.interactionId),ea=(ra-na)/7+1)}))})))).observe({type:"event",buffered:!0,durationThreshold:0});var e=t===te.INITIAL_LOAD?0:ia();return{getViewInteractionCount:function(){return ia()-e}}}(t),r=n.getViewInteractionCount,i=function(t){var e=[];function n(){e.sort((function(t,e){return e.duration-t.duration})).splice(oa)}return{process:function(t){var r=e.findIndex((function(e){return t.interactionId===e.interactionId})),i=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<oa||t.duration>i.duration)&&(e.push(t),n())},estimateP98Duration:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]?e[n].duration:void 0}}}(r),o=-1;return{getInteractionToNextPaint:function(){return o>=0?o:r()?0:void 0},stop:e.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var e of t)"event"!==e.entryType&&"first-input"!==e.entryType||!e.interactionId||i.process(e);var n=i.estimateP98Duration();n&&(o=n)})).unsubscribe}}function sa(t,e,n,r,i,o){var a,s={},u=function(t,e,n,r,i,o){var a=r===te.INITIAL_LOAD,s=!0,u=[];function c(){!s&&!a&&u.length>0&&o(Math.max.apply(Math,u))}return{setLoadEvent:function(t){a&&(a=!1,u.push(t),c())},stop:Mi(t,e,n,(function(t){s&&(s=!1,t.hadActivity&&u.push(Et(i.timeStamp,t.end)),c())})).stop}}(t,e,n,i,o,(function(t){s.loadingTime=t;var e=Jo();s.scroll={maxDepth:e.scrollDepth,maxDepthScrollHeight:e.scrollHeight,maxDepthTime:t,maxDepthScrollTop:e.scrollTop},r()})),c=u.stop,l=u.setLoadEvent,f=function(t,e,n){void 0===n&&(n=Jo);var r=0,i=K((function(){var i=n(),o=i._scrollValues,a=i.scrollDepth,s=i.scrollTop;if(a>r){var u=_t(),c=Et(t.relative,u);e({maxDepth:r=a,maxDepthScrollHeight:o,maxDepthTime:c,maxDepthScrollTop:s})}}),Xo,{leading:!1,trailing:!0}),o=ze(window,qt.SCROLL,i.throttled,{passive:!0});return{stop:function(){i.cancel(),o.stop()}}}(o,(function(t){s.scroll=t}),Jo),d=f.stop;if(Oi("layout-shift")){s.cumulativeLayoutShift=0;var p=ta(t,(function(t){s.cumulativeLayoutShift=t,r()}));a=p.stop}else a=it;var h=aa(i,t),v=h.stop,_=h.getInteractionToNextPaint;return{stop:function(){c(),a(),d(),v()},setLoadEvent:l,getCommonViewMetrics:function(){return s.interactionToNextPaint=_(),s}}}var ua=5*st;var ca=3e3,la=5*st;function fa(t,e,n,r,i,o,a){function s(i,o,a){return function(t,e,n,r,i,o,a){void 0===o&&(o=mt());var s,u,c,l,f=q(),p={},_=0,m=O(r),g=!0;a&&(u=a.name,c=a.service,l=a.version);t.notify(en.VIEW_CREATED,{id:f,name:u,startClocks:o,service:c,version:l});var y=K(D,ca,{leading:!1}),E=y.throttled,b=y.cancel,w=sa(t,e,n,E,i,o),S=w.setLoadEvent,T=w.stop,C=w.getCommonViewMetrics,I=i===te.INITIAL_LOAD?Yo(t,S,E):{scheduleStop:it,initialViewMetrics:{}},A=I.scheduleStop,R=I.initialViewMetrics,x=function(t,e,n){var r=ki({lifeCycle:t,isChildEvent:function(t){return t.view.id===e},onChange:n});return{scheduleStop:function(){d(r.stop,ua)},eventCounts:r.eventCounts}}(t,f,E),N=x.scheduleStop,k=x.eventCounts,L=h(D,la);function D(){b(),_+=1;var e=void 0===s?gt():s.timeStamp;t.notify(en.VIEW_UPDATED,{customTimings:p,documentVersion:_,id:f,name:u,service:c,version:l,loadingType:i,location:m,startClocks:o,commonViewMetrics:C(),initialViewMetrics:R,duration:Et(o.timeStamp,e),isActive:void 0===s,sessionIsActive:g,eventCounts:k})}return D(),{name:u,service:c,version:l,scheduleUpdate:E,end:function(e){s||(s=Dt(e&&e.endClocks,mt()),g=Dt(e&&e.sessionIsActive,!0),t.notify(en.VIEW_ENDED,{endClocks:s}),v(L),T(),A(),N(),D())},addTiming:function(t,e){if(!s){var n=function(t){return t<ct}(e)?e:Et(o.timeStamp,e);p[function(t){var e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");e!==t&&console.warn("Invalid timing name: "+t+", sanitized to: "+e);return e}(t)]=n,E()}}}}(e,n,r,t,i,o,a)}var u,c=s(te.INITIAL_LOAD,bt(),a);return e.subscribe(en.SESSION_RENEWED,(function(){s(te.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version})})),e.subscribe(en.SESSION_EXPIRED,(function(){c.end({sessionIsActive:!1})})),e.subscribe(en.PAGE_EXITED,(function(t){t.reason!==Fn.UNLOADING&&t.reason!==Fn.PAGEHIDE||c.end()})),o&&(u=function(t){return t.subscribe((function(t){var e,n,r=t.oldLocation,i=t.newLocation;if(n=i,(e=r).pathname!==n.pathname||!Pt(n.hash)&&Ut(n.hash)!==Ut(e.hash))return c.end(),void(c=s(te.ROUTE_CHANGE))}))}(i)),{addTiming:function(t,e){void 0===e&&(e=gt()),c.addTiming(t,e)},startView:function(t,e){c.end({endClocks:e}),c=s(te.ROUTE_CHANGE,e,t)},stop:function(){u&&u.unsubscribe(),c.end()}}}function da(t,e,n,r,i,o,a,s){return t.subscribe(en.VIEW_UPDATED,(function(n){t.notify(en.RAW_RUM_EVENT_COLLECTED,function(t,e,n,r){var i=n.getReplayStats(t.id),o=r.findAll(t.startClocks.relative,t.duration),a={_gc:{document_version:t.documentVersion,replay_stats:i,page_states:o},date:t.startClocks.timeStamp,type:Jt.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:t.commonViewMetrics.cumulativeLayoutShift,first_byte:pt(t.initialViewMetrics.firstByte),dom_complete:pt(t.initialViewMetrics.domComplete),dom_content_loaded:pt(t.initialViewMetrics.domContentLoaded),dom_interactive:pt(t.initialViewMetrics.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:pt(t.initialViewMetrics.firstContentfulPaint),first_input_delay:pt(t.initialViewMetrics.firstInputDelay),first_input_time:pt(t.initialViewMetrics.firstInputTime),interaction_to_next_paint:pt(t.commonViewMetrics.interactionToNextPaint),is_active:t.isActive,name:t.name,largest_contentful_paint:pt(t.initialViewMetrics.largestContentfulPaint),largest_contentful_paint_element_selector:t.initialViewMetrics.largestContentfulPaintElement,load_event:pt(t.initialViewMetrics.loadEvent),loading_time:ha(pt(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:pt(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_height:t.commonViewMetrics.scroll.maxDepthScrollHeight,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_depth_time:pt(t.commonViewMetrics.scroll.maxDepthTime)}}:void 0,session:{has_replay:!!i||void 0,is_active:!!t.sessionIsActive&&void 0},privacy:{replay_level:e.defaultPrivacyLevel}};H(t.customTimings)||(a.view.custom_timings=(s=t.customTimings,u=pt,c={},T(s,(function(t,e){c[e]=u(t)})),c));var s,u,c;return a=A(a,{view:pa(t.initialViewMetrics)}),{rawRumEvent:a,startTime:t.startClocks.relative,domainContext:{location:t.location}}}(n,e,a,o))})),fa(n,t,r,e,i,!e.trackViewsManually,s)}function pa(t){var e=Ei(t);if(e){var n=e.fetchStart,r=e.responseEnd,i=e.domInteractive,o=e.domContentLoaded,a=e.domComplete,s=e.loadEventEnd,u=e.loadEventStart,c=e.domContentLoadedEventEnd,l={};if(r!==n){l.fpt=pt(r-n);var f=parseInt((r-n)/1e3);l.apdexLevel=f>9?9:f}return i!==n&&(l.tti=pt(i-n)),o!==n&&(l.dom_ready=pt(o-n)),s!==n&&(l.load=pt(s-n)),u!==c&&(l.resource_load_time=pt(u-c)),a!==i&&(l.dom=pt(a-i)),l}}function ha(t){return j(t)&&t<0?void 0:t}function va(){this.buffer=new Uint8Array(8),_a().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function _a(){return window.crypto||window.msCrypto}function ma(t){this._spanId=new va,this._traceId=new va,this._traceSampled=t}function ga(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function ya(t,e,n){this._spanId=ga(),this._traceId=ga(),this._applicationId=t.applicationId,this._env=t.env,this._version=t.version,this._urlParse=Q(e).getParse(),this._traceSampled=n}function Ea(t,e){this._traceId=new va,this._spanId=new va,this._traceSampled=e,this.is128Bit=t.traceId128Bit}function ba(t,e){this._traceId=new va,this._spanId=new va,this._traceSampled=e}function wa(t,e){this._traceId=new va,this._spanId=new va,this._traceSampled=e,this.is128Bit=t.traceId128Bit}function Sa(t,e){this._traceId=new va,this._spanId=new va,this._traceSampled=t,this.isHexTraceId=e}function Ta(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Ca(t,e,n,r){if(n.findTrackedSession()){var i=Rt(t.allowedTracingUrls,(function(t){return B([t.match],e.url,!0)}));if(i){var o,a=!j(t.tracingSampleRate)||lt(t.tracingSampleRate);switch(i.traceType){case ne.DDTRACE:o=new ma(a);break;case ne.SKYWALKING_V3:o=new ya(t,e.url,a);break;case ne.ZIPKIN_MULTI_HEADER:o=new wa(t,a);break;case ne.JAEGER:o=new Ea(t,a);break;case ne.W3C_TRACEPARENT:o=new Sa(a);break;case ne.W3C_TRACEPARENT_64:o=new Sa(a,!0);break;case ne.ZIPKIN_SINGLE_HEADER:o=new ba(t,a)}o&&o.isTracingSupported()&&(e.traceId=o.getTraceId(),e.spanId=o.getSpanId(),e.traceSampled=a,r(o.makeTracingHeaders()))}}}va.prototype={toString:function(t){var e=this.readInt32(0),n=this.readInt32(4),r="";do{var i=e%t*4294967296+n;e=Math.floor(e/t),n=Math.floor(i/t),r=(i%t).toString(t)+r}while(e||n);return r},toDecimalString:function(){return this.toString(10)},toPaddedHexadecimalString(){var t=this.toString(16);return Array(17-t.length).join("0")+t},readInt32:function(t){return 16777216*this.buffer[t]+(this.buffer[t+1]<<16)+(this.buffer[t+2]<<8)+this.buffer[t+3]}},ma.prototype={isTracingSupported:function(){return void 0!==_a()},getSpanId:function(){return this._spanId.toDecimalString()},getTraceId:function(){return this._traceId.toDecimalString()},makeTracingHeaders:function(){return{"x-datadog-origin":"rum","x-datadog-parent-id":this.getSpanId(),"x-datadog-sampling-priority":this._traceSampled?"2":"-1","x-datadog-trace-id":this.getTraceId()}}},ya.prototype={isTracingSupported:function(){return!!(this._env&&this._version&&this._urlParse)},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getSkyWalkingSw8:function(){try{var t=String(Z(this._traceId)),e=String(Z(this._spanId)),n=String(Z(this._applicationId+"_rum_"+this.env)),r=String(Z(this._version)),i=String(Z(window.location.href)),o=String(Z(this._urlParse.Host));return(this._traceSampled?"1":"0")+"-"+t+"-"+e+"-0-"+n+"-"+r+"-"+i+"-"+o}catch(t){return""}},makeTracingHeaders:function(){return{sw8:this.getSkyWalkingSw8()}}},Ea.prototype={isTracingSupported:function(){return void 0!==_a()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.is128Bit?"0000000000000000"+this._traceId.toPaddedHexadecimalString():this._traceId.toPaddedHexadecimalString()},getUberTraceId:function(){return this.getTraceId()+":"+this.getSpanId()+":0:"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{"uber-trace-id":this.getUberTraceId()}}},ba.prototype={isTracingSupported:function(){return void 0!==_a()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this._traceId.toPaddedHexadecimalString()},getB3Str:function(){return this.getTraceId()+"-"+this.getSpanId()+"-"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{b3:this.getB3Str()}}},wa.prototype={isTracingSupported:function(){return void 0!==_a()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.is128Bit?"0000000000000000"+this._traceId.toPaddedHexadecimalString():this._traceId.toPaddedHexadecimalString()},makeTracingHeaders:function(){return{"X-B3-TraceId":this.getSpanId(),"X-B3-SpanId":this.getTraceId(),"X-B3-Sampled":this._traceSampled?"1":"0"}}},Sa.prototype={isTracingSupported:function(){return void 0!==_a()},getSpanId:function(){return this.isHexTraceId?this._spanId.toDecimalString():this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.isHexTraceId?this._traceId.toDecimalString():this._traceId.toPaddedHexadecimalString()+this._spanId.toPaddedHexadecimalString()},getTraceParent:function(){return this.isHexTraceId?"00-0000000000000000"+this._traceId.toPaddedHexadecimalString()+"-"+this._spanId.toPaddedHexadecimalString()+"-"+(this._traceSampled?"01":"00"):"00-"+this.getTraceId()+"-"+this.getSpanId()+"-"+(this._traceSampled?"01":"00")},makeTracingHeaders:function(){var t={traceparent:this.getTraceParent()};return this.isHexTraceId?C(t,{"x-gc-trace-id":this.getTraceId(),"x-gc-span-id":this.getSpanId()}):t}};var Oa=1;function Ia(t,e,n){var r=function(t,e){return{clearTracingIfNeeded:Ta,traceFetch:function(n){return Ca(t,n,e,(function(t){if(!(n.input instanceof Request)||n.init&&n.init.headers){n.init=O(n.init);var e=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(t,n){e.push([n,t])})):R(n.init.headers)?T(n.init.headers,(function(t){e.push(t)})):n.init.headers&&T(n.init.headers,(function(t,n){e.push([n,t])}));var r={};T(e.concat(z(t)),(function(t){r[t[0]]=t[1]})),n.init.headers=r}else n.input=new Request(n.input),T(t,(function(t,e){n.input.headers.append(e,t)}))}))},traceXhr:function(n,r){return Ca(t,n,e,(function(t){T(t,(function(t,e){r.setRequestHeader(e,t)}))}))}}}(e,n);!function(t,e,n){var r=Dn().subscribe((function(r){var i=r;if(Ti(e,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=Aa(),t.notify(en.REQUEST_STARTED,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),t.notify(en.REQUEST_COMPLETED,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ee.XHR,url:i.url,xhr:i.xhr})}}))}(t,e,r),function(t,e,n){var r=Rn().subscribe((function(r){var i=r;if(Ti(e,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=Aa(),t.notify(en.REQUEST_STARTED,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":!function(t,e){var n=t.response&&function(t){try{return t.clone()}catch(t){return}}(t.response);n&&n.body?function(t,e,n){var r=t.getReader(),i=[],o=0;function s(){var t,a;if(r.cancel().catch(it),n.collectStreamBody){var s;if(1===i.length)s=i[0];else{s=new Uint8Array(o);var u=0;T(i,(function(t){s.set(t,u),u+=t.length}))}t=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}e(void 0,t,a)}!function t(){r.read().then(a((function(e){e.done?s():(n.collectStreamBody&&i.push(e.value),(o+=e.value.length)>n.bytesLimit?s():t())})),a((function(t){e(t)})))}()}(n.body,(function(){e(Et(t.startClocks.timeStamp,gt()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):e(Et(t.startClocks.timeStamp,gt()))}(i,(function(e){n.clearTracingIfNeeded(i),t.notify(en.REQUEST_COMPLETED,{duration:e,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ee.FETCH,url:i.url,response:i.response,init:i.init,input:i.input})}))}}))}(t,e,r)}function Aa(){var t=Oa;return Oa+=1,t}function Ra(t){if(performance&&"getEntriesByName"in performance){var e=performance.getEntriesByName(t.url,"resource");if(e.length&&"toJSON"in e[0]){var n,r=M(e,(function(t){return t.toJSON()}));return r=D(r,Ei),1===(r=D(r,(function(e){return n=e,r=t.startClocks.relative,i=xa({startTime:t.startClocks.relative,duration:t.duration}),o=1,n.startTime>=r-o&&xa(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&xa((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function xa(t){return t.startTime+t.duration}function Na(t,e){t.subscribe(en.REQUEST_COMPLETED,(function(e){t.notify(en.RAW_RUM_EVENT_COLLECTED,function(t){var e=t.type===ee.XHR?Yt.XHR:Yt.FETCH,n=Ra(t),r=n?wt(n.startTime):t.startClocks,i=n?La(n):void 0,o=function(t){var e=t.traceSampled&&t.traceId&&t.spanId;if(!e)return;return{_gc:{spanId:t.spanId,traceId:t.traceId},resource:{id:q()}}}(t),a=Q(t.url).getParse(),s=A({date:r.timeStamp,resource:{id:q,type:e,duration:dt(t.duration),method:t.method,status:t.status,statusGroup:rt(t.status),url:t.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:Y(a.Path),urlQuery:ce(X(t.url))},type:Jt.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:s,domainContext:{performanceEntry:n&&Da(n),xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}}(e))})),t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(n){for(var r=0;r<n.length;r++){var i=n[r];"resource"!==i.entryType||("xmlhttprequest"===(o=i).initiatorType||"fetch"===o.initiatorType)||gi(i.name,e.resourceUrlLimit)||t.notify(en.RAW_RUM_EVENT_COLLECTED,ka(i))}var o}))}function ka(t){var e=vi(t),n=La(t),r=function(t){return t.traceId?{_gc:{traceId:t.traceId}}:void 0}(t),i=Q(t.name).getParse(),o="";!function(t){return t.encodedBodySize>0&&t.transferSize>0&&t.transferSize<t.encodedBodySize||null}(t)?function(t){return!(t.transferSize>0)&&(t.decodedBodySize>0||t.duration<30)}(t)&&(o=200):o=304;var a=wt(t.startTime),s=A({date:a.timeStamp,resource:{id:q(),type:e,url:t.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:Y(i.Path),urlQuery:ce(X(t.name)),method:"GET",status:o,statusGroup:rt(o)},type:Jt.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:s,domainContext:{performanceEntry:Da(t)}}}function La(t){return{resource:A({},{duration:(e=t,0===e.duration&&e.startTime<e.responseEnd?dt(e.responseEnd-e.startTime):dt(e.duration))},Si(t),yi(t))};var e}function Da(t){return"function"==typeof PerformanceEntry&&t instanceof PerformanceEntry&&t.toJSON(),t}var Ma={sdkVersion:"3.1.0",sdkName:"df_web_rum_sdk"};function Pa(t){if(t.applicationId){if(!t.datakitUrl&&!t.datakitOrigin)return n.error("datakitOrigin is not configured, no RUM data will be collected."),!1;if(void 0===t.sessionReplaySampleRate||xt(t.sessionReplaySampleRate)){var e=function(t){void 0!==t.allowedTracingUrls&&void 0!==t.allowedTracingOrigins&&n.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==t.allowedTracingUrls){if(!R(t.allowedTracingUrls))return void n.error("Allowed Tracing URLs should be an array");var e=[];return T(t.allowedTracingUrls,(function(r){var i;It(r)?e.push({match:r,traceType:Dt(t.traceType,ne.DDTRACE)}):"object"===tt(i=r)&&It(i.match)&&W(i.traceType)?e.push(r):n.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)})),e}if(void 0!==t.allowedTracingOrigins){if(!R(t.allowedTracingOrigins))return void n.error("Allowed Tracing Origins should be an array");e=[];return T(t.allowedTracingOrigins,(function(n){var r=Ua(n,Dt(t.traceType,ne.DDTRACE));r&&e.push(r)})),e}if(void 0!==t.allowedDDTracingOrigins){if(!R(t.allowedDDTracingOrigins))return void n.error("Allowed Tracing Origins should be an array");e=[];return T(t.allowedDDTracingOrigins,(function(n){var r=Ua(n,Dt(t.traceType,ne.DDTRACE));r&&e.push(r)})),e}return[]}(t);if(e)if(void 0===t.tracingSampleRate||xt(t.tracingSampleRate))if(void 0===t.excludedActivityUrls||R(t.excludedActivityUrls)){var r=In(t);if(r){var i,o,a=!!Dt(t.trackUserInteractions,t.trackInteractions),s=!!t.trackFrustrations;return C({applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:Dt(t.sessionReplaySampleRate,100),tracingSampleRate:t.tracingSampleRate,allowedTracingUrls:e,excludedActivityUrls:Dt(t.excludedActivityUrls,[]),trackUserInteractions:a||s,trackFrustrations:s,trackViewsManually:!!t.trackViewsManually,traceType:Dt(t.traceType,ne.DDTRACE),traceId128Bit:!!t.traceId128Bit,defaultPrivacyLevel:(i=On,o=t.defaultPrivacyLevel,P(L(i),(function(t){return i[t]===o}))?t.defaultPrivacyLevel:On.MASK_USER_INPUT)},r,Ma)}}else n.error("Excluded Activity Urls should be an array");else n.error("Tracing Sample Rate should be a number between 0 and 100")}else n.error("Premium Sample Rate should be a number between 0 and 100")}else n.error("Application ID is not configured, no RUM data will be collected.")}function Ua(t,e){var r;if("string"==typeof t?r=t:t instanceof RegExp?r=function(e){return t.test(dn(e))}:"function"==typeof t&&(r=function(e){return t(dn(e))}),void 0!==r)return{match:r,traceType:e};n.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",t)}var Ba={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},Fa={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Va={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Ha={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},za={Play:0,Pause:1},Wa={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:On.ALLOW,MASK:On.MASK,MASK_USER_INPUT:On.MASK_USER_INPUT},$a="data-gc-privacy",ja="allow",Ga="mask",Ka="mask-user-input",Za="hidden",qa="gc-privacy-allow",Ya="gc-privacy-mask",Qa="gc-privacy-mask-user-input",Xa="gc-privacy-hidden",Ja="***",ts="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",es={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},ns=new WeakMap;function rs(t){return ns.has(t)}function is(t){return ns.get(t)}function os(t,e){var n=t.tagName,r=t.value;if(bs(t,e)){var i=t.type;if("INPUT"===n&&("button"===i||"submit"===i||"reset"===i||"range"===i))return r;if(!r||"OPTION"===n)return;return Ja}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}var as=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ss=/^[A-Za-z]+:|^\/\//,us=/^data:.*,/i;function cs(t,e){return t.replace(as,(function(t,n,r,i,o,a){var s=r||o||a;if(!e||!s||ss.test(s)||us.test(s))return t;var u=n||i||"";return"/"===s[0]?"url(".concat(u).concat(function(t){return(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(e)+s).concat(u,")"):`url(${u}${function(t,e){try{return pn(t,e).href}catch(e){return t}}(s,e)}${u})`}))}function ls(t){if(!t)return null;var e,n;try{e=t.rules||t.cssRules}catch{}return e?cs(((n=Array.from(e,fs).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n),t.href):null}function fs(t){var e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=ls(t.styleSheet)||e}catch{}return ds(e)}function ds(t){if(t.includes(":")){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}return t}function ps(t){if(void 0!==t&&0!==t.length)return t.map((function(t){var e=t.cssRules||t.rules;return{cssRules:Array.from(e,(function(t){return t.cssText?ds(t.cssText):""})),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function hs(t,e){if(!e||""===e.trim())return e;var n=t.createElement("a");return n.href=e,n.href}var vs=/^[^ \t\n\r\u000c]+/,_s=/^[, \t\n\r\u000c]+/;var ms=1e5;function gs(t,e){var n=$n(t),r=n?gs(n,e):e;return ys(Es(t),r)}function ys(t,e){switch(e){case Wa.HIDDEN:case Wa.IGNORE:return e}switch(t){case Wa.ALLOW:case Wa.MASK:case Wa.MASK_USER_INPUT:case Wa.HIDDEN:case Wa.IGNORE:return t;default:return e}}function Es(t){if(Hn(t)){var e=t.getAttribute($a);if("BASE"===t.tagName)return Wa.ALLOW;if("INPUT"===t.tagName){var n=t;if("password"===n.type||"email"===n.type||"tel"===n.type)return Wa.MASK;if("hidden"===n.type)return Wa.MASK;var r=n.getAttribute("autocomplete");if(r&&0===r.indexOf("cc-"))return Wa.MASK}return e===Za||t.classList.contains(Xa)?Wa.HIDDEN:e===Ga||t.classList.contains(Ya)?Wa.MASK:e===Ka||t.classList.contains(Qa)?Wa.MASK_USER_INPUT:e===ja||t.classList.contains(qa)?Wa.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){var e=i("rel");return/preload|prefetch/i.test(e)&&"script"===i("as")||"shortcut icon"===e||"icon"===e}if("META"===t.nodeName){var n=i("name"),r=(e=i("rel"),i("property"));return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===e||"apple-touch-icon"===e||"shortcut icon"===e||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(r)||/^product:/.test(r)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function i(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?Wa.IGNORE:void 0}}function bs(t,e){switch(e){case Wa.MASK:case Wa.HIDDEN:case Wa.IGNORE:return!0;case Wa.MASK_USER_INPUT:return function(t){return t.nodeType===Node.TEXT_NODE}(t)?ws(t.parentNode):ws(t);default:return!1}}function ws(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!es[e.tagName]}var Ss=function(t){return t.replace(/\S/g,"x")};function Ts(t,e,n){var r=t.parentElement&&t.parentElement.tagName,i=t.textContent||"";if(!e||i.trim()){var o=n;if("SCRIPT"===r)i=Ja;else if(o===Wa.HIDDEN)i=Ja;else if(bs(t,o))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!i.trim())return}else i="OPTION"===r?Ja:Ss(i);return i}}var Cs={INITIAL_FULL_SNAPSHOT:0,SUBSEQUENT_FULL_SNAPSHOT:1,MUTATION:2};function Os(t,e,n){return Is(t,{serializationContext:n,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function Is(t,e){var n=function(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e){return{type:Fa.Document,childNodes:As(t,e),adoptedStyleSheets:ps(t.adoptedStyleSheets)}}(t,e);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e){var n=[];t.childNodes.length&&(n=As(t,e));var r=Wn(t);r&&e.serializationContext.shadowRootsController.addShadowRoot(t);return{type:Fa.DocumentFragment,childNodes:n,isShadowRoot:r,adoptedStyleSheets:r?ps(t.adoptedStyleSheets):void 0}}(t,e);case t.DOCUMENT_TYPE_NODE:return n=t,{type:Fa.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId};case t.ELEMENT_NODE:return function(t,e){var n=ks(t.tagName),r=(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),i=ys(Es(t),e.parentNodePrivacyLevel);var o;if(i===Wa.HIDDEN){var a=t.getBoundingClientRect(),s=a.width,u=a.height;return{type:Fa.Element,tagName:n,attributes:{rr_width:s+"px",rr_height:u+"px",[$a]:Za},childNodes:[],isSVG:r}}if(i===Wa.IGNORE)return;var c=function(t,e,n){if(e===Wa.HIDDEN)return{};for(var r={},i=ks(t.tagName),o=t.ownerDocument,a=0;a<t.attributes.length;a+=1){var s=t.attributes.item(a).name,u=Rs(t,e,s,n.configuration);null!==u&&(r[s]=Ls(o,i,s,u))}if(t.value&&("textarea"===i||"select"===i||"option"===i||"input"===i)){var c=os(t,e);void 0!==c&&(r.value=c)}if("option"===i&&e===Wa.ALLOW){var l=t;l.selected&&(r.selected=l.selected)}if("link"===i){var f=Array.from(o.styleSheets).find((function(e){return e.href===t.href}));(d=ls(f))&&f&&(r._cssText=d)}if("style"===i&&t.sheet){var d;(d=ls(t.sheet))&&(r._cssText=d)}var p,h,v=t;"input"!==i||"radio"!==v.type&&"checkbox"!==v.type||(e===Wa.ALLOW?r.checked=!!v.checked:bs(v,e)&&delete r.checked);if("audio"===i||"video"===i){var _=t;r.rr_mediaState=_.paused?"paused":"played"}var m=n.serializationContext;switch(m.status){case Cs.INITIAL_FULL_SNAPSHOT:p=Math.round(t.scrollTop),h=Math.round(t.scrollLeft),(p||h)&&m.elementsScrollPositions.set(t,{scrollTop:p,scrollLeft:h});break;case Cs.SUBSEQUENT_FULL_SNAPSHOT:if(m.elementsScrollPositions.has(t)){const e=m.elementsScrollPositions.get(t);p=e.scrollTop,h=e.scrollLeft}}h&&(r.rr_scrollLeft=h);p&&(r.rr_scrollTop=p);return r}(t,i,e),l=[];if(t.childNodes.length&&"style"!==n){l=As(t,e.parentNodePrivacyLevel===i&&e.ignoreWhiteSpace===("head"===n)?e:C({},e,{parentNodePrivacyLevel:i,ignoreWhiteSpace:"head"===n}))}if(zn(t)){var f=Is(t.shadowRoot,e);null!==f&&l.push(f)}return{type:Fa.Element,tagName:n,attributes:c,childNodes:l,isSVG:r}}(t,e);case t.TEXT_NODE:return function(t,e){var n=Ts(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(void 0===n)return;return{type:Fa.Text,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:Fa.CDATA,textContent:""}}var n}(t,e);if(!n)return null;var r=is(t)||xs++,i=n;return i.id=r,function(t,e){ns.set(t,e)}(t,r),e.serializedNodeIds&&e.serializedNodeIds.add(r),i}function As(t,e){var n=[];return t.childNodes.forEach((function(t){var r=Is(t,e);r&&n.push(r)})),n}function Rs(t,e,n,r){if(e===Wa.HIDDEN)return null;var i=t.getAttribute(n);if(e===Wa.MASK&&n!==$a&&!to.includes(n)&&n!==r.actionNameAttribute){var o=t.tagName;switch(n){case"title":case"alt":case"placeholder":return Ja}if("IMG"===o||"SOURCE"===o){if("src"===n||"srcset"===n)return ts;if("onerror"===n)return null}if("A"===o&&"href"===n)return Ja;if(i&&Mt(n,"data-"))return Ja}return i&&"string"==typeof i&&i.length>ms&&"data:"===i.slice(0,5)?"data:truncated":i}var xs=1;var Ns=/[^a-z1-6-_]/;function ks(t){var e=(t+"").toLowerCase().trim();return Ns.test(e)?"div":e}function Ls(t,e,n,r){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?hs(t,r):"background"!==n||!r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;var n=0;function r(t){var r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(_s),!(n>=e.length);){var o=r(vs);if(","===o.slice(-1))o=hs(t,o.substring(0,o.length-1)),i.push(o);else{var a="";o=hs(t,o);for(var s=!1;;){var u=e.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(t,r):"style"===n?cs(r,((i=document.createElement("a")).href="",i.href)):"object"===e&&"data"===n?hs(t,r):r:hs(t,r):r;var i}function Ds(t){return Boolean(t.changedTouches)}function Ms(t,e){return{data:C({source:t},e),type:Ba.IncrementalSnapshot,timestamp:gt()}}function Ps(t){for(var e=[],n=t;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(r),n=n.parentRule}if(n.parentStyleSheet){r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}}var Us=100;function Bs(t){var e=it,n=[];function r(){e(),t(n),n=[]}return{addMutations:function(t){0===n.length&&(e=function(t,e){if(window.requestIdleCallback){var n=window.requestIdleCallback(a(t),e);return function(){return window.cancelIdleCallback(n)}}n=window.requestAnimationFrame(a(t));return function(){return window.cancelAnimationFrame(n)}}(r,{timeout:Us})),Array.prototype.push.apply(n,t)},flush:r,stop:function(){e()}}}function Fs(t,e,n,r){var i=xi();if(!i)return{stop:it,flush:it};var o=Bs((function(i){!function(t,e,n,r,i){t.filter((function(t){return"childList"===t.type})).forEach((function(t){t.removedNodes.forEach((function(t){Vs(t,r.removeShadowRoot)}))}));var o=t.filter((function(t){return i.contains(t.target)&&function(t){for(var e=t;e;){if(!rs(e)&&!Wn(e))return!1;e=$n(e)}return!0}(t.target)&&gs(t.target,n.defaultPrivacyLevel)!==Wa.HIDDEN})),a=function(t,e,n){var r=new Set,i=new Map;for(var o of t)o.addedNodes.forEach((function(t){r.add(t)})),o.removedNodes.forEach((function(t){r.has(t)||i.set(t,o.target),r.delete(t)}));var a=Array.from(r);s=a,s.sort((function(t,e){var n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0}));var s;var u=new Set,c=[];for(var l of a)if(!v(l)){var f=gs(l.parentNode,e.defaultPrivacyLevel);if(f!==Wa.HIDDEN&&f!==Wa.IGNORE){var d=Is(l,{serializedNodeIds:u,parentNodePrivacyLevel:f,serializationContext:{status:Cs.MUTATION,shadowRootsController:n},configuration:e});if(d){var p=$n(l);c.push({nextId:_(l),parentId:is(p),node:d})}}}var h=[];return i.forEach((function(t,e){rs(e)&&h.push({parentId:is(t),id:is(e)})})),{adds:c,removes:h,serializedNodeIds:u,hasBeenSerialized:v};function v(t){return rs(t)&&u.has(is(t))}function _(t){for(var e=t.nextSibling;e;){if(rs(e))return is(e);e=e.nextSibling}return null}}(o.filter((function(t){return"childList"===t.type})),n,r),s=a.adds,u=a.removes,c=a.serializedNodeIds;function l(t){return rs(t)&&c.has(is(t))}var f=function(t,e){var n=[],r=new Set,i=t.filter((function(t){return!r.has(t.target)&&(r.add(t.target),!0)}));for(var o of i){if(o.target.textContent!==o.oldValue){var a=gs($n(o.target),e.defaultPrivacyLevel);a!==Wa.HIDDEN&&a!==Wa.IGNORE&&n.push({id:is(o.target),value:Dt(Ts(o.target,!1,a))})}}return n}(o.filter((function(t){return"characterData"===t.type&&!l(t.target)})),n),d=function(t,e){var n=[],r=new Map,i=t.filter((function(t){var e=r.get(t.target);return(!e||!e.has(t.attributeName))&&(e?e.add(t.attributeName):r.set(t.target,new Set([t.attributeName])),!0)})),o=new Map;for(var a of i){if(a.target.getAttribute(a.attributeName)!==a.oldValue){var s,u=gs(a.target,e.defaultPrivacyLevel),c=Rs(a.target,u,a.attributeName,e);if("value"===a.attributeName){var l=os(a.target,u);if(void 0===l)continue;s=l}else s="string"==typeof c?c:null;var f=o.get(a.target);f||(f={id:is(a.target),attributes:{}},n.push(f),o.set(a.target,f)),f.attributes[a.attributeName]=s}}return n}(o.filter((function(t){return"attributes"===t.type&&!l(t.target)})),n);if(!(f.length||d.length||u.length||s.length))return;e({adds:s,removes:u,texts:f,attributes:d})}(i.concat(s.takeRecords()),t,e,n,r)})),s=new i(a(o.addMutations));return s.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){s.disconnect(),o.stop()},flush:function(){o.flush()}}}function Vs(t,e){var n;zn(t)&&e(t.shadowRoot),(n=t,zn(n)?n.shadowRoot.childNodes:n.childNodes).forEach((function(t){Vs(t,e)}))}var Hs=function(t,e){var n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(!function(){var t=window.visualViewport;return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}()?(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)):(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)),r):r},zs=function(){var t=window.visualViewport;return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}},Ws=50,$s=100,js=200,Gs=new WeakMap;let Ks=1;function Zs(t){return Gs.has(t)||Gs.set(t,Ks++),Gs.get(t)}function qs(t){var e,n,r,i,o,a,s,u,c,l=(e=t.mutationCb,n=t.configuration,r=t.shadowRootsController,Fs(e,n,r,document)),f=function(t){var e=K((function(e){var n=Js(e);if(rs(n)){var r=Qs(e);if(!r)return;var i={id:is(n),timeOffset:0,x:r.x,y:r.y};t([i],Ds(e)?Va.TouchMove:Va.MouseMove)}}),Ws,{trailing:!1});return We(document,[qt.MOUSE_MOVE,qt.TOUCH_MOVE],e.throttled,{capture:!0,passive:!0}).stop}(t.mousemoveCb),d=function(t,e){var n=function(n){var r=Js(n);if(gs(r,e)!==Wa.HIDDEN&&rs(r)){var i,o=is(r),a=Ys[n.type];if(a!==Ha.Blur&&a!==Ha.Focus){var s=Qs(n);if(!s)return;i={id:o,type:a,x:s.x,y:s.y}}else i={id:o,type:a};var u=C({id:Zs(n)},Ms(Va.MouseInteraction,i));t(u)}};return We(document,Object.keys(Ys),n,{capture:!0,passive:!0}).stop}(t.mouseInteractionCb,t.configuration.defaultPrivacyLevel),p=function(t,e,n){var r=K((function(r){var i=Js(r);if(i&&gs(i,e)!==Wa.HIDDEN&&rs(i)){var o=is(i),a=i===document?{scrollTop:Kn(),scrollLeft:Gn()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};n.set(i,a),t({id:o,x:a.scrollLeft,y:a.scrollTop})}}),$s);return ze(document,qt.SCROLL,r.throttled,{capture:!0,passive:!0}).stop}(t.scrollCb,t.configuration.defaultPrivacyLevel,t.elementsScrollPositions),h=function(t){return Ao().subscribe(t).unsubscribe}(t.viewportResizeCb),v=Xs(t.inputCb,t.configuration.defaultPrivacyLevel),_=(i=t.mediaInteractionCb,o=t.configuration.defaultPrivacyLevel,a=function(t){var e=Js(t);e&&gs(e,o)!==Wa.HIDDEN&&rs(e)&&i({id:is(e),type:t.type===qt.PLAY?za.Play:za.Pause})},We(document,[qt.PLAY,qt.PAUSE],a,{capture:!0,passive:!0}).stop),m=function(t){function e(t,e){t&&rs(t.ownerNode)&&e(is(t.ownerNode))}var n=[ae(CSSStyleSheet.prototype,"insertRule",{before:function(n,r){e(this,(function(e){return t({id:e,adds:[{rule:n,index:r}]})}))}}),ae(CSSStyleSheet.prototype,"deleteRule",{before:function(n){e(this,(function(e){return t({id:e,removes:[{index:n}]})}))}})];"undefined"!=typeof CSSGroupingRule?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(r){n.push(ae(r.prototype,"insertRule",{before:function(n,r){var i=this;e(this.parentStyleSheet,(function(e){var o=Ps(i);o&&(o.push(r||0),t({id:e,adds:[{rule:n,index:o}]}))}))}}),ae(r.prototype,"deleteRule",{before:function(n){var r=this;e(this.parentStyleSheet,(function(e){var i=Ps(r);i&&(i.push(n),t({id:e,removes:[{index:i}]}))}))}}))}return function(){n.forEach((function(t){t.stop()}))}}(t.styleSheetCb),g=(s=t.focusCb,We(window,[qt.FOCUS,qt.BLUR],(function(){s({has_focus:document.hasFocus()})})).stop),y=function(t){if(!window.visualViewport)return it;var e=K((function(){t(zs())}),js,{trailing:!1}),n=We(window.visualViewport,[qt.RESIZE,qt.SCROLL],e.throttled,{capture:!0,passive:!0}).stop,r=e.cancel;return function(){n(),r()}}(t.visualViewportResizeCb),E=(u=t.lifeCycle,c=t.frustrationCb,u.subscribe(en.RAW_RUM_EVENT_COLLECTED,(function(t){t.rawRumEvent.type===Jt.ACTION&&t.rawRumEvent.action.type===Qt.CLICK&&t.rawRumEvent.action.frustration&&t.rawRumEvent.action.frustration.type&&t.rawRumEvent.action.frustration.type.length&&"events"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&c({timestamp:t.rawRumEvent.date,type:Ba.FrustrationRecord,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((function(t){return Zs(t)}))}})})).unsubscribe);return{flush:function(){l.flush()},stop:function(){l.stop(),f(),d(),p(),h(),v(),_(),m(),g(),y(),E()}}}var Ys={[qt.POINTER_UP]:Ha.MouseUp,[qt.MOUSE_DOWN]:Ha.MouseDown,[qt.CLICK]:Ha.Click,[qt.CONTEXT_MENU]:Ha.ContextMenu,[qt.DBL_CLICK]:Ha.DblClick,[qt.FOCUS]:Ha.Focus,[qt.BLUR]:Ha.Blur,[qt.TOUCH_START]:Ha.TouchStart,[qt.TOUCH_END]:Ha.TouchEnd};function Qs(t){var e=Ds(t)?t.changedTouches[0]:t,n=e.clientX,r=e.clientY;if(window.visualViewport){var i=Hs(n,r);n=i.visualViewportX,r=i.visualViewportY}if(Number.isFinite(n)&&Number.isFinite(r))return{x:n,y:r}}function Xs(t,e,n){void 0===n&&(n=document);var r,i=new WeakMap,o=n!==document,a=We(n,o?[qt.CHANGE]:[qt.INPUT,qt.CHANGE],(function(t){var e=Js(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&u(e)}),{capture:!0,passive:!0}),s=a.stop;if(o)r=it;else{const t=[se(HTMLInputElement.prototype,"value",u),se(HTMLInputElement.prototype,"checked",u),se(HTMLSelectElement.prototype,"value",u),se(HTMLTextAreaElement.prototype,"value",u),se(HTMLSelectElement.prototype,"selectedIndex",u)];r=function(){t.forEach((function(t){return t.stop()}))}}return function(){r(),s()};function u(t){var n=gs(t,e);if(n===Wa.HIDDEN)return;var r=t.type;let i;if("radio"===r||"checkbox"===r){if(bs(t,n))return;i={isChecked:t.checked}}else{var o=os(t,n);if(void 0===o)return;i={text:o}}c(t,i);var a,s,u=t.name;"radio"===r&&u&&t.checked&&(a=document.querySelectorAll('input[type="radio"][name="'+F(u)+'"]'),s=function(e){e!==t&&c(e,{isChecked:!1})},Array.prototype.forEach.call(a,s))}function c(e,n){if(rs(e)){var r=i.get(e);r&&r.text===n.text&&r.isChecked===n.isChecked||(i.set(e,n),t(C({id:is(e)},n)))}}}function Js(t){return!0===t.composed&&zn(t.target)?t.composedPath()[0]:t.target}var tu=function(t,e){var n=e.mutationCb,r=e.inputCb,i=new Map,o={addShadowRoot:function(e){var a=Fs(n,t,o,e),s=a.flush,u=a.stop,c=Xs(r,t.defaultPrivacyLevel,e);i.set(e,{flush:s,stop:function(){u(),c()}})},removeShadowRoot:function(t){var e=i.get(t);e&&(e.stop(),i.delete(t))},stop:function(){i.forEach((function(t){t.stop()}))},flush:function(){i.forEach((function(t){t.flush()}))}};return o};function eu(t){var e=t.emit;if(!e)throw new Error("emit function is required");var n,r=(n=new WeakMap,{set:function(t,e){(t!==document||document.scrollingElement)&&n.set(t===document?document.scrollingElement:t,e)},get:function(t){return n.get(t)},has:function(t){return n.has(t)}}),i=function(t){e(Ms(Va.Mutation,t))},o=function(t){e(Ms(Va.Input,t))},a=tu(t.configuration,{mutationCb:i,inputCb:o}),s=function(n,i){void 0===n&&(n=gt()),void 0===i&&(i={status:Cs.INITIAL_FULL_SNAPSHOT,elementsScrollPositions:r,shadowRootsController:a});var o=Ro(),s=o.width,u=o.height;e({data:{height:u,href:window.location.href,width:s},type:Ba.Meta,timestamp:n}),e({data:{has_focus:document.hasFocus()},type:Ba.Focus,timestamp:n}),e({data:{node:Os(document,t.configuration,i),initialOffset:{left:Gn(),top:Kn()}},type:Ba.FullSnapshot,timestamp:n}),window.visualViewport&&e({data:zs(),type:Ba.VisualViewport,timestamp:n})};s();var u=qs({lifeCycle:t.lifeCycle,configuration:t.configuration,elementsScrollPositions:r,inputCb:o,mediaInteractionCb:function(t){e(Ms(Va.MediaInteraction,t))},mouseInteractionCb:function(t){e(t)},mousemoveCb:function(t,n){e(Ms(n,{positions:t}))},mutationCb:i,scrollCb:function(t){e(Ms(Va.Scroll,t))},styleSheetCb:function(t){e(Ms(Va.StyleSheetRule,t))},viewportResizeCb:function(t){e(Ms(Va.ViewportResize,t))},frustrationCb:function(t){e(t)},focusCb:function(t){e({data:t,type:Ba.Focus,timestamp:gt()})},visualViewportResizeCb:function(t){e({data:t,type:Ba.VisualViewport,timestamp:gt()})},shadowRootsController:a}),c=u.stop,l=u.flush;function f(){a.flush(),l()}return{stop:function(){a.stop(),c()},takeSubsequentFullSnapshot:function(t){f(),s(t,{shadowRootsController:a,status:Cs.SUBSEQUENT_FULL_SNAPSHOT,elementsScrollPositions:r})},flushMutations:f,shadowRootsController:a}}function nu(t,e,n){var r=new FormData;return r.append("segment",new Blob([t],{type:"application/octet-stream"}),e.session.id+"-"+e.start),ru(e,(function(t,e){r.append(t,e)})),r.append("raw_segment_size",n.toString()),{data:r,bytesCount:t.byteLength}}function ru(t,e,n){void 0===n&&(n=""),T(z(t),(function(t){var r=t[1],i=t[0];"object"==typeof r&&null!==r?ru(r,e,""+n+i+"_"):e(""+n+i,String(r))}))}var iu,ou=10;function au(t){return cu(t).segments_count}function su(t){cu(t).records_count+=1}function uu(t){return iu&&iu.get(t)}function cu(t){var e;return iu||(iu=new Map),iu.has(t)?e=iu.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},iu.set(t,e),iu.size>ou&&function(){if(!iu)return;if(iu.keys)iu.delete(iu.keys().next().value);else{var t=!0;iu.forEach((function(e,n){t&&(iu.delete(n),t=!1)}))}}()),e}var lu=0;function fu(t,e,n,r,i,o){this.worker=t,this.pendingWriteCount=0,this.id=lu++;var a=e.view.id;this.metadata=C({start:r.timestamp,end:r.timestamp,creation_reason:n,records_count:1,has_full_snapshot:r.type===Ba.FullSnapshot,index_in_view:au(a),source:"browser"},e),function(t){cu(t).segments_count+=1}(a),su(a);var s=0,u=0,c=[],l=this,f=ze(t,"message",(function(t){var e=t.data;"wrote"===e.type&&(e.id===l.id?(l.pendingWriteCount-=1,function(t,e){cu(t).segments_total_raw_size+=e}(a,e.additionalBytesCount),s+=e.additionalBytesCount,u+=e.result.length,c.push(e.result),l.flushReason&&0===l.pendingWriteCount?(c.push(e.trailer),o(function(t){var e,n=t.reduce((function(t,e){return t+e.length}),0),r=new Uint8Array(n),i=0,o=Ne(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r.set(a,i),i+=a.length}}catch(t){o.e(t)}finally{o.f()}return r}(c),s),d()):i(u)):e.id>l.id&&d())})),d=f.stop;this.write('{"records":['+JSON.stringify(r))}fu.prototype.addRecord=function(t){this.metadata.start=Math.min(this.metadata.start,t.timestamp),this.metadata.end=Math.max(this.metadata.end,t.timestamp),this.metadata.records_count+=1,su(this.metadata.view.id),this.metadata.has_full_snapshot||(this.metadata.has_full_snapshot=t.type===Ba.FullSnapshot),this.write(","+JSON.stringify(t))},fu.prototype.flush=function(t){this.write("],"+JSON.stringify(this.metadata).slice(1)+"\n"),this.worker.postMessage({action:"reset",streamId:1}),this.flushReason=t},fu.prototype.write=function(t){this.pendingWriteCount+=1,this.worker.postMessage({data:t,id:this.id,streamId:1,action:"write"})};var du=30*at,pu=6e4;function hu(t,e,n,r,i,o){return function(t,e,n,r){var i={status:vu.WaitingForInitialRecord,nextSegmentCreationReason:"init"},o=t.subscribe(en.VIEW_CREATED,(function(){c("view_change")})),a=o.unsubscribe,s=t.subscribe(en.PAGE_EXITED,(function(t){c(t.reason)})),u=s.unsubscribe;function c(t){i.status===vu.SegmentPending&&(i.segment.flush(t),p(i.expirationTimeoutId)),i="stop"!==t?{status:vu.WaitingForInitialRecord,nextSegmentCreationReason:t}:{status:vu.Stopped}}function l(t,o){var a=e();if(a){var s=new fu(r,a,t,o,(function(t){!s.flushReason&&t>pu&&c("segment_bytes_limit")}),(function(t,e){var r=nu(t,s.metadata,e);Vn(s.flushReason)?n.sendOnExit(r):n.send(r)}));i={status:vu.SegmentPending,segment:s,expirationTimeoutId:d((function(){c("segment_duration_limit")}),du)}}}return{addRecord:function(t){switch(i.status){case vu.WaitingForInitialRecord:l(i.nextSegmentCreationReason,t);break;case vu.SegmentPending:i.segment.addRecord(t)}},stop:function(){c("stop"),a(),u()}}}(t,(function(){return function(t,e,n){var r=e.findTrackedSession(),i=n.findView();if(!r||!i)return;return{sdk:{name:t.sdkName,version:t.sdkVersion},env:t.env||"",service:i.service||t.service||"browser",version:i.version||t.version||"",app:{id:t.applicationId},session:{id:r.id},view:{id:i.id}}}(e,n,r)}),i,o)}var vu={WaitingForInitialRecord:0,SegmentPending:1,Stopped:2};const _u='!function(){"use strict";function t(t,a){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,a){if(!t)return;if("string"==typeof t)return e(t,a);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,a)}(t))||a&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,_=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return _=t.done,t},e:function(t){h=!0,s=t},f:function(){try{_||null==n.return||n.return()}finally{if(h)throw s}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function a(e){var a,n=e.reduce((function(t,e){return t+e.length}),0),r=new Uint8Array(n),i=0,s=t(e);try{for(s.s();!(a=s.n()).done;){var _=a.value;r.set(_,i),i+=_.length}}catch(t){s.e(t)}finally{s.f()}return r}function n(t){for(var e=t.length;--e>=0;)t[e]=0}var r=256,i=286,s=30,_=15,h=new Uint8Array([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]),l=new Uint8Array([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]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);n(u);var f=new Array(60);n(f);var c=new Array(512);n(c);var p=new Array(256);n(p);var g=new Array(29);n(g);var v,w,b,m=new Array(s);function y(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(m);var z=function(t){return t<256?c[t]:c[256+(t>>>7)]},A=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,A(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},E=function(t,e,a){x(t,a[2*e],a[2*e+1])},Z=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},S=function(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=_;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=Z(i[h]++,h))}},U=function(t){var e;for(e=0;e<i;e++)t.dyn_ltree[2*e]=0;for(e=0;e<s;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},R=function(t){t.bi_valid>8?A(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},L=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},F=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&L(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!L(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},T=function(t,e,a){var n,i,s,_,o=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===n?E(t,i,e):(s=p[i],E(t,s+r+1,e),0!==(_=h[s])&&(i-=g[s],x(t,i,_)),n--,s=z(n),E(t,s,a),0!==(_=l[s])&&(n-=m[s],x(t,n,_)))}while(o<t.last_lit);E(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)F(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],F(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,F(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=_;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(i=p,g++),l[2*n+1]=i,n>o||(t.bl_count[i]++,s=0,n>=c&&(s=f[n-c]),h=l[2*n],t.opt_len+=h*(i+s),u&&(t.static_len+=h*(d[2*n+1]+s)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),S(i,o,t.bl_count)},O=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},N=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{E(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(E(t,r,t.bl_tree),_--),E(t,16,t.bl_tree),x(t,_-3,2)):_<=10?(E(t,17,t.bl_tree),x(t,_-3,3)):(E(t,18,t.bl_tree),x(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},D=!1,C=function(t,e,a,n){x(t,0+(n?1:0),3),function(t,e,a,n){R(t),n&&(A(t,a),A(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},M=function(t,e,a,n){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<r;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=a+5,a+4<=i&&-1!==e?C(t,e,a,n):4===t.strategy||s===i?(x(t,2+(n?1:0),3),T(t,u,f)):(x(t,4+(n?1:0),3),function(t,e,a,n){var r;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),r=0;r<n;r++)x(t,t.bl_tree[2*d[r]+1],3);N(t,t.dyn_ltree,e-1),N(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),T(t,t.dyn_ltree,t.dyn_dtree)),U(t),n&&R(t)},B={_tr_init:function(t){D||(!function(){var t,e,a,n,r,d=new Array(16);for(a=0,n=0;n<28;n++)for(g[n]=a,t=0;t<1<<h[n];t++)p[a++]=n;for(p[a-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<l[n];t++)c[r++]=n;for(r>>=7;n<s;n++)for(m[n]=r<<7,t=0;t<1<<l[n]-7;t++)c[256+r++]=n;for(e=0;e<=_;e++)d[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,d[8]++;for(;t<=255;)u[2*t+1]=9,t++,d[9]++;for(;t<=279;)u[2*t+1]=7,t++,d[7]++;for(;t<=287;)u[2*t+1]=8,t++,d[8]++;for(S(u,287,d),t=0;t<s;t++)f[2*t+1]=5,f[2*t]=Z(t,5);v=new y(u,h,257,i,_),w=new y(f,l,0,s,_),b=new y(new Array(0),o,0,19,7)}(),D=!0),t.l_desc=new k(t.dyn_ltree,v),t.d_desc=new k(t.dyn_dtree,w),t.bl_desc=new k(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,U(t)},_tr_stored_block:C,_tr_flush_block:M,_tr_tally:function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(p[a]+r+1)]++,t.dyn_dtree[2*z(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){x(t,2,3),E(t,256,u),function(t){16===t.bi_valid?(A(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},H=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},Y=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),K=function(t,e,a,n){var r=Y,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},G=B._tr_init,X=B._tr_stored_block,W=B._tr_flush_block,$=B._tr_tally,q=B._tr_align,J=j.Z_NO_FLUSH,Q=j.Z_PARTIAL_FLUSH,V=j.Z_FULL_FLUSH,tt=j.Z_FINISH,et=j.Z_BLOCK,at=j.Z_OK,nt=j.Z_STREAM_END,rt=j.Z_STREAM_ERROR,it=j.Z_DATA_ERROR,st=j.Z_BUF_ERROR,_t=j.Z_DEFAULT_COMPRESSION,ht=j.Z_FILTERED,lt=j.Z_HUFFMAN_ONLY,ot=j.Z_RLE,dt=j.Z_FIXED,ut=j.Z_DEFAULT_STRATEGY,ft=j.Z_UNKNOWN,ct=j.Z_DEFLATED,pt=258,gt=262,vt=103,wt=113,bt=666,mt=function(t,e){return t.msg=P[e],e},yt=function(t){return(t<<1)-(t>4?9:0)},kt=function(t){for(var e=t.length;--e>=0;)t[e]=0},zt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},At=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},xt=function(t,e){W(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,At(t.strm)},Et=function(t,e){t.pending_buf[t.pending++]=e},Zt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},St=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-gt?t.strstart-(t.w_size-gt):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+pt,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=pt-(u-i),i=u-pt,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Ut=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-gt)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=H(s.adler,_,o,h):2===s.state.wrap&&(s.adler=K(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=zt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=zt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<gt&&0!==t.strm.avail_in)},Rt=function(t,e){for(var a,n;;){if(t.lookahead<gt){if(Ut(t),t.lookahead<gt&&e===J)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-gt&&(t.match_length=St(t,a)),t.match_length>=3)if(n=$(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=zt(t,t.ins_h,t.window[t.strstart+1]);else n=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2},Lt=function(t,e){for(var a,n,r;;){if(t.lookahead<gt){if(Ut(t),t.lookahead<gt&&e===J)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-gt&&(t.match_length=St(t,a),t.match_length<=5&&(t.strategy===ht||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=$(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(xt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=$(t,0,t.window[t.strstart-1]))&&xt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=$(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2};function Ft(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Tt=[new Ft(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ut(t),0===t.lookahead&&e===J)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,xt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-gt&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(xt(t,!1),t.strm.avail_out),1)})),new Ft(4,4,8,4,Rt),new Ft(4,5,16,8,Rt),new Ft(4,6,32,32,Rt),new Ft(4,4,16,16,Lt),new Ft(8,16,32,32,Lt),new Ft(8,16,128,128,Lt),new Ft(8,32,128,256,Lt),new Ft(32,128,258,1024,Lt),new Ft(32,258,258,4096,Lt)];function It(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kt(this.dyn_ltree),kt(this.dyn_dtree),kt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ot=function(t){if(!t||!t.state)return mt(t,rt);t.total_in=t.total_out=0,t.data_type=ft;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=J,G(e),at},Nt=function(t){var e,a=Ot(t);return a===at&&((e=t.state).window_size=2*e.w_size,kt(e.head),e.max_lazy_match=Tt[e.level].max_lazy,e.good_match=Tt[e.level].good_length,e.nice_match=Tt[e.level].nice_length,e.max_chain_length=Tt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Dt=function(t,e,a,n,r,i){if(!t)return rt;var s=1;if(e===_t&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ct||n<8||n>15||e<0||e>9||i<0||i>dt)return mt(t,rt);8===n&&(n=9);var _=new It;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,Nt(t)},Ct={deflateInit:function(t,e){return Dt(t,e,ct,15,8,ut)},deflateInit2:Dt,deflateReset:Nt,deflateResetKeep:Ot,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?rt:(t.state.gzhead=e,at):rt},deflate:function(t,e){var a,n;if(!t||!t.state||e>et||e<0)return t?mt(t,rt):rt;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===bt&&e!==tt)return mt(t,0===t.avail_out?st:rt);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Et(r,31),Et(r,139),Et(r,8),r.gzhead?(Et(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Et(r,255&r.gzhead.time),Et(r,r.gzhead.time>>8&255),Et(r,r.gzhead.time>>16&255),Et(r,r.gzhead.time>>24&255),Et(r,9===r.level?2:r.strategy>=lt||r.level<2?4:0),Et(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Et(r,255&r.gzhead.extra.length),Et(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=K(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Et(r,0),Et(r,0),Et(r,0),Et(r,0),Et(r,0),Et(r,9===r.level?2:r.strategy>=lt||r.level<2?4:0),Et(r,3),r.status=wt);else{var s=ct+(r.w_bits-8<<4)<<8;s|=(r.strategy>=lt||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=wt,Zt(r,s),0!==r.strstart&&(Zt(r,t.adler>>>16),Zt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending!==r.pending_buf_size));)Et(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Et(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Et(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=vt)}else r.status=vt;if(r.status===vt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&At(t),r.pending+2<=r.pending_buf_size&&(Et(r,255&t.adler),Et(r,t.adler>>8&255),t.adler=0,r.status=wt)):r.status=wt),0!==r.pending){if(At(t),0===t.avail_out)return r.last_flush=-1,at}else if(0===t.avail_in&&yt(e)<=yt(i)&&e!==tt)return mt(t,st);if(r.status===bt&&0!==t.avail_in)return mt(t,st);if(0!==t.avail_in||0!==r.lookahead||e!==J&&r.status!==bt){var _=r.strategy===lt?function(t,e){for(var a;;){if(0===t.lookahead&&(Ut(t),0===t.lookahead)){if(e===J)return 1;break}if(t.match_length=0,a=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ot?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=pt){if(Ut(t),t.lookahead<=pt&&e===J)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+pt;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=pt-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=$(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Tt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=bt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),at;if(2===_&&(e===Q?q(r):e!==et&&(X(r,0,0,!1),e===V&&(kt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),At(t),0===t.avail_out))return r.last_flush=-1,at}return e!==tt?at:r.wrap<=0?nt:(2===r.wrap?(Et(r,255&t.adler),Et(r,t.adler>>8&255),Et(r,t.adler>>16&255),Et(r,t.adler>>24&255),Et(r,255&t.total_in),Et(r,t.total_in>>8&255),Et(r,t.total_in>>16&255),Et(r,t.total_in>>24&255)):(Zt(r,t.adler>>>16),Zt(r,65535&t.adler)),At(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?at:nt)},deflateEnd:function(t){if(!t||!t.state)return rt;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==vt&&e!==wt&&e!==bt?mt(t,rt):(t.state=null,e===wt?mt(t,it):at)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return rt;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return rt;if(1===r&&(t.adler=H(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(kt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Ut(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=zt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Ut(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,at},deflateInfo:"pako deflate (from Nodeca project)"};for(var Mt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Mt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Mt[254]=Mt[254]=1;var Ht=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Yt=Object.prototype.toString,Kt=j.Z_NO_FLUSH,Pt=j.Z_SYNC_FLUSH,jt=j.Z_FULL_FLUSH,Gt=j.Z_FINISH,Xt=j.Z_OK,Wt=j.Z_STREAM_END,$t=j.Z_DEFAULT_COMPRESSION,qt=j.Z_DEFAULT_STRATEGY,Jt=j.Z_DEFLATED;function Qt(){this.options={level:$t,method:Jt,chunkSize:16384,windowBits:15,memLevel:8,strategy:qt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ht,this.strm.avail_out=0;var e=Ct.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==Xt)throw new Error(P[e]);if(t.header&&Ct.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Yt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ct.deflateSetDictionary(this.strm,a))!==Xt)throw new Error(P[e]);this._dict_set=!0}}function Vt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function te(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Qt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Gt:Kt,"[object ArrayBuffer]"===Yt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Pt||n===jt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ct.deflate(r,n))===Wt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ct.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Xt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Qt.prototype.onData=function(t){this.chunks.push(t)},Qt.prototype.onEnd=function(t){t===Xt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(t){void 0===t&&(t=self);try{var e=new Map;t.addEventListener("message",(function(n){try{var r=function(t,e){switch(e.action){case"init":return{type:"initialized",version:"3.1.0"};case"write":var n=t.get(e.streamId);n||(n=new Qt,t.set(e.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(e.data);return n.push(i,j.Z_SYNC_FLUSH),{type:"wrote",id:e.id,streamId:e.streamId,result:a(n.chunks.slice(r)),trailer:te(n),additionalBytesCount:i.length};case"reset":t.delete(e.streamId)}}(e,n.data);r&&t.postMessage(r)}catch(e){Vt(t,e,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(e){Vt(t,e)}}()}();';var mu;function gu(){return mu||(mu=URL.createObjectURL(new Blob([_u]))),new Worker(mu)}var yu={Nil:0,Loading:1,Error:2,Initialized:3},Eu={status:yu.Nil};function bu(t,e){switch(void 0===e&&(e=gu),Eu.status){case yu.Nil:Eu={status:yu.Loading,callbacks:[t]},function(t){void 0===t&&(t=gu);try{var e=t();return ze(e,"error",wu),ze(e,"message",(function(t){var n=t.data;"errored"===n.type?wu(n.error,n.streamId):"initialized"===n.type&&function(t,e){Eu.status===yu.Loading&&(T(Eu.callbacks,(function(e){e(t)})),Eu={status:yu.Initialized,worker:t,version:e})}(e,n.version)})),e.postMessage({action:"init"}),e}catch(t){wu(t)}}(e);break;case yu.Loading:Eu.callbacks.push(t);break;case yu.Error:t();break;case yu.Initialized:t(Eu.worker)}}function wu(t,e){var r;Eu.status===yu.Loading&&(n.error("Session Replay recording failed to start: an error occurred while creating the Worker:",t),(t instanceof Event||t instanceof Error&&(At(r=t.message,"Content Security Policy")||At(r,"requires 'TrustedScriptURL'")))&&n.error("Please make sure CSP is correctly configured !!!"),T(Eu.callbacks,(function(t){t()})),Eu={status:yu.Error})}var Su=0,Tu=1,Cu=2,Ou=3;var Iu,Au,Ru,xu,Nu=function(t,e){if(void 0===e&&(e=bu),Wr()||"function"!=typeof Array.from||"function"!=typeof CSSSupportsRule||"function"!=typeof URL.createObjectURL||!("forEach"in NodeList.prototype))return{start:it,stop:it,getReplayStats:function(){},onRumStart:it,isRecording:function(){return!1}};var n={status:Su},r=function(){n={status:Tu}},i=function(){n={status:Su}};return{start:function(){r()},stop:function(){i()},getReplayStats:uu,onRumStart:function(o,a,s,u){o.subscribe(en.SESSION_EXPIRED,(function(){n.status!==Cu&&n.status!==Ou||(i(),n={status:Tu})})),o.subscribe(en.SESSION_RENEWED,(function(){n.status===Tu&&r()})),r=function(){var r=s.findTrackedSession();r&&r.sessionReplayAllowed?n.status!==Cu&&n.status!==Ou&&(n={status:Cu},jn("interactive",(function(){n.status===Cu&&e((function(e){if(n.status===Cu)if(e){var r=t(o,a,s,u,e);n={status:Ou,stopRecording:r.stop}}else n={status:Su}}))}))):n={status:Tu}},i=function(){n.status!==Su&&(n.status===Ou&&n.stopRecording(),n={status:Su})},n.status===Tu&&r()},isRecording:function(){return n.status===Ou}}}((function(t,e,n,r,i,o){var a=o||Nr(e.sessionReplayEndPoint,pu,(function(e){t.notify(en.RAW_ERROR_COLLECTED,{error:e})})),s=hu(t,e,n,r,a,i),u=s.addRecord,c=s.stop,l=eu({emit:u,configuration:e,lifeCycle:t}),f=l.stop,d=l.takeSubsequentFullSnapshot,p=l.flushMutations,h=t.subscribe(en.VIEW_ENDED,(function(){p(),u({timestamp:gt(),type:Ba.ViewEnd})})),v=t.subscribe(en.VIEW_CREATED,(function(t){d(t.startClocks.timeStamp)}));return{stop:function(){h.unsubscribe(),v.unsubscribe(),f(),c()}}})),ku=function(t,e){var r=!1,i=Zr(Gr),s=Zr(jr),u=function(){},c=function(){},l=function(){},f=new Ft,d=function(t,e){void 0===e&&(e=gt()),f.add((function(){return d(t,e)}))},p=function(t,e){void 0===e&&(e=mt()),f.add((function(){return p(t,e)}))},h=function(t,n){void 0===n&&(n=Uo(i,s,e)),f.add((function(){return h(t,n)}))},v=function(t,n){void 0===n&&(n=Uo(i,s,e)),f.add((function(){return v(t,n)}))};function _(n,r){var o=t(n,e,i,s,r);p=o.startView,h=o.addAction,v=o.addError,d=o.addTiming,u=o.getInternalContext,l=o.stopSession,f.drain(),e.onRumStart(o.lifeCycle,n,o.session,o.viewContexts)}var m,g,y=a((function(t){p("object"==typeof t?t:{name:t})}));return m={init:a((function(t){if(c=function(){return nt(t)},Wr()&&(t=function(t){return C({},t,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",sessionSampleRate:100})}(t)),function(t){return function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{var e="dd_cookie_test_".concat(q()),n="test";return gn(e,n,at,t),yn(e)===n}catch(t){return!1}}(An(t))?"file:"!==window.location.protocol||(n.error("Execution is not allowed in the current context."),!1):(n.warn("Cookies are not authorized, we will not send any data."),!1)}(t)&&function(t){return!r||(t.silentMultipleInit||n.error("DATAFLUX_RUM is already initialized."),!1)}(t)){var e=Pa(t);if(e){if(e.trackViewsManually){var i=f;f=new Ft,p=function(t){_(e,t)},i.drain()}else _(e);r=!0}}})),addRumGlobalContext:a(i.add),setGlobalContextProperty:a(i.setContextProperty),removeRumGlobalContext:a(i.remove),removeGlobalContextProperty:a(i.removeContextProperty),getRumGlobalContext:a(i.get),getGlobalContext:a(i.getContext),setRumGlobalContext:a(i.set),setGlobalContext:a(i.setContext),clearGlobalContext:a(i.clearContext),getInitConfiguration:a((function(){return c()})),getInternalContext:a((function(t){return u(t)})),addDebugSession:a((function(t){})),clearDebugSession:a((function(){})),getDebugSession:a((function(){})),addAction:a((function(t,e){h({name:t,context:nt(e),startClocks:mt(),type:Qt.CUSTOM})})),addError:a((function(t,e){var n=Ae();v({error:t,handlingStack:n,context:nt(e),startClocks:mt()})})),addTiming:a((function(t,e){d(t,e)})),setUser:a((function(t){(function(t){var e="object"===tt(t);return e||n.error("Unsupported user:",t),e})(t)&&s.setContext(qr(t))})),getUser:a(s.getContext),setUserProperty:a((function(t,e){var n={};n[t]=e;var r=qr(n)[t];s.setContextProperty(t,r)})),removeUserProperty:a(s.removeContextProperty),removeUser:a(s.clearContext),clearUser:a(s.clearContext),startView:y,stopSession:a((function(){l()})),startSessionReplayRecording:a(e.start),stopSessionReplayRecording:a(e.stop)},g=C({onReady:function(t){t()}},m),Object.defineProperty(g,"_setDebug",{get:function(){return o},enumerable:!1}),g}((function(t,e,n,r,i){var o=new nn,s=function(t){const e=ni(ti.RUM,t);return e}(t);s.setContextProvider((function(){return{application:{id:t.applicationId},session:{id:f.findTrackedSession()&&f.findTrackedSession().id},view:{id:_.findView()&&_.findView().id},action:{id:g.findActionId(),ids:g.findAllActionId()}}}));var u,c=function(t){o.notify(en.RAW_ERROR_COLLECTED,{error:t})},l=u=new Be((function(){var t=We(document,[qt.VISIBILITY_CHANGE,qt.FREEZE,qt.PAGE_HIDE],(function(t){t.type===qt.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?u.notify({reason:Fn.HIDDEN}):t.type===qt.FREEZE&&u.notify({reason:Fn.FROZEN})}),{capture:!0}),e=ze(window,qt.BEFORE_UNLOAD,(function(){u.notify({reason:Fn.UNLOADING})}));return function(){t.stop(),e.stop()}}));l.subscribe((function(t){o.notify(en.PAGE_EXITED,t)}));var f=Wr()?function(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",plan:si.WITHOUT_SESSION_REPLAY,sessionReplayAllowed:!1};return{findTrackedSession:function(){return t},expire:it,expireObservable:new Be}}():ci(t,o);if(Wr())!function(t){var e=zr();t.subscribe(en.RUM_EVENT_COLLECTED,(function(t){var n=Br(t).rowData;e.send("rum",n)}))}(o);else Io(t,o,s.observable,c,l,f.expireObservable);var d=function(t){var e=yn(fi);return e||(e=q(),gn(fi,e,di,t.cookieOptions)),{getId:function(){return e}}}(t),p=function(){var t=xi(),e=new Be(a((function(){if(t){var n=new t((function(){return e.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}})));return e}(),h=Ni(location),v=function(t,e,n,r,i,o,a,s,u){var c=function(t){var e=new $t(Po);return t.subscribe(en.VIEW_CREATED,(function(t){e.add(function(t){return{service:t.service,version:t.version,id:t.id,name:t.name}}(t),t.startClocks.relative)})),t.subscribe(en.VIEW_ENDED,(function(t){e.closeActive(t.endClocks.relative)})),t.subscribe(en.SESSION_RENEWED,(function(){e.reset()})),{findView:function(t){return e.find(t)},stop:function(){e.stop()}}}(t),l=function(t,e,n){var r,i=new $t(Mo);t.subscribe(en.VIEW_ENDED,(function(t){i.closeActive(t.endClocks.relative)})),t.subscribe(en.VIEW_CREATED,(function(t){var e=n.href;i.add(a({url:e,location:n,referrer:r||document.referrer}),t.startClocks.relative),r=e}));var o=e.subscribe((function(t){var e=i.find();if(e){var n=_t();i.closeActive(n),i.add(a({url:t.newLocation.href,location:t.newLocation,referrer:e.referrer}),n)}}));function a(t){var e=t.location.pathname,n=t.location.hash;return"/"===e&&n&&!Pt(n)&&(e="/"+Ut(n)),{url:t.url,referrer:t.referrer,host:t.location.host,path:e,pathGroup:Y(e),urlQuery:ce(X(t.location.href))}}return{findUrl:function(t){return i.find(t)},stop:function(){o.unsubscribe(),i.stop()}}}(t,o,n),f=Wo(),d=function(t,e,n,r){t.subscribe(en.AUTO_ACTION_COMPLETED,(function(e){t.notify(en.RAW_RUM_EVENT_COLLECTED,Co(e,r))}));var i={findActionId:it,findAllActionId:it};return n.trackUserInteractions&&(i=Eo(t,e,n).actionContexts),{actionContexts:i,addAction:function(e,n){t.notify(en.RAW_RUM_EVENT_COLLECTED,I({savedCommonContext:n},Co(e,r)))}}}(t,a,e,f),p=d.actionContexts,h=d.addAction;return Do(e,t,r,i,c,l,p,s,u),{viewContexts:c,urlContexts:l,pageStateHistory:f,addAction:h,actionContexts:p,stop:function(){c.stop(),f.stop()}}}(o,t,location,f,d,h,p,(function(){return Uo(n,r,e)}),c),_=v.viewContexts,m=v.urlContexts,g=v.actionContexts,y=v.pageStateHistory,E=v.addAction;!function(t,e){t.subscribe(en.PERFORMANCE_ENTRIES_COLLECTED,(function(n){for(var r=0;r<n.length;r++){var i=n[r];if("longtask"!==i.entryType)return;if(!e.findTrackedSession(i.startTime))break;var o=wt(i.startTime),a={date:o.timeStamp,long_task:{id:q(),duration:pt(i.duration)},type:Jt.LONG_TASK};t.notify(en.RAW_RUM_EVENT_COLLECTED,{rawRumEvent:a,startTime:o.relative,domainContext:{performanceEntry:i.toJSON()}})}}))}(o,f),Na(o,t);var b=da(o,t,location,p,h,y,e,i),w=b.addTiming,S=b.startView,T=jo(o,0,y).addError;Ia(o,t,f),Ii(o,t);var C=function(t,e,n,r,i){return{get:function(o){var a=n.findView(o),s=i.findUrl(o),u=e.findTrackedSession(o);if(u&&a&&s){var c=r.findActionId(o),l=r.findAllActionId(o);return{application:{id:t},session:{id:u.id},userAction:c?{id:c,ids:l}:void 0,view:{id:a.id,name:a.name,url:s.url,referrer:s.referrer,host:s.host,path:s.path,pathGroup:s.pathGroup,urlQuery:s.urlQuery}}}}}}(t.applicationId,f,_,g,m);return{addAction:E,addError:T,addTiming:w,configuration:t,lifeCycle:o,viewContexts:_,session:f,startView:S,stopSession:function(){f.expire()},getInternalContext:C.get}}),Nu);Iu=f(),Ru=ku,xu=Iu[Au="DATAFLUX_RUM"],Iu[Au]=Ru,xu&&xu.q&&T(xu.q,(function(t){c(t,"onReady callback threw an error:")()}))}();
1
+ !function(){"use strict";var t,e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},n=function t(n){var r=[].slice.call(arguments,1);Object.prototype.hasOwnProperty.call(e,n)||(n=e.log),t[n].apply(t,r)};function r(t,e){var n,r=window;return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=t[r.Zone.__symbol__(e)]),n||(n=t[e]),n}n.debug=console.debug.bind(console),n.log=console.log.bind(console),n.info=console.info.bind(console),n.warn=console.warn.bind(console),n.error=console.error.bind(console);var i=!1;function o(t){i=t}function a(t){return function(){return s(t,this,arguments)}}function s(n,r,i){try{return n.apply(r,i)}catch(n){if(u(e.error,n),t)try{t(n)}catch(t){u(e.error,t)}}}function u(t){var e=[].slice.call(arguments,1);i&&n.apply(null,[t,"[MONITOR]"].concat(e))}function c(t,e){return function(){var r=[].slice.call(arguments);try{return t.apply(this,r)}catch(t){n.error(e,t)}}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(){if("object"===("undefined"==typeof globalThis?"undefined":l(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var t=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==l(t)&&(t="object"===("undefined"==typeof self?"undefined":l(self))?self:"object"===("undefined"==typeof window?"undefined":l(window))?window:{}),t}function d(t,e){return r(f(),"setTimeout")(a(t),e)}function p(t){r(f(),"clearTimeout")(t)}function h(t,e){return r(window,"setInterval")(a(t),e)}function v(t){r(window,"clearInterval")(t)}function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}var m=Array.prototype,g=(Function.prototype,Object.prototype),y=m.slice,E=g.toString,b=g.hasOwnProperty,w=m.forEach,S=Array.isArray,T=function(t,e,n){if(null===t)return!1;if(w&&t.forEach===w)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&false===e.call(n,t[r],r,t))return!1}else for(var o in t)if(b.call(t,o)&&false===e.call(n,t[o],o,t))return!1};function C(t){return T(y.call(arguments,1),(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})),t}function O(t){return C({},t)}var I=function(t){return T(y.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},A=function(t){return T(y.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(V(e[n])&&V(t[n])?I(t[n],e[n]):t[n]=e[n])})),t},R=S||function(t){return"[object Array]"===E.call(t)},x=function(t){if(!t)return!1;try{return/^\s*\bfunction\b/.test(t)}catch(t){return!1}},k=function(t){return t?t.toArray?t.toArray():R(t)?y.call(t):(e=t)&&b.call(e,"callee")?y.call(t):N(t):[];var e},N=function(t){var e=[];return null===t||T(t,(function(t){e[e.length]=t})),e},L=function(t){var e=[];return null===t||T(t,(function(t,n){e[e.length]=n})),e},D=function(t,e,n){if(t.filter)return t.filter(e);for(var r=[],i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];e.call(n,o,i,t)&&r.push(o)}return r},M=function(t,e,n){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];r.push(e.call(n,o,i,t))}return r},P=function(t,e,n){if(t.some)return t.some(e);for(var r=!1,i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];if(e.call(n,o,i,t)){r=!0;break}}return r},U=function(t,e,n){if(t.every)return t.every(e);for(var r=!0,i=0;i<t.length;i++)if(b.call(t,i)){var o=t[i];if(!e.call(n,o,i,t)){r=!1;break}}return r},B=function(t,e,r){return void 0===r&&(r=!1),P(t,(function(t){try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return r?Bt(e,t):t===e}catch(t){n.error(t)}}))},F=function(t){return t+="",window.CSS&&window.CSS.escape?window.CSS.escape(t):t.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}))},V=function(t){return null!==t&&"[object Object]"===E.call(t)},H=function(t){if(V(t)){for(var e in t)if(b.call(t,e))return!1;return!0}return!1},z=function(t){var e=[];return T(t,(function(t,n){e.push([n,t])})),e},W=function(t){return"[object String]"===E.call(t)},$=function(t){return"[object Boolean]"===E.call(t)},j=function(t){return"[object Number]"===E.call(t)&&/[\d\.]+/.test(String(t))},G=function t(e){var n=e;try{n=t(e)}catch(t){n=e}return n},K=(Date.now,function(t,e,n){var r,i,o=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1,u=this;return{throttled:function(){s?r=arguments:(o?t.apply(u,arguments):r=arguments,s=!0,i=d((function(){a&&r&&t.apply(u,r),s=!1,r=void 0}),e))},cancel:function(){p(i),s=!1,r=void 0}}}),Z=function(t){if("function"==typeof btoa)return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode("0x"+e)})));var e,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,u=0,c="",l=[];if(!(t=String(t)))return t;t=function(t){var e,n,r,i,o="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=t.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>e&&(o+=t.substring(e,n)),o+=s,e=n=i+1)}return n>e&&(o+=t.substring(e,t.length)),o}(t);do{e=(o=t.charCodeAt(s++)<<16|t.charCodeAt(s++)<<8|t.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[u++]=a.charAt(e)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<t.length);switch(c=l.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c};function q(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,q)}function Y(t){var e="";return t&&(e=t.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),e||"/"}var Q=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!==_(t))return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];this._values.QueryString=e},e.prototype.getParse=function(){return this._values},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);if(!e)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==e[this._fields[n]]&&(this._values[n]=e[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new e(t)};var X=function(t){var e={},n=t.split("?")[1]||"";return n&&(e=J("?"+n)),e},J=function(t){for(var e=function(t){return G(t)},n={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(-1!==o){var a=r[i].substring(0,o),s=r[i].substring(o+1);a=e(a),s=e(s),n[a]=s}}return n};function tt(t){return null===t?"null":Array.isArray(t)?"array":_(t)}function et(t,e,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var t=new WeakSet;return{hasAlreadyBeenSeen:function(e){var n=t.has(e);return n||t.add(e),n}}}var e=[];return{hasAlreadyBeenSeen:function(t){var n=e.indexOf(t)>=0;return n||e.push(t),n}}}()),void 0===e)return t;if("object"!==_(e)||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var r=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,r)}if(!n.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var i=Array.isArray(t)?t:[],o=0;o<e.length;++o)i[o]=et(i[o],e[o],n);return i}i="object"===tt(t)?t:{};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=et(i[a],e[a],n));return i}}function nt(t){return et(void 0,t)}function rt(t){return t?String(t).substr(0,1)+String(t).substr(1).replace(/\d*/g,"x"):t}function it(){}var ot,at,st,ut,ct=1e3,lt=60*ct,ft=60*lt,dt=365*(24*ft);function pt(t){return 0!==t&&100*Math.random()<=t}function ht(t,e){return+t.toFixed(e)}function vt(t){return"number"!=typeof t?t:ht(1e6*t,0)}function _t(t){return j(t)?ht(1e6*t,0):t}function mt(t){return t-It()}function gt(t){return Math.round(It()+t)}function yt(){return performance.now()}function Et(){return{relative:yt(),timeStamp:bt()}}function bt(){return wt()}function wt(){return(new Date).getTime()}function St(t,e){return e-t}function Tt(){return{relative:0,timeStamp:It()}}function Ct(t){return{relative:t,timeStamp:Ot(t)}}function Ot(t){var e=wt()-performance.now();return e>It()?Math.round(e+t):gt(t)}function It(){return void 0===ot&&(ot=performance.timing.navigationStart),ot}function At(t,e){for(var n=e.split(".");n.length;){var r=n.shift();if(!(t&&r in t&&b.call(t,r)))return;t=t[r]}return t}function Rt(t,e){var n=t.charCodeAt(e-1);return n>=55296&&n<=56319?t.slice(0,e+1):t.slice(0,e)}function xt(t){var e=tt(t);return"string"===e||"function"===e||t instanceof RegExp}function kt(t,e){return-1!==t.indexOf(e)}function Nt(t,e){for(var n=0;n<t.length;n+=1){var r=t[n];if(e(r,n,t))return r}}function Lt(t){return j(t)&&t>=0&&t<=100}function Dt(t){if(t.origin&&"null"!==t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}function Mt(t){var e={};return T(t,(function(t,n){var r;e[(r=n,r.replace(/[A-Z]/g,(function(t,e){return(0!==e?"_":"")+t.toLowerCase()})).replace(/-/g,"_"))]=Pt(t)})),e}function Pt(t){return R(t)?M(t,(function(t){return Pt(t)})):"object"===_(t)&&null!==t?Mt(t):t}function Ut(t,e){return null!=t?t:e}function Bt(t,e){return t.slice(0,e.length)===e}function Ft(t){var e=t.substr(1);return!!e&&!!document.getElementById(e)}function Vt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var Ht=function(){this.buffer=[]};Ht.prototype={add:function(t){this.buffer.push(t)>500&&this.buffer.splice(0,1)},drain:function(){T(this.buffer,(function(t){t()})),this.buffer.length=0}};var zt=Ht;function Wt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $t(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var jt=1/0,Gt=lt;function Kt(t,e){this.expireDelay=t,this.entries=[],this.maxEntries=e;var n=this;this.clearOldContextsInterval=h((function(){n.clearOldContexts()}),Gt)}Kt.prototype.add=function(t,e){var n=this,r={context:t,startTime:e,endTime:jt,remove:function(){var t=n.entries.indexOf(r);t>=0&&n.entries.splice(t,1)},close:function(t){r.endTime=t}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},Kt.prototype.find=function(t){void 0===t&&(t=jt);var e,n=Wt(this.entries);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.startTime<=t){if(t<=r.endTime)return r.context;break}}}catch(t){n.e(t)}finally{n.f()}},Kt.prototype.closeActive=function(t){var e=this.entries[0];e&&e.endTime===jt&&e.close(t)},Kt.prototype.findAll=function(t,e){void 0===e&&(e=0),void 0===t&&(t=jt);var n=t+e,r=D(this.entries,(function(e){return e.startTime<=n&&t<=e.endTime}));return M(r,(function(t){return t.context}))},Kt.prototype.reset=function(){this.entries=[]},Kt.prototype.stop=function(){v(this.clearOldContextsInterval)},Kt.prototype.clearOldContexts=function(){for(var t=yt()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<t;)this.entries.pop()};var Zt={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},qt={getMatchMap:function(t){return{Trident:t.indexOf("Trident")>-1||t.indexOf("NET CLR")>-1,Presto:t.indexOf("Presto")>-1,WebKit:t.indexOf("AppleWebKit")>-1,Gecko:t.indexOf("Gecko/")>-1,Safari:t.indexOf("Safari")>-1,Chrome:t.indexOf("Chrome")>-1||t.indexOf("CriOS")>-1,IE:t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1,Edge:t.indexOf("Edge")>-1||t.indexOf("Edg")>-1,Firefox:t.indexOf("Firefox")>-1||t.indexOf("FxiOS")>-1,"Firefox Focus":t.indexOf("Focus")>-1,Chromium:t.indexOf("Chromium")>-1,Opera:t.indexOf("Opera")>-1||t.indexOf("OPR")>-1,Vivaldi:t.indexOf("Vivaldi")>-1,Yandex:t.indexOf("YaBrowser")>-1,Arora:t.indexOf("Arora")>-1,Lunascape:t.indexOf("Lunascape")>-1,QupZilla:t.indexOf("QupZilla")>-1,"Coc Coc":t.indexOf("coc_coc_browser")>-1,Kindle:t.indexOf("Kindle")>-1||t.indexOf("Silk/")>-1,Iceweasel:t.indexOf("Iceweasel")>-1,Konqueror:t.indexOf("Konqueror")>-1,Iceape:t.indexOf("Iceape")>-1,SeaMonkey:t.indexOf("SeaMonkey")>-1,Epiphany:t.indexOf("Epiphany")>-1,360:t.indexOf("QihooBrowser")>-1||t.indexOf("QHBrowser")>-1,"360EE":t.indexOf("360EE")>-1,"360SE":t.indexOf("360SE")>-1,UC:t.indexOf("UC")>-1||t.indexOf(" UBrowser")>-1,QQBrowser:t.indexOf("QQBrowser")>-1,QQ:t.indexOf("QQ/")>-1,Baidu:t.indexOf("Baidu")>-1||t.indexOf("BIDUBrowser")>-1,Maxthon:t.indexOf("Maxthon")>-1,Sogou:t.indexOf("MetaSr")>-1||t.indexOf("Sogou")>-1,LBBROWSER:t.indexOf("LBBROWSER")>-1,"2345Explorer":t.indexOf("2345Explorer")>-1,TheWorld:t.indexOf("TheWorld")>-1,XiaoMi:t.indexOf("MiuiBrowser")>-1,Quark:t.indexOf("Quark")>-1,Qiyu:t.indexOf("Qiyu")>-1,Wechat:t.indexOf("MicroMessenger")>-1,Taobao:t.indexOf("AliApp(TB")>-1,Alipay:t.indexOf("AliApp(AP")>-1,Weibo:t.indexOf("Weibo")>-1,Douban:t.indexOf("com.douban.frodo")>-1,Suning:t.indexOf("SNEBUY-APP")>-1,iQiYi:t.indexOf("IqiyiApp")>-1,Windows:t.indexOf("Windows")>-1,Linux:t.indexOf("Linux")>-1||t.indexOf("X11")>-1,"Mac OS":t.indexOf("Macintosh")>-1,Android:t.indexOf("Android")>-1||t.indexOf("Adr")>-1,Ubuntu:t.indexOf("Ubuntu")>-1,FreeBSD:t.indexOf("FreeBSD")>-1,Debian:t.indexOf("Debian")>-1,"Windows Phone":t.indexOf("IEMobile")>-1||t.indexOf("Windows Phone")>-1,BlackBerry:t.indexOf("BlackBerry")>-1||t.indexOf("RIM")>-1,MeeGo:t.indexOf("MeeGo")>-1,Symbian:t.indexOf("Symbian")>-1,iOS:t.indexOf("like Mac OS X")>-1,"Chrome OS":t.indexOf("CrOS")>-1,WebOS:t.indexOf("hpwOS")>-1,Mobile:t.indexOf("Mobi")>-1||t.indexOf("iPh")>-1||t.indexOf("480")>-1,Tablet:t.indexOf("Tablet")>-1||t.indexOf("Nexus 7")>-1,iPad:t.indexOf("iPad")>-1}},matchInfoMap:function(t){var e=Zt.navigator.userAgent||"",n=qt.getMatchMap(e);for(var r in Zt.infoMap)for(var i=0;i<Zt.infoMap[r].length;i++){var o=Zt.infoMap[r][i];n[o]&&(t[r]=o)}},getOS:function(){return qt.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var t=this,e=Zt.navigator.userAgent||"";t.osVersion="",t.osMajor="";var n={Windows:function(){var t=e.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[t]||t},Android:function(){return e.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return e.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return e.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return e.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return e.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return e.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[t.os]&&(t.osVersion=n[t.os](),t.osVersion===e&&(t.osVersion="")),t.osVersion&&(t.osMajor=t.osVersion.split(".").length&&t.osVersion.split(".")[0]),{version:t.osVersion,osMajor:t.osMajor}},getOrientationStatu:function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"},getDeviceType:function(){var t=this;return t.device="PC",qt.matchInfoMap(t),t.device},getNetwork:function(){var t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,e="unknown",n=t?t.type||t.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":e="cellular";break;case"none":e="none";break;case"ethernet":case"wifi":case"wimax":case"4g":e="wifi";break;case"other":case"unknown":e="unknown"}return e},getLanguage:function(){var t;return this.language=((t=(Zt.navigator.browserLanguage||Zt.navigator.language||"").split("-"))[1]&&(t[1]=t[1].toUpperCase()),t.join("_")),this.language},getBrowserInfo:function(){var t=this;qt.matchInfoMap(t);var e=Zt.navigator.userAgent||"",n=function(t,e){var n=Zt.navigator.mimeTypes;for(var r in n)if(n[r][t]==e)return!0;return!1},r=qt.getMatchMap(e),i=!1;if("undefined"!=typeof window&&window.chrome){var o=e.replace(/^.*Chrome\/([\d]+).*$/,"$1");o>36&&window.showModalDialog?i=!0:o>45&&(i=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(e.indexOf("iPad")>-1)),i&&(n("type","application/gameplugin")||Zt.navigator&&void 0===Zt.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var a={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge?\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return e.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return e.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return e.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return e.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return e.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return e.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return e.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return e.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return e.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return e.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var t="";e.indexOf("LieBaoFast")>-1&&(t=e.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=e.replace(/^.*Chrome\/([\d]+).*$/,"$1");return t||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return e.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return t.browserVersion="",t.browserMajor="",a[t.browser]&&(t.browserVersion=a[t.browser](),t.browserVersion==e&&(t.browserVersion="")),"Chrome"==t.browser&&e.match(/\S+Browser/)&&(t.browser=e.match(/\S+Browser/)[0],t.version=e.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==t.browser&&(t.version>"75"?t.engine="Blink":t.engine="EdgeHTML"),("Chrome"==t.browser&&parseInt(t.browserVersion)>27||r.Chrome&&"WebKit"==t.engine&&parseInt(t.browserVersion)>27||"Opera"==t.browser&&parseInt(t.version)>12||"Yandex"==t.browser)&&(t.engine="Blink"),t.browserVersion&&(t.browserMajor=t.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:t.browser,browserVersion:t.browserVersion,engine:t.engine,browserMajor:t.browserMajor}},getGeoPostion:function(t){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){t(e)}),(function(t){n.warn(t)}))}},Yt={};"undefined"!=typeof window&&(Yt={os:qt.getOS(),osVersion:qt.getOSVersion().version,osVersionMajor:qt.getOSVersion().osMajor,browser:qt.getBrowserInfo().browser,browserVersion:qt.getBrowserInfo().browserVersion,browserVersionMajor:qt.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:qt.getNetwork(),divice:qt.getDeviceType()});var Qt=Yt,Xt={BEFORE_UNLOAD:"beforeunload",CLICK:"click",DBL_CLICK:"dblclick",KEY_DOWN:"keydown",LOAD:"load",POP_STATE:"popstate",SCROLL:"scroll",TOUCH_START:"touchstart",TOUCH_END:"touchend",TOUCH_MOVE:"touchmove",VISIBILITY_CHANGE:"visibilitychange",PAGE_SHOW:"pageshow",FREEZE:"freeze",RESUME:"resume",DOM_CONTENT_LOADED:"DOMContentLoaded",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",HASH_CHANGE:"hashchange",PAGE_HIDE:"pagehide",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",FOCUS:"focus",BLUR:"blur",CONTEXT_MENU:"contextmenu",RESIZE:"resize",CHANGE:"change",INPUT:"input",PLAY:"play",PAUSE:"pause",SECURITY_POLICY_VIOLATION:"securitypolicyviolation",SELECTION_CHANGE:"selectionchange",STORAGE:"storage"},Jt={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},te={CLICK:"click",CUSTOM:"custom"},ee={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},ne={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},re={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change"},ie={FETCH:Jt.FETCH,XHR:Jt.XHR},oe={DDTRACE:"ddtrace",ZIPKIN_MULTI_HEADER:"zipkin",ZIPKIN_SINGLE_HEADER:"zipkin_single_header",W3C_TRACEPARENT:"w3c_traceparent",W3C_TRACEPARENT_64:"w3c_traceparent_64bit",SKYWALKING_V3:"skywalking_v3",JAEGER:"jaeger"},ae={HANDLED:"handled",UNHANDLED:"unhandled"},se={UNCAUGHT:"Uncaught",PROVIDED:"Provided"};function ue(t,e,n){var r=t[e],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return t[e]=o,{stop:function(){t[e]===o?t[e]=r:i=r}}}function ce(t,e,n){return ue(t,e,(function(t){return function(){var e;return n&&n.before&&s(n.before,this,arguments),"function"==typeof t&&(e=t.apply(this,arguments)),n&&n.after&&s(n.after,this,arguments),e}}))}function le(t,e,n){var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:it};var i=function(t,e){d((function(){n(t,e)}),0)},o=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:o}),{stop:function(){Object.getOwnPropertyDescriptor(t,e)&&Object.getOwnPropertyDescriptor(t,e).set===o?Object.defineProperty(t,e,r):i=it}}}function fe(t){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(t)}function de(t,e,n){if("object"!==fe(t)||null===t)return JSON.stringify(t);var r=pe(Object.prototype),i=pe(Array.prototype),o=pe(Object.getPrototypeOf(t)),a=pe(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),i(),o(),a()}}function pe(t){var e=t,n=e.toJSON;return n?(delete e.toJSON,function(){e.toJSON=n}):it}function he(t){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(t)}var ve="?";function _e(t){var e=[],n=Ce(t,"stack");return n&&T(n.split("\n"),(function(t){var n=function(t){var e=ye.exec(t);if(!e)return;var n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),i=Ee.exec(e[2]);r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||ve,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){var e=be.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:ve,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){var e=we.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||ve,line:+e[3],url:e[2]}}(t)||function(t){var e=Se.exec(t);if(!e)return;var n=e[3]&&e[3].indexOf(" > eval")>-1,r=Te.exec(e[3]);n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0);return{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||ve,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=ve),e.push(n))})),{message:Ce(t,"message"),name:Ce(t,"name"),stack:e}}var me="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",ge="(?::(\\d+))",ye=new RegExp("^\\s*at (.*?) ?\\("+me+ge+"?"+ge+"?\\)?\\s*$","i"),Ee=new RegExp("\\((\\S*)"+ge+ge+"\\)");var be=new RegExp("^\\s*at ?"+me+ge+"?"+ge+"??\\s*$","i");var we=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Se=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Te=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Ce(t,e){if("object"===he(t)&&t&&e in t){var n=t[e];return"string"==typeof n?n:void 0}}var Oe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Ie(t){var e=function(t){return ce(window,"onerror",{before:function(e,n,r,i,o){var a;if(o instanceof Error)a=_e(o);else{var s={url:n,column:i,line:r},u=function(t){var e,n;if("[object String]"==={}.toString.call(t)){var r=Oe.exec(t);r&&(e=r[1],n=r[2])}return{name:e,message:n}}(e);a={name:u.name,message:u.message,stack:[s]}}t(a,Ut(o,e))}})}(t),n=function(t){return ce(window,"onunhandledrejection",{before:function(e){var n=e.reason||"Empty reason",r=_e(n);t(r,n)}})}(t);return{stop:function(){e.stop(),n.stop()}}}var Ae="No stack, consider using an instance of Error",Re={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function xe(t){var e=t.stackTrace,n=t.originalError,r=t.handlingStack,i=t.startClocks,o=t.nonErrorPrefix,a=t.source,s=t.handling,u=n instanceof Error,c=function(t,e,n,r){return t&&t.message&&t&&t.name?t.message:e?"Empty message":n+" "+de(sanitize(r))}(e,u,o,n),l=function(t,e){if(void 0===e)return!1;if(t)return!0;return e.stack.length>0&&(e.stack.length>1||void 0!==e.stack[0].url)}(u,e)?Ne(e):Ae,f=u?function(t,e){var n=t,r=[];for(;n&&n.cause instanceof Error&&r.length<10;){var i=_e(n.cause);r.push({message:n.cause.message,source:e,type:i&&i.name,stack:i&&Ne(i)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:i,source:a,handling:s,originalError:n,message:c,stack:l,handlingStack:r,type:e&&e.name,causes:f}}function ke(){var t,e=new Error;if(!e.stack)try{throw e}catch(t){}return s((function(){var n=_e(e);n.stack=n.stack.slice(2),t=Ne(n)})),t}function Ne(t){var e=Le(t);return T(t.stack,(function(t){var n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?"("+t.args.join(", ")+")":"",i=t.line?":"+t.line:"",o=t.line&&t.column?":"+t.column:"";e+="\n at "+n+r+" @ "+t.url+i+o})),e}function Le(t){return(t.name||"Error")+": "+t.message}function De(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Me(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Me(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Pe=1024,Ue=1024*Pe,Be=/[^\u0000-\u007F]/;function Fe(t){return Be.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}var Ve=function(t){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=t};Ve.prototype={subscribe:function(t){!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t);var e=this;return{unsubscribe:function(){e.observers=D(e.observers,(function(e){return t!==e})),!e.observers.length&&e.onLastUnsubscribe&&e.onLastUnsubscribe()}}},notify:function(t){T(this.observers,(function(e){e(t)}))}};var He=Ve;function ze(){var t=[].slice.call(arguments),e=new He((function(){var n=M(t,(function(t){return t.subscribe((function(t){return e.notify(t)}))}));return function(){return T(n,(function(t){return t.unsubscribe()}))}}));return e}var We={};function $e(t){var n=M(t,(function(t){return We[t]||(We[t]=function(t){var n=new He((function(){var r=console[t];return console[t]=function(){var i=[].slice.call(arguments);r.apply(console,arguments);var o=ke();s((function(){n.notify(function(t,n,r){var i,o=M(t,(function(t){return function(t){if("string"==typeof t)return t;if(t instanceof Error)return Le(_e(t));return de(t,void 0,2)}(t)})).join(" ");if(n===e.error){var a=Nt(t,(function(t){return t instanceof Error}));i=a?Ne(_e(a)):void 0,o="console error: "+o}return{api:n,message:o,stack:i,handlingStack:r}}(i,t,o))}))},function(){console[t]=r}}));return n}(t)),We[t]}));return ze.apply(this,n)}function je(t,e,n,r){return Ge(t,[e],n,r)}function Ge(t,e,n,i){var o=a(i&&i.once?function(t){u(),n(t)}:n);i=i&&i.passive?{capture:i.capture,passive:i.passive}:i&&i.capture;var s=r(t,"addEventListener");T(e,(function(e){s.call(t,e,o,i)}));var u=function(){var n=r(t,"removeEventListener");T(e,(function(e){n.call(t,e,o,i)}))};return{stop:u}}var Ke={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Ze(t,e){var n,r=[];kt(e,Ke.cspViolation)&&r.push(n=new He((function(){var t=function(t){n.notify(function(t){var e=Ke.cspViolation,n="'"+t.blockedURI+"' blocked by '"+t.effectiveDirective+"' directive";return{type:Ke.cspViolation,subtype:t.effectiveDirective,message:e+": "+n,stack:qe(t.effectiveDirective,n+' of the policy "'+Rt(t.originalPolicy,100)+'"',t.sourceFile,t.lineNumber,t.columnNumber)}}(t))};return je(document,Xt.SECURITY_POLICY_VIOLATION,t).stop})));var i=D(e,(function(t){return t!==Ke.cspViolation}));return i.length&&r.push(function(t){var e=new He((function(){if(window.ReportingObserver){var n=a((function(t){T(t,(function(t){e.notify(function(t){var e=t.body,n=t.type;return{type:n,subtype:e.id,message:n+": "+e.message,stack:qe(e.id,e.message,e.sourceFile,e.lineNumber,e.columnNumber)}}(t))}))})),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return e}(i)),ze.apply(this,r)}function qe(t,e,n,r,i){return n&&Ne({name:t,message:e,stack:[{func:"?",url:n,line:r,column:i}]})}function Ye(t){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(t)}var Qe=220*Pe,Xe="$",Je=3;function tn(t,e){void 0===e&&(e=Qe);var n=pe(Object.prototype),r=pe(Array.prototype),i=[],o=new WeakMap,a=en(t,Xe,void 0,i,o),s=JSON.stringify(a)&&JSON.stringify(a).length||0;if(!(s>e)){for(;i.length>0&&s<e;){var u=i.shift(),c=0;if(Array.isArray(u.source))for(var l=0;l<u.source.length;l++){if(s+=void 0!==(f=en(u.source[l],u.path,l,i,o))?JSON.stringify(f).length:4,s+=c,c=1,s>e){nn(e,"truncated",t);break}u.target[l]=f}else for(var l in u.source)if(Object.prototype.hasOwnProperty.call(u.source,l)){var f;if(void 0!==(f=en(u.source[l],u.path,l,i,o))&&(s+=JSON.stringify(f).length+c+l.length+Je,c=1),s>e){nn(e,"truncated",t);break}u.target[l]=f}}return n(),r(),a}nn(e,"discarded",t)}function en(t,e,n,r,i){var o=function(t){var e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!o||"object"!==Ye(o))return function(t){if("bigint"==typeof t)return"[BigInt] "+t.toString();if("function"==typeof t)return"[Function] "+t.name||0;if("symbol"===Ye(t))return"[Symbol] "+t.description||0;return t}(o);var a=function(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(e&&e[1])return"["+e[1]+"]"}catch(t){}return"[Unserializable]"}(o);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=t;if(i.has(s))return"[Reference seen at "+i.get(s)+"]";var u=void 0!==n?e+"."+n:e,c=Array.isArray(o)?[]:{};return i.set(s,u),r.push({source:o,target:c,path:u}),c}function nn(t,e,r){n.warn("The data provided has been "+e+" as it is over the limit of "+t+" characters:",r)}var rn=function(){this._events=[],this.pendingEvents=[]};rn.prototype={emit:function(t){var e=[].slice.call(arguments,1);T(this._events,(function(n){if(n.type!==t)return!1;n.callback.apply(n.context,e)}))},on:function(t,e,n){"function"==typeof e&&this._events.push({type:t,callback:e,context:n||this})}};new rn;var on,an={PERFORMANCE_ENTRIES_COLLECTED:"PERFORMANCE_ENTRIES_COLLECTED",AUTO_ACTION_COMPLETED:"AUTO_ACTION_COMPLETED",VIEW_CREATED:"VIEW_CREATED",VIEW_UPDATED:"VIEW_UPDATED",VIEW_ENDED:"VIEW_ENDED",SESSION_RENEWED:"SESSION_RENEWED",SESSION_EXPIRED:"SESSION_EXPIRED",PAGE_EXITED:"PAGE_EXITED",REQUEST_STARTED:"REQUEST_STARTED",REQUEST_COMPLETED:"REQUEST_COMPLETED",RAW_RUM_EVENT_COLLECTED:"RAW_RUM_EVENT_COLLECTED",RUM_EVENT_COLLECTED:"RUM_EVENT_COLLECTED",RAW_ERROR_COLLECTED:"RAW_ERROR_COLLECTED",RAW_LOG_COLLECTED:"RAW_LOG_COLLECTED",LOG_COLLECTED:"LOG_COLLECTED"};function sn(){this.callbacks={}}function un(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return cn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function cn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ln(t,e,n){var r=nt(t),i=n(r);return T(z(e),(function(e){var n=e[0],i=e[1],o=function(t,e){var n,r=t,i=un(e.split("."));try{for(i.s();!(n=i.n()).done;){var o=n.value;if(!pn(r,o))return;r=r[o]}}catch(t){i.e(t)}finally{i.f()}return r}(r,n),a=tt(o);a===i?fn(t,n,tn(o)):"object"!==i||"undefined"!==a&&"null"!==a||fn(t,n,{})})),i}function fn(t,e,n){for(var r=t,i=e.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!dn(r))return;o!==i.length-1?r=r[a]:r[a]=n}}function dn(t){return"object"===tt(t)}function pn(t,e){return dn(t)&&Object.prototype.hasOwnProperty.call(t,e)}function hn(t,e,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&d((function(){r=0}),lt),(r+=1)<=e||i)return i=!1,!1;if(r===e+1){i=!0;try{n({message:"Reached max number of "+t+"s by minute: "+e,source:Re.AGENT,startClocks:Et()})}finally{i=!1}}return!0}}}function vn(t){return mn(t,Dt(window.location)).href}function _n(t){return Dt(mn(t))}function mn(t,e){if(function(){if(void 0!==on)return on;try{var t=new URL("http://test/path");return on="http://test/path"===t.href}catch(t){on=!1}return on}())return void 0!==e?new URL(t,e):new URL(t);if(void 0===e&&!/:/.test(t))throw new Error("Invalid URL: "+t);var n=document,r=n.createElement("a");if(void 0!==e){var i=(n=document.implementation.createHTMLDocument("")).createElement("base");i.href=e,n.head.appendChild(i),n.body.appendChild(r)}return r.href=t,r}sn.prototype={notify:function(t,e){var n=this.callbacks[t];n&&T(n,(function(t){t(e)}))},subscribe:function(t,e){this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e);var n=this;return{unsubscribe:function(){n.callbacks[t]=D(n.callbacks[t],(function(t){return t!==e}))}}}};var gn=navigator.userAgent.toLowerCase(),yn=function(){return/iphone os/.test(gn)};var En,bn=ct;function wn(t,e,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"";document.cookie=t+"="+e+";"+o+";path=/;samesite="+a+s+u}function Sn(t){return function(t,e){var n=t.match("(?:^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,t)}var Tn=/^\s+|\s+$/g,Cn={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function On(t,e){var n=Cn[e];return n?(0===t.indexOf("/")&&(t=location.origin+In(t)),t.lastIndexOf("/")===t.length-1?In(t)+"v1/write"+n:In(t)+"/v1/write"+n):""}function In(t){return t.replace(Tn,"")}var An,Rn,xn={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function kn(t){if(void 0===t.sampleRate||Lt(t.sampleRate))if(void 0===t.sessionSampleRate||Lt(t.sessionSampleRate)){if(void 0===t.telemetrySampleRate||Lt(t.telemetrySampleRate)){var e=t.sessionSampleRate||t.sampleRate;return C({beforeSend:t.beforeSend&&c(t.beforeSend,"beforeSend threw an error:"),cookieOptions:Nn(t),sessionSampleRate:Ut(e,100),service:t.service,version:t.version,env:t.env,telemetrySampleRate:Ut(t.telemetrySampleRate,100),telemetryEnabled:Ut(t.telemetryEnabled,!1),silentMultipleInit:!!t.silentMultipleInit,batchBytesLimit:16*Pe,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ct,batchMessagesLimit:50,messageBytesLimit:256*Pe,resourceUrlLimit:5*Pe,storeContextsToLocal:!!t.storeContextsToLocal},function(t){var e=function(t){return!1};"isIntakeUrl"in t&&x(t.isIntakeUrl)&&$(t.isIntakeUrl())&&(e=t.isIntakeUrl);var n=function(t){return!1};return"isServerError"in t&&x(t.isServerError)&&$(t.isServerError())&&(n=t.isServerError),{rumEndpoint:On(t.datakitUrl||t.datakitOrigin,"rum"),logsEndpoint:On(t.datakitOrigin,"log"),sessionReplayEndPoint:On(t.datakitOrigin,"sessionReplay"),isIntakeUrl:e,isServerError:n}}(t))}n.error("Telemetry Sample Rate should be a number between 0 and 100")}else n.error("Sample Rate should be a number between 0 and 100");else n.error("Sample Rate should be a number between 0 and 100")}function Nn(t){var e={};return e.secure=function(t){return!!t.useSecureSessionCookie||!!t.useCrossSiteSessionCookie}(t),e.crossSite=!!t.useCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=function(){if(void 0===En){for(var t="dd_site_test_".concat(q()),e=window.location.hostname.split("."),n=e.pop();e.length&&!Sn(t);)n=e.pop()+"."+n,wn(t,"test",ct,{domain:n});En=n}return En}()),e}function Ln(){var t;return An||(t=new He((function(){if(window.fetch)return ue(window,"fetch",(function(e){return function(n,r){var i,o=s(Dn,null,[t,n,r]);return o?(i=e.call(this,o.input,o.init),s(Mn,null,[t,i,o])):i=e.call(this,n,r),i}})).stop})),An=t),An}function Dn(t,e,n){var r=n&&n.method||e instanceof Request&&e.method||"GET",i=e instanceof Request?e.url:vn(String(e)),o={state:"start",init:n,input:e,method:r,startClocks:Et(),url:i};return t.notify(o),o}function Mn(t,e,n){var r=function(e){var r=n;if(r.state="resolve","stack"in e||e instanceof Error)r.status=0,r.isAborted=e instanceof DOMException&&e.code===DOMException.ABORT_ERR,r.error=e;else if("status"in e){r.response=e;try{r.responseType=e.constructor===Response&&e.type||""}catch(t){r.responseType=""}r.status=e.status,r.isAborted=!1}t.notify(r)};e.then(a(r),a(r))}var Pn={},Un="_DATAFLUX_REQUEST_UUID";function Bn(){var t;return Rn||(t=new He((function(){var e=ce(XMLHttpRequest.prototype,"open",{before:Fn}),n=ce(XMLHttpRequest.prototype,"send",{before:function(){Vn.call(this,t)}}),r=ce(XMLHttpRequest.prototype,"abort",{before:zn});return function(){e.stop(),n.stop(),r.stop()}})),Rn=t),Rn}function Fn(t,e){var n=this[Un]||q();this[Un]=n,Pn[n]={state:"open",method:t,url:vn(String(e))}}function Vn(t){var e=Pn[this[Un]];if(e){var n=e;n.state="start",n.startTime=yt(),n.startClocks=Et(),n.isAborted=!1,n.xhr=this;var r=!1,i=ce(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&o.call(this)}}).stop,o=function(){if(a(),i(),!r){r=!0;var o=e;o.state="complete",o.duration=St(n.startClocks.timeStamp,bt()),o.status=this.status,t.notify(O(o)),Hn.call(this)}},a=je(this,"loadend",o).stop;t.notify(n)}}function Hn(){delete Pn[this[Un]],delete this[Un]}function zn(){var t=Pn[this[Un]];t&&(t.isAborted=!0)}var Wn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function $n(t){return kt(N(Wn),t)}function jn(t){return t.nodeType===Node.ELEMENT_NODE}function Gn(t){return jn(t)&&Boolean(t.shadowRoot)}function Kn(t){var e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&jn(e.host)}function Zn(t){return Kn(t)?t.host:t.parentNode}function qn(t,e){if(document.readyState===t||"complete"===document.readyState)e();else{var n="complete"===t?Xt.LOAD:Xt.DOM_CONTENT_LOADED;je(window,n,e,{once:!0})}}function Yn(){var t,e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Qn(){var t,e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}var Xn,Jn={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",session_has_replay:"session.has_replay",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.path",view_path_group:"view.path_group",view_url_query:"view.url_query"},tr={action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display"},er={view:{type:ne.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent",first_byte:"view.first_byte",page_states:"_gc.page_states",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:ne.RESOURCE,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_encode_size:"resource.encode_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:ne.ERROR,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"]}},long_task:{type:ne.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration"}},action:{type:ne.ACTION,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"]}},browser_log:{type:ne.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}},nr=4*ft,rr=15*lt,ir=/^([a-z]+)=([a-z0-9-]+)$/,or="&",ar="_dataflux_s",sr=10,ur=100,cr=[];function lr(t,e){if(void 0===e&&(e=0),Xn||(Xn=t),t===Xn)if(e>=ur)pr();else{var n,r=vr();if(fr()){if(r.lock)return void dr(t,e);if(n=q(),r.lock=n,hr(r,t.options),(r=vr()).lock!==n)return void dr(t,e)}var i=t.process(r);if(fr()&&(r=vr()).lock!==n)dr(t,e);else{if(i&&function(t,e){if(_r(t))return void function(t){wn(ar,"",0,t)}(e);t.expire=String(wt()+rr),hr(t,e)}(i,t.options),fr()&&(!i||!_r(i))){if((r=vr()).lock!==n)return void dr(t,e);delete r.lock,hr(r,t.options),i=r}t.after&&t.after(i||r),pr()}}else cr.push(t)}function fr(){return void 0===st&&(st=!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)),st}function dr(t,e){d((function(){lr(t,e+1)}),sr)}function pr(){Xn=void 0;var t=cr.shift();t&&lr(t)}function hr(t,e){wn(ar,function(t){return M(z(t),(function(t){return t[0]+"="+t[1]})).join(or)}(t),rr,e)}function vr(){var t=Sn(ar),e={};return function(t){return void 0!==t&&(-1!==t.indexOf(or)||ir.test(t))}(t)&&T(t.split(or),(function(t){var n=ir.exec(t);if(null!==n){var r=n[1],i=n[2];e[r]=i}})),e}function _r(t){return H(t)}function mr(t,e,n){var r=new He,i=new He,o=h((function(){lr({options:t,process:function(t){return c(t)?void 0:{}},after:s})}),bn),a=function(){var t=vr();if(c(t))return t;return{}}();function s(t){return c(t)||(t={}),u()&&(!function(t){return a.id!==t.id||a[e]!==t[e]}(t)?a=t:(a={},i.notify())),t}function u(){return void 0!==a[e]}function c(t){return(void 0===t.created||wt()-Number(t.created)<nr)&&(void 0===t.expire||wt()<Number(t.expire))}return{expandOrRenewSession:K((function(){var i;lr({options:t,process:function(t){var r=s(t);return i=function(t){var r=n(t[e]),i=r.trackingType,o=r.isTracked;t[e]=i,o&&!t.id&&(t.id=q(),t.created=String(wt()));return o}(r),r},after:function(t){i&&!u()&&function(t){a=t,r.notify()}(t),a=t}})}),bn).throttled,expandSession:function(){lr({options:t,process:function(t){return u()?s(t):void 0}})},getSession:function(){return a},renewObservable:r,expireObservable:i,expire:function(){deleteSessionCookie(t),s({})},stop:function(){v(o)}}}var gr=lt,yr=nr,Er=[],br=function(t,e,n){var r=mr(t,e,n);Er.push((function(){return r.stop()}));var i,o,a=new Kt(yr);function s(){return{id:r.getSession().id,trackingType:r.getSession()[e]}}return Er.push((function(){return a.stop()})),r.renewObservable.subscribe((function(){a.add(s(),yt())})),r.expireObservable.subscribe((function(){a.closeActive(yt())})),r.expandOrRenewSession(),a.add(s(),Tt().relative),i=function(){return r.expandOrRenewSession()},o=Ge(window,[Xt.CLICK,Xt.TOUCH_START,Xt.KEY_DOWN,Xt.SCROLL],i,{capture:!0,passive:!0}),Er.push(o.stop),function(t){var e=function(){"visible"===document.visibilityState&&t()},n=je(document,Xt.VISIBILITY_CHANGE,e);Er.push(n.stop);var r=h(e,gr);Er.push((function(){v(r)}))}((function(){return r.expandSession()})),{findActiveSession:function(t){return a.find(t)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}};var wr=80*Pe,Sr=32,Tr=3*Ue,Cr=256*ct,Or=ct,Ir={UP:0,FAILURE_DETECTED:1,DOWN:2},Ar={AFTER_SUCCESS:0,AFTER_RESUME:1};function Rr(t,e,n,r,i){e.transportStatus===Ir.UP&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?kr(t,e,n,{onSuccess:function(){return Nr(Ar.AFTER_SUCCESS,e,n,r,i)},onFailure:function(){e.queuedPayloads.enqueue(t),xr(e,n,r,i)}}):e.queuedPayloads.enqueue(t)}function xr(t,e,n,r){t.transportStatus===Ir.DOWN&&d((function(){kr(t.queuedPayloads.first(),t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=Or,Nr(Ar.AFTER_RESUME,t,e,n,r)},onFailure:function(){t.currentBackoffTime=Math.min(Cr,2*t.currentBackoffTime),xr(t,e,n,r)}})}),t.currentBackoffTime)}function kr(t,e,n,r){var i=r.onSuccess,o=r.onFailure;e.bandwidthMonitor.add(t),n(t,(function(n){e.bandwidthMonitor.remove(t),!function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||t.status>=500)}(n)?(e.transportStatus=Ir.UP,i()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?Ir.FAILURE_DETECTED:Ir.DOWN,e.lastFailureStatus=n.status,o())}))}function Nr(t,e,n,r,i){t===Ar.AFTER_SUCCESS&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(i({message:"Reached max "+r+" events size queued for upload: "+Tr/Ue+"MiB",source:Re.AGENT,startClocks:Et()}),e.queueFullReported=!0);var o=e.queuedPayloads;for(e.queuedPayloads=Lr();o.size()>0;)Rr(o.dequeue(),e,n,r,i)}function Lr(){var t=[];return{bytesCount:0,enqueue:function(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:function(){return t[0]},dequeue:function(){var e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:function(){return t.length},isFull:function(){return this.bytesCount>=Tr}}}function Dr(t){return t?t+(-1===t.indexOf("?")?"?":"&")+"precision=ms":t}function Mr(t,e,n){var r={transportStatus:Ir.UP,lastFailureStatus:0,currentBackoffTime:Or,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=wr&&this.ongoingRequestCount<Sr},add:function(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove:function(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount}},queuedPayloads:Lr(),queueFullReported:!1},i=function(n,r){return function(t,e,n,r){var i=n.data,o=n.bytesCount,s=Dr(t),u=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&o<e;u?fetch(s,{method:"POST",body:i,keepalive:!0,mode:"cors"}).then(a((function(t){"function"==typeof r&&r({status:t.status,type:t.type})})),a((function(){Pr(s,i,r)}))):Pr(s,i,r)}(t,e,n,r)};return{send:function(e){Rr(e,r,i,t,n)},sendOnExit:function(n){!function(t,e,n){var r=n.data,i=n.bytesCount,o=Dr(t),a=!!navigator.sendBeacon&&i<e;if(a)try{if(navigator.sendBeacon(o,r))return}catch(t){}Pr(o,r)}(t,e,n)}}}function Pr(t,e,n){var r=new XMLHttpRequest;r.open("POST",t,!0),je(r,"loadend",(function(){"function"==typeof n&&n({status:r.status})}),{once:!0}),r.send(e)}function Ur(t){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(t)}function Br(t){if("object"===Ur(t)&&t)t=de(t);else if(!W(t))return t;return String(t).replace(/[\s=,"]/g,(function(t){return"\\"+t}))}function Fr(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function Vr(t){return"object"===Ur(t)&&t?Fr(de(t)):W(t)?Fr(t):t}var Hr="custom_keys",zr=function(t){if(!t||!t.type)return{rowStr:"",rowData:void 0};var e={tags:{},fields:{}},n=!1,r="";return T(er,(function(i,o){if(i.type===t.type){r+=o+",",e.measurement=o;var a=[],s=I({},Jn,i.tags),u=["date","type",Hr];T(s,(function(n,r){var i=At(t,n);u.push(r),(i||j(i))&&(e.tags[r]=function(t){return W(t)?t:de(t)}(i),a.push(Br(r)+"="+Br(i)))}));var c=[],l=I({},tr,i.fields);if(T(l,(function(n,r){if(R(n)&&2===n.length){var i=n[1],o=At(t,i);u.push(r),null!=o&&(e.fields[r]=o,c.push(Br(r)+"="+Vr(o)))}else if(W(n)){o=At(t,n);u.push(r),null!=o&&(e.fields[r]=o,c.push(Br(r)+"="+Vr(o)))}})),t.context&&V(t.context)&&!H(t.context)){var f=[];T(t.context,(function(t,n){u.indexOf(n)>-1||(u.push(n),null!=t&&(f.push(n),e.fields[n]=t,c.push(Br(n)+"="+Vr(t))))})),f.length&&(e.fields[Hr]=Vr(f),c.push(Br(Hr)+"="+Vr(f)))}t.type===ne.LOGGER&&T(t,(function(t,n){-1===u.indexOf(n)&&null!=t&&(e.fields[n]=t,c.push(Br(n)+"="+Vr(t)))})),a.length&&(r+=a.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+t.date,e.time=_t(t.date)}})),{rowStr:n?r:"",rowData:n?e:void 0}},Wr=function(t,e,n){this.pushOnlyBuffer=[],this.upsertBuffer={},this.request=t,this.flushController=e,this.messageBytesLimit=n;var r=this;this.flushController.flushObservable.subscribe((function(t){r.flush(t)}))};Wr.prototype.add=function(t){this.addOrUpdate(t)},Wr.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},Wr.prototype.flush=function(t){var e=this.pushOnlyBuffer.concat(N(this.upsertBuffer));if(this.pushOnlyBuffer=[],this.upsertBuffer={},e.length>0){var n={data:e.join("\n"),bytesCount:t.bytesCount,flushReason:t.reason};$n(t.reason)?this.request.sendOnExit(n):this.request.send(n)}},Wr.prototype.addOrUpdate=function(t,e){var r=this.process(t),i=r.processedMessage,o=r.messageBytesCount;o>=this.messageBytesLimit?n.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.messageBytesLimit+"KB."):(this.hasMessageFor(e)&&this.remove(e),this.push(i,o,e))},Wr.prototype.process=function(t){var e=zr(t).rowStr;return{processedMessage:e,messageBytesCount:Fe(e)}},Wr.prototype.push=function(t,e,n){var r=this.flushController.getMessagesCount()>0?1:0;this.flushController.notifyBeforeAddMessage(e+r),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.flushController.notifyAfterAddMessage()},Wr.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=Fe(e),r=this.flushController.getMessagesCount()>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},Wr.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]};var $r=Wr;function jr(t){var e=t.messagesLimit,n=t.bytesLimit,r=t.durationLimit,i=t.pageExitObservable,o=t.sessionExpireObservable,a=new He;i.subscribe((function(t){return l(t.reason)})),o.subscribe((function(){return l("session_expire")}));var s,u=0,c=0;function l(t){if(0!==c){var e=c,n=u;c=0,u=0,f(),a.notify({reason:t,messagesCount:e,bytesCount:n})}}function f(){p(s),s=void 0}return{flushObservable:a,getMessagesCount:function(){return c},notifyBeforeAddMessage:function(t){u+t>=n&&l("bytes_limit"),c+=1,u+=t,void 0===s&&(s=d((function(){l("duration_limit")}),r))},notifyAfterAddMessage:function(){c>=e?l("messages_limit"):u>=n&&l("bytes_limit")},notifyAfterRemoveMessage:function(t){u-=t,0===(c-=1)&&f()}}}function Gr(){var t=f().FTWebViewJavascriptBridge;if(t)return{send:function(e,n){t.sendEvent(JSON.stringify({name:e,data:n}))}}}function Kr(){return!!Gr()}var Zr=3*Pe,qr="user",Yr="global context";var Qr=200;function Xr(t,e){void 0===e&&(e=Fe);var r,i={},o=!1,a=new He,s=K((function(i){r=e(de(i)),o||(o=function(t,e){return t>Zr&&(n.warn("The "+e+"data is over "+Zr/Pe+" KiB. On low connectivity, the SDK has the potential to exhaust the user's upload bandwidth."),!0)}(r,t))}),Qr).throttled,u={getBytesCount:function(){return r},get:function(){return i},add:function(t,e){i[t]=e,s(i),a.notify()},remove:function(t){delete i[t],s(i),a.notify()},set:function(t){s(i=t),a.notify()},getContext:function(){return nt(i)},setContext:function(t){"object"===tt(t)?(i=tn(t),s(i)):u.clearContext(),a.notify()},setContextProperty:function(t,e){i[t]=nt(e),s(i),a.notify()},removeContextProperty:function(t){delete i[t],s(i),a.notify()},clearContext:function(){i={},r=0,a.notify()},changeObservable:a};return u}var Jr="_gc_s",ti=[];function ei(t,e,n){void 0===n&&(n=Fe);var r=function(t,e){return Jr+"_"+t+"_"+e}(t,e),i=Xr(e,n);function o(){var t=localStorage.getItem(r),e=null!==t?JSON.parse(t):{};i.setContext(e)}return o(),ti.push(je(window,Xt.STORAGE,(function(t){r===t.key&&o()}))),i.changeObservable.subscribe((function(){localStorage.setItem(r,JSON.stringify(i.getContext()))})),i}function ni(t){var e=C({},t);return T(["id","name","email"],(function(t){t in e&&(e[t]=String(e[t]))})),e}var ri,ii={log:"log",configuration:"configuration"},oi={debug:"debug",error:"error"},ai=["https://static.guance.com","http://localhost","<anonymous>"],si={LOGS:"browser-logs-sdk",RUM:"browser-rum-sdk"},ui={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1};function ci(e,n){var r,i=new He;return ui.telemetryEnabled=n.telemetryEnabled&&pt(n.telemetrySampleRate),ri=function(t){if(ui.telemetryEnabled){var n=function(t,e){return A({type:"telemetry",date:bt(),service:t,version:"3.1.2",source:"browser",telemetry:e},void 0!==r?r():{})}(e,t);i.notify(n)}},t=fi,C(ui,{maxEventsPerPage:n.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(t){r=t},observable:i,enabled:ui.telemetryEnabled}}function li(t,n){u(e.debug,t,n),di(C({type:ii.log,message:t,status:oi.debug},n))}function fi(t,e){di(C({type:ii.log,status:oi.error},function(t){if(t instanceof Error){var e=_e(t);return{error:{kind:e.name,stack:Ne(pi(e))},message:e.message}}return{error:{stack:Ae},message:se.UNCAUGHT+" "+de(t)}}(t),e))}function di(t){ri&&ui.sentEventCount<ui.maxEventsPerPage&&(ui.sentEventCount+=1,ri(t))}function pi(t){return t.stack=t.stack.filter((function(t){return!t.url||ai.some((function(e){return Bt(t.url,e)}))})),t}var hi="rum",vi={WITHOUT_SESSION_REPLAY:1,WITH_SESSION_REPLAY:2},_i={NOT_TRACKED:"0",TRACKED_WITH_SESSION_REPLAY:"1",TRACKED_WITHOUT_SESSION_REPLAY:"2"};function mi(t,e){var n=br(t.cookieOptions,hi,(function(e){return function(t,e){var n;n=function(t){return t===_i.NOT_TRACKED||t===_i.TRACKED_WITH_SESSION_REPLAY||t===_i.TRACKED_WITHOUT_SESSION_REPLAY}(e)?e:pt(t.sessionSampleRate)?pt(t.sessionReplaySampleRate)?_i.TRACKED_WITH_SESSION_REPLAY:_i.TRACKED_WITHOUT_SESSION_REPLAY:_i.NOT_TRACKED;return{trackingType:n,isTracked:gi(n)}}(t,e)}));return n.expireObservable.subscribe((function(){e.notify(an.SESSION_EXPIRED)})),n.renewObservable.subscribe((function(){e.notify(an.SESSION_RENEWED)})),{findTrackedSession:function(t){var e=n.findActiveSession(t);if(e&&gi(e.trackingType)){var r=e.trackingType===_i.TRACKED_WITH_SESSION_REPLAY?vi.WITH_SESSION_REPLAY:vi.WITHOUT_SESSION_REPLAY;return{id:e.id,plan:r,sessionReplayAllowed:r===vi.WITH_SESSION_REPLAY}}},expire:n.expire,expireObservable:n.expireObservable}}function gi(t){return t===_i.TRACKED_WITHOUT_SESSION_REPLAY||t===_i.TRACKED_WITH_SESSION_REPLAY}var yi="_dataflulx_usr_id",Ei=1440*ft,bi="initial_document",wi=[[Jt.DOCUMENT,function(t){return bi===t}],[Jt.XHR,function(t){return"xmlhttprequest"===t}],[Jt.FETCH,function(t){return"fetch"===t}],[Jt.BEACON,function(t){return"beacon"===t}],[Jt.CSS,function(t,e){return null!==e.match(/\.css$/i)}],[Jt.JS,function(t,e){return null!==e.match(/\.js$/i)}],[Jt.IMAGE,function(t,e){return kt(["image","img","icon"],t)||null!==e.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Jt.FONT,function(t,e){return null!==e.match(/\.(woff|eot|woff2|ttf)$/i)}],[Jt.MEDIA,function(t,e){return kt(["audio","video"],t)||null!==e.match(/\.(mp3|mp4)$/i)}]];function Si(t){var e=t.name;if(!function(t){try{return!!mn(t)}catch(t){return!1}}(e))return Jt.OTHER;var n=function(t){var e=mn(t).pathname;return"/"===e[0]?e:"/"+e}(e),r=Jt.OTHER;return T(wi,(function(e){var i=e[0];if((0,e[1])(t.initiatorType,n))return r=i,!1})),r}function Ti(){for(var t=k(arguments),e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}var Ci=/[^\u0000-\u007F]/;function Oi(t,e){return n=t,(Ci.test(n)?void 0!==window.TextEncoder?(new TextEncoder).encode(n).length:new Blob([n]).size:n.length)>e;var n}function Ii(t){var e=Ai(t);if(e){var n=e.startTime,r=e.fetchStart,i=e.redirectStart,o=e.redirectEnd,a=e.domainLookupStart,s=e.domainLookupEnd,u=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,f=e.requestStart,d=e.responseStart,p=e.responseEnd,h={firstbyte:vt(d-a),trans:vt(p-d),downloadTime:xi(n,d,p),firstByteTime:xi(n,f,d)};return d>0&&d<=yt()&&(h.ttfb=vt(d-f)),l!==r&&(h.tcp=vt(l-u),h.connectTime=xi(n,u,l),Ti(u,c,l)&&(h.ssl=vt(l-c),h.sslTime=xi(n,c,l))),s!==r&&(h.dns=vt(s-a),h.dnsTime=xi(n,a,s)),Ri(t)&&(h.redirect=vt(o-i),h.redirectTime=xi(n,i,o)),t.renderBlockingStatus&&(h.renderBlockingStatus=t.renderBlockingStatus),h}}function Ai(t){if(Ti(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!Ri(t))return t;var e=t.redirectStart,n=t.redirectEnd;if(e<t.startTime&&(e=t.startTime),n<t.startTime&&(n=t.fetchStart),Ti(t.startTime,e,n,t.fetchStart))return I({},t,{redirectEnd:n,redirectStart:e})}}function Ri(t){return t.fetchStart!==t.startTime}function xi(t,e,n){return{duration:vt(n-e),start:vt(e-t)}}function ki(t){if(t.startTime<t.responseStart)return{size:t.decodedBodySize,encodeSize:Number.MAX_SAFE_INTEGER<t.encodedBodySize?0:t.encodedBodySize}}function Ni(t,e){return e&&!function(t,e){var n=[e.rumEndpoint];return e.logsEndpoint&&n.push(e.logsEndpoint),e.sessionReplayEndPoint&&n.push(e.sessionReplayEndPoint),P(n,(function(e){return 0===t.indexOf(e)}))||e.isIntakeUrl(t)}(e,t)}function Li(){return void 0!==window.performance&&"getEntries"in performance}function Di(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&kt(PerformanceObserver.supportedEntryTypes,t)}function Mi(t,e){var n;if(n=function(n){Ui(t,e,[n])},qn("interactive",(function(){var t,e={entryType:"resource",initiatorType:bi,traceId:""};if(Di("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];t=I(r.toJSON(),e)}else{var i=Pi();t=I(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},e)}n(t)})),Li()){var r=performance.getEntries();d((function(){Ui(t,e,r)}))}if(window.PerformanceObserver){var i=a((function(n){Ui(t,e,n.getEntries())})),o=["resource","navigation","longtask","paint"],s=["largest-contentful-paint","first-input","layout-shift"];try{T(s,(function(t){new PerformanceObserver(i).observe({type:t,buffered:!0})}))}catch(t){T(s,(function(t){o.push(t)}))}new PerformanceObserver(i).observe({entryTypes:o}),Li()&&"addEventListener"in performance&&je(performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Di("navigation")||function(t){function e(){t(I(Pi(),{entryType:"navigation"}))}qn("complete",(function(){d(e)}))}((function(n){Ui(t,e,[n])})),Di("first-input")||function(t){var e=wt(),n=!1,r=Ge(window,[Xt.CLICK,Xt.MOUSE_DOWN,Xt.KEY_DOWN,Xt.TOUCH_START,Xt.POINTER_DOWN],(function(t){if(t.cancelable){var e={entryType:"first-input",processingStart:yt(),startTime:t.timeStamp};t.type===Xt.POINTER_DOWN?i(e):o(e)}}),{passive:!0,capture:!0}).stop;function i(t){Ge(window,[Xt.POINTER_UP,Xt.POINTER_CANCEL],(function(e){e.type===Xt.POINTER_UP&&o(t)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<wt()-e&&t(i)}}}((function(n){return Ui(t,e,[n])}))}function Pi(){var t={},e=performance.timing;for(var n in e)j(e[n])&&(t[n]=0===e[n]?0:mt(e[n]));return t}function Ui(t,e,n){var r=D(n,(function(t){return"resource"===t.entryType||"navigation"===t.entryType||"paint"===t.entryType||"longtask"===t.entryType||"largest-contentful-paint"===t.entryType||"first-input"===t.entryType||"layout-shift"===t.entryType})),i=D(r,(function(t){return!function(t){return"navigation"===t.entryType&&t.loadEventEnd<=0}(t)&&!function(t,e){return"resource"===e.entryType&&!Ni(t,e.name)}(e,t)}));i.length&&t.notify(an.PERFORMANCE_ENTRIES_COLLECTED,i)}function Bi(){var t,e=window;if(e.Zone&&(t=r(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){var n=r(new e.MutationObserver(it),"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}function Fi(t){var e=O(t),n=new He((function(){var t,e,n,i,o,a=(t=r,e=ce(history,"pushState",{after:t}),n=ce(history,"replaceState",{after:t}),i=je(window,Xt.POP_STATE,t),{stop:function(){e.stop(),n.stop(),i.stop()}}),s=(o=r,je(window,Xt.HASH_CHANGE,o));return function(){a.stop(),s.stop()}}));function r(){if(e.href!==t.href){var r=O(t);n.notify({newLocation:r,oldLocation:e}),e=r}}return n}function Vi(t){var e=t.lifeCycle,n=t.isChildEvent,r=t.onChange;void 0===r&&(r=it);var i={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(an.RUM_EVENT_COLLECTED,(function(t){if(t.type!==ne.VIEW&&n(t))switch(t.type){case ne.ERROR:i.errorCount+=1,r(i);break;case ne.ACTION:t.action.frustration&&(i.frustrationCount+=t.action.frustration.type.length),i.actionCount+=1,r(i);break;case ne.LONG_TASK:i.longTaskCount+=1,r(i);break;case ne.RESOURCE:i.resourceCount+=1,r(i)}}));return{stop:function(){o.unsubscribe()},eventCounts:i}}var Hi=100,zi=100;function Wi(t,e,n,r,i){var o=function(t,e,n){var r=new He((function(){var i,o=[],a=0;o.push(e.subscribe(u),t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){P(t,(function(t){return"resource"===t.entryType&&!$i(n,t.name)}))&&u()})),t.subscribe(an.REQUEST_STARTED,(function(t){$i(n,t.url)||(void 0===i&&(i=t.requestIndex),a+=1,u())})),t.subscribe(an.REQUEST_COMPLETED,(function(t){$i(n,t.url)||void 0===i||t.requestIndex<i||(a-=1,u())})));var s=ce(window,"open",{before:u}).stop;return function(){s(),T(o,(function(t){t.unsubscribe()}))};function u(){r.notify({isBusy:a>0})}}));return r}(t,e,n);return function(t,e,n){var r,i=!1,o=d((function(){c({hadActivity:!1})}),Hi),a=void 0!==n?d((function(){return c({hadActivity:!0,end:bt()})}),n):void 0,s=t.subscribe((function(t){var e=t.isBusy;p(o),p(r);var n=bt();e||(r=d((function(){c({hadActivity:!0,end:n})}),zi))})),u=function(){i=!0,p(o),p(r),p(a),s.unsubscribe()};function c(t){i||(u(),e(t))}return{stop:u}}(o,r,i)}function $i(t,e){return B(t.excludedActivityUrls,e)}var ji=ct,Gi=100,Ki={WaitingForMoreClicks:0,WaitingForClicksToStop:1,Finalized:2};function Zi(t,e){var n,r=[],i=Ki.WaitingForMoreClicks;function o(t){t.stopObservable.subscribe(a),r.push(t),p(n),n=d(s,ji)}function a(){i===Ki.WaitingForClicksToStop&&U(r,(function(t){return t.isStopped()}))&&(i=Ki.Finalized,e(r))}function s(){p(n),i===Ki.WaitingForMoreClicks&&(i=Ki.WaitingForClicksToStop,a())}return o(t),{tryAppend:function(t){return i===Ki.WaitingForMoreClicks&&(r.length>0&&(e=r[r.length-1].event,n=t.event,!(e.target===n.target&&(a=e,u=n,Math.sqrt(Math.pow(a.clientX-u.clientX,2)+Math.pow(a.clientY-u.clientY,2))<=Gi)&&e.timeStamp-n.timeStamp<=ji))?(s(),!1):(o(t),!0));var e,n,a,u},stop:function(){s()}}}var qi="data-guance-action-name";function Yi(t,e){return Qi(t,qi)||e&&Qi(t,e)||ro(t,e,to)||ro(t,e,eo)||""}function Qi(t,e){var n;if(function(){void 0===Ji&&(Ji="closest"in HTMLElement.prototype);return Ji}())n=t.closest("["+e+"]");else for(var r=t;r;){if(r.hasAttribute(e)){n=r;break}r=r.parentElement}if(n)return oo(io(n.getAttribute(e).trim()))}var Xi,Ji,to=[function(t,e){if(function(){void 0===Xi&&(Xi="labels"in HTMLInputElement.prototype);return Xi}()){if("labels"in t&&t.labels&&t.labels.length>0)return ao(t.labels[0],e)}else if(t.id){var n=t.ownerDocument&&Nt(t.ownerDocument.querySelectorAll("label"),(function(e){return e.htmlFor===t.id}));return n&&ao(n,e)}},function(t){if("INPUT"===t.nodeName){var e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return e.value}},function(t,e){if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return ao(t,e)},function(t){return t.getAttribute("aria-label")},function(t,e){var n=t.getAttribute("aria-labelledby");if(n)return n=n.split(/\s+/),n=M(n,(function(e){return function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)})),n=D(n,(function(t){return Boolean(t)})),(n=M(n,(function(t){return ao(t,e)}))).join(" ")},function(t){return t.getAttribute("alt")},function(t){return t.getAttribute("name")},function(t){return t.getAttribute("title")},function(t){return t.getAttribute("placeholder")},function(t,e){if("options"in t&&t.options.length>0)return ao(t.options[0],e)}],eo=[function(t,e){return ao(t,e)}],no=10;function ro(t,e,n){for(var r=t,i=0;i<=no&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o=0;o<n.length;o++){var a=(0,n[o])(r,e);if("string"==typeof a){var s=a.trim();if(s)return oo(io(s))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function io(t){return t.replace(/\s+/g," ")}function oo(t){return t.length>100?Rt(t,100)+" [...]":t}function ao(t,e){if(!t.isContentEditable){if("innerText"in t){var n=t.innerText,r=function(e){for(var r=t.querySelectorAll(e),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return void 0===at&&(at=Boolean(document.documentMode)),at&&r("script, style"),r("["+qi+"]"),e&&r("["+e+"]"),n}return t.textContent}}var so,uo=[qi,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],co=[ho,function(t){if(t.id&&!po(t.id))return"#"+F(t.id)}],lo=[ho,function(t){if("BODY"===t.tagName)return;if(t.classList.length>0)for(var e=0;e<t.classList.length;e+=1){var n=t.classList[e];if(!po(n))return F(t.tagName)+"."+F(n)}},function(t){return F(t.tagName)}];function fo(t,e){for(var n="",r=t;r&&"HTML"!==r.nodeName;){var i=_o(r,co,mo,e,n);if(i)return i;n=_o(r,lo,go,e,n)||yo(vo(r),n),r=r.parentElement}return n}function po(t){return/[0-9]/.test(t)}function ho(t,e){if(e&&(r=i(e)))return r;for(var n=0;n<uo.length;n++){var r;if(r=i(uo[n]))return r}function i(e){if(t.hasAttribute(e))return F(t.tagName)+"["+e+'="'+F(t.getAttribute(e))+'"]'}}function vo(t){for(var e=t.parentElement&&t.parentElement.firstElementChild,n=1;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;var r=F(t.tagName);return/^::/.test(r)?r:r+":nth-of-type("+n+")"}function _o(t,e,n,r,i){for(var o=0;o<e.length;o++){var a=(0,e[o])(t,r);if(a){var s=yo(a,i);if(n(t,s))return s}}}function mo(t,e){return 1===t.ownerDocument.body.querySelectorAll(e).length}function go(t,e){return 1===t.parentElement.querySelectorAll(function(){if(void 0===so)try{document.querySelector(":scope"),so=!0}catch{so=!1}return so}()?yo(":scope",e):e).length}function yo(t,e){return e?t+">"+e:t}function Eo(){var t=window.getSelection();return!t||t.isCollapsed}function bo(t){return t.target instanceof Element&&!1!==t.isPrimary}var wo=3;function So(t,e){if(function(t){if(P(t,(function(t){return t.getUserActivity().selection})))return!1;for(var e=0;e<t.length-(wo-1);e+=1)if(t[e+wo-1].event.timeStamp-t[e].event.timeStamp<=ct)return!0;return!1}(t))return e.addFrustration(ee.RAGE_CLICK),P(t,Co)&&e.addFrustration(ee.DEAD_CLICK),e.hasError()&&e.addFrustration(ee.ERROR_CLICK),{isRage:!0};var n=P(t,(function(t){return t.getUserActivity().selection}));return T(t,(function(t){t.hasError()&&t.addFrustration(ee.ERROR_CLICK),Co(t)&&!n&&t.addFrustration(ee.DEAD_CLICK)})),{isRage:!1}}var To='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Co(t){return!t.hasPageActivity()&&!t.getUserActivity().input&&(e=t.event.target,n=To,!(e.matches?e.matches(n):e.msMatchesSelector&&e.msMatchesSelector(n)));var e,n}var Oo=10*ct,Io=5*lt;function Ao(t,e,n){var r,i=new Kt(Io),o=new He;t.subscribe(an.SESSION_RENEWED,(function(){i.reset()})),t.subscribe(an.VIEW_ENDED,p);var a,s,u,c,l,f=(a={onPointerDown:function(r){return function(t,e,n,r,i){if(t.trackFrustrations||!r.find()){var o,a,s,u=(o=i,a=t.actionNameAttribute,s=o.target.getBoundingClientRect(),{type:te.CLICK,target:{width:Math.round(s.width),height:Math.round(s.height),selector:fo(o.target,a)},position:{x:Math.round(o.clientX-s.left),y:Math.round(o.clientY-s.top)},name:Yi(o.target,a)});if(t.trackFrustrations||u.name){var c=!1;return Wi(e,n,t,(function(t){c=t.hadActivity}),Hi),{clickActionBase:u,hadActivityOnPointerDown:function(){return c}}}}}(n,t,e,i,r)},onPointerUp:function(r,a,s){!function(t,e,n,r,i,o,a,s,u,c){var l=No(e,r,u,a,s);t.trackFrustrations&&o(l);var f=Wi(e,n,t,(function(e){e.hadActivity&&e.end<l.startClocks.timeStamp?l.discard():(e.hadActivity?l.stop(e.end):c()?l.stop(l.startClocks.timeStamp):l.stop(),t.trackFrustrations||(e.hadActivity?l.validate():l.discard()))}),Oo),d=f.stop,p=e.subscribe(an.VIEW_ENDED,(function(t){l.stop(t.endClocks.timeStamp)})),h=i.subscribe((function(){l.stop()}));l.stopObservable.subscribe((function(){p.unsubscribe(),d(),h.unsubscribe()}))}(n,t,e,i,o,h,r.clickActionBase,a,s,r.hadActivityOnPointerDown)}},c={selection:!1,input:!1},l=[je(window,Xt.POINTER_DOWN,(function(t){bo(t)&&(s=Eo(),c={selection:!1,input:!1},u=a.onPointerDown(t))}),{capture:!0}),je(window,Xt.SELECTION_CHANGE,(function(){s&&Eo()||(c.selection=!0)}),{capture:!0}),je(window,Xt.POINTER_UP,(function(t){if(bo(t)&&u){var e=c;a.onPointerUp(u,t,(function(){return e})),u=void 0}}),{capture:!0}),je(window,Xt.INPUT,(function(){c.input=!0}),{capture:!0})],{stop:function(){T(l,(function(t){return t.stop()}))}}),d=f.stop;return{stop:function(){p(),o.notify(),d()},actionContexts:{findActionId:function(t){return i.find(t)},findAllActionId:function(t){return n.trackFrustrations?i.findAll(t):i.find(t)}}};function p(){r&&r.stop()}function h(t){if(!r||!r.tryAppend(t)){var e=t.clone();r=Zi(t,(function(t){!function(t,e){var n=So(t,e),r=n.isRage;r?(T(t,(function(t){t.discard()})),e.stop(bt()),e.validate(M(t,(function(t){return t.event})))):(e.discard(),T(t,(function(t){t.validate()})))}(t,e)}))}}}var Ro,xo,ko={ONGOING:0,STOPPED:1,FINALIZED:2};function No(t,e,n,r,i){var o,a=q(),s=Et(),u=e.add(a,s.relative),c=Vi({lifeCycle:t,isChildEvent:function(t){return void 0!==t.action&&(R(t.action.ids)?kt(t.action.ids,a):t.action.ids===a)}}),l=ko.ONGOING,f=[],d=new He;function p(t){l===ko.ONGOING&&(o=t,l=ko.STOPPED,o?u.close(mt(o)):u.remove(),c.stop(),d.notify())}return{event:i,stop:p,stopObservable:d,hasError:function(){return c.eventCounts.errorCount>0},hasPageActivity:function(){return void 0!==o},getUserActivity:n,addFrustration:function(t){f.push(t)},startClocks:s,isStopped:function(){return l===ko.STOPPED||l===ko.FINALIZED},clone:function(){return No(t,e,n,r,i)},validate:function(e){if(p(),l===ko.STOPPED){var n=c.eventCounts,u=n.resourceCount,d=n.errorCount,h=n.longTaskCount,v=C({type:te.CLICK,duration:o&&St(s.timeStamp,o),startClocks:s,id:a,frustrationTypes:f,counts:{resourceCount:u,errorCount:d,longTaskCount:h},events:Ut(e,[i]),event:i},r);t.notify(an.AUTO_ACTION_COMPLETED,v),l=ko.FINALIZED}},discard:function(){p(),l=ko.FINALIZED}}}function Lo(t,e){var n=Do(t)?{action:{error:{count:t.counts.errorCount},id:t.id,loadingTime:_t(t.duration),frustration:{type:t.frustrationTypes},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_gc:{action:{target:t.target,position:t.position}}}:{action:{loadingTime:0}};return{customerContext:Do(t)?void 0:t.context,rawRumEvent:A({action:{id:q(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:ne.ACTION,view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},n),startTime:t.startClocks.relative,domainContext:Do(t)?{event:t.event,events:t.events}:{}}}function Do(t){return t.type!==te.CUSTOM}function Mo(t,e,n,r,i,o){var a=function(t,e,n,r){var i=a(t.rumEndpoint),o=i.batch;function a(i){var o=jr({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageExitObservable:n,sessionExpireObservable:r});return{batch:new $r(Mr(i,t.batchBytesLimit,e),o,t.messageBytesLimit),flushController:o}}return{flushObservable:i.flushController.flushObservable,add:function(t){o.add(t)},upsert:function(t,e){o.upsert(t,e)}}}(t,r,i,o);e.subscribe(an.RUM_EVENT_COLLECTED,(function(t){t.type===ne.VIEW?a.upsert(t,t.view.id):a.add(t)})),n.subscribe((function(t){a.add(t)}))}function Po(){var t;return Ro||(t=new He((function(){var e=K((function(){t.notify(Uo())}),200).throttled;return je(window,Xt.RESIZE,e,{capture:!0,passive:!0}).stop})),Ro=t),Ro}function Uo(){var t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var Bo={SYNTHETICS:"synthetics",USER:"user"},Fo={"view.url":"string","view.referrer":"string"},Vo={context:"object"},Ho={};function zo(t,e,r,i,o,a,s,u,c){Ho[ne.VIEW]=Fo,Ho[ne.ERROR]=C({"error.message":"string","error.stack":"string","error.resource.url":"string"},Vo,Fo),Ho[ne.RESOURCE]=C({"resource.url":"string"},Vo,Fo),Ho[ne.ACTION]=C({"action.target.name":"string"},Vo,Fo),Ho[ne.LONG_TASK]=C({},Vo,Fo);var l={};l[ne.ERROR]=hn(ne.ERROR,t.eventRateLimiterThreshold,c),l[ne.ACTION]=hn(ne.ACTION,t.eventRateLimiterThreshold,c),e.subscribe(an.RAW_RUM_EVENT_COLLECTED,(function(c){var f,d=c.startTime,p=c.rawRumEvent,h=c.savedCommonContext,v=c.customerContext,_=c.domainContext,m=o.findView(d),g=a.findUrl(d),y=r.findTrackedSession(p.type!==ne.VIEW?d:void 0);if(y&&m&&g){var E=s.findActionId(d),b=s.findAllActionId(d),w=h||u(),S={_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion,drift:Math.round(wt()-(It()+performance.now()))},terminal:{type:"web"},application:{id:t.applicationId},device:Qt,env:t.env||"",service:m.service||t.service||"browser",version:m.version||t.version||"",source:"browser",date:bt(),user:{id:i.getId(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?Bo.USER:Bo.SYNTHETICS,id:y.id},view:{id:m.id,name:m.name,url:g.url,referrer:g.referrer,host:g.host,path:g.path,pathGroup:g.pathGroup,urlQuery:g.urlQuery},action:(f=p,-1!==[ne.ERROR,ne.RESOURCE,ne.LONG_TASK].indexOf(f.type)&&E?{id:E,ids:b}:void 0),display:(xo||(xo=Uo(),Po().subscribe((function(t){xo=t})).unsubscribe),{viewport:xo})},T=Mt(A(S,m,p)),C=A({},w.context,v);H(C)||(T.context=C),"has_replay"in T.session||(T.session.has_replay=w.hasReplay),H(w.user)||(T.user=A({is_signin:"T"},w.user)),function(t,e,r,i){if(e){var o=ln(t,Ho[t.type],(function(t){return e(t,r)}));if(!1===o&&t.type!==ne.VIEW)return!1;!1===o&&n.warn("Can't dismiss view events using beforeSend!")}var a=!1;i[t.type]&&(a=i[t.type].isLimitReached());return!a}(T,t.beforeSend,_,l)&&(H(T.context)&&delete T.context,e.notify(an.RUM_EVENT_COLLECTED,T))}}))}var Wo=nr;var $o=nr;function jo(t,e,n){return{context:t.getContext(),user:e.getContext(),hasReplay:!!n.isRecording()||void 0}}var Go,Ko=4e3,Zo=500,qo=nr,Yo={ACTIVE:"active",PASSIVE:"passive",HIDDEN:"hidden",FROZEN:"frozen",TERMINATED:"terminated"};function Qo(t){void 0===t&&(t=Zo);var e,n=new Kt(qo,Ko);i(Xo(),yt());var r=Ge(window,[Xt.PAGE_SHOW,Xt.FOCUS,Xt.BLUR,Xt.VISIBILITY_CHANGE,Xt.RESUME,Xt.FREEZE,Xt.PAGE_HIDE],(function(t){t.isTrusted&&i(function(t){if(t.type===Xt.FREEZE)return Yo.FROZEN;if(t.type===Xt.PAGE_HIDE)return t.persisted?Yo.FROZEN:Yo.TERMINATED;return Xo()}(t),t.timeStamp)}),{capture:!0}).stop;function i(t,r){void 0===r&&(r=yt()),t!==e&&(e=t,n.closeActive(r),n.add({state:e,startTime:r},r))}return{findAll:function(e,r){var i=n.findAll(e,r);if(0!==i.length){for(var o=[],a=Math.max(0,i.length-t),s=i.length-1;s>=a;s--){var u=i[s],c=St(e,u.startTime);o.push({state:u.state,start:_t(c)})}return o}},isInActivePageStateAt:function(t){var e=n.find(t);return void 0!==e&&e.state===Yo.ACTIVE},addPageState:i,stop:function(){r(),n.stop()}}}function Xo(){return"hidden"===document.visibilityState?Yo.HIDDEN:document.hasFocus()?Yo.ACTIVE:Yo.PASSIVE}function Jo(t,n,r){var i=new He;return function(t){var n=$e([e.error]).subscribe((function(e){t.notify({startClocks:Et(),message:e.message,stack:e.stack,source:Re.CONSOLE,handling:ae.HANDLED,handlingStack:e.handlingStack})}))}(i),function(t){Ie((function(e,n){t.notify(xe({stackTrace:e,originalError:n,startClocks:Et(),nonErrorPrefix:se.UNCAUGHT,source:Re.SOURCE,handling:ae.UNHANDLED}))}))}(i),function(t,e){var n=Ze(0,[(Ke.cspViolation,Ke.intervention)]).subscribe((function(t){e.notify({startClocks:Et(),message:t.message,stack:t.stack,type:t.subtype,source:Re.REPORT,handling:ae.UNHANDLED})}))}(0,i),i.subscribe((function(e){t.notify(an.RAW_ERROR_COLLECTED,{error:e})})),function(t,e){return t.subscribe(an.RAW_ERROR_COLLECTED,(function(n){t.notify(an.RAW_RUM_EVENT_COLLECTED,C({customerContext:n.customerContext,savedCommonContext:n.savedCommonContext},function(t,e){var n={date:t.startClocks.timeStamp,error:{id:q(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser"},type:ne.ERROR,view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}};return{rawRumEvent:n,startTime:t.startClocks.relative,domainContext:{error:t.originalError}}}(n.error,e)))})),{addError:function(e,n){var r=e.error,i=xe({stackTrace:r instanceof Error?_e(r):void 0,originalError:r,handlingStack:e.handlingStack,startClocks:e.startClocks,nonErrorPrefix:se.PROVIDED,source:Re.CUSTOM,handling:ae.HANDLED});t.notify(an.RAW_ERROR_COLLECTED,{customerContext:e.context,savedCommonContext:n,error:i})}}}(t,r)}function ta(t){if(void 0===t&&(t=window),!Go)if("hidden"===document.visibilityState)Go={timeStamp:0};else{Go={timeStamp:1/0};var e=Ge(t,[Xt.PAGE_HIDE,Xt.VISIBILITY_CHANGE],(function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||(Go.timeStamp=t.timeStamp,e())}),{capture:!0}).stop}return Go}var ea=10*lt;var na=10*lt;var ra=5*lt;function ia(t,e,n){var r={};function i(t){C(r,t),n()}var o=function(t,e){return{stop:t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var n=0;n<t.length;n++){var r=t[n];"navigation"===r.entryType&&e({fetchStart:r.fetchStart,responseEnd:r.responseEnd,domComplete:r.domComplete,domContentLoaded:r.domContentLoadedEventEnd,domInteractive:r.domInteractive,loadEvent:r.loadEventEnd,loadEventEnd:r.loadEventEnd,loadEventStart:r.loadEventStart,domContentLoadedEventEnd:r.domContentLoadedEventEnd,domContentLoadedEventStart:r.domContentLoadedEventStart,firstByte:r.responseStart>=0&&r.responseStart<=yt()?r.responseStart:void 0})}})).unsubscribe}}(t,(function(t){e(t.loadEvent),i(t)})),a=o.stop,s=function(t,e){var n=ta();return{stop:t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var r=Nt(t,(function(t){return"paint"===t.entryType&&"first-contentful-paint"===t.name&&t.startTime<n.timeStamp&&t.startTime<ea}));r&&e(r.startTime)})).unsubscribe}}(t,(function(t){i({firstContentfulPaint:t})})),u=s.stop,c=function(t,e,n){var r=ta(),i=1/0,o=Ge(e,[Xt.POINTER_DOWN,Xt.KEY_DOWN],(function(t){i=t.timeStamp}),{capture:!0,once:!0}).stop,a=t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var e=function(t,e){for(var n=t.length-1;n>=0;n-=1){var r=t[n];if(e(r,n,t))return r}}(t,(function(t){return"largest-contentful-paint"===t.entryType&&t.startTime<i&&t.startTime<r.timeStamp&&t.startTime<na}));e&&n(e.startTime,e.element)})).unsubscribe;return{stop:function(){o(),a()}}}(t,window,(function(t,e){i({largestContentfulPaint:t,largestContentfulPaintElement:e?fo(e):void 0})})),l=c.stop,f=function(t,e){var n=ta();return{stop:t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){var r=Nt(t,(function(t){return"first-input"===t.entryType&&t.startTime<n.timeStamp}));if(r){var i=St(r.startTime,r.processingStart);e({firstInputDelay:i>=0?i:0,firstInputTime:r.startTime,firstInputTarget:r.target})}})).unsubscribe}}(t,(function(t){i({firstInputDelay:t.firstInputDelay,firstInputTime:t.firstInputTime})})),p=f.stop;function h(){a(),u(),l(),p()}return{stop:h,initialViewMetrics:r,scheduleStop:function(){d(h,ra)}}}var oa,aa=ct;function sa(){var t=Qn(),e=Uo().height;return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}function ua(t,e){var n=0,r=function(){var t,e,n=0;return{update:function(r){void 0===t||r.startTime-e>=ct||r.startTime-t>=5*ct?(t=e=r.startTime,n=r.value):(n+=r.value,e=r.startTime)},value:function(){return n}}}();return{stop:t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var i=0;i<t.length;i++){var o=t[i];"layout-shift"!==o.entryType||o.hadRecentInput||(r.update(o),r.value()>n&&(n=r.value(),e(ht(n,4))))}})).unsubscribe}}var ca=0,la=1/0,fa=0;var da=function(){return oa?ca:window.performance.interactionCount||0},pa=10;function ha(t,e){if(!(Di("event")&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:function(){},stop:it};var n=function(t){"interactionCount"in performance||oa||(oa=new window.PerformanceObserver(a((function(t){t.getEntries().forEach((function(t){const e=t;e.interactionId&&(la=Math.min(la,e.interactionId),fa=Math.max(fa,e.interactionId),ca=(fa-la)/7+1)}))})))).observe({type:"event",buffered:!0,durationThreshold:0});var e=t===re.INITIAL_LOAD?0:da();return{getViewInteractionCount:function(){return da()-e}}}(t),r=n.getViewInteractionCount,i=function(t){var e=[];function n(){e.sort((function(t,e){return e.duration-t.duration})).splice(pa)}return{process:function(t){var r=e.findIndex((function(e){return t.interactionId===e.interactionId})),i=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<pa||t.duration>i.duration)&&(e.push(t),n())},estimateP98Duration:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]?e[n].duration:void 0}}}(r),o=-1;return{getInteractionToNextPaint:function(){return o>=0?o:r()?0:void 0},stop:e.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(t){for(var e of t)"event"!==e.entryType&&"first-input"!==e.entryType||!e.interactionId||i.process(e);var n=i.estimateP98Duration();n&&(o=n)})).unsubscribe}}function va(t,e,n,r,i,o){var a,s={},u=function(t,e,n,r,i,o){var a=r===re.INITIAL_LOAD,s=!0,u=[];function c(){!s&&!a&&u.length>0&&o(Math.max.apply(Math,u))}return{setLoadEvent:function(t){a&&(a=!1,u.push(t),c())},stop:Wi(t,e,n,(function(t){s&&(s=!1,t.hadActivity&&u.push(St(i.timeStamp,t.end)),c())})).stop}}(t,e,n,i,o,(function(t){s.loadingTime=t;var e=sa();s.scroll={maxDepth:e.scrollDepth,maxDepthScrollHeight:e.scrollHeight,maxDepthTime:t,maxDepthScrollTop:e.scrollTop},r()})),c=u.stop,l=u.setLoadEvent,f=function(t,e,n){void 0===n&&(n=sa);var r=0,i=K((function(){var i=n(),o=i._scrollValues,a=i.scrollDepth,s=i.scrollTop;if(a>r){var u=yt(),c=St(t.relative,u);e({maxDepth:r=a,maxDepthScrollHeight:o,maxDepthTime:c,maxDepthScrollTop:s})}}),aa,{leading:!1,trailing:!0}),o=je(window,Xt.SCROLL,i.throttled,{passive:!0});return{stop:function(){i.cancel(),o.stop()}}}(o,(function(t){s.scroll=t}),sa),d=f.stop;if(Di("layout-shift")){s.cumulativeLayoutShift=0;var p=ua(t,(function(t){s.cumulativeLayoutShift=t,r()}));a=p.stop}else a=it;var h=ha(i,t),v=h.stop,_=h.getInteractionToNextPaint;return{stop:function(){c(),a(),d(),v()},setLoadEvent:l,getCommonViewMetrics:function(){return s.interactionToNextPaint=_(),s}}}var _a=5*lt;var ma=3e3,ga=5*lt;function ya(t,e,n,r,i,o,a){function s(i,o,a){return function(t,e,n,r,i,o,a){void 0===o&&(o=Et());var s,u,c,l,f=q(),p={},_=0,m=O(r),g=!0;a&&(u=a.name,c=a.service,l=a.version);t.notify(an.VIEW_CREATED,{id:f,name:u,startClocks:o,service:c,version:l});var y=K(D,ma,{leading:!1}),E=y.throttled,b=y.cancel,w=va(t,e,n,E,i,o),S=w.setLoadEvent,T=w.stop,C=w.getCommonViewMetrics,I=i===re.INITIAL_LOAD?ia(t,S,E):{scheduleStop:it,initialViewMetrics:{}},A=I.scheduleStop,R=I.initialViewMetrics,x=function(t,e,n){var r=Vi({lifeCycle:t,isChildEvent:function(t){return t.view.id===e},onChange:n});return{scheduleStop:function(){d(r.stop,_a)},eventCounts:r.eventCounts}}(t,f,E),k=x.scheduleStop,N=x.eventCounts,L=h(D,ga);function D(){b(),_+=1;var e=void 0===s?bt():s.timeStamp;t.notify(an.VIEW_UPDATED,{customTimings:p,documentVersion:_,id:f,name:u,service:c,version:l,loadingType:i,location:m,startClocks:o,commonViewMetrics:C(),initialViewMetrics:R,duration:St(o.timeStamp,e),isActive:void 0===s,sessionIsActive:g,eventCounts:N})}return D(),{name:u,service:c,version:l,scheduleUpdate:E,end:function(e){s||(s=Ut(e&&e.endClocks,Et()),g=Ut(e&&e.sessionIsActive,!0),t.notify(an.VIEW_ENDED,{endClocks:s}),v(L),T(),A(),k(),D())},addTiming:function(t,e){if(!s){var n=function(t){return t<dt}(e)?e:St(o.timeStamp,e);p[function(t){var e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");e!==t&&console.warn("Invalid timing name: "+t+", sanitized to: "+e);return e}(t)]=n,E()}}}}(e,n,r,t,i,o,a)}var u,c=s(re.INITIAL_LOAD,Tt(),a);return e.subscribe(an.SESSION_RENEWED,(function(){s(re.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version})})),e.subscribe(an.SESSION_EXPIRED,(function(){c.end({sessionIsActive:!1})})),e.subscribe(an.PAGE_EXITED,(function(t){t.reason!==Wn.UNLOADING&&t.reason!==Wn.PAGEHIDE||c.end()})),o&&(u=function(t){return t.subscribe((function(t){var e,n,r=t.oldLocation,i=t.newLocation;if(n=i,(e=r).pathname!==n.pathname||!Ft(n.hash)&&Vt(n.hash)!==Vt(e.hash))return c.end(),void(c=s(re.ROUTE_CHANGE))}))}(i)),{addTiming:function(t,e){void 0===e&&(e=bt()),c.addTiming(t,e)},startView:function(t,e){c.end({endClocks:e}),c=s(re.ROUTE_CHANGE,e,t)},stop:function(){u&&u.unsubscribe(),c.end()}}}function Ea(t,e,n,r,i,o,a,s){return t.subscribe(an.VIEW_UPDATED,(function(n){t.notify(an.RAW_RUM_EVENT_COLLECTED,function(t,e,n,r){var i=n.getReplayStats(t.id),o=r.findAll(t.startClocks.relative,t.duration),a={_gc:{document_version:t.documentVersion,replay_stats:i,page_states:o},date:t.startClocks.timeStamp,type:ne.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:t.commonViewMetrics.cumulativeLayoutShift,first_byte:_t(t.initialViewMetrics.firstByte),dom_complete:_t(t.initialViewMetrics.domComplete),dom_content_loaded:_t(t.initialViewMetrics.domContentLoaded),dom_interactive:_t(t.initialViewMetrics.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:_t(t.initialViewMetrics.firstContentfulPaint),first_input_delay:_t(t.initialViewMetrics.firstInputDelay),first_input_time:_t(t.initialViewMetrics.firstInputTime),interaction_to_next_paint:_t(t.commonViewMetrics.interactionToNextPaint),is_active:t.isActive,name:t.name,largest_contentful_paint:_t(t.initialViewMetrics.largestContentfulPaint),largest_contentful_paint_element_selector:t.initialViewMetrics.largestContentfulPaintElement,load_event:_t(t.initialViewMetrics.loadEvent),loading_time:wa(_t(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:_t(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_height:t.commonViewMetrics.scroll.maxDepthScrollHeight,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_depth_time:_t(t.commonViewMetrics.scroll.maxDepthTime)}}:void 0,session:{has_replay:!!i||void 0,is_active:!!t.sessionIsActive&&void 0},privacy:{replay_level:e.defaultPrivacyLevel}};H(t.customTimings)||(a.view.custom_timings=(s=t.customTimings,u=_t,c={},T(s,(function(t,e){c[e]=u(t)})),c));var s,u,c;return a=A(a,{view:ba(t.initialViewMetrics)}),{rawRumEvent:a,startTime:t.startClocks.relative,domainContext:{location:t.location}}}(n,e,a,o))})),ya(n,t,r,e,i,!e.trackViewsManually,s)}function ba(t){var e=Ai(t);if(e){var n=e.fetchStart,r=e.responseEnd,i=e.domInteractive,o=e.domContentLoaded,a=e.domComplete,s=e.loadEventEnd,u=e.loadEventStart,c=e.domContentLoadedEventEnd,l={};if(r!==n){l.fpt=_t(r-n);var f=parseInt((r-n)/1e3);l.apdexLevel=f>9?9:f}return i!==n&&(l.tti=_t(i-n)),o!==n&&(l.dom_ready=_t(o-n)),s!==n&&(l.load=_t(s-n)),u!==c&&(l.resource_load_time=_t(u-c)),a!==i&&(l.dom=_t(a-i)),l}}function wa(t){return j(t)&&t<0?void 0:t}function Sa(){this.buffer=new Uint8Array(8),Ta().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function Ta(){return window.crypto||window.msCrypto}function Ca(t){this._spanId=new Sa,this._traceId=new Sa,this._traceSampled=t}function Oa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function Ia(t,e,n){this._spanId=Oa(),this._traceId=Oa(),this._applicationId=t.applicationId,this._env=t.env,this._version=t.version,this._urlParse=Q(e).getParse(),this._traceSampled=n}function Aa(t,e){this._traceId=new Sa,this._spanId=new Sa,this._traceSampled=e,this.is128Bit=t.traceId128Bit}function Ra(t,e){this._traceId=new Sa,this._spanId=new Sa,this._traceSampled=e}function xa(t,e){this._traceId=new Sa,this._spanId=new Sa,this._traceSampled=e,this.is128Bit=t.traceId128Bit}function ka(t,e){this._traceId=new Sa,this._spanId=new Sa,this._traceSampled=t,this.isHexTraceId=e}function Na(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function La(t,e,n,r){if(n.findTrackedSession()){var i=Nt(t.allowedTracingUrls,(function(t){return B([t.match],e.url,!0)}));if(i){var o,a=!j(t.tracingSampleRate)||pt(t.tracingSampleRate);switch(i.traceType){case oe.DDTRACE:o=new Ca(a);break;case oe.SKYWALKING_V3:o=new Ia(t,e.url,a);break;case oe.ZIPKIN_MULTI_HEADER:o=new xa(t,a);break;case oe.JAEGER:o=new Aa(t,a);break;case oe.W3C_TRACEPARENT:o=new ka(a);break;case oe.W3C_TRACEPARENT_64:o=new ka(a,!0);break;case oe.ZIPKIN_SINGLE_HEADER:o=new Ra(t,a)}o&&o.isTracingSupported()&&(e.traceId=o.getTraceId(),e.spanId=o.getSpanId(),e.traceSampled=a,r(o.makeTracingHeaders()))}}}Sa.prototype={toString:function(t){var e=this.readInt32(0),n=this.readInt32(4),r="";do{var i=e%t*4294967296+n;e=Math.floor(e/t),n=Math.floor(i/t),r=(i%t).toString(t)+r}while(e||n);return r},toDecimalString:function(){return this.toString(10)},toPaddedHexadecimalString(){var t=this.toString(16);return Array(17-t.length).join("0")+t},readInt32:function(t){return 16777216*this.buffer[t]+(this.buffer[t+1]<<16)+(this.buffer[t+2]<<8)+this.buffer[t+3]}},Ca.prototype={isTracingSupported:function(){return void 0!==Ta()},getSpanId:function(){return this._spanId.toDecimalString()},getTraceId:function(){return this._traceId.toDecimalString()},makeTracingHeaders:function(){return{"x-datadog-origin":"rum","x-datadog-parent-id":this.getSpanId(),"x-datadog-sampling-priority":this._traceSampled?"2":"-1","x-datadog-trace-id":this.getTraceId()}}},Ia.prototype={isTracingSupported:function(){return!!(this._env&&this._version&&this._urlParse)},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getSkyWalkingSw8:function(){try{var t=String(Z(this._traceId)),e=String(Z(this._spanId)),n=String(Z(this._applicationId+"_rum_"+this.env)),r=String(Z(this._version)),i=String(Z(window.location.href)),o=String(Z(this._urlParse.Host));return(this._traceSampled?"1":"0")+"-"+t+"-"+e+"-0-"+n+"-"+r+"-"+i+"-"+o}catch(t){return""}},makeTracingHeaders:function(){return{sw8:this.getSkyWalkingSw8()}}},Aa.prototype={isTracingSupported:function(){return void 0!==Ta()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.is128Bit?"0000000000000000"+this._traceId.toPaddedHexadecimalString():this._traceId.toPaddedHexadecimalString()},getUberTraceId:function(){return this.getTraceId()+":"+this.getSpanId()+":0:"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{"uber-trace-id":this.getUberTraceId()}}},Ra.prototype={isTracingSupported:function(){return void 0!==Ta()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this._traceId.toPaddedHexadecimalString()},getB3Str:function(){return this.getTraceId()+"-"+this.getSpanId()+"-"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{b3:this.getB3Str()}}},xa.prototype={isTracingSupported:function(){return void 0!==Ta()},getSpanId:function(){return this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.is128Bit?"0000000000000000"+this._traceId.toPaddedHexadecimalString():this._traceId.toPaddedHexadecimalString()},makeTracingHeaders:function(){return{"X-B3-TraceId":this.getSpanId(),"X-B3-SpanId":this.getTraceId(),"X-B3-Sampled":this._traceSampled?"1":"0"}}},ka.prototype={isTracingSupported:function(){return void 0!==Ta()},getSpanId:function(){return this.isHexTraceId?this._spanId.toDecimalString():this._spanId.toPaddedHexadecimalString()},getTraceId:function(){return this.isHexTraceId?this._traceId.toDecimalString():this._traceId.toPaddedHexadecimalString()+this._spanId.toPaddedHexadecimalString()},getTraceParent:function(){return this.isHexTraceId?"00-0000000000000000"+this._traceId.toPaddedHexadecimalString()+"-"+this._spanId.toPaddedHexadecimalString()+"-"+(this._traceSampled?"01":"00"):"00-"+this.getTraceId()+"-"+this.getSpanId()+"-"+(this._traceSampled?"01":"00")},makeTracingHeaders:function(){var t={traceparent:this.getTraceParent()};return this.isHexTraceId?C(t,{"x-gc-trace-id":this.getTraceId(),"x-gc-span-id":this.getSpanId()}):t}};var Da=1;function Ma(t,e,n){var r=function(t,e){return{clearTracingIfNeeded:Na,traceFetch:function(n){return La(t,n,e,(function(t){if(!(n.input instanceof Request)||n.init&&n.init.headers){n.init=O(n.init);var e=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(t,n){e.push([n,t])})):R(n.init.headers)?T(n.init.headers,(function(t){e.push(t)})):n.init.headers&&T(n.init.headers,(function(t,n){e.push([n,t])}));var r={};T(e.concat(z(t)),(function(t){r[t[0]]=t[1]})),n.init.headers=r}else n.input=new Request(n.input),T(t,(function(t,e){n.input.headers.append(e,t)}))}))},traceXhr:function(n,r){return La(t,n,e,(function(t){T(t,(function(t,e){r.setRequestHeader(e,t)}))}))}}}(e,n);!function(t,e,n){var r=Bn().subscribe((function(r){var i=r;if(Ni(e,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=Pa(),t.notify(an.REQUEST_STARTED,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),t.notify(an.REQUEST_COMPLETED,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ie.XHR,url:i.url,xhr:i.xhr})}}))}(t,e,r),function(t,e,n){var r=Ln().subscribe((function(r){var i=r;if(Ni(e,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=Pa(),t.notify(an.REQUEST_STARTED,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":!function(t,e){var n=t.response&&function(t){try{return t.clone()}catch(t){return}}(t.response);n&&n.body?function(t,e,n){var r=t.getReader(),i=[],o=0;function s(){var t,a;if(r.cancel().catch(it),n.collectStreamBody){var s;if(1===i.length)s=i[0];else{s=new Uint8Array(o);var u=0;T(i,(function(t){s.set(t,u),u+=t.length}))}t=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}e(void 0,t,a)}!function t(){r.read().then(a((function(e){e.done?s():(n.collectStreamBody&&i.push(e.value),(o+=e.value.length)>n.bytesLimit?s():t())})),a((function(t){e(t)})))}()}(n.body,(function(){e(St(t.startClocks.timeStamp,bt()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):e(St(t.startClocks.timeStamp,bt()))}(i,(function(e){n.clearTracingIfNeeded(i),t.notify(an.REQUEST_COMPLETED,{duration:e,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ie.FETCH,url:i.url,response:i.response,init:i.init,input:i.input})}))}}))}(t,e,r)}function Pa(){var t=Da;return Da+=1,t}function Ua(t){if(performance&&"getEntriesByName"in performance){var e=performance.getEntriesByName(t.url,"resource");if(e.length&&"toJSON"in e[0]){var n,r=M(e,(function(t){return t.toJSON()}));return r=D(r,Ai),1===(r=D(r,(function(e){return n=e,r=t.startClocks.relative,i=Ba({startTime:t.startClocks.relative,duration:t.duration}),o=1,n.startTime>=r-o&&Ba(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&Ba((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function Ba(t){return t.startTime+t.duration}function Fa(t,e){t.subscribe(an.REQUEST_COMPLETED,(function(e){t.notify(an.RAW_RUM_EVENT_COLLECTED,function(t){var e=t.type===ie.XHR?Jt.XHR:Jt.FETCH,n=Ua(t),r=n?Ct(n.startTime):t.startClocks,i=n?Ha(n):void 0,o=function(t){var e=t.traceSampled&&t.traceId&&t.spanId;if(!e)return;return{_gc:{spanId:t.spanId,traceId:t.traceId},resource:{id:q()}}}(t),a=Q(t.url).getParse(),s=A({date:r.timeStamp,resource:{id:q,type:e,duration:vt(t.duration),method:t.method,status:t.status,statusGroup:rt(t.status),url:t.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:Y(a.Path),urlQuery:de(X(t.url))},type:ne.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:s,domainContext:{performanceEntry:n&&za(n),xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}}(e))})),t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(n){for(var r=0;r<n.length;r++){var i=n[r];"resource"!==i.entryType||("xmlhttprequest"===(o=i).initiatorType||"fetch"===o.initiatorType)||Oi(i.name,e.resourceUrlLimit)||t.notify(an.RAW_RUM_EVENT_COLLECTED,Va(i))}var o}))}function Va(t){var e=Si(t),n=Ha(t),r=function(t){return t.traceId?{_gc:{traceId:t.traceId}}:void 0}(t),i=Q(t.name).getParse(),o="";!function(t){return t.encodedBodySize>0&&t.transferSize>0&&t.transferSize<t.encodedBodySize||null}(t)?function(t){return!(t.transferSize>0)&&(t.decodedBodySize>0||t.duration<30)}(t)&&(o=200):o=304;var a=Ct(t.startTime),s=A({date:a.timeStamp,resource:{id:q(),type:e,url:t.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:Y(i.Path),urlQuery:de(X(t.name)),method:"GET",status:o,statusGroup:rt(o)},type:ne.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:s,domainContext:{performanceEntry:za(t)}}}function Ha(t){return{resource:A({},{duration:(e=t,0===e.duration&&e.startTime<e.responseEnd?vt(e.responseEnd-e.startTime):vt(e.duration))},ki(t),Ii(t))};var e}function za(t){return"function"==typeof PerformanceEntry&&t instanceof PerformanceEntry&&t.toJSON(),t}var Wa={sdkVersion:"3.1.2",sdkName:"df_web_rum_sdk"};function $a(t){if(t.applicationId){if(!t.datakitUrl&&!t.datakitOrigin)return n.error("datakitOrigin is not configured, no RUM data will be collected."),!1;if(void 0===t.sessionReplaySampleRate||Lt(t.sessionReplaySampleRate)){var e=function(t){void 0!==t.allowedTracingUrls&&void 0!==t.allowedTracingOrigins&&n.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==t.allowedTracingUrls){if(!R(t.allowedTracingUrls))return void n.error("Allowed Tracing URLs should be an array");var e=[];return T(t.allowedTracingUrls,(function(r){var i;xt(r)?e.push({match:r,traceType:Ut(t.traceType,oe.DDTRACE)}):"object"===tt(i=r)&&xt(i.match)&&W(i.traceType)?e.push(r):n.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)})),e}if(void 0!==t.allowedTracingOrigins){if(!R(t.allowedTracingOrigins))return void n.error("Allowed Tracing Origins should be an array");e=[];return T(t.allowedTracingOrigins,(function(n){var r=ja(n,Ut(t.traceType,oe.DDTRACE));r&&e.push(r)})),e}if(void 0!==t.allowedDDTracingOrigins){if(!R(t.allowedDDTracingOrigins))return void n.error("Allowed Tracing Origins should be an array");e=[];return T(t.allowedDDTracingOrigins,(function(n){var r=ja(n,Ut(t.traceType,oe.DDTRACE));r&&e.push(r)})),e}return[]}(t);if(e)if(void 0===t.tracingSampleRate||Lt(t.tracingSampleRate))if(void 0===t.excludedActivityUrls||R(t.excludedActivityUrls)){var r=kn(t);if(r){var i,o,a=!!Ut(t.trackUserInteractions,t.trackInteractions),s=!!t.trackFrustrations;return C({applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:Ut(t.sessionReplaySampleRate,100),tracingSampleRate:t.tracingSampleRate,allowedTracingUrls:e,excludedActivityUrls:Ut(t.excludedActivityUrls,[]),trackUserInteractions:a||s,trackFrustrations:s,trackViewsManually:!!t.trackViewsManually,traceType:Ut(t.traceType,oe.DDTRACE),traceId128Bit:!!t.traceId128Bit,defaultPrivacyLevel:(i=xn,o=t.defaultPrivacyLevel,P(L(i),(function(t){return i[t]===o}))?t.defaultPrivacyLevel:xn.MASK_USER_INPUT)},r,Wa)}}else n.error("Excluded Activity Urls should be an array");else n.error("Tracing Sample Rate should be a number between 0 and 100")}else n.error("Premium Sample Rate should be a number between 0 and 100")}else n.error("Application ID is not configured, no RUM data will be collected.")}function ja(t,e){var r;if("string"==typeof t?r=t:t instanceof RegExp?r=function(e){return t.test(_n(e))}:"function"==typeof t&&(r=function(e){return t(_n(e))}),void 0!==r)return{match:r,traceType:e};n.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",t)}var Ga={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},Ka={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Za={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},qa={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Ya={Play:0,Pause:1},Qa={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:xn.ALLOW,MASK:xn.MASK,MASK_USER_INPUT:xn.MASK_USER_INPUT},Xa="data-gc-privacy",Ja="allow",ts="mask",es="mask-user-input",ns="hidden",rs="gc-privacy-allow",is="gc-privacy-mask",os="gc-privacy-mask-user-input",as="gc-privacy-hidden",ss="***",us="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",cs={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},ls=new WeakMap;function fs(t){return ls.has(t)}function ds(t){return ls.get(t)}function ps(t,e){var n=t.tagName,r=t.value;if(Rs(t,e)){var i=t.type;if("INPUT"===n&&("button"===i||"submit"===i||"reset"===i||"range"===i))return r;if(!r||"OPTION"===n)return;return ss}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}var hs=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,vs=/^[A-Za-z]+:|^\/\//,_s=/^data:.*,/i;function ms(t,e){return t.replace(hs,(function(t,n,r,i,o,a){var s=r||o||a;if(!e||!s||vs.test(s)||_s.test(s))return t;var u=n||i||"";return"/"===s[0]?"url(".concat(u).concat(function(t){return(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(e)+s).concat(u,")"):`url(${u}${function(t,e){try{return mn(t,e).href}catch(e){return t}}(s,e)}${u})`}))}function gs(t){if(!t)return null;var e,n;try{e=t.rules||t.cssRules}catch{}return e?ms(((n=Array.from(e,(void 0===ut&&(ut=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),ut?Es:ys)).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n),t.href):null}function ys(t){return function(t){return"styleSheet"in t}(t)&&gs(t.styleSheet)||t.cssText}function Es(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return ys(t)}function bs(t){if(void 0!==t&&0!==t.length)return t.map((function(t){var e=t.cssRules||t.rules;return{cssRules:Array.from(e,(function(t){return t.cssText})),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function ws(t,e){if(!e||""===e.trim())return e;var n=t.createElement("a");return n.href=e,n.href}var Ss=/^[^ \t\n\r\u000c]+/,Ts=/^[, \t\n\r\u000c]+/;var Cs=1e5;function Os(t,e){var n=Zn(t),r=n?Os(n,e):e;return Is(As(t),r)}function Is(t,e){switch(e){case Qa.HIDDEN:case Qa.IGNORE:return e}switch(t){case Qa.ALLOW:case Qa.MASK:case Qa.MASK_USER_INPUT:case Qa.HIDDEN:case Qa.IGNORE:return t;default:return e}}function As(t){if(jn(t)){var e=t.getAttribute(Xa);if("BASE"===t.tagName)return Qa.ALLOW;if("INPUT"===t.tagName){var n=t;if("password"===n.type||"email"===n.type||"tel"===n.type)return Qa.MASK;if("hidden"===n.type)return Qa.MASK;var r=n.getAttribute("autocomplete");if(r&&0===r.indexOf("cc-"))return Qa.MASK}return e===ns||t.classList.contains(as)?Qa.HIDDEN:e===ts||t.classList.contains(is)?Qa.MASK:e===es||t.classList.contains(os)?Qa.MASK_USER_INPUT:e===Ja||t.classList.contains(rs)?Qa.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){var e=i("rel");return/preload|prefetch/i.test(e)&&"script"===i("as")||"shortcut icon"===e||"icon"===e}if("META"===t.nodeName){var n=i("name"),r=(e=i("rel"),i("property"));return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===e||"apple-touch-icon"===e||"shortcut icon"===e||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(r)||/^product:/.test(r)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function i(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?Qa.IGNORE:void 0}}function Rs(t,e){switch(e){case Qa.MASK:case Qa.HIDDEN:case Qa.IGNORE:return!0;case Qa.MASK_USER_INPUT:return function(t){return t.nodeType===Node.TEXT_NODE}(t)?xs(t.parentNode):xs(t);default:return!1}}function xs(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!cs[e.tagName]}var ks=function(t){return t.replace(/\S/g,"x")};function Ns(t,e,n){var r=t.parentElement&&t.parentElement.tagName,i=t.textContent||"";if(!e||i.trim()){var o=n;if("SCRIPT"===r)i=ss;else if(o===Qa.HIDDEN)i=ss;else if(Rs(t,o))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!i.trim())return}else i="OPTION"===r?ss:ks(i);return i}}var Ls={INITIAL_FULL_SNAPSHOT:0,SUBSEQUENT_FULL_SNAPSHOT:1,MUTATION:2};function Ds(t,e,n){return Ms(t,{serializationContext:n,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function Ms(t,e){var n=function(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e){return{type:Ka.Document,childNodes:Ps(t,e),adoptedStyleSheets:bs(t.adoptedStyleSheets)}}(t,e);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e){var n=[];t.childNodes.length&&(n=Ps(t,e));var r=Kn(t);r&&e.serializationContext.shadowRootsController.addShadowRoot(t);return{type:Ka.DocumentFragment,childNodes:n,isShadowRoot:r,adoptedStyleSheets:r?bs(t.adoptedStyleSheets):void 0}}(t,e);case t.DOCUMENT_TYPE_NODE:return n=t,{type:Ka.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId};case t.ELEMENT_NODE:return function(t,e){var n=Vs(t.tagName),r=(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),i=Is(As(t),e.parentNodePrivacyLevel);var o;if(i===Qa.HIDDEN){var a=t.getBoundingClientRect(),s=a.width,u=a.height;return{type:Ka.Element,tagName:n,attributes:{rr_width:s+"px",rr_height:u+"px",[Xa]:ns},childNodes:[],isSVG:r}}if(i===Qa.IGNORE)return;var c=function(t,e,n){if(e===Qa.HIDDEN)return{};for(var r={},i=Vs(t.tagName),o=t.ownerDocument,a=0;a<t.attributes.length;a+=1){var s=t.attributes.item(a).name,u=Us(t,e,s,n.configuration);null!==u&&(r[s]=Hs(o,i,s,u))}if(t.value&&("textarea"===i||"select"===i||"option"===i||"input"===i)){var c=ps(t,e);void 0!==c&&(r.value=c)}if("option"===i&&e===Qa.ALLOW){var l=t;l.selected&&(r.selected=l.selected)}if("link"===i){var f=Array.from(o.styleSheets).find((function(e){return e.href===t.href}));(d=gs(f))&&f&&(r._cssText=d)}if("style"===i&&t.sheet){var d;(d=gs(t.sheet))&&(r._cssText=d)}var p,h,v=t;"input"!==i||"radio"!==v.type&&"checkbox"!==v.type||(e===Qa.ALLOW?r.checked=!!v.checked:Rs(v,e)&&delete r.checked);if("audio"===i||"video"===i){var _=t;r.rr_mediaState=_.paused?"paused":"played"}var m=n.serializationContext;switch(m.status){case Ls.INITIAL_FULL_SNAPSHOT:p=Math.round(t.scrollTop),h=Math.round(t.scrollLeft),(p||h)&&m.elementsScrollPositions.set(t,{scrollTop:p,scrollLeft:h});break;case Ls.SUBSEQUENT_FULL_SNAPSHOT:if(m.elementsScrollPositions.has(t)){const e=m.elementsScrollPositions.get(t);p=e.scrollTop,h=e.scrollLeft}}h&&(r.rr_scrollLeft=h);p&&(r.rr_scrollTop=p);return r}(t,i,e),l=[];if(t.childNodes.length&&"style"!==n){l=Ps(t,e.parentNodePrivacyLevel===i&&e.ignoreWhiteSpace===("head"===n)?e:C({},e,{parentNodePrivacyLevel:i,ignoreWhiteSpace:"head"===n}))}if(Gn(t)){var f=Ms(t.shadowRoot,e);null!==f&&l.push(f)}return{type:Ka.Element,tagName:n,attributes:c,childNodes:l,isSVG:r}}(t,e);case t.TEXT_NODE:return function(t,e){var n=Ns(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(void 0===n)return;return{type:Ka.Text,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:Ka.CDATA,textContent:""}}var n}(t,e);if(!n)return null;var r=ds(t)||Bs++,i=n;return i.id=r,function(t,e){ls.set(t,e)}(t,r),e.serializedNodeIds&&e.serializedNodeIds.add(r),i}function Ps(t,e){var n=[];return t.childNodes.forEach((function(t){var r=Ms(t,e);r&&n.push(r)})),n}function Us(t,e,n,r){if(e===Qa.HIDDEN)return null;var i=t.getAttribute(n);if(e===Qa.MASK&&n!==Xa&&!uo.includes(n)&&n!==r.actionNameAttribute){var o=t.tagName;switch(n){case"title":case"alt":case"placeholder":return ss}if("IMG"===o||"SOURCE"===o){if("src"===n||"srcset"===n)return us;if("onerror"===n)return null}if("A"===o&&"href"===n)return ss;if(i&&Bt(n,"data-"))return ss}return i&&"string"==typeof i&&i.length>Cs&&"data:"===i.slice(0,5)?"data:truncated":i}var Bs=1;var Fs=/[^a-z1-6-_]/;function Vs(t){var e=(t+"").toLowerCase().trim();return Fs.test(e)?"div":e}function Hs(t,e,n,r){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?ws(t,r):"background"!==n||!r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;var n=0;function r(t){var r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(Ts),!(n>=e.length);){var o=r(Ss);if(","===o.slice(-1))o=ws(t,o.substring(0,o.length-1)),i.push(o);else{var a="";o=ws(t,o);for(var s=!1;;){var u=e.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(t,r):"style"===n?ms(r,((i=document.createElement("a")).href="",i.href)):"object"===e&&"data"===n?ws(t,r):r:ws(t,r):r;var i}function zs(t){return Boolean(t.changedTouches)}function Ws(t,e){return{data:C({source:t},e),type:Ga.IncrementalSnapshot,timestamp:bt()}}function $s(t){for(var e=[],n=t;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(r),n=n.parentRule}if(n.parentStyleSheet){r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}}var js=100;function Gs(t){var e=it,n=[];function r(){e(),t(n),n=[]}return{addMutations:function(t){0===n.length&&(e=function(t,e){if(window.requestIdleCallback){var n=window.requestIdleCallback(a(t),e);return function(){return window.cancelIdleCallback(n)}}n=window.requestAnimationFrame(a(t));return function(){return window.cancelAnimationFrame(n)}}(r,{timeout:js})),Array.prototype.push.apply(n,t)},flush:r,stop:function(){e()}}}function Ks(t,e,n,r){var i=Bi();if(!i)return{stop:it,flush:it};var o=Gs((function(r){!function(t,e,n,r){t.filter((function(t){return"childList"===t.type})).forEach((function(t){t.removedNodes.forEach((function(t){Zs(t,r.removeShadowRoot)}))}));var i=t.filter((function(t){return t.target.isConnected&&function(t){for(var e=t;e;){if(!fs(e)&&!Kn(e))return!1;e=Zn(e)}return!0}(t.target)&&Os(t.target,n.defaultPrivacyLevel)!==Qa.HIDDEN})),o=function(t,e,n){var r=new Set,i=new Map;for(var o of t)o.addedNodes.forEach((function(t){r.add(t)})),o.removedNodes.forEach((function(t){r.has(t)||i.set(t,o.target),r.delete(t)}));var a=Array.from(r);s=a,s.sort((function(t,e){var n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0}));var s;var u=new Set,c=[];for(var l of a)if(!v(l)){var f=Os(l.parentNode,e.defaultPrivacyLevel);if(f!==Qa.HIDDEN&&f!==Qa.IGNORE){var d=Ms(l,{serializedNodeIds:u,parentNodePrivacyLevel:f,serializationContext:{status:Ls.MUTATION,shadowRootsController:n},configuration:e});if(d){var p=Zn(l);c.push({nextId:_(l),parentId:ds(p),node:d})}}}var h=[];return i.forEach((function(t,e){fs(e)&&h.push({parentId:ds(t),id:ds(e)})})),{adds:c,removes:h,serializedNodeIds:u,hasBeenSerialized:v};function v(t){return fs(t)&&u.has(ds(t))}function _(t){for(var e=t.nextSibling;e;){if(fs(e))return ds(e);e=e.nextSibling}return null}}(i.filter((function(t){return"childList"===t.type})),n,r),a=o.adds,s=o.removes,u=o.serializedNodeIds;function c(t){return fs(t)&&u.has(ds(t))}var l=function(t,e){var n=[],r=new Set,i=t.filter((function(t){return!r.has(t.target)&&(r.add(t.target),!0)}));for(var o of i){if(o.target.textContent!==o.oldValue){var a=Os(Zn(o.target),e.defaultPrivacyLevel);a!==Qa.HIDDEN&&a!==Qa.IGNORE&&n.push({id:ds(o.target),value:Ut(Ns(o.target,!1,a))})}}return n}(i.filter((function(t){return"characterData"===t.type&&!c(t.target)})),n),f=function(t,e){var n=[],r=new Map,i=t.filter((function(t){var e=r.get(t.target);return(!e||!e.has(t.attributeName))&&(e?e.add(t.attributeName):r.set(t.target,new Set([t.attributeName])),!0)})),o=new Map;for(var a of i){if(a.target.getAttribute(a.attributeName)!==a.oldValue){var s,u=Os(a.target,e.defaultPrivacyLevel),c=Us(a.target,u,a.attributeName,e);if("value"===a.attributeName){var l=ps(a.target,u);if(void 0===l)continue;s=l}else s="string"==typeof c?c:null;var f=o.get(a.target);f||(f={id:ds(a.target),attributes:{}},n.push(f),o.set(a.target,f)),f.attributes[a.attributeName]=s}}return n}(i.filter((function(t){return"attributes"===t.type&&!c(t.target)})),n);if(!(l.length||f.length||s.length||a.length))return;e({adds:a,removes:s,texts:l,attributes:f})}(r.concat(s.takeRecords()),t,e,n)})),s=new i(a(o.addMutations));return s.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){s.disconnect(),o.stop()},flush:function(){o.flush()}}}function Zs(t,e){var n,r;Gn(t)&&e(t.shadowRoot),r=function(t){return Zs(t,e)},(n=t).childNodes.forEach(r),Gn(n)&&r(n.shadowRoot)}var qs=function(t,e){var n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(!function(){var t=window.visualViewport;return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}()?(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)):(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)),r):r},Ys=function(){var t=window.visualViewport;return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}},Qs=50,Xs=100,Js=200,tu=new WeakMap;let eu=1;function nu(t){return tu.has(t)||tu.set(t,eu++),tu.get(t)}function ru(t){var e,n,r,i,o,a,s,u,c,l=(e=t.mutationCb,n=t.configuration,r=t.shadowRootsController,Ks(e,n,r,document)),f=function(t){var e=K((function(e){var n=su(e);if(fs(n)){var r=ou(e);if(!r)return;var i={id:ds(n),timeOffset:0,x:r.x,y:r.y};t([i],zs(e)?Za.TouchMove:Za.MouseMove)}}),Qs,{trailing:!1});return Ge(document,[Xt.MOUSE_MOVE,Xt.TOUCH_MOVE],e.throttled,{capture:!0,passive:!0}).stop}(t.mousemoveCb),d=function(t,e){var n=function(n){var r=su(n);if(Os(r,e)!==Qa.HIDDEN&&fs(r)){var i,o=ds(r),a=iu[n.type];if(a!==qa.Blur&&a!==qa.Focus){var s=ou(n);if(!s)return;i={id:o,type:a,x:s.x,y:s.y}}else i={id:o,type:a};var u=C({id:nu(n)},Ws(Za.MouseInteraction,i));t(u)}};return Ge(document,Object.keys(iu),n,{capture:!0,passive:!0}).stop}(t.mouseInteractionCb,t.configuration.defaultPrivacyLevel),p=function(t,e,n){var r=K((function(r){var i=su(r);if(i&&Os(i,e)!==Qa.HIDDEN&&fs(i)){var o=ds(i),a=i===document?{scrollTop:Qn(),scrollLeft:Yn()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};n.set(i,a),t({id:o,x:a.scrollLeft,y:a.scrollTop})}}),Xs);return je(document,Xt.SCROLL,r.throttled,{capture:!0,passive:!0}).stop}(t.scrollCb,t.configuration.defaultPrivacyLevel,t.elementsScrollPositions),h=function(t){return Po().subscribe(t).unsubscribe}(t.viewportResizeCb),v=au(t.inputCb,t.configuration.defaultPrivacyLevel),_=(i=t.mediaInteractionCb,o=t.configuration.defaultPrivacyLevel,a=function(t){var e=su(t);e&&Os(e,o)!==Qa.HIDDEN&&fs(e)&&i({id:ds(e),type:t.type===Xt.PLAY?Ya.Play:Ya.Pause})},Ge(document,[Xt.PLAY,Xt.PAUSE],a,{capture:!0,passive:!0}).stop),m=function(t){function e(t,e){t&&fs(t.ownerNode)&&e(ds(t.ownerNode))}var n=[ce(CSSStyleSheet.prototype,"insertRule",{before:function(n,r){e(this,(function(e){return t({id:e,adds:[{rule:n,index:r}]})}))}}),ce(CSSStyleSheet.prototype,"deleteRule",{before:function(n){e(this,(function(e){return t({id:e,removes:[{index:n}]})}))}})];"undefined"!=typeof CSSGroupingRule?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(r){n.push(ce(r.prototype,"insertRule",{before:function(n,r){var i=this;e(this.parentStyleSheet,(function(e){var o=$s(i);o&&(o.push(r||0),t({id:e,adds:[{rule:n,index:o}]}))}))}}),ce(r.prototype,"deleteRule",{before:function(n){var r=this;e(this.parentStyleSheet,(function(e){var i=$s(r);i&&(i.push(n),t({id:e,removes:[{index:i}]}))}))}}))}return function(){n.forEach((function(t){t.stop()}))}}(t.styleSheetCb),g=(s=t.focusCb,Ge(window,[Xt.FOCUS,Xt.BLUR],(function(){s({has_focus:document.hasFocus()})})).stop),y=function(t){if(!window.visualViewport)return it;var e=K((function(){t(Ys())}),Js,{trailing:!1}),n=Ge(window.visualViewport,[Xt.RESIZE,Xt.SCROLL],e.throttled,{capture:!0,passive:!0}).stop,r=e.cancel;return function(){n(),r()}}(t.visualViewportResizeCb),E=(u=t.lifeCycle,c=t.frustrationCb,u.subscribe(an.RAW_RUM_EVENT_COLLECTED,(function(t){t.rawRumEvent.type===ne.ACTION&&t.rawRumEvent.action.type===te.CLICK&&t.rawRumEvent.action.frustration&&t.rawRumEvent.action.frustration.type&&t.rawRumEvent.action.frustration.type.length&&"events"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&c({timestamp:t.rawRumEvent.date,type:Ga.FrustrationRecord,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((function(t){return nu(t)}))}})})).unsubscribe);return{flush:function(){l.flush()},stop:function(){l.stop(),f(),d(),p(),h(),v(),_(),m(),g(),y(),E()}}}var iu={[Xt.POINTER_UP]:qa.MouseUp,[Xt.MOUSE_DOWN]:qa.MouseDown,[Xt.CLICK]:qa.Click,[Xt.CONTEXT_MENU]:qa.ContextMenu,[Xt.DBL_CLICK]:qa.DblClick,[Xt.FOCUS]:qa.Focus,[Xt.BLUR]:qa.Blur,[Xt.TOUCH_START]:qa.TouchStart,[Xt.TOUCH_END]:qa.TouchEnd};function ou(t){var e=zs(t)?t.changedTouches[0]:t,n=e.clientX,r=e.clientY;if(window.visualViewport){var i=qs(n,r);n=i.visualViewportX,r=i.visualViewportY}if(Number.isFinite(n)&&Number.isFinite(r))return{x:n,y:r}}function au(t,e,n){void 0===n&&(n=document);var r,i=new WeakMap,o=n!==document,a=Ge(n,o?[Xt.CHANGE]:[Xt.INPUT,Xt.CHANGE],(function(t){var e=su(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&u(e)}),{capture:!0,passive:!0}),s=a.stop;if(o)r=it;else{const t=[le(HTMLInputElement.prototype,"value",u),le(HTMLInputElement.prototype,"checked",u),le(HTMLSelectElement.prototype,"value",u),le(HTMLTextAreaElement.prototype,"value",u),le(HTMLSelectElement.prototype,"selectedIndex",u)];r=function(){t.forEach((function(t){return t.stop()}))}}return function(){r(),s()};function u(t){var n=Os(t,e);if(n===Qa.HIDDEN)return;var r=t.type;let i;if("radio"===r||"checkbox"===r){if(Rs(t,n))return;i={isChecked:t.checked}}else{var o=ps(t,n);if(void 0===o)return;i={text:o}}c(t,i);var a,s,u=t.name;"radio"===r&&u&&t.checked&&(a=document.querySelectorAll('input[type="radio"][name="'+F(u)+'"]'),s=function(e){e!==t&&c(e,{isChecked:!1})},Array.prototype.forEach.call(a,s))}function c(e,n){if(fs(e)){var r=i.get(e);r&&r.text===n.text&&r.isChecked===n.isChecked||(i.set(e,n),t(C({id:ds(e)},n)))}}}function su(t){return!0===t.composed&&Gn(t.target)?t.composedPath()[0]:t.target}var uu=function(t,e){var n=e.mutationCb,r=e.inputCb,i=new Map,o={addShadowRoot:function(e){var a=Ks(n,t,o,e),s=a.flush,u=a.stop,c=au(r,t.defaultPrivacyLevel,e);i.set(e,{flush:s,stop:function(){u(),c()}})},removeShadowRoot:function(t){var e=i.get(t);e&&(e.stop(),i.delete(t))},stop:function(){i.forEach((function(t){t.stop()}))},flush:function(){i.forEach((function(t){t.flush()}))}};return o};function cu(t){var e=t.emit;if(!e)throw new Error("emit function is required");var n,r=(n=new WeakMap,{set:function(t,e){(t!==document||document.scrollingElement)&&n.set(t===document?document.scrollingElement:t,e)},get:function(t){return n.get(t)},has:function(t){return n.has(t)}}),i=function(t){e(Ws(Za.Mutation,t))},o=function(t){e(Ws(Za.Input,t))},a=uu(t.configuration,{mutationCb:i,inputCb:o}),s=function(n,i){void 0===n&&(n=bt()),void 0===i&&(i={status:Ls.INITIAL_FULL_SNAPSHOT,elementsScrollPositions:r,shadowRootsController:a});var o=Uo(),s=o.width,u=o.height;e({data:{height:u,href:window.location.href,width:s},type:Ga.Meta,timestamp:n}),e({data:{has_focus:document.hasFocus()},type:Ga.Focus,timestamp:n}),e({data:{node:Ds(document,t.configuration,i),initialOffset:{left:Yn(),top:Qn()}},type:Ga.FullSnapshot,timestamp:n}),window.visualViewport&&e({data:Ys(),type:Ga.VisualViewport,timestamp:n})};s();var u=ru({lifeCycle:t.lifeCycle,configuration:t.configuration,elementsScrollPositions:r,inputCb:o,mediaInteractionCb:function(t){e(Ws(Za.MediaInteraction,t))},mouseInteractionCb:function(t){e(t)},mousemoveCb:function(t,n){e(Ws(n,{positions:t}))},mutationCb:i,scrollCb:function(t){e(Ws(Za.Scroll,t))},styleSheetCb:function(t){e(Ws(Za.StyleSheetRule,t))},viewportResizeCb:function(t){e(Ws(Za.ViewportResize,t))},frustrationCb:function(t){e(t)},focusCb:function(t){e({data:t,type:Ga.Focus,timestamp:bt()})},visualViewportResizeCb:function(t){e({data:t,type:Ga.VisualViewport,timestamp:bt()})},shadowRootsController:a}),c=u.stop,l=u.flush;function f(){a.flush(),l()}return{stop:function(){a.stop(),c()},takeSubsequentFullSnapshot:function(t){f(),s(t,{shadowRootsController:a,status:Ls.SUBSEQUENT_FULL_SNAPSHOT,elementsScrollPositions:r})},flushMutations:f,shadowRootsController:a}}function lu(t,e,n){var r=new FormData;return r.append("segment",new Blob([t],{type:"application/octet-stream"}),e.session.id+"-"+e.start),fu(e,(function(t,e){r.append(t,e)})),r.append("raw_segment_size",n),{data:r,bytesCount:t.byteLength}}function fu(t,e,n){void 0===n&&(n=""),T(z(t),(function(t){var r=t[1],i=t[0];"object"==typeof r&&null!==r?fu(r,e,""+n+i+"_"):e(""+n+i,String(r))}))}var du,pu=10;function hu(t){return vu(t).segments_count}function vu(t){var e;return du||(du=new Map),du.has(t)?e=du.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},du.set(t,e),du.size>pu&&function(){if(!du)return;if(du.keys)du.delete(du.keys().next().value);else{var t=!0;du.forEach((function(e,n){t&&(du.delete(n),t=!1)}))}}()),e}function _u(t,e,n){this.encoder=t;var r=e.view.id;this.metadata=C({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:hu(r),source:"browser"},e),function(t){vu(t).segments_count+=1}(r)}_u.prototype.addRecord=function(t,e){this.metadata.start=Math.min(this.metadata.start,t.timestamp),this.metadata.end=Math.max(this.metadata.end,t.timestamp),this.metadata.records_count+=1,this.metadata.has_full_snapshot||(this.metadata.has_full_snapshot=t.type===Ga.FullSnapshot),vu(this.metadata.view.id).records_count+=1;const n=1===this.metadata.records_count?'{"records":[':",";this.encoder.write(n+JSON.stringify(t),e)},_u.prototype.flush=function(t){if(0===this.metadata.records_count)throw new Error("Empty segment flushed");var e=this;this.encoder.write("],"+JSON.stringify(this.metadata).slice(1)+"\n",(function(){var n,r;n=e.metadata.view.id,r=e.encoder.getRawBytesCount(),vu(n).segments_total_raw_size+=r,t(e.metadata)})),this.encoder.reset()};var mu=30*ct,gu=6e4;function yu(t,e,n,r,i,o){return function(t,e,n,r){var i={status:Eu.WaitingForInitialRecord,nextSegmentCreationReason:"init"},o=t.subscribe(an.VIEW_CREATED,(function(){c("view_change")})),a=o.unsubscribe,s=t.subscribe(an.PAGE_EXITED,(function(t){c(t.reason)})),u=s.unsubscribe;function c(t){i.status===Eu.SegmentPending&&(i.segment.flush((function(e){var i=lu(r.getEncodedBytes(),e,r.getRawBytesCount());$n(t)?n.sendOnExit(i):n.send(i)})),p(i.expirationTimeoutId)),i="stop"!==t?{status:Eu.WaitingForInitialRecord,nextSegmentCreationReason:t}:{status:Eu.Stopped}}return{addRecord:function(t){if(i.status!==Eu.Stopped){if(i.status===Eu.WaitingForInitialRecord){var n=e();if(!n)return;i={status:Eu.SegmentPending,segment:new _u(r,n,i.nextSegmentCreationReason),expirationTimeoutId:d((function(){c("segment_duration_limit")}),mu)}}var o=i.segment;o.addRecord(t,(function(){i.status===Eu.SegmentPending&&i.segment===o&&r.getEncodedBytesCount()>gu&&c("segment_bytes_limit")}))}},stop:function(){c("stop"),a(),u()}}}(t,(function(){return function(t,e,n){var r=e.findTrackedSession(),i=n.findView();if(!r||!i)return;return{sdk:{name:t.sdkName,version:t.sdkVersion},env:t.env||"",service:i.service||t.service||"browser",version:i.version||t.version||"",app:{id:t.applicationId},session:{id:r.id},view:{id:i.id}}}(e,n,r)}),i,o)}var Eu={WaitingForInitialRecord:0,SegmentPending:1,Stopped:2};var bu=1;function wu(t,e){var n,r=0,i=[],o=0,a=[],s=je(t,"message",(function(t){var o=t.data;if("wrote"===o.type&&o.streamId===e){var u=a.shift();u&&u.id===o.id?(0===o.id?(r=o.additionalBytesCount,i=[o.result]):(r+=o.additionalBytesCount,i.push(o.result)),n=o.trailer,u.callback()):(s(),li("Worker responses received out of order."))}})).stop;return{getEncodedBytes:function(){return i.length?function(t){var e,n=t.reduce((function(t,e){return t+e.length}),0),r=new Uint8Array(n),i=0,o=De(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r.set(a,i),i+=a.length}}catch(t){o.e(t)}finally{o.f()}return r}(i.concat(n)):new Uint8Array(0)},getEncodedBytesCount:function(){return i.length?i.reduce((function(t,e){return t+e.length}),0)+n.length:0},getRawBytesCount:function(){return r},write:function(n,r){t.postMessage({action:"write",id:o,data:n,streamId:e}),a.push({id:o,callback:r}),o+=1},reset:function(){t.postMessage({action:"reset",streamId:e}),o=0}}}var Su=10*ct;function Tu(){return new Worker(URL.createObjectURL(new Blob(['!function(){"use strict";function t(t,a){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,a){if(!t)return;if("string"==typeof t)return e(t,a);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,a)}(t))||a&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,_=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return _=t.done,t},e:function(t){h=!0,s=t},f:function(){try{_||null==n.return||n.return()}finally{if(h)throw s}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function a(e){var a,n=e.reduce((function(t,e){return t+e.length}),0),r=new Uint8Array(n),i=0,s=t(e);try{for(s.s();!(a=s.n()).done;){var _=a.value;r.set(_,i),i+=_.length}}catch(t){s.e(t)}finally{s.f()}return r}function n(t){for(var e=t.length;--e>=0;)t[e]=0}var r=256,i=286,s=30,_=15,h=new Uint8Array([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]),l=new Uint8Array([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]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);n(u);var f=new Array(60);n(f);var c=new Array(512);n(c);var p=new Array(256);n(p);var g=new Array(29);n(g);var v,w,b,m=new Array(s);function y(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(m);var z=function(t){return t<256?c[t]:c[256+(t>>>7)]},A=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,A(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},E=function(t,e,a){x(t,a[2*e],a[2*e+1])},Z=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},S=function(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=_;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=Z(i[h]++,h))}},U=function(t){var e;for(e=0;e<i;e++)t.dyn_ltree[2*e]=0;for(e=0;e<s;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},R=function(t){t.bi_valid>8?A(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},L=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},F=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&L(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!L(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},T=function(t,e,a){var n,i,s,_,o=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===n?E(t,i,e):(s=p[i],E(t,s+r+1,e),0!==(_=h[s])&&(i-=g[s],x(t,i,_)),n--,s=z(n),E(t,s,a),0!==(_=l[s])&&(n-=m[s],x(t,n,_)))}while(o<t.last_lit);E(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)F(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],F(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,F(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=_;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(i=p,g++),l[2*n+1]=i,n>o||(t.bl_count[i]++,s=0,n>=c&&(s=f[n-c]),h=l[2*n],t.opt_len+=h*(i+s),u&&(t.static_len+=h*(d[2*n+1]+s)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),S(i,o,t.bl_count)},O=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},N=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{E(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(E(t,r,t.bl_tree),_--),E(t,16,t.bl_tree),x(t,_-3,2)):_<=10?(E(t,17,t.bl_tree),x(t,_-3,3)):(E(t,18,t.bl_tree),x(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},D=!1,C=function(t,e,a,n){x(t,0+(n?1:0),3),function(t,e,a,n){R(t),n&&(A(t,a),A(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},M=function(t,e,a,n){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<r;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=a+5,a+4<=i&&-1!==e?C(t,e,a,n):4===t.strategy||s===i?(x(t,2+(n?1:0),3),T(t,u,f)):(x(t,4+(n?1:0),3),function(t,e,a,n){var r;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),r=0;r<n;r++)x(t,t.bl_tree[2*d[r]+1],3);N(t,t.dyn_ltree,e-1),N(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),T(t,t.dyn_ltree,t.dyn_dtree)),U(t),n&&R(t)},B={_tr_init:function(t){D||(!function(){var t,e,a,n,r,d=new Array(16);for(a=0,n=0;n<28;n++)for(g[n]=a,t=0;t<1<<h[n];t++)p[a++]=n;for(p[a-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<l[n];t++)c[r++]=n;for(r>>=7;n<s;n++)for(m[n]=r<<7,t=0;t<1<<l[n]-7;t++)c[256+r++]=n;for(e=0;e<=_;e++)d[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,d[8]++;for(;t<=255;)u[2*t+1]=9,t++,d[9]++;for(;t<=279;)u[2*t+1]=7,t++,d[7]++;for(;t<=287;)u[2*t+1]=8,t++,d[8]++;for(S(u,287,d),t=0;t<s;t++)f[2*t+1]=5,f[2*t]=Z(t,5);v=new y(u,h,257,i,_),w=new y(f,l,0,s,_),b=new y(new Array(0),o,0,19,7)}(),D=!0),t.l_desc=new k(t.dyn_ltree,v),t.d_desc=new k(t.dyn_dtree,w),t.bl_desc=new k(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,U(t)},_tr_stored_block:C,_tr_flush_block:M,_tr_tally:function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(p[a]+r+1)]++,t.dyn_dtree[2*z(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){x(t,2,3),E(t,256,u),function(t){16===t.bi_valid?(A(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},H=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},Y=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),K=function(t,e,a,n){var r=Y,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},G=B._tr_init,X=B._tr_stored_block,W=B._tr_flush_block,$=B._tr_tally,q=B._tr_align,J=j.Z_NO_FLUSH,Q=j.Z_PARTIAL_FLUSH,V=j.Z_FULL_FLUSH,tt=j.Z_FINISH,et=j.Z_BLOCK,at=j.Z_OK,nt=j.Z_STREAM_END,rt=j.Z_STREAM_ERROR,it=j.Z_DATA_ERROR,st=j.Z_BUF_ERROR,_t=j.Z_DEFAULT_COMPRESSION,ht=j.Z_FILTERED,lt=j.Z_HUFFMAN_ONLY,ot=j.Z_RLE,dt=j.Z_FIXED,ut=j.Z_DEFAULT_STRATEGY,ft=j.Z_UNKNOWN,ct=j.Z_DEFLATED,pt=258,gt=262,vt=103,wt=113,bt=666,mt=function(t,e){return t.msg=P[e],e},yt=function(t){return(t<<1)-(t>4?9:0)},kt=function(t){for(var e=t.length;--e>=0;)t[e]=0},zt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},At=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},xt=function(t,e){W(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,At(t.strm)},Et=function(t,e){t.pending_buf[t.pending++]=e},Zt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},St=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-gt?t.strstart-(t.w_size-gt):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+pt,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=pt-(u-i),i=u-pt,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Ut=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-gt)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=H(s.adler,_,o,h):2===s.state.wrap&&(s.adler=K(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=zt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=zt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<gt&&0!==t.strm.avail_in)},Rt=function(t,e){for(var a,n;;){if(t.lookahead<gt){if(Ut(t),t.lookahead<gt&&e===J)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-gt&&(t.match_length=St(t,a)),t.match_length>=3)if(n=$(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=zt(t,t.ins_h,t.window[t.strstart+1]);else n=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2},Lt=function(t,e){for(var a,n,r;;){if(t.lookahead<gt){if(Ut(t),t.lookahead<gt&&e===J)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-gt&&(t.match_length=St(t,a),t.match_length<=5&&(t.strategy===ht||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=$(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=zt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(xt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=$(t,0,t.window[t.strstart-1]))&&xt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=$(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2};function Ft(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Tt=[new Ft(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ut(t),0===t.lookahead&&e===J)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,xt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-gt&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(xt(t,!1),t.strm.avail_out),1)})),new Ft(4,4,8,4,Rt),new Ft(4,5,16,8,Rt),new Ft(4,6,32,32,Rt),new Ft(4,4,16,16,Lt),new Ft(8,16,32,32,Lt),new Ft(8,16,128,128,Lt),new Ft(8,32,128,256,Lt),new Ft(32,128,258,1024,Lt),new Ft(32,258,258,4096,Lt)];function It(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kt(this.dyn_ltree),kt(this.dyn_dtree),kt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ot=function(t){if(!t||!t.state)return mt(t,rt);t.total_in=t.total_out=0,t.data_type=ft;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=J,G(e),at},Nt=function(t){var e,a=Ot(t);return a===at&&((e=t.state).window_size=2*e.w_size,kt(e.head),e.max_lazy_match=Tt[e.level].max_lazy,e.good_match=Tt[e.level].good_length,e.nice_match=Tt[e.level].nice_length,e.max_chain_length=Tt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Dt=function(t,e,a,n,r,i){if(!t)return rt;var s=1;if(e===_t&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ct||n<8||n>15||e<0||e>9||i<0||i>dt)return mt(t,rt);8===n&&(n=9);var _=new It;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,Nt(t)},Ct={deflateInit:function(t,e){return Dt(t,e,ct,15,8,ut)},deflateInit2:Dt,deflateReset:Nt,deflateResetKeep:Ot,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?rt:(t.state.gzhead=e,at):rt},deflate:function(t,e){var a,n;if(!t||!t.state||e>et||e<0)return t?mt(t,rt):rt;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===bt&&e!==tt)return mt(t,0===t.avail_out?st:rt);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Et(r,31),Et(r,139),Et(r,8),r.gzhead?(Et(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Et(r,255&r.gzhead.time),Et(r,r.gzhead.time>>8&255),Et(r,r.gzhead.time>>16&255),Et(r,r.gzhead.time>>24&255),Et(r,9===r.level?2:r.strategy>=lt||r.level<2?4:0),Et(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Et(r,255&r.gzhead.extra.length),Et(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=K(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Et(r,0),Et(r,0),Et(r,0),Et(r,0),Et(r,0),Et(r,9===r.level?2:r.strategy>=lt||r.level<2?4:0),Et(r,3),r.status=wt);else{var s=ct+(r.w_bits-8<<4)<<8;s|=(r.strategy>=lt||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=wt,Zt(r,s),0!==r.strstart&&(Zt(r,t.adler>>>16),Zt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending!==r.pending_buf_size));)Et(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Et(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),At(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Et(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=K(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=vt)}else r.status=vt;if(r.status===vt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&At(t),r.pending+2<=r.pending_buf_size&&(Et(r,255&t.adler),Et(r,t.adler>>8&255),t.adler=0,r.status=wt)):r.status=wt),0!==r.pending){if(At(t),0===t.avail_out)return r.last_flush=-1,at}else if(0===t.avail_in&&yt(e)<=yt(i)&&e!==tt)return mt(t,st);if(r.status===bt&&0!==t.avail_in)return mt(t,st);if(0!==t.avail_in||0!==r.lookahead||e!==J&&r.status!==bt){var _=r.strategy===lt?function(t,e){for(var a;;){if(0===t.lookahead&&(Ut(t),0===t.lookahead)){if(e===J)return 1;break}if(t.match_length=0,a=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ot?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=pt){if(Ut(t),t.lookahead<=pt&&e===J)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+pt;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=pt-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=$(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=$(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(xt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(xt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Tt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=bt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),at;if(2===_&&(e===Q?q(r):e!==et&&(X(r,0,0,!1),e===V&&(kt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),At(t),0===t.avail_out))return r.last_flush=-1,at}return e!==tt?at:r.wrap<=0?nt:(2===r.wrap?(Et(r,255&t.adler),Et(r,t.adler>>8&255),Et(r,t.adler>>16&255),Et(r,t.adler>>24&255),Et(r,255&t.total_in),Et(r,t.total_in>>8&255),Et(r,t.total_in>>16&255),Et(r,t.total_in>>24&255)):(Zt(r,t.adler>>>16),Zt(r,65535&t.adler)),At(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?at:nt)},deflateEnd:function(t){if(!t||!t.state)return rt;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==vt&&e!==wt&&e!==bt?mt(t,rt):(t.state=null,e===wt?mt(t,it):at)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return rt;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return rt;if(1===r&&(t.adler=H(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(kt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Ut(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=zt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Ut(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,at},deflateInfo:"pako deflate (from Nodeca project)"};for(var Mt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Mt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Mt[254]=Mt[254]=1;var Ht=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Yt=Object.prototype.toString,Kt=j.Z_NO_FLUSH,Pt=j.Z_SYNC_FLUSH,jt=j.Z_FULL_FLUSH,Gt=j.Z_FINISH,Xt=j.Z_OK,Wt=j.Z_STREAM_END,$t=j.Z_DEFAULT_COMPRESSION,qt=j.Z_DEFAULT_STRATEGY,Jt=j.Z_DEFLATED;function Qt(){this.options={level:$t,method:Jt,chunkSize:16384,windowBits:15,memLevel:8,strategy:qt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ht,this.strm.avail_out=0;var e=Ct.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==Xt)throw new Error(P[e]);if(t.header&&Ct.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Yt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ct.deflateSetDictionary(this.strm,a))!==Xt)throw new Error(P[e]);this._dict_set=!0}}function Vt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function te(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Qt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Gt:Kt,"[object ArrayBuffer]"===Yt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Pt||n===jt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ct.deflate(r,n))===Wt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ct.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Xt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Qt.prototype.onData=function(t){this.chunks.push(t)},Qt.prototype.onEnd=function(t){t===Xt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(t){void 0===t&&(t=self);try{var e=new Map;t.addEventListener("message",(function(n){try{var r=function(t,e){switch(e.action){case"init":return{type:"initialized",version:"3.1.2"};case"write":var n=t.get(e.streamId);n||(n=new Qt,t.set(e.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(e.data);return n.push(i,j.Z_SYNC_FLUSH),{type:"wrote",id:e.id,streamId:e.streamId,result:a(n.chunks.slice(r)),trailer:te(n),additionalBytesCount:i.length};case"reset":t.delete(e.streamId)}}(e,n.data);r&&t.postMessage(r)}catch(e){Vt(t,e,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(e){Vt(t,e)}}()}();'])))}var Cu={Nil:0,Loading:1,Error:2,Initialized:3},Ou={status:Cu.Nil};function Iu(t,e){switch(void 0===e&&(e=Tu),Ou.status===Cu.Nil&&function(t){void 0===t&&(t=Tu);try{var e=t();je(e,"error",xu),je(e,"message",(function(t){var e,n=t.data;"errored"===n.type?xu(n.error,n.streamId):"initialized"===n.type&&(e=n.version,Ou.status===Cu.Loading&&(Ou={status:Cu.Initialized,worker:Ou.worker,version:e}))})),e.postMessage({action:"init"}),d(Ru,Su),Ou={status:Cu.Loading,worker:e,initializationFailureCallbacks:[]}}catch(t){xu(t)}}(e),Ou.status){case Cu.Loading:return Ou.initializationFailureCallbacks.push(t),Ou.worker;case Cu.Initialized:return Ou.worker}}function Au(){return Ou.status}function Ru(){Ou.status===Cu.Loading&&(n.error("Session Replay recording failed to start: a timeout occurred while initializing the Worker"),Ou.initializationFailureCallbacks.forEach((function(t){t()})),Ou={status:Cu.Error})}function xu(t,e){var r;Ou.status===Cu.Loading?(n.error("Session Replay recording failed to start: an error occurred while creating the Worker:",t),t instanceof Event||t instanceof Error&&(kt(r=t.message,"Content Security Policy")||kt(r,"requires 'TrustedScriptURL'"))?n.error("Please make sure CSP is correctly configured !!!"):fi(t),Ou.status===Cu.Loading&&Ou.initializationFailureCallbacks.forEach((function(t){t()})),Ou={status:Cu.Error}):fi(t,{worker_version:Ou.status===Cu.Initialized&&Ou.version,stream_id:e})}var ku=0,Nu=1,Lu=2,Du=3;var Mu,Pu,Uu,Bu,Fu=function(t,e){var n=new He;if(Kr()||"function"!=typeof Array.from||"function"!=typeof CSSSupportsRule||"function"!=typeof URL.createObjectURL||!("forEach"in NodeList.prototype))return{start:it,stop:it,getReplayStats:function(){},onRumStart:it,isRecording:function(){return!1},recorderStartObservable:n};var r={status:ku},i=function(){r={status:Nu}},o=function(){r={status:ku}};return{start:function(){i()},stop:function(){o()},recorderStartObservable:n,getReplayStats:function(t){return Au()===Cu.Initialized?function(t){return du&&du.get(t)}(t):void 0},onRumStart:function(a,s,u,c){a.subscribe(an.SESSION_EXPIRED,(function(){r.status!==Lu&&r.status!==Du||(o(),r={status:Nu})})),a.subscribe(an.SESSION_RENEWED,(function(){r.status===Nu&&i()})),i=function(){var i=u.findTrackedSession();i&&i.sessionReplayAllowed?r.status!==Lu&&r.status!==Du&&(r={status:Lu},qn("interactive",(function(){if(r.status===Lu&&r.status===Lu){var i=Iu((function(){o()}),e);if(i){var l=t(a,s,u,c,wu(i,bu));n.notify(yt()),r={status:Du,stopRecording:l.stop}}else r={status:ku}}}))):r={status:Nu}},o=function(){r.status!==ku&&(r.status===Du&&r.stopRecording(),r={status:ku})},r.status===Nu&&i()},isRecording:function(){return r.status===Du}}}((function(t,e,n,r,i,o){var a=o||Mr(e.sessionReplayEndPoint,gu,(function(e){t.notify(an.RAW_ERROR_COLLECTED,{error:e}),li("Error reported to customer",{"error.message":e.message})})),s=yu(t,e,n,r,a,i),u=s.addRecord,c=s.stop,l=cu({emit:u,configuration:e,lifeCycle:t}),f=l.stop,d=l.takeSubsequentFullSnapshot,p=l.flushMutations,h=t.subscribe(an.VIEW_ENDED,(function(){p(),u({timestamp:bt(),type:Ga.ViewEnd})})),v=t.subscribe(an.VIEW_CREATED,(function(t){d(t.startClocks.timeStamp)}));return{stop:function(){h.unsubscribe(),v.unsubscribe(),f(),c()}}})),Vu=function(t,e){var r=!1,i=Xr(Yr),s=Xr(qr),u=function(){},c=function(){},l=function(){},f=new zt,d=function(t,e){void 0===e&&(e=bt()),f.add((function(){return d(t,e)}))},p=function(t,e){void 0===e&&(e=Et()),f.add((function(){return p(t,e)}))},h=function(t,n){void 0===n&&(n=jo(i,s,e)),f.add((function(){return h(t,n)}))},v=function(t,n){void 0===n&&(n=jo(i,s,e)),f.add((function(){return v(t,n)}))};function _(n,r){if(n.storeContextsToLocal){var o=i.getContext();(i=ei("rum",Yr)).setContext(A(i.getContext(),o));var a=s.getContext();(s=ei("rum",qr)).setContext(A(s.getContext(),a))}var c=t(n,e,i,s,r);p=c.startView,h=c.addAction,v=c.addError,d=c.addTiming,u=c.getInternalContext,l=c.stopSession,f.drain(),e.onRumStart(c.lifeCycle,n,c.session,c.viewContexts)}var m,g,y=a((function(t){p("object"==typeof t?t:{name:t})}));return m={init:a((function(t){if(c=function(){return nt(t)},Kr()&&(t=function(t){return C({},t,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",sessionSampleRate:100})}(t)),function(t){return function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{var e="dd_cookie_test_".concat(q()),n="test";return wn(e,n,ct,t),Sn(e)===n}catch(t){return!1}}(Nn(t))?"file:"!==window.location.protocol||(n.error("Execution is not allowed in the current context."),!1):(n.warn("Cookies are not authorized, we will not send any data."),!1)}(t)&&function(t){return!r||(t.silentMultipleInit||n.error("DATAFLUX_RUM is already initialized."),!1)}(t)){var e=$a(t);if(e){if(e.trackViewsManually){var i=f;f=new zt,p=function(t){_(e,t)},i.drain()}else _(e);r=!0}}})),addRumGlobalContext:a((function(t,e){return i.add(t,e)})),setGlobalContextProperty:a((function(t,e){return i.setContextProperty(t,e)})),removeRumGlobalContext:a((function(t){return i.remove(t)})),removeGlobalContextProperty:a((function(t){return i.removeContextProperty(t)})),getRumGlobalContext:a((function(){return i.get()})),getGlobalContext:a((function(){return i.getContext()})),setRumGlobalContext:a((function(t){return i.set(t)})),setGlobalContext:a((function(t){return i.setContext(t)})),clearGlobalContext:a((function(){return i.clearContext()})),getInitConfiguration:a((function(){return c()})),getInternalContext:a((function(t){return u(t)})),addDebugSession:a((function(t){})),clearDebugSession:a((function(){})),getDebugSession:a((function(){})),addAction:a((function(t,e){h({name:t,context:nt(e),startClocks:Et(),type:te.CUSTOM})})),addError:a((function(t,e){var n=ke();v({error:t,handlingStack:n,context:nt(e),startClocks:Et()})})),addTiming:a((function(t,e){d(t,e)})),setUser:a((function(t){(function(t){var e="object"===tt(t);return e||n.error("Unsupported user:",t),e})(t)&&s.setContext(ni(t))})),getUser:a((function(){return s.getContext()})),setUserProperty:a((function(t,e){var n={};n[t]=e;var r=ni(n)[t];s.setContextProperty(t,r)})),removeUserProperty:a((function(t){return s.removeContextProperty(t)})),removeUser:a((function(){return s.clearContext()})),clearUser:a((function(){return s.clearContext()})),startView:y,stopSession:a((function(){l()})),startSessionReplayRecording:a(e.start),stopSessionReplayRecording:a(e.stop)},g=C({onReady:function(t){t()}},m),Object.defineProperty(g,"_setDebug",{get:function(){return o},enumerable:!1}),g}((function(t,e,n,r,i){var o=new sn,s=function(t){const e=ci(si.RUM,t);return e}(t);s.setContextProvider((function(){return{application:{id:t.applicationId},session:{id:f.findTrackedSession()&&f.findTrackedSession().id},view:{id:_.findView()&&_.findView().id},action:{id:g.findActionId(),ids:g.findAllActionId()}}}));var u,c=function(t){o.notify(an.RAW_ERROR_COLLECTED,{error:t})},l=u=new He((function(){var t=Ge(document,[Xt.VISIBILITY_CHANGE,Xt.FREEZE,Xt.PAGE_HIDE],(function(t){t.type===Xt.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?u.notify({reason:Wn.HIDDEN}):t.type===Xt.FREEZE&&u.notify({reason:Wn.FROZEN})}),{capture:!0}),e=je(window,Xt.BEFORE_UNLOAD,(function(){u.notify({reason:Wn.UNLOADING})}));return function(){t.stop(),e.stop()}}));l.subscribe((function(t){o.notify(an.PAGE_EXITED,t)}));var f=Kr()?function(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",plan:vi.WITHOUT_SESSION_REPLAY,sessionReplayAllowed:!1};return{findTrackedSession:function(){return t},expire:it,expireObservable:new He}}():mi(t,o);if(Kr())!function(t){var e=Gr();t.subscribe(an.RUM_EVENT_COLLECTED,(function(t){var n=zr(t).rowData;e.send("rum",n)}))}(o);else Mo(t,o,s.observable,c,l,f.expireObservable);var d=function(t){var e=Sn(yi);return e||(e=q(),wn(yi,e,Ei,t.cookieOptions)),{getId:function(){return e}}}(t),p=function(){var t=Bi(),e=new He(a((function(){if(t){var n=new t((function(){return e.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}})));return e}(),h=Fi(location),v=function(t,e,n,r,i,o,a,s,u){var c=function(t){var e=new Kt($o);return t.subscribe(an.VIEW_CREATED,(function(t){e.add(function(t){return{service:t.service,version:t.version,id:t.id,name:t.name}}(t),t.startClocks.relative)})),t.subscribe(an.VIEW_ENDED,(function(t){e.closeActive(t.endClocks.relative)})),t.subscribe(an.SESSION_RENEWED,(function(){e.reset()})),{findView:function(t){return e.find(t)},stop:function(){e.stop()}}}(t),l=function(t,e,n){var r,i=new Kt(Wo);t.subscribe(an.VIEW_ENDED,(function(t){i.closeActive(t.endClocks.relative)})),t.subscribe(an.VIEW_CREATED,(function(t){var e=n.href;i.add(a({url:e,location:n,referrer:r||document.referrer}),t.startClocks.relative),r=e}));var o=e.subscribe((function(t){var e=i.find();if(e){var n=yt();i.closeActive(n),i.add(a({url:t.newLocation.href,location:t.newLocation,referrer:e.referrer}),n)}}));function a(t){var e=t.location.pathname,n=t.location.hash;return"/"===e&&n&&!Ft(n)&&(e="/"+Vt(n)),{url:t.url,referrer:t.referrer,host:t.location.host,path:e,pathGroup:Y(e),urlQuery:de(X(t.location.href))}}return{findUrl:function(t){return i.find(t)},stop:function(){o.unsubscribe(),i.stop()}}}(t,o,n),f=Qo(),d=function(t,e,n,r){t.subscribe(an.AUTO_ACTION_COMPLETED,(function(e){t.notify(an.RAW_RUM_EVENT_COLLECTED,Lo(e,r))}));var i={findActionId:it,findAllActionId:it};return n.trackUserInteractions&&(i=Ao(t,e,n).actionContexts),{actionContexts:i,addAction:function(e,n){t.notify(an.RAW_RUM_EVENT_COLLECTED,I({savedCommonContext:n},Lo(e,r)))}}}(t,a,e,f),p=d.actionContexts,h=d.addAction;return zo(e,t,r,i,c,l,p,s,u),{viewContexts:c,urlContexts:l,pageStateHistory:f,addAction:h,actionContexts:p,stop:function(){c.stop(),f.stop()}}}(o,t,location,f,d,h,p,(function(){return jo(n,r,e)}),c),_=v.viewContexts,m=v.urlContexts,g=v.actionContexts,y=v.pageStateHistory,E=v.addAction;!function(t,e){t.subscribe(an.PERFORMANCE_ENTRIES_COLLECTED,(function(n){for(var r=0;r<n.length;r++){var i=n[r];if("longtask"!==i.entryType)return;if(!e.findTrackedSession(i.startTime))break;var o=Ct(i.startTime),a={date:o.timeStamp,long_task:{id:q(),duration:_t(i.duration)},type:ne.LONG_TASK};t.notify(an.RAW_RUM_EVENT_COLLECTED,{rawRumEvent:a,startTime:o.relative,domainContext:{performanceEntry:i.toJSON()}})}}))}(o,f),Fa(o,t);var b=Ea(o,t,location,p,h,y,e,i),w=b.addTiming,S=b.startView,T=Jo(o,0,y).addError;Ma(o,t,f),Mi(o,t);var C=function(t,e,n,r,i){return{get:function(o){var a=n.findView(o),s=i.findUrl(o),u=e.findTrackedSession(o);if(u&&a&&s){var c=r.findActionId(o),l=r.findAllActionId(o);return{application:{id:t},session:{id:u.id},userAction:c?{id:c,ids:l}:void 0,view:{id:a.id,name:a.name,url:s.url,referrer:s.referrer,host:s.host,path:s.path,pathGroup:s.pathGroup,urlQuery:s.urlQuery}}}}}}(t.applicationId,f,_,g,m);return{addAction:E,addError:T,addTiming:w,configuration:t,lifeCycle:o,viewContexts:_,session:f,startView:S,stopSession:function(){f.expire()},getInternalContext:C.get}}),Fu);Mu=f(),Uu=Vu,Bu=Mu[Pu="DATAFLUX_RUM"],Mu[Pu]=Uu,Bu&&Bu.q&&T(Bu.q,(function(t){c(t,"onReady callback threw an error:")()}))}();